@@ -34,11 +34,10 @@ declare function unistBuilder<T extends string>(
3434 * @param props additional properties for node
3535 * @param value value property of node
3636 */
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
4241
4342/**
4443 * Creates a node, with type and children
@@ -58,21 +57,21 @@ declare function unistBuilder<T extends string, C extends Node[]>(
5857 * @param props additional properties for node
5958 * @param children child nodes of the current node
6059 */
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
6665
6766/**
6867 * Creates a node, with type and props
6968 *
7069 * @param type type of node
7170 * @param props additional properties for node
7271 */
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
7776
7877export = unistBuilder
0 commit comments