File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ export namespace JSON {
43
43
* @param data T
44
44
* @returns string
45
45
*/
46
- export function stringify < T extends Nullable | null > ( data : T , out : string | null = null ) : string {
46
+ export function stringify < T > ( data : T , out : string | null = null ) : string {
47
47
if ( isBoolean < T > ( data ) ) {
48
48
if ( out ) {
49
49
if ( < bool > data == true ) {
@@ -57,6 +57,13 @@ export namespace JSON {
57
57
return out ;
58
58
}
59
59
return out ? "true" : "false" ;
60
+ } else if ( isInteger < T > ( ) && nameof < T > ( ) == "usize" && data == 0 ) {
61
+ if ( out ) {
62
+ out = changetype < string > ( __renew ( changetype < usize > ( out ) , 8 ) ) ;
63
+ store < u64 > ( changetype < usize > ( out ) , 30399761348886638 ) ;
64
+ return out ;
65
+ }
66
+ return NULL_WORD ;
60
67
} else if ( isInteger < T > ( data ) ) {
61
68
if ( out ) {
62
69
out = changetype < string > ( __renew ( changetype < usize > ( out ) , sizeof < T > ( ) << 3 ) ) ;
You can’t perform that action at this time.
0 commit comments