-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
Line 1066 in 7f1df6e
| stringify(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; |
Line 1073 in 7f1df6e
| stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string; |
The signature of this functions are not correct. If passing undefined as an argument this function can return undefined.
On the above definitions the return type is always type string.
see mdn:
undefined, Functions, and Symbols are not valid JSON values. If any such values are encountered during conversion they are either omitted (when found in an object) or changed to null (when found in an array). JSON.stringify() can return undefined when passing in "pure" values like JSON.stringify(function(){}) or JSON.stringify(undefined).
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created