Skip to content

Commit 6c11e84

Browse files
committed
use unknown instead of object as default for ScriptSuccess<> and ScriptResponse<>
1 parent 698da0d commit 6c11e84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

env.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type Replace<A, B> = Omit<A, keyof B> & B
2-
type ScriptSuccess<T = object> = { ok: true } & T
2+
type ScriptSuccess<T = unknown> = { ok: true } & T
33
type ScriptFailure = { ok: false, msg?: string }
4-
type ScriptResponse<T = object> = ScriptSuccess<T> | ScriptFailure
4+
type ScriptResponse<T = unknown> = ScriptSuccess<T> | ScriptFailure
55
type ErrorScripts = Record<string, () => ScriptFailure>
66
type Scriptor<TArgs extends any[] = any[]> = { name: string, call: (...args: TArgs) => unknown }
77

0 commit comments

Comments
 (0)