Closed
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
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;
}
}