mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-01 04:53:43 +00:00
feat: Utils to do bindLan and have ipv4 and ipv6 if need be
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import { GenericManifest } from "../manifest/ManifestTypes";
|
||||
import { AutoConfig, AutoConfigFrom } from "./AutoConfig";
|
||||
import { GenericManifest } from "../manifest/ManifestTypes"
|
||||
import { AutoConfig, AutoConfigFrom } from "./AutoConfig"
|
||||
|
||||
export function setupAutoConfig<
|
||||
WD,
|
||||
Input,
|
||||
Manifest extends GenericManifest,
|
||||
NestedConfigs extends {
|
||||
[key in keyof Manifest["dependencies"]]: unknown;
|
||||
[key in keyof Manifest["dependencies"]]: unknown
|
||||
},
|
||||
>(configs: AutoConfigFrom<WD, Input, NestedConfigs>) {
|
||||
type C = typeof configs;
|
||||
type C = typeof configs
|
||||
const answer = { ...configs } as unknown as {
|
||||
[k in keyof C]: AutoConfig<WD, Input, NestedConfigs>;
|
||||
};
|
||||
[k in keyof C]: AutoConfig<WD, Input, NestedConfigs>
|
||||
}
|
||||
for (const key in configs) {
|
||||
answer[key as keyof typeof configs] = new AutoConfig<
|
||||
WD,
|
||||
Input,
|
||||
NestedConfigs
|
||||
>(configs, key as keyof typeof configs);
|
||||
>(configs, key as keyof typeof configs)
|
||||
}
|
||||
return answer;
|
||||
return answer
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user