mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 09:24:19 -06:00
Merge branch 'release-1.5'
This commit is contained in:
commit
7b5550725a
@ -35052,6 +35052,12 @@ var ts;
|
||||
var newSourceFile = ts.updateSourceFile(sourceFile, newText, textChangeRange, aggressiveChecks);
|
||||
setSourceFileFields(newSourceFile, scriptSnapshot, version);
|
||||
newSourceFile.nameTable = undefined;
|
||||
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
||||
if (sourceFile.scriptSnapshot.dispose) {
|
||||
sourceFile.scriptSnapshot.dispose();
|
||||
}
|
||||
sourceFile.scriptSnapshot = undefined;
|
||||
}
|
||||
return newSourceFile;
|
||||
}
|
||||
}
|
||||
|
||||
2
bin/typescript.d.ts
vendored
2
bin/typescript.d.ts
vendored
@ -1591,6 +1591,8 @@ declare module "typescript" {
|
||||
* not happen and the entire document will be re - parsed.
|
||||
*/
|
||||
getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange;
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
|
||||
@ -41389,6 +41389,13 @@ var ts;
|
||||
// after incremental parsing nameTable might not be up-to-date
|
||||
// drop it so it can be lazily recreated later
|
||||
newSourceFile.nameTable = undefined;
|
||||
// dispose all resources held by old script snapshot
|
||||
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
||||
if (sourceFile.scriptSnapshot.dispose) {
|
||||
sourceFile.scriptSnapshot.dispose();
|
||||
}
|
||||
sourceFile.scriptSnapshot = undefined;
|
||||
}
|
||||
return newSourceFile;
|
||||
}
|
||||
}
|
||||
@ -46760,6 +46767,13 @@ var ts;
|
||||
var decoded = JSON.parse(encoded);
|
||||
return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength);
|
||||
};
|
||||
ScriptSnapshotShimAdapter.prototype.dispose = function () {
|
||||
// if scriptSnapshotShim is a COM object then property check becomes method call with no arguments
|
||||
// 'in' does not have this effect
|
||||
if ("dispose" in this.scriptSnapshotShim) {
|
||||
this.scriptSnapshotShim.dispose();
|
||||
}
|
||||
};
|
||||
return ScriptSnapshotShimAdapter;
|
||||
})();
|
||||
var LanguageServiceShimHostAdapter = (function () {
|
||||
|
||||
2
bin/typescriptServices.d.ts
vendored
2
bin/typescriptServices.d.ts
vendored
@ -1591,6 +1591,8 @@ declare namespace ts {
|
||||
* not happen and the entire document will be re - parsed.
|
||||
*/
|
||||
getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange;
|
||||
/** Releases all resources held by this script snapshot */
|
||||
dispose?(): void;
|
||||
}
|
||||
module ScriptSnapshot {
|
||||
function fromString(text: string): IScriptSnapshot;
|
||||
|
||||
@ -41389,6 +41389,13 @@ var ts;
|
||||
// after incremental parsing nameTable might not be up-to-date
|
||||
// drop it so it can be lazily recreated later
|
||||
newSourceFile.nameTable = undefined;
|
||||
// dispose all resources held by old script snapshot
|
||||
if (sourceFile !== newSourceFile && sourceFile.scriptSnapshot) {
|
||||
if (sourceFile.scriptSnapshot.dispose) {
|
||||
sourceFile.scriptSnapshot.dispose();
|
||||
}
|
||||
sourceFile.scriptSnapshot = undefined;
|
||||
}
|
||||
return newSourceFile;
|
||||
}
|
||||
}
|
||||
@ -46760,6 +46767,13 @@ var ts;
|
||||
var decoded = JSON.parse(encoded);
|
||||
return ts.createTextChangeRange(ts.createTextSpan(decoded.span.start, decoded.span.length), decoded.newLength);
|
||||
};
|
||||
ScriptSnapshotShimAdapter.prototype.dispose = function () {
|
||||
// if scriptSnapshotShim is a COM object then property check becomes method call with no arguments
|
||||
// 'in' does not have this effect
|
||||
if ("dispose" in this.scriptSnapshotShim) {
|
||||
this.scriptSnapshotShim.dispose();
|
||||
}
|
||||
};
|
||||
return ScriptSnapshotShimAdapter;
|
||||
})();
|
||||
var LanguageServiceShimHostAdapter = (function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user