Fix definition of ts.Iterator
This commit is contained in:
parent
573768aaf5
commit
54e54f4f19
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -1346,9 +1346,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"base64-js": {
|
"base64-js": {
|
||||||
"version": "1.5.0",
|
"version": "1.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
|
||||||
"integrity": "sha512-Jrdy04F2EKcNggUDfubMUPNAZg2vMquLQSm8sKLYJvz40ClFL1S8GKyDshGkNsbNNE5Z+fQavzU7nSK1I9JUGA==",
|
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"before-after-hook": {
|
"before-after-hook": {
|
||||||
|
|
|
@ -88,7 +88,7 @@ namespace ts {
|
||||||
|
|
||||||
/** ES6 Iterator type. */
|
/** ES6 Iterator type. */
|
||||||
export interface Iterator<T> {
|
export interface Iterator<T> {
|
||||||
next(): { value: T, done?: false } | { value: never, done: true };
|
next(): { value: T, done?: false } | { value: void, done: true };
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Array that is only intended to be pushed to, never read. */
|
/** Array that is only intended to be pushed to, never read. */
|
||||||
|
|
|
@ -621,8 +621,9 @@ namespace ts {
|
||||||
const invokeMap = new Map<Path, string[]>();
|
const invokeMap = new Map<Path, string[]>();
|
||||||
|
|
||||||
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
while (!timerToUpdateChildWatches && cacheToUpdateChildWatches.size) {
|
||||||
const { value: [dirPath, { dirName, options, fileNames }], done } = cacheToUpdateChildWatches.entries().next();
|
const result = cacheToUpdateChildWatches.entries().next();
|
||||||
Debug.assert(!done);
|
Debug.assert(!result.done);
|
||||||
|
const { value: [dirPath, { dirName, options, fileNames }] } = result;
|
||||||
cacheToUpdateChildWatches.delete(dirPath);
|
cacheToUpdateChildWatches.delete(dirPath);
|
||||||
// Because the child refresh is fresh, we would need to invalidate whole root directory being watched
|
// Because the child refresh is fresh, we would need to invalidate whole root directory being watched
|
||||||
// to ensure that all the changes are reflected at this time
|
// to ensure that all the changes are reflected at this time
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace ts {
|
||||||
|
|
||||||
type IteratorResultShim<T> =
|
type IteratorResultShim<T> =
|
||||||
| { value: T, done?: false }
|
| { value: T, done?: false }
|
||||||
| { value: never, done: true };
|
| { value: void, done: true };
|
||||||
|
|
||||||
interface IteratorShim<T> {
|
interface IteratorShim<T> {
|
||||||
next(): IteratorResultShim<T>;
|
next(): IteratorResultShim<T>;
|
||||||
|
|
|
@ -189,8 +189,9 @@ interface Symbol {
|
||||||
export function generateSourceMapBaselineFiles(sys: System & { writtenFiles: ReadonlyCollection<string>; }) {
|
export function generateSourceMapBaselineFiles(sys: System & { writtenFiles: ReadonlyCollection<string>; }) {
|
||||||
const mapFileNames = mapDefinedIterator(sys.writtenFiles.keys(), f => f.endsWith(".map") ? f : undefined);
|
const mapFileNames = mapDefinedIterator(sys.writtenFiles.keys(), f => f.endsWith(".map") ? f : undefined);
|
||||||
while (true) {
|
while (true) {
|
||||||
const { value: mapFile, done } = mapFileNames.next();
|
const result = mapFileNames.next();
|
||||||
if (done) break;
|
if (result.done) break;
|
||||||
|
const mapFile = result.value;
|
||||||
const text = Harness.SourceMapRecorder.getSourceMapRecordWithSystem(sys, mapFile);
|
const text = Harness.SourceMapRecorder.getSourceMapRecordWithSystem(sys, mapFile);
|
||||||
sys.writeFile(`${mapFile}.baseline.txt`, text);
|
sys.writeFile(`${mapFile}.baseline.txt`, text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ declare namespace ts {
|
||||||
value: T;
|
value: T;
|
||||||
done?: false;
|
done?: false;
|
||||||
} | {
|
} | {
|
||||||
value: never;
|
value: void;
|
||||||
done: true;
|
done: true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ declare namespace ts {
|
||||||
value: T;
|
value: T;
|
||||||
done?: false;
|
done?: false;
|
||||||
} | {
|
} | {
|
||||||
value: never;
|
value: void;
|
||||||
done: true;
|
done: true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue