-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptAwaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Search Terms
disableIncrementalParsing
Suggestion
Right now disabling incremental parsing is done via the public api like so:
ts.disableIncrementalParsing = true;
TypeScript/lib/typescript.d.ts
Line 5882 in 196c0aa
let disableIncrementalParsing: boolean; |
This means that if someone sets this to true it will mess with anyone else that depends on it.
It would be nice if this was made non-global.
Workaround
function doWithIncrementalParsing(action: () => void) {
const oldValue = ts.disableIncrementalParsing;
ts.disableIncrementalParsing = false;
try {
action();
} finally {
ts.disableIncrementalParsing = oldValue;
}
}
Metadata
Metadata
Assignees
Labels
APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptAwaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript