node: Set "lib" to "es5" (#15093)

This commit is contained in:
Andy 2017-03-09 21:25:49 -08:00 committed by Mohamed Hegazy
parent 743e9958ff
commit 1aad431d7d
3 changed files with 14 additions and 3 deletions

11
node/index.d.ts vendored
View File

@ -40,6 +40,17 @@ interface WeakMapConstructor { }
interface SetConstructor { }
interface WeakSetConstructor { }
// Forward-declare needed types from lib.es2015.d.ts (in case users are using `--lib es5`)
interface Iterable<T> {}
interface Iterator<T> {
next(value?: any): IteratorResult<T>;
}
interface IteratorResult<T> {}
interface SymbolConstructor {
readonly iterator: symbol;
}
declare var Symbol: SymbolConstructor;
/************************************************
* *
* GLOBAL *

View File

@ -520,7 +520,7 @@ function stream_readable_pipe_test() {
assert(typeof r.bytesRead === 'number');
assert(typeof r.path === 'string');
assert(typeof rs.path === 'Buffer');
assert(rs.path instanceof Buffer);
r.pipe(z).pipe(w);
@ -2159,7 +2159,7 @@ namespace v8_tests {
const heapStats = v8.getHeapStatistics();
const heapSpaceStats = v8.getHeapSpaceStatistics();
const zapsGarbage: number = heapStats.does_zap_garbage;
v8.setFlagsFromString('--collect_maps');

View File

@ -6,7 +6,7 @@
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
"es5"
],
"noImplicitAny": true,
"noImplicitThis": true,