- Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version:
nightly (1.9.0-dev.20160521.01)
Code
Currently JSON.stringify is defined as:
stringify(value: any): string; stringify(value: any, replacer: (key: string, value: any) => any): string; stringify(value: any, replacer: any[]): string; stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string; stringify(value: any, replacer: any[], space: string | number): string;which makes it impossible to provide space argument without replacer if strictNullChecks is on:
JSON.stringify(value, undefined, 2)Perhaps, another signature can be added or replacer can be made | undefined?
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue