Skip to content

Commit 763e88d

Browse files
committed
TW: document JSONSerializable edge cases
1 parent 903bcbf commit 763e88d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

types/scratch-vm.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ declare namespace VM {
9494
serializeAssets(): ScratchStorage.Asset[];
9595
deserialize(json: unknown, zip?: JSZip, keepExisting?: boolean): Promise<void>;
9696
}
97-
// https://github.com/microsoft/TypeScript/pull/33050#issue-484549713
97+
/**
98+
* Note that behavior of Infinity, -Infinity, and NaN is undefined.
99+
* Implementation based on https://github.com/microsoft/TypeScript/pull/33050#issue-484549713
100+
*/
98101
type JSONSerializable = string | number | boolean | null | JSONSerializable[] | { [key: string]: JSONSerializable };
99102
/**
100103
* Maps extension ID to arbitrary data storage.

0 commit comments

Comments
 (0)