-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this
Description
TypeScript Version: nightly
Expected behavior:
The typescriptServices.d.ts file signature for getChangeRange in the IScriptSnapshot interface should allow implementations to return undefined - as mentioned in its accompanying comment:
interface IScriptSnapshot {
// [...omitted...]
/**
* Gets the TextChangeRange that describe how the text changed between this text and
* an older version. This information is used by the incremental parser to determine
* what sections of the script need to be re-parsed. 'undefined' can be returned if the
* change range cannot be determined. However, in that case, incremental parsing will
* not happen and the entire document will be re - parsed.
*/
getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange | undefined;
// [...omitted...]
}
Actual behavior:
It currently does not :-)
interface IScriptSnapshot {
// [...omitted...]
/**
* Gets the TextChangeRange that describe how the text changed between this text and
* an older version. This information is used by the incremental parser to determine
* what sections of the script need to be re-parsed. 'undefined' can be returned if the
* change range cannot be determined. However, in that case, incremental parsing will
* not happen and the entire document will be re - parsed.
*/
getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange;
// [...omitted...]
}
I may be missing something however so apologies if I'm off the mark here!
Cheers.
Metadata
Metadata
Assignees
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueHelp WantedYou can do thisYou can do this