diff --git a/env.d.ts b/env.d.ts index 3667826..7892a96 100644 --- a/env.d.ts +++ b/env.d.ts @@ -3,13 +3,7 @@ type ScriptSuccess = { ok: true } & T type ScriptFailure = { ok: false, msg?: string } type ScriptResponse = ScriptSuccess | ScriptFailure type ErrorScripts = Record ScriptFailure> - -type AllOptional = { [K in keyof T]-?: {} extends Pick ? true : false }[keyof T] - -type Scriptor = { - name: string - call: AllOptional extends true ? (args?: Args) => Ret : (args: Args) => Ret -} +type Scriptor = { name: string, call: (...args: TArgs) => unknown } type Subscripts = Record any>> & { accts: ErrorScripts