diff --git a/lib/config/builder/config.ts b/lib/config/builder/config.ts index 5671176..5b2d3ec 100644 --- a/lib/config/builder/config.ts +++ b/lib/config/builder/config.ts @@ -18,7 +18,7 @@ export type ExtractConfigType | Config | Config ? B : A -export type TypeAsConfigOf, WD> = { +export type TypeAsConfigOf, WD = never> = { [K in keyof A]: Value } @@ -82,7 +82,7 @@ export const addNodesSpec = Config.of({ hostname: hostname, port: port }); export class Config, WD> { private constructor( private readonly spec: { - [K in keyof Type]: Value + [K in keyof Type]: Value | Value }, public validator: Parser, ) {} @@ -91,7 +91,7 @@ export class Config, WD> { [K in keyof Type]: ValueSpec } for (const k in this.spec) { - answer[k] = await this.spec[k].build(options) + answer[k] = await this.spec[k].build(options as any) } return answer } @@ -117,7 +117,7 @@ export class Config, WD> { { [K in keyof Spec]: Spec[K] extends Value ? WD : never }[keyof Spec] - >(spec as any, validator as any) + >(spec, validator as any) } /** diff --git a/lib/config/constants.ts b/lib/config/constants.ts index f287811..b2e5601 100644 --- a/lib/config/constants.ts +++ b/lib/config/constants.ts @@ -14,7 +14,7 @@ export const smtpConfig = Value.union( system: { name: "System Credentials", spec: Config.of({}) }, custom: { name: "Custom Credentials", - spec: Config.of>({ + spec: Config.of>({ server: Value.text({ name: "SMTP Server", required: { diff --git a/lib/emverLite/mod.ts b/lib/emverLite/mod.ts index 2e6346e..f672613 100644 --- a/lib/emverLite/mod.ts +++ b/lib/emverLite/mod.ts @@ -65,7 +65,7 @@ export class EmVer { * Or an already made emver * IsUnsafe */ - static from(range: ValidEmVer | EmVer): EmVer { + static from(range: string | EmVer): EmVer { if (range instanceof EmVer) { return range } diff --git a/lib/manifest/ManifestTypes.ts b/lib/manifest/ManifestTypes.ts index 97cfb68..4ee09fc 100644 --- a/lib/manifest/ManifestTypes.ts +++ b/lib/manifest/ManifestTypes.ts @@ -1,4 +1,4 @@ -import { ValidEmVer, ValidEmVerRange } from "../emverLite/mod" +import { ValidEmVer } from "../emverLite/mod" import { ActionMetaData } from "../types" export interface Container { @@ -70,7 +70,7 @@ export interface Dependency { /** The range of versions that would satisfy the dependency * ie: >=3.4.5 && <4.0.0 */ - version: ValidEmVerRange + version: string /** * A human readable explanation on what the dependency is used for */