Skip to content

Commit 836202b

Browse files
authored
Fixes Draft type definition (#33)
1 parent b437552 commit 836202b

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

typeTemplates/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Draft } from "immer";
2+
13
export type Primitives = symbol | string | number | boolean | null | undefined;
24
export type ObjectAndPrimitives = Primitives | object;
35
type KeyType = string | number | symbol;
@@ -338,9 +340,9 @@ export function transformObjectDeep(
338340
export function truncate(string: string, length: number): string;
339341
export function _truncate(string: NilOr<string>, length: number): NilOr<string>;
340342

341-
export function nullSafe<T extends Function>(
343+
export function nullSafe<T extends (...args: any) => any>(
342344
func: T
343-
): (...args: any) => ReturnType<T>;
345+
): (...args: Parameters<T>) => ReturnType<T>;
344346

345347
export function isNotPresent(object: any): boolean;
346348
export function isPresent(object: any): boolean;

0 commit comments

Comments
 (0)