@@ -66,15 +66,15 @@ declare module 'prismarine-nbt'{
66
66
/** @deprecated */
67
67
export function parse ( data : Buffer , callback : ( err : Error | null , value : NBT ) => any ) : void ;
68
68
69
- export function short < T extends number > ( val : T ) : { type : 'short' , value : T }
70
- export function byte < T extends number > ( val : T ) : { type : 'byte' , value : T }
71
- export function string < T extends string > ( val : T ) : { type : 'string' , value : T }
72
- export function comp < T extends object > ( val : T ) : { type : 'compound' , value : T }
73
- export function int < T extends number > ( val : T ) : { type : 'int' , value : T }
74
- export function list < T extends string , K extends { type : T } > ( ... value : K [ ] ) : { type : 'list' ; value : { type : T | 'end' , value : K [ ] } } ;
75
- export function double < T extends number > ( value : T ) : { type : 'double' , value : T }
69
+ export function short < T extends number | number [ ] > ( val : T ) : { type : 'short' , value : T }
70
+ export function byte < T extends number | number [ ] > ( val : T ) : { type : 'byte' , value : T }
71
+ export function string < T extends string | string [ ] > ( val : T ) : { type : 'string' , value : T }
72
+ export function comp < T extends object | object [ ] > ( val : T , name ?: string ) : { type : 'compound' , name , value : T }
73
+ export function int < T extends number | number [ ] > ( val : T ) : { type : 'int' , value : T }
74
+ export function list < T extends string , K extends { type : T } > ( value : K ) : { type : 'list' ; value : { type : T | 'end' , value : K } } ;
75
+ export function double < T extends number | number [ ] > ( value : T ) : { type : 'double' , value : T }
76
76
/**
77
77
* @param value Takes a BigInt or an array of two 32-bit integers
78
78
*/
79
- export function long < T extends number | BigInt > ( value : T [ ] | T ) : { type : 'long' , value : T [ ] | T }
79
+ export function long < T extends number | number [ ] | number [ number [ ] ] | BigInt | BigInt [ ] > ( value : T ) : { type : 'long' , value : T }
80
80
}
0 commit comments