@@ -34,11 +34,10 @@ declare function unistBuilder<T extends string>(
34
34
* @param props additional properties for node
35
35
* @param value value property of node
36
36
*/
37
- declare function unistBuilder < T extends string , P extends { } > (
38
- type : T ,
39
- props : P ,
40
- value : string
41
- ) : { type : T ; value : string } & P
37
+ declare function unistBuilder <
38
+ T extends string ,
39
+ P extends Record < string , unknown >
40
+ > ( type : T , props : P , value : string ) : { type : T ; value : string } & P
42
41
43
42
/**
44
43
* Creates a node, with type and children
@@ -58,21 +57,21 @@ declare function unistBuilder<T extends string, C extends Node[]>(
58
57
* @param props additional properties for node
59
58
* @param children child nodes of the current node
60
59
*/
61
- declare function unistBuilder < T extends string , P extends { } , C extends Node [ ] > (
62
- type : T ,
63
- props : P ,
64
- children : C
65
- ) : { type : T ; children : C } & P
60
+ declare function unistBuilder <
61
+ T extends string ,
62
+ P extends Record < string , unknown > ,
63
+ C extends Node [ ]
64
+ > ( type : T , props : P , children : C ) : { type : T ; children : C } & P
66
65
67
66
/**
68
67
* Creates a node, with type and props
69
68
*
70
69
* @param type type of node
71
70
* @param props additional properties for node
72
71
*/
73
- declare function unistBuilder < T extends string , P extends { } > (
74
- type : T ,
75
- props : P
76
- ) : { type : T } & P
72
+ declare function unistBuilder <
73
+ T extends string ,
74
+ P extends Record < string , unknown >
75
+ > ( type : T , props : P ) : { type : T } & P
77
76
78
77
export = unistBuilder
0 commit comments