From 90d1caa3ce132fa78cf7491d9589085598ac33d3 Mon Sep 17 00:00:00 2001 From: BluJ Date: Tue, 9 May 2023 14:15:49 -0600 Subject: [PATCH] chore: Update the build to ensure the correct shape --- lib/StartSdk.ts | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/StartSdk.ts b/lib/StartSdk.ts index d1d3d81..7b0333a 100644 --- a/lib/StartSdk.ts +++ b/lib/StartSdk.ts @@ -48,7 +48,6 @@ import { setupMain } from "./mainFn" import { defaultTrigger } from "./trigger/defaultTrigger" import { changeOnFirstSuccess, cooldownTrigger } from "./trigger" import setupConfig, { Read, Save } from "./config/setupConfig" -export type SdkBuilt = StartSdk["build"] // prettier-ignore type AnyNeverCond = @@ -59,12 +58,6 @@ type AnyNeverCond = export class StartSdk { private constructor() {} - private anyOf( - a: A, - ): AnyNeverCond<[Manifest, Store], "Build not ready", A> { - return a as any - } - static of() { return new StartSdk() } @@ -75,8 +68,8 @@ export class StartSdk { return new StartSdk() } - build() { - return this.anyOf({ + build(isReady: AnyNeverCond<[Manifest, Store], "Build not ready", true>) { + return { AutoConfig: ( configs: AutoConfigFrom, path: keyof AutoConfigFrom, @@ -416,6 +409,6 @@ export class StartSdk { a: VariantValues, ) => Variants.of(a), }, - }) + } } }