From a894f8ad2b0ff35b1bcfd91defba994136c68b18 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 12 Jan 2021 06:43:39 +0000 Subject: [PATCH 01/92] Update package-lock.json --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7813e79bd79f4..72f3b28b3ffd8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1743,9 +1743,9 @@ "dev": true }, "call-bind": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.1.tgz", - "integrity": "sha512-tvAvUwNcRikl3RVF20X9lsYmmepsovzTWeJiXjO0PkJp15uy/6xKFZOQtuiSULwYW+6ToZBprphCgWXC2dSgcQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, "requires": { "function-bind": "^1.1.1", From a276a6dce74b8d9d31b5e04b2509cb4ed6f5fcb8 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Tue, 12 Jan 2021 20:59:08 +0200 Subject: [PATCH 02/92] feat(31388): allow binding elements starting with an underscore (#41378) --- src/compiler/checker.ts | 15 +- ...sWithUnderscoreInBindingElement.errors.txt | 145 +++++++ ...VariablesWithUnderscoreInBindingElement.js | 136 +++++++ ...blesWithUnderscoreInBindingElement.symbols | 279 +++++++++++++ ...iablesWithUnderscoreInBindingElement.types | 378 ++++++++++++++++++ ...iablesWithUnderscoreInForOfLoop.errors.txt | 56 +++ ...nusedVariablesWithUnderscoreInForOfLoop.js | 43 +- ...VariablesWithUnderscoreInForOfLoop.symbols | 37 +- ...edVariablesWithUnderscoreInForOfLoop.types | 67 +++- ...ablesWithUnderscoreInForOfLoop1.errors.txt | 23 -- ...usedVariablesWithUnderscoreInForOfLoop1.js | 22 - ...ariablesWithUnderscoreInForOfLoop1.symbols | 17 - ...dVariablesWithUnderscoreInForOfLoop1.types | 29 -- ...VariablesWithUnderscoreInBindingElement.ts | 90 +++++ ...nusedVariablesWithUnderscoreInForOfLoop.ts | 21 +- ...usedVariablesWithUnderscoreInForOfLoop1.ts | 9 - 16 files changed, 1253 insertions(+), 114 deletions(-) create mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.errors.txt create mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.js create mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.symbols create mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.types create mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.errors.txt delete mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.errors.txt delete mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.js delete mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.symbols delete mode 100644 tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.types create mode 100644 tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts delete mode 100644 tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 10f8dc923b88f..ff603646905d9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -33839,13 +33839,16 @@ namespace ts { } function isValidUnusedLocalDeclaration(declaration: Declaration): boolean { - if (isBindingElement(declaration) && isIdentifierThatStartsWithUnderscore(declaration.name)) { - return !!findAncestor(declaration.parent, ancestor => - isArrayBindingPattern(ancestor) || isVariableDeclaration(ancestor) || isVariableDeclarationList(ancestor) ? false : - isForOfStatement(ancestor) ? true : "quit" - ); + if (isBindingElement(declaration)) { + if (isObjectBindingPattern(declaration.parent)) { + /** + * ignore starts with underscore names _ + * const { a: _a } = { a: 1 } + */ + return !!(declaration.propertyName && isIdentifierThatStartsWithUnderscore(declaration.name)); + } + return isIdentifierThatStartsWithUnderscore(declaration.name); } - return isAmbientModule(declaration) || (isVariableDeclaration(declaration) && isForInOrOfStatement(declaration.parent.parent) || isImportedDeclaration(declaration)) && isIdentifierThatStartsWithUnderscore(declaration.name!); } diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.errors.txt b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.errors.txt new file mode 100644 index 0000000000000..58eccaee1e8f5 --- /dev/null +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.errors.txt @@ -0,0 +1,145 @@ +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(12,17): error TS6133: 'b1' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(13,12): error TS6133: 'a2' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(14,12): error TS6133: 'a3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(14,16): error TS6133: 'b3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(23,12): error TS6133: 'a3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(23,18): error TS6133: 'b3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(23,22): error TS6133: 'c3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(23,28): error TS6133: 'd3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(23,32): error TS6133: 'e3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(37,22): error TS6133: 'b1' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(38,13): error TS6133: 'a2' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(39,11): error TS6198: All destructured elements are unused. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(68,9): error TS6133: 'a3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(70,18): error TS6198: All destructured elements are unused. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(74,9): error TS6133: 'c3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(75,9): error TS6133: 'd3' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts(81,11): error TS6198: All destructured elements are unused. + + +==== tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts (17 errors) ==== + function t1() { + const [_a1, b1] = [1, 2]; + console.log(b1); + + const [a2, _b2] = [1, 2]; + console.log(a2); + + const [_a3, _b3] = [1, 2]; + } + + function t2() { + const [_a1, b1] = [1, 2]; + ~~ +!!! error TS6133: 'b1' is declared but its value is never read. + const [a2, _b2] = [1, 2]; + ~~ +!!! error TS6133: 'a2' is declared but its value is never read. + const [a3, b3] = [1, 2]; + ~~ +!!! error TS6133: 'a3' is declared but its value is never read. + ~~ +!!! error TS6133: 'b3' is declared but its value is never read. + } + + function t3() { + const [_a1, [[_b1, c1]], d1, _e1] = [1, [[2, 3]], 4, 5]; + console.log(c1, d1); + + const [_a2, [[_b2, _c2]], _d2, _e2] = [1, [[2, 3]], 4, 5]; + + const [a3, [[b3, c3]], d3, e3] = [1, [[2, 3]], 4, 5]; + ~~ +!!! error TS6133: 'a3' is declared but its value is never read. + ~~ +!!! error TS6133: 'b3' is declared but its value is never read. + ~~ +!!! error TS6133: 'c3' is declared but its value is never read. + ~~ +!!! error TS6133: 'd3' is declared but its value is never read. + ~~ +!!! error TS6133: 'e3' is declared but its value is never read. + } + + function t4() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + console.log(b1); + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + console.log(a2); + + const { a3: _a3, b3: _b3 } = { a3: 1, b3: 1 }; + } + + function t5() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + ~~ +!!! error TS6133: 'b1' is declared but its value is never read. + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + ~~ +!!! error TS6133: 'a2' is declared but its value is never read. + const { a3, b3 } = { a3: 1, b3: 1 }; + ~~~~~~~~~~ +!!! error TS6198: All destructured elements are unused. + } + + function t6() { + const { + a1: _a1, + b1: { + b11: { + b111: _b111, + b112 + } + }, + c1, + d1: _d1 + } = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }; + console.log(b112, c1); + + const { + a2: _a2, + b2: { + b21: { + b211: _b211, b212: _b212 + } + }, + c2: _c2, + d2: _d2 + } = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }; + + const { + a3, + ~~ +!!! error TS6133: 'a3' is declared but its value is never read. + b3: { + b31: { + ~ + b311, b312 + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~~~~~ +!!! error TS6198: All destructured elements are unused. + }, + c3, + ~~ +!!! error TS6133: 'c3' is declared but its value is never read. + d3 + ~~ +!!! error TS6133: 'd3' is declared but its value is never read. + } = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }; + } + + function t7() { + // error + const { _a1, _b1 } = { _a1: 1, _b1: 1 }; + ~~~~~~~~~~~~ +!!! error TS6198: All destructured elements are unused. + + // ok + const { a2: _a2, b2: _b2 } = { a2: 1, b2: 1 }; + + // ok + const { _a3: _ignoreA3, _b3: _ignoreB3 } = { _a3: 1, _b3: 1 }; + } + \ No newline at end of file diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.js b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.js new file mode 100644 index 0000000000000..6e6846f470a59 --- /dev/null +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.js @@ -0,0 +1,136 @@ +//// [unusedVariablesWithUnderscoreInBindingElement.ts] +function t1() { + const [_a1, b1] = [1, 2]; + console.log(b1); + + const [a2, _b2] = [1, 2]; + console.log(a2); + + const [_a3, _b3] = [1, 2]; +} + +function t2() { + const [_a1, b1] = [1, 2]; + const [a2, _b2] = [1, 2]; + const [a3, b3] = [1, 2]; +} + +function t3() { + const [_a1, [[_b1, c1]], d1, _e1] = [1, [[2, 3]], 4, 5]; + console.log(c1, d1); + + const [_a2, [[_b2, _c2]], _d2, _e2] = [1, [[2, 3]], 4, 5]; + + const [a3, [[b3, c3]], d3, e3] = [1, [[2, 3]], 4, 5]; +} + +function t4() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + console.log(b1); + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + console.log(a2); + + const { a3: _a3, b3: _b3 } = { a3: 1, b3: 1 }; +} + +function t5() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + const { a3, b3 } = { a3: 1, b3: 1 }; +} + +function t6() { + const { + a1: _a1, + b1: { + b11: { + b111: _b111, + b112 + } + }, + c1, + d1: _d1 + } = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }; + console.log(b112, c1); + + const { + a2: _a2, + b2: { + b21: { + b211: _b211, b212: _b212 + } + }, + c2: _c2, + d2: _d2 + } = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }; + + const { + a3, + b3: { + b31: { + b311, b312 + } + }, + c3, + d3 + } = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }; +} + +function t7() { + // error + const { _a1, _b1 } = { _a1: 1, _b1: 1 }; + + // ok + const { a2: _a2, b2: _b2 } = { a2: 1, b2: 1 }; + + // ok + const { _a3: _ignoreA3, _b3: _ignoreB3 } = { _a3: 1, _b3: 1 }; +} + + +//// [unusedVariablesWithUnderscoreInBindingElement.js] +function t1() { + var _a = [1, 2], _a1 = _a[0], b1 = _a[1]; + console.log(b1); + var _b = [1, 2], a2 = _b[0], _b2 = _b[1]; + console.log(a2); + var _c = [1, 2], _a3 = _c[0], _b3 = _c[1]; +} +function t2() { + var _a = [1, 2], _a1 = _a[0], b1 = _a[1]; + var _b = [1, 2], a2 = _b[0], _b2 = _b[1]; + var _c = [1, 2], a3 = _c[0], b3 = _c[1]; +} +function t3() { + var _a = [1, [[2, 3]], 4, 5], _a1 = _a[0], _b = _a[1][0], _b1 = _b[0], c1 = _b[1], d1 = _a[2], _e1 = _a[3]; + console.log(c1, d1); + var _c = [1, [[2, 3]], 4, 5], _a2 = _c[0], _d = _c[1][0], _b2 = _d[0], _c2 = _d[1], _d2 = _c[2], _e2 = _c[3]; + var _e = [1, [[2, 3]], 4, 5], a3 = _e[0], _f = _e[1][0], b3 = _f[0], c3 = _f[1], d3 = _e[2], e3 = _e[3]; +} +function t4() { + var _a = { a1: 1, b1: 1 }, _a1 = _a.a1, b1 = _a.b1; + console.log(b1); + var _b = { a2: 1, b2: 1 }, a2 = _b.a2, _b2 = _b.b2; + console.log(a2); + var _c = { a3: 1, b3: 1 }, _a3 = _c.a3, _b3 = _c.b3; +} +function t5() { + var _a = { a1: 1, b1: 1 }, _a1 = _a.a1, b1 = _a.b1; + var _b = { a2: 1, b2: 1 }, a2 = _b.a2, _b2 = _b.b2; + var _c = { a3: 1, b3: 1 }, a3 = _c.a3, b3 = _c.b3; +} +function t6() { + var _a = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }, _a1 = _a.a1, _b = _a.b1.b11, _b111 = _b.b111, b112 = _b.b112, c1 = _a.c1, _d1 = _a.d1; + console.log(b112, c1); + var _c = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }, _a2 = _c.a2, _d = _c.b2.b21, _b211 = _d.b211, _b212 = _d.b212, _c2 = _c.c2, _d2 = _c.d2; + var _e = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }, a3 = _e.a3, _f = _e.b3.b31, b311 = _f.b311, b312 = _f.b312, c3 = _e.c3, d3 = _e.d3; +} +function t7() { + // error + var _a = { _a1: 1, _b1: 1 }, _a1 = _a._a1, _b1 = _a._b1; + // ok + var _b = { a2: 1, b2: 1 }, _a2 = _b.a2, _b2 = _b.b2; + // ok + var _c = { _a3: 1, _b3: 1 }, _ignoreA3 = _c._a3, _ignoreB3 = _c._b3; +} diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.symbols b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.symbols new file mode 100644 index 0000000000000..0c5367a9ed64f --- /dev/null +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.symbols @@ -0,0 +1,279 @@ +=== tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts === +function t1() { +>t1 : Symbol(t1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 0, 0)) + + const [_a1, b1] = [1, 2]; +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 1, 11)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 1, 15)) + + console.log(b1); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 1, 15)) + + const [a2, _b2] = [1, 2]; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 4, 11)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 4, 14)) + + console.log(a2); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 4, 11)) + + const [_a3, _b3] = [1, 2]; +>_a3 : Symbol(_a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 7, 11)) +>_b3 : Symbol(_b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 7, 15)) +} + +function t2() { +>t2 : Symbol(t2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 8, 1)) + + const [_a1, b1] = [1, 2]; +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 11, 11)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 11, 15)) + + const [a2, _b2] = [1, 2]; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 12, 11)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 12, 14)) + + const [a3, b3] = [1, 2]; +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 13, 11)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 13, 14)) +} + +function t3() { +>t3 : Symbol(t3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 14, 1)) + + const [_a1, [[_b1, c1]], d1, _e1] = [1, [[2, 3]], 4, 5]; +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 11)) +>_b1 : Symbol(_b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 18)) +>c1 : Symbol(c1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 22)) +>d1 : Symbol(d1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 28)) +>_e1 : Symbol(_e1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 32)) + + console.log(c1, d1); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>c1 : Symbol(c1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 22)) +>d1 : Symbol(d1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 17, 28)) + + const [_a2, [[_b2, _c2]], _d2, _e2] = [1, [[2, 3]], 4, 5]; +>_a2 : Symbol(_a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 20, 11)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 20, 18)) +>_c2 : Symbol(_c2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 20, 22)) +>_d2 : Symbol(_d2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 20, 29)) +>_e2 : Symbol(_e2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 20, 34)) + + const [a3, [[b3, c3]], d3, e3] = [1, [[2, 3]], 4, 5]; +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 22, 11)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 22, 17)) +>c3 : Symbol(c3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 22, 20)) +>d3 : Symbol(d3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 22, 26)) +>e3 : Symbol(e3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 22, 30)) +} + +function t4() { +>t4 : Symbol(t4, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 23, 1)) + + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 29)) +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 11)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 20)) +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 29)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 36)) + + console.log(b1); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 26, 20)) + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 11)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 36)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 15)) +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 29)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 36)) + + console.log(a2); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 29, 11)) + + const { a3: _a3, b3: _b3 } = { a3: 1, b3: 1 }; +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 34)) +>_a3 : Symbol(_a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 11)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 41)) +>_b3 : Symbol(_b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 20)) +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 34)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 32, 41)) +} + +function t5() { +>t5 : Symbol(t5, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 33, 1)) + + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 36, 29)) +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 36, 11)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 36, 20)) +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 36, 29)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 36, 36)) + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 37, 11)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 37, 36)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 37, 15)) +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 37, 29)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 37, 36)) + + const { a3, b3 } = { a3: 1, b3: 1 }; +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 38, 11)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 38, 15)) +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 38, 24)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 38, 31)) +} + +function t6() { +>t6 : Symbol(t6, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 39, 1)) + + const { + a1: _a1, +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 9)) +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 42, 11)) + + b1: { +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 16)) + + b11: { +>b11 : Symbol(b11, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 22)) + + b111: _b111, +>b111 : Symbol(b111, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 29)) +>_b111 : Symbol(_b111, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 45, 18)) + + b112 +>b112 : Symbol(b112, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 46, 28)) + } + }, + c1, +>c1 : Symbol(c1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 49, 10)) + + d1: _d1 +>d1 : Symbol(d1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 58)) +>_d1 : Symbol(_d1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 50, 11)) + + } = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }; +>a1 : Symbol(a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 9)) +>b1 : Symbol(b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 16)) +>b11 : Symbol(b11, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 22)) +>b111 : Symbol(b111, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 29)) +>b112 : Symbol(b112, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 38)) +>c1 : Symbol(c1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 51)) +>d1 : Symbol(d1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 52, 58)) + + console.log(b112, c1); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>b112 : Symbol(b112, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 46, 28)) +>c1 : Symbol(c1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 49, 10)) + + const { + a2: _a2, +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 9)) +>_a2 : Symbol(_a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 55, 11)) + + b2: { +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 16)) + + b21: { +>b21 : Symbol(b21, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 22)) + + b211: _b211, b212: _b212 +>b211 : Symbol(b211, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 29)) +>_b211 : Symbol(_b211, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 58, 18)) +>b212 : Symbol(b212, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 38)) +>_b212 : Symbol(_b212, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 59, 28)) + } + }, + c2: _c2, +>c2 : Symbol(c2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 51)) +>_c2 : Symbol(_c2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 61, 10)) + + d2: _d2 +>d2 : Symbol(d2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 58)) +>_d2 : Symbol(_d2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 62, 16)) + + } = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 9)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 16)) +>b21 : Symbol(b21, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 22)) +>b211 : Symbol(b211, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 29)) +>b212 : Symbol(b212, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 38)) +>c2 : Symbol(c2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 51)) +>d2 : Symbol(d2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 64, 58)) + + const { + a3, +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 66, 11)) + + b3: { +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 16)) + + b31: { +>b31 : Symbol(b31, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 22)) + + b311, b312 +>b311 : Symbol(b311, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 69, 18)) +>b312 : Symbol(b312, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 70, 21)) + } + }, + c3, +>c3 : Symbol(c3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 72, 10)) + + d3 +>d3 : Symbol(d3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 73, 11)) + + } = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }; +>a3 : Symbol(a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 9)) +>b3 : Symbol(b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 16)) +>b31 : Symbol(b31, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 22)) +>b311 : Symbol(b311, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 29)) +>b312 : Symbol(b312, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 38)) +>c3 : Symbol(c3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 51)) +>d3 : Symbol(d3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 75, 58)) +} + +function t7() { +>t7 : Symbol(t7, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 76, 1)) + + // error + const { _a1, _b1 } = { _a1: 1, _b1: 1 }; +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 80, 11)) +>_b1 : Symbol(_b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 80, 16)) +>_a1 : Symbol(_a1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 80, 26)) +>_b1 : Symbol(_b1, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 80, 34)) + + // ok + const { a2: _a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 34)) +>_a2 : Symbol(_a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 11)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 41)) +>_b2 : Symbol(_b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 20)) +>a2 : Symbol(a2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 34)) +>b2 : Symbol(b2, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 83, 41)) + + // ok + const { _a3: _ignoreA3, _b3: _ignoreB3 } = { _a3: 1, _b3: 1 }; +>_a3 : Symbol(_a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 48)) +>_ignoreA3 : Symbol(_ignoreA3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 11)) +>_b3 : Symbol(_b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 56)) +>_ignoreB3 : Symbol(_ignoreB3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 27)) +>_a3 : Symbol(_a3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 48)) +>_b3 : Symbol(_b3, Decl(unusedVariablesWithUnderscoreInBindingElement.ts, 86, 56)) +} + diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.types b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.types new file mode 100644 index 0000000000000..d5d65c91af935 --- /dev/null +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInBindingElement.types @@ -0,0 +1,378 @@ +=== tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts === +function t1() { +>t1 : () => void + + const [_a1, b1] = [1, 2]; +>_a1 : number +>b1 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 + + console.log(b1); +>console.log(b1) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>b1 : number + + const [a2, _b2] = [1, 2]; +>a2 : number +>_b2 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 + + console.log(a2); +>console.log(a2) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>a2 : number + + const [_a3, _b3] = [1, 2]; +>_a3 : number +>_b3 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 +} + +function t2() { +>t2 : () => void + + const [_a1, b1] = [1, 2]; +>_a1 : number +>b1 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 + + const [a2, _b2] = [1, 2]; +>a2 : number +>_b2 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 + + const [a3, b3] = [1, 2]; +>a3 : number +>b3 : number +>[1, 2] : [number, number] +>1 : 1 +>2 : 2 +} + +function t3() { +>t3 : () => void + + const [_a1, [[_b1, c1]], d1, _e1] = [1, [[2, 3]], 4, 5]; +>_a1 : number +>_b1 : number +>c1 : number +>d1 : number +>_e1 : number +>[1, [[2, 3]], 4, 5] : [number, [[number, number]], number, number] +>1 : 1 +>[[2, 3]] : [[number, number]] +>[2, 3] : [number, number] +>2 : 2 +>3 : 3 +>4 : 4 +>5 : 5 + + console.log(c1, d1); +>console.log(c1, d1) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>c1 : number +>d1 : number + + const [_a2, [[_b2, _c2]], _d2, _e2] = [1, [[2, 3]], 4, 5]; +>_a2 : number +>_b2 : number +>_c2 : number +>_d2 : number +>_e2 : number +>[1, [[2, 3]], 4, 5] : [number, [[number, number]], number, number] +>1 : 1 +>[[2, 3]] : [[number, number]] +>[2, 3] : [number, number] +>2 : 2 +>3 : 3 +>4 : 4 +>5 : 5 + + const [a3, [[b3, c3]], d3, e3] = [1, [[2, 3]], 4, 5]; +>a3 : number +>b3 : number +>c3 : number +>d3 : number +>e3 : number +>[1, [[2, 3]], 4, 5] : [number, [[number, number]], number, number] +>1 : 1 +>[[2, 3]] : [[number, number]] +>[2, 3] : [number, number] +>2 : 2 +>3 : 3 +>4 : 4 +>5 : 5 +} + +function t4() { +>t4 : () => void + + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; +>a1 : any +>_a1 : number +>b1 : number +>{ a1: 1, b1: 1 } : { a1: number; b1: number; } +>a1 : number +>1 : 1 +>b1 : number +>1 : 1 + + console.log(b1); +>console.log(b1) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>b1 : number + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : number +>b2 : any +>_b2 : number +>{ a2: 1, b2: 1 } : { a2: number; b2: number; } +>a2 : number +>1 : 1 +>b2 : number +>1 : 1 + + console.log(a2); +>console.log(a2) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>a2 : number + + const { a3: _a3, b3: _b3 } = { a3: 1, b3: 1 }; +>a3 : any +>_a3 : number +>b3 : any +>_b3 : number +>{ a3: 1, b3: 1 } : { a3: number; b3: number; } +>a3 : number +>1 : 1 +>b3 : number +>1 : 1 +} + +function t5() { +>t5 : () => void + + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; +>a1 : any +>_a1 : number +>b1 : number +>{ a1: 1, b1: 1 } : { a1: number; b1: number; } +>a1 : number +>1 : 1 +>b1 : number +>1 : 1 + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : number +>b2 : any +>_b2 : number +>{ a2: 1, b2: 1 } : { a2: number; b2: number; } +>a2 : number +>1 : 1 +>b2 : number +>1 : 1 + + const { a3, b3 } = { a3: 1, b3: 1 }; +>a3 : number +>b3 : number +>{ a3: 1, b3: 1 } : { a3: number; b3: number; } +>a3 : number +>1 : 1 +>b3 : number +>1 : 1 +} + +function t6() { +>t6 : () => void + + const { + a1: _a1, +>a1 : any +>_a1 : number + + b1: { +>b1 : any + + b11: { +>b11 : any + + b111: _b111, +>b111 : any +>_b111 : number + + b112 +>b112 : number + } + }, + c1, +>c1 : number + + d1: _d1 +>d1 : any +>_d1 : number + + } = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }; +>{ a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 } : { a1: number; b1: { b11: { b111: number; b112: number; }; }; c1: number; d1: number; } +>a1 : number +>1 : 1 +>b1 : { b11: { b111: number; b112: number; }; } +>{ b11: { b111: 1, b112: 1 } } : { b11: { b111: number; b112: number; }; } +>b11 : { b111: number; b112: number; } +>{ b111: 1, b112: 1 } : { b111: number; b112: number; } +>b111 : number +>1 : 1 +>b112 : number +>1 : 1 +>c1 : number +>1 : 1 +>d1 : number +>1 : 1 + + console.log(b112, c1); +>console.log(b112, c1) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>b112 : number +>c1 : number + + const { + a2: _a2, +>a2 : any +>_a2 : number + + b2: { +>b2 : any + + b21: { +>b21 : any + + b211: _b211, b212: _b212 +>b211 : any +>_b211 : number +>b212 : any +>_b212 : number + } + }, + c2: _c2, +>c2 : any +>_c2 : number + + d2: _d2 +>d2 : any +>_d2 : number + + } = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }; +>{ a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 } : { a2: number; b2: { b21: { b211: number; b212: number; }; }; c2: number; d2: number; } +>a2 : number +>1 : 1 +>b2 : { b21: { b211: number; b212: number; }; } +>{ b21: { b211: 1, b212: 1 } } : { b21: { b211: number; b212: number; }; } +>b21 : { b211: number; b212: number; } +>{ b211: 1, b212: 1 } : { b211: number; b212: number; } +>b211 : number +>1 : 1 +>b212 : number +>1 : 1 +>c2 : number +>1 : 1 +>d2 : number +>1 : 1 + + const { + a3, +>a3 : number + + b3: { +>b3 : any + + b31: { +>b31 : any + + b311, b312 +>b311 : number +>b312 : number + } + }, + c3, +>c3 : number + + d3 +>d3 : number + + } = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }; +>{ a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 } : { a3: number; b3: { b31: { b311: number; b312: number; }; }; c3: number; d3: number; } +>a3 : number +>1 : 1 +>b3 : { b31: { b311: number; b312: number; }; } +>{ b31: { b311: 1, b312: 1 } } : { b31: { b311: number; b312: number; }; } +>b31 : { b311: number; b312: number; } +>{ b311: 1, b312: 1 } : { b311: number; b312: number; } +>b311 : number +>1 : 1 +>b312 : number +>1 : 1 +>c3 : number +>1 : 1 +>d3 : number +>1 : 1 +} + +function t7() { +>t7 : () => void + + // error + const { _a1, _b1 } = { _a1: 1, _b1: 1 }; +>_a1 : number +>_b1 : number +>{ _a1: 1, _b1: 1 } : { _a1: number; _b1: number; } +>_a1 : number +>1 : 1 +>_b1 : number +>1 : 1 + + // ok + const { a2: _a2, b2: _b2 } = { a2: 1, b2: 1 }; +>a2 : any +>_a2 : number +>b2 : any +>_b2 : number +>{ a2: 1, b2: 1 } : { a2: number; b2: number; } +>a2 : number +>1 : 1 +>b2 : number +>1 : 1 + + // ok + const { _a3: _ignoreA3, _b3: _ignoreB3 } = { _a3: 1, _b3: 1 }; +>_a3 : any +>_ignoreA3 : number +>_b3 : any +>_ignoreB3 : number +>{ _a3: 1, _b3: 1 } : { _a3: number; _b3: number; } +>_a3 : number +>1 : 1 +>_b3 : number +>1 : 1 +} + diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.errors.txt b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.errors.txt new file mode 100644 index 0000000000000..38476fd6c796a --- /dev/null +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.errors.txt @@ -0,0 +1,56 @@ +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(15,21): error TS6133: 'b' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(17,17): error TS6133: 'a' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(19,17): error TS6133: 'a' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(19,20): error TS6133: 'b' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(23,23): error TS6133: 'b' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(25,19): error TS6133: 'a' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(27,19): error TS6133: 'a' is declared but its value is never read. +tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts(27,22): error TS6133: 'b' is declared but its value is never read. + + +==== tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts (8 errors) ==== + function t1() { + for (const [_a, b] of [['key', 1]]) { + console.log(b); + } + + for (const [a, _b] of [['key', 1]]) { + console.log(a); + } + + for (const [_a, _b] of [['key', 1]]) {} + } + + + function t2() { + for (const [_a, b] of [['key', 1]]) {} + ~ +!!! error TS6133: 'b' is declared but its value is never read. + + for (const [a, _b] of [['key', 1]]) {} + ~ +!!! error TS6133: 'a' is declared but its value is never read. + + for (const [a, b] of [['key', 1]]) {} + ~ +!!! error TS6133: 'a' is declared but its value is never read. + ~ +!!! error TS6133: 'b' is declared but its value is never read. + } + + function t3() { + for (const [[[_a, b]]] of [[[['key', 1]]]]) {} + ~ +!!! error TS6133: 'b' is declared but its value is never read. + + for (const [[[a, _b]]] of [[[['key', 1]]]]) {} + ~ +!!! error TS6133: 'a' is declared but its value is never read. + + for (const [[[a, b]]] of [[[['key', 1]]]]) {} + ~ +!!! error TS6133: 'a' is declared but its value is never read. + ~ +!!! error TS6133: 'b' is declared but its value is never read. + } + \ No newline at end of file diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.js b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.js index 0c08ba841931f..3418db8795e79 100644 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.js +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.js @@ -1,5 +1,5 @@ //// [unusedVariablesWithUnderscoreInForOfLoop.ts] -function f() { +function t1() { for (const [_a, b] of [['key', 1]]) { console.log(b); } @@ -10,10 +10,27 @@ function f() { for (const [_a, _b] of [['key', 1]]) {} } + + +function t2() { + for (const [_a, b] of [['key', 1]]) {} + + for (const [a, _b] of [['key', 1]]) {} + + for (const [a, b] of [['key', 1]]) {} +} + +function t3() { + for (const [[[_a, b]]] of [[[['key', 1]]]]) {} + + for (const [[[a, _b]]] of [[[['key', 1]]]]) {} + + for (const [[[a, b]]] of [[[['key', 1]]]]) {} +} //// [unusedVariablesWithUnderscoreInForOfLoop.js] -function f() { +function t1() { for (var _i = 0, _c = [['key', 1]]; _i < _c.length; _i++) { var _d = _c[_i], _a = _d[0], b = _d[1]; console.log(b); @@ -26,3 +43,25 @@ function f() { var _k = _j[_h], _a = _k[0], _b = _k[1]; } } +function t2() { + for (var _i = 0, _c = [['key', 1]]; _i < _c.length; _i++) { + var _d = _c[_i], _a = _d[0], b = _d[1]; + } + for (var _e = 0, _f = [['key', 1]]; _e < _f.length; _e++) { + var _g = _f[_e], a = _g[0], _b = _g[1]; + } + for (var _h = 0, _j = [['key', 1]]; _h < _j.length; _h++) { + var _k = _j[_h], a = _k[0], b = _k[1]; + } +} +function t3() { + for (var _i = 0, _c = [[[['key', 1]]]]; _i < _c.length; _i++) { + var _d = _c[_i][0][0], _a = _d[0], b = _d[1]; + } + for (var _e = 0, _f = [[[['key', 1]]]]; _e < _f.length; _e++) { + var _g = _f[_e][0][0], a = _g[0], _b = _g[1]; + } + for (var _h = 0, _j = [[[['key', 1]]]]; _h < _j.length; _h++) { + var _k = _j[_h][0][0], a = _k[0], b = _k[1]; + } +} diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.symbols b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.symbols index d6c97536d3b4f..2bc45a8911a2f 100644 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.symbols +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.symbols @@ -1,6 +1,6 @@ === tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts === -function f() { ->f : Symbol(f, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 0, 0)) +function t1() { +>t1 : Symbol(t1, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 0, 0)) for (const [_a, b] of [['key', 1]]) { >_a : Symbol(_a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 1, 16)) @@ -29,3 +29,36 @@ function f() { >_b : Symbol(_b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 9, 19)) } + +function t2() { +>t2 : Symbol(t2, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 10, 1)) + + for (const [_a, b] of [['key', 1]]) {} +>_a : Symbol(_a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 14, 16)) +>b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 14, 19)) + + for (const [a, _b] of [['key', 1]]) {} +>a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 16, 16)) +>_b : Symbol(_b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 16, 18)) + + for (const [a, b] of [['key', 1]]) {} +>a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 18, 16)) +>b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 18, 18)) +} + +function t3() { +>t3 : Symbol(t3, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 19, 1)) + + for (const [[[_a, b]]] of [[[['key', 1]]]]) {} +>_a : Symbol(_a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 22, 18)) +>b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 22, 21)) + + for (const [[[a, _b]]] of [[[['key', 1]]]]) {} +>a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 24, 18)) +>_b : Symbol(_b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 24, 20)) + + for (const [[[a, b]]] of [[[['key', 1]]]]) {} +>a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 26, 18)) +>b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop.ts, 26, 20)) +} + diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.types b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.types index eb1ce0b0bbeae..b86d820a46b91 100644 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.types +++ b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop.types @@ -1,6 +1,6 @@ === tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts === -function f() { ->f : () => void +function t1() { +>t1 : () => void for (const [_a, b] of [['key', 1]]) { >_a : string | number @@ -43,3 +43,66 @@ function f() { >1 : 1 } + +function t2() { +>t2 : () => void + + for (const [_a, b] of [['key', 1]]) {} +>_a : string | number +>b : string | number +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 + + for (const [a, _b] of [['key', 1]]) {} +>a : string | number +>_b : string | number +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 + + for (const [a, b] of [['key', 1]]) {} +>a : string | number +>b : string | number +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 +} + +function t3() { +>t3 : () => void + + for (const [[[_a, b]]] of [[[['key', 1]]]]) {} +>_a : string | number +>b : string | number +>[[[['key', 1]]]] : (string | number)[][][][] +>[[['key', 1]]] : (string | number)[][][] +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 + + for (const [[[a, _b]]] of [[[['key', 1]]]]) {} +>a : string | number +>_b : string | number +>[[[['key', 1]]]] : (string | number)[][][][] +>[[['key', 1]]] : (string | number)[][][] +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 + + for (const [[[a, b]]] of [[[['key', 1]]]]) {} +>a : string | number +>b : string | number +>[[[['key', 1]]]] : (string | number)[][][][] +>[[['key', 1]]] : (string | number)[][][] +>[['key', 1]] : (string | number)[][] +>['key', 1] : (string | number)[] +>'key' : "key" +>1 : 1 +} + diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.errors.txt b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.errors.txt deleted file mode 100644 index fa8b7d9d55caf..0000000000000 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.errors.txt +++ /dev/null @@ -1,23 +0,0 @@ -tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts(2,21): error TS6133: 'b' is declared but its value is never read. -tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts(4,17): error TS6133: 'a' is declared but its value is never read. -tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts(6,17): error TS6133: 'a' is declared but its value is never read. -tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts(6,20): error TS6133: 'b' is declared but its value is never read. - - -==== tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts (4 errors) ==== - function f() { - for (const [_a, b] of [['key', 1]]) {} - ~ -!!! error TS6133: 'b' is declared but its value is never read. - - for (const [a, _b] of [['key', 1]]) {} - ~ -!!! error TS6133: 'a' is declared but its value is never read. - - for (const [a, b] of [['key', 1]]) {} - ~ -!!! error TS6133: 'a' is declared but its value is never read. - ~ -!!! error TS6133: 'b' is declared but its value is never read. - } - \ No newline at end of file diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.js b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.js deleted file mode 100644 index bb5ecbfe974c2..0000000000000 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.js +++ /dev/null @@ -1,22 +0,0 @@ -//// [unusedVariablesWithUnderscoreInForOfLoop1.ts] -function f() { - for (const [_a, b] of [['key', 1]]) {} - - for (const [a, _b] of [['key', 1]]) {} - - for (const [a, b] of [['key', 1]]) {} -} - - -//// [unusedVariablesWithUnderscoreInForOfLoop1.js] -function f() { - for (var _i = 0, _c = [['key', 1]]; _i < _c.length; _i++) { - var _d = _c[_i], _a = _d[0], b = _d[1]; - } - for (var _e = 0, _f = [['key', 1]]; _e < _f.length; _e++) { - var _g = _f[_e], a = _g[0], _b = _g[1]; - } - for (var _h = 0, _j = [['key', 1]]; _h < _j.length; _h++) { - var _k = _j[_h], a = _k[0], b = _k[1]; - } -} diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.symbols b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.symbols deleted file mode 100644 index b98293944afd4..0000000000000 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.symbols +++ /dev/null @@ -1,17 +0,0 @@ -=== tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts === -function f() { ->f : Symbol(f, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 0, 0)) - - for (const [_a, b] of [['key', 1]]) {} ->_a : Symbol(_a, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 1, 16)) ->b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 1, 19)) - - for (const [a, _b] of [['key', 1]]) {} ->a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 3, 16)) ->_b : Symbol(_b, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 3, 18)) - - for (const [a, b] of [['key', 1]]) {} ->a : Symbol(a, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 5, 16)) ->b : Symbol(b, Decl(unusedVariablesWithUnderscoreInForOfLoop1.ts, 5, 18)) -} - diff --git a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.types b/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.types deleted file mode 100644 index 100e87191482f..0000000000000 --- a/tests/baselines/reference/unusedVariablesWithUnderscoreInForOfLoop1.types +++ /dev/null @@ -1,29 +0,0 @@ -=== tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts === -function f() { ->f : () => void - - for (const [_a, b] of [['key', 1]]) {} ->_a : string | number ->b : string | number ->[['key', 1]] : (string | number)[][] ->['key', 1] : (string | number)[] ->'key' : "key" ->1 : 1 - - for (const [a, _b] of [['key', 1]]) {} ->a : string | number ->_b : string | number ->[['key', 1]] : (string | number)[][] ->['key', 1] : (string | number)[] ->'key' : "key" ->1 : 1 - - for (const [a, b] of [['key', 1]]) {} ->a : string | number ->b : string | number ->[['key', 1]] : (string | number)[][] ->['key', 1] : (string | number)[] ->'key' : "key" ->1 : 1 -} - diff --git a/tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts b/tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts new file mode 100644 index 0000000000000..23b732d51edb9 --- /dev/null +++ b/tests/cases/compiler/unusedVariablesWithUnderscoreInBindingElement.ts @@ -0,0 +1,90 @@ +// @noUnusedLocals: true + +function t1() { + const [_a1, b1] = [1, 2]; + console.log(b1); + + const [a2, _b2] = [1, 2]; + console.log(a2); + + const [_a3, _b3] = [1, 2]; +} + +function t2() { + const [_a1, b1] = [1, 2]; + const [a2, _b2] = [1, 2]; + const [a3, b3] = [1, 2]; +} + +function t3() { + const [_a1, [[_b1, c1]], d1, _e1] = [1, [[2, 3]], 4, 5]; + console.log(c1, d1); + + const [_a2, [[_b2, _c2]], _d2, _e2] = [1, [[2, 3]], 4, 5]; + + const [a3, [[b3, c3]], d3, e3] = [1, [[2, 3]], 4, 5]; +} + +function t4() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + console.log(b1); + + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + console.log(a2); + + const { a3: _a3, b3: _b3 } = { a3: 1, b3: 1 }; +} + +function t5() { + const { a1: _a1, b1 } = { a1: 1, b1: 1 }; + const { a2, b2: _b2 } = { a2: 1, b2: 1 }; + const { a3, b3 } = { a3: 1, b3: 1 }; +} + +function t6() { + const { + a1: _a1, + b1: { + b11: { + b111: _b111, + b112 + } + }, + c1, + d1: _d1 + } = { a1: 1, b1: { b11: { b111: 1, b112: 1 } }, c1: 1, d1: 1 }; + console.log(b112, c1); + + const { + a2: _a2, + b2: { + b21: { + b211: _b211, b212: _b212 + } + }, + c2: _c2, + d2: _d2 + } = { a2: 1, b2: { b21: { b211: 1, b212: 1 } }, c2: 1, d2: 1 }; + + const { + a3, + b3: { + b31: { + b311, b312 + } + }, + c3, + d3 + } = { a3: 1, b3: { b31: { b311: 1, b312: 1 } }, c3: 1, d3: 1 }; +} + +function t7() { + // error + const { _a1, _b1 } = { _a1: 1, _b1: 1 }; + + // ok + const { a2: _a2, b2: _b2 } = { a2: 1, b2: 1 }; + + // ok + const { _a3: _ignoreA3, _b3: _ignoreB3 } = { _a3: 1, _b3: 1 }; +} diff --git a/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts b/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts index 064e1971ead3d..0bd35321760d9 100644 --- a/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts +++ b/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop.ts @@ -1,6 +1,6 @@ -//@noUnusedLocals:true +// @noUnusedLocals: true -function f() { +function t1() { for (const [_a, b] of [['key', 1]]) { console.log(b); } @@ -11,3 +11,20 @@ function f() { for (const [_a, _b] of [['key', 1]]) {} } + + +function t2() { + for (const [_a, b] of [['key', 1]]) {} + + for (const [a, _b] of [['key', 1]]) {} + + for (const [a, b] of [['key', 1]]) {} +} + +function t3() { + for (const [[[_a, b]]] of [[[['key', 1]]]]) {} + + for (const [[[a, _b]]] of [[[['key', 1]]]]) {} + + for (const [[[a, b]]] of [[[['key', 1]]]]) {} +} diff --git a/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts b/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts deleted file mode 100644 index 0848f20d34a1d..0000000000000 --- a/tests/cases/compiler/unusedVariablesWithUnderscoreInForOfLoop1.ts +++ /dev/null @@ -1,9 +0,0 @@ -//@noUnusedLocals:true - -function f() { - for (const [_a, b] of [['key', 1]]) {} - - for (const [a, _b] of [['key', 1]]) {} - - for (const [a, b] of [['key', 1]]) {} -} From c3dd845923c34cf12cc00cc0787556c177607507 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 12 Jan 2021 12:59:52 -0800 Subject: [PATCH 03/92] Better detect when typical nondistributive conditionals need to be defered by unwrapping their check and extends types (#42248) --- src/compiler/checker.ts | 29 ++++++++++++++---- tests/baselines/reference/inferTypes1.types | 2 +- ...cursiveConditionalEvaluationNonInfinite.js | 10 +++++++ ...veConditionalEvaluationNonInfinite.symbols | 30 +++++++++++++++++++ ...siveConditionalEvaluationNonInfinite.types | 23 ++++++++++++++ .../reference/recursiveConditionalTypes.types | 2 +- ...cursiveConditionalEvaluationNonInfinite.ts | 5 ++++ 7 files changed, 93 insertions(+), 8 deletions(-) create mode 100644 tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.js create mode 100644 tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.symbols create mode 100644 tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types create mode 100644 tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ff603646905d9..b20e2b296bb2f 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14567,6 +14567,23 @@ namespace ts { return type; } + function isTypicalNondistributiveConditional(root: ConditionalRoot) { + return !root.isDistributive + && root.node.checkType.kind === SyntaxKind.TupleType + && length((root.node.checkType as TupleTypeNode).elements) === 1 + && root.node.extendsType.kind === SyntaxKind.TupleType + && length((root.node.extendsType as TupleTypeNode).elements) === 1; + } + + /** + * We syntactually check for common nondistributive conditional shapes and unwrap them into + * the intended comparison - we do this so we can check if the unwrapped types are generic or + * not and appropriately defer condition calculation + */ + function unwrapNondistributiveConditionalTuple(root: ConditionalRoot, type: Type) { + return isTypicalNondistributiveConditional(root) && isTupleType(type) ? getTypeArguments(type)[0] : type; + } + function getConditionalType(root: ConditionalRoot, mapper: TypeMapper | undefined, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[]): Type { let result; let extraTypes: Type[] | undefined; @@ -14574,9 +14591,9 @@ namespace ts { // types of the form 'A extends B ? X : C extends D ? Y : E extends F ? Z : ...' as a single construct for // purposes of resolution. This means such types aren't subject to the instatiation depth limiter. while (true) { - const checkType = instantiateType(root.checkType, mapper); + const checkType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.checkType), mapper); const checkTypeInstantiable = isGenericObjectType(checkType) || isGenericIndexType(checkType); - const extendsType = instantiateType(root.extendsType, mapper); + const extendsType = instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), mapper); if (checkType === wildcardType || extendsType === wildcardType) { return wildcardType; } @@ -14599,9 +14616,9 @@ namespace ts { // types with type parameters mapped to the wildcard type, the most permissive instantiations // possible (the wildcard type is assignable to and from all types). If those are not related, // then no instantiations will be and we can just return the false branch type. - if (!(inferredExtendsType.flags & TypeFlags.AnyOrUnknown) && (checkType.flags & TypeFlags.Any || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) { + if (!(inferredExtendsType.flags & TypeFlags.AnyOrUnknown) && ((checkType.flags & TypeFlags.Any && root.isDistributive) || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) { // Return union of trueType and falseType for 'any' since it matches anything - if (checkType.flags & TypeFlags.Any) { + if (checkType.flags & TypeFlags.Any && root.isDistributive) { (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper)); } // If falseType is an immediately nested conditional type that isn't distributive or has an @@ -14630,8 +14647,8 @@ namespace ts { // Return a deferred type for a check that is neither definitely true nor definitely false result = createType(TypeFlags.Conditional); result.root = root; - result.checkType = checkType; - result.extendsType = extendsType; + result.checkType = instantiateType(root.checkType, mapper); + result.extendsType = instantiateType(root.extendsType, mapper); result.mapper = mapper; result.combinedMapper = combinedMapper; result.aliasSymbol = aliasSymbol || root.aliasSymbol; diff --git a/tests/baselines/reference/inferTypes1.types b/tests/baselines/reference/inferTypes1.types index 86b0b145fb6b3..aa94569cb306a 100644 --- a/tests/baselines/reference/inferTypes1.types +++ b/tests/baselines/reference/inferTypes1.types @@ -257,7 +257,7 @@ type T61 = infer A extends infer B ? infer C : infer D; // Error >T61 : T61 type T62 = U extends (infer U)[] ? U : U; // Error ->T62 : any +>T62 : unknown type T63 = T extends (infer A extends infer B ? infer C : infer D) ? string : number; >T63 : T63 diff --git a/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.js b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.js new file mode 100644 index 0000000000000..748d607cf3b8d --- /dev/null +++ b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.js @@ -0,0 +1,10 @@ +//// [recursiveConditionalEvaluationNonInfinite.ts] +type Test = [T] extends [any[]] ? { array: Test } : { notArray: T }; +declare const x: Test; +const y: { array: { notArray: number } } = x; // Error +declare const a: Test; +const b: { notArray: number } = a; // Works + +//// [recursiveConditionalEvaluationNonInfinite.js] +var y = x; // Error +var b = a; // Works diff --git a/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.symbols b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.symbols new file mode 100644 index 0000000000000..12f1d367132d0 --- /dev/null +++ b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.symbols @@ -0,0 +1,30 @@ +=== tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts === +type Test = [T] extends [any[]] ? { array: Test } : { notArray: T }; +>Test : Symbol(Test, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 0)) +>T : Symbol(T, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 10)) +>T : Symbol(T, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 10)) +>array : Symbol(array, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 38)) +>Test : Symbol(Test, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 0)) +>T : Symbol(T, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 10)) +>notArray : Symbol(notArray, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 62)) +>T : Symbol(T, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 10)) + +declare const x: Test; +>x : Symbol(x, Decl(recursiveConditionalEvaluationNonInfinite.ts, 1, 13)) +>Test : Symbol(Test, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 0)) + +const y: { array: { notArray: number } } = x; // Error +>y : Symbol(y, Decl(recursiveConditionalEvaluationNonInfinite.ts, 2, 5)) +>array : Symbol(array, Decl(recursiveConditionalEvaluationNonInfinite.ts, 2, 10)) +>notArray : Symbol(notArray, Decl(recursiveConditionalEvaluationNonInfinite.ts, 2, 19)) +>x : Symbol(x, Decl(recursiveConditionalEvaluationNonInfinite.ts, 1, 13)) + +declare const a: Test; +>a : Symbol(a, Decl(recursiveConditionalEvaluationNonInfinite.ts, 3, 13)) +>Test : Symbol(Test, Decl(recursiveConditionalEvaluationNonInfinite.ts, 0, 0)) + +const b: { notArray: number } = a; // Works +>b : Symbol(b, Decl(recursiveConditionalEvaluationNonInfinite.ts, 4, 5)) +>notArray : Symbol(notArray, Decl(recursiveConditionalEvaluationNonInfinite.ts, 4, 10)) +>a : Symbol(a, Decl(recursiveConditionalEvaluationNonInfinite.ts, 3, 13)) + diff --git a/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types new file mode 100644 index 0000000000000..2a302606d632d --- /dev/null +++ b/tests/baselines/reference/recursiveConditionalEvaluationNonInfinite.types @@ -0,0 +1,23 @@ +=== tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts === +type Test = [T] extends [any[]] ? { array: Test } : { notArray: T }; +>Test : Test +>array : Test +>notArray : T + +declare const x: Test; +>x : { array: { notArray: number; }; } + +const y: { array: { notArray: number } } = x; // Error +>y : { array: { notArray: number;}; } +>array : { notArray: number; } +>notArray : number +>x : { array: { notArray: number; }; } + +declare const a: Test; +>a : { notArray: number; } + +const b: { notArray: number } = a; // Works +>b : { notArray: number; } +>notArray : number +>a : { notArray: number; } + diff --git a/tests/baselines/reference/recursiveConditionalTypes.types b/tests/baselines/reference/recursiveConditionalTypes.types index 651799b01cfb8..91ef74f541808 100644 --- a/tests/baselines/reference/recursiveConditionalTypes.types +++ b/tests/baselines/reference/recursiveConditionalTypes.types @@ -105,7 +105,7 @@ type TT3 = TupleOf; >TT3 : number[] type TT4 = TupleOf; // Depth error ->TT4 : any +>TT4 : [any, ...any[]] function f22(tn: TupleOf, tm: TupleOf) { >f22 : (tn: TupleOf, tm: TupleOf) => void diff --git a/tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts b/tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts new file mode 100644 index 0000000000000..e2630c584b518 --- /dev/null +++ b/tests/cases/compiler/recursiveConditionalEvaluationNonInfinite.ts @@ -0,0 +1,5 @@ +type Test = [T] extends [any[]] ? { array: Test } : { notArray: T }; +declare const x: Test; +const y: { array: { notArray: number } } = x; // Error +declare const a: Test; +const b: { notArray: number } = a; // Works \ No newline at end of file From 2f5863754fe42ce04ae35cfce14a455ac1b57a71 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Tue, 12 Jan 2021 13:15:54 -0800 Subject: [PATCH 04/92] Improve naming of hasNonBindableDynamicName (#42297) hasNonBindableDynamicName 1. Has 'non' in the name, and is only ever used negated. 2. Is true for a case that's not reflected correctly in the name -- it's true for non-dynamic names as well. I considered hasEarlyOrLateBindableName, but decided to use hasBindableName for now. --- src/compiler/checker.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b20e2b296bb2f..af8faea439c33 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8202,7 +8202,7 @@ namespace ts { if (isParameter(declaration)) { const func = declaration.parent; // For a parameter of a set accessor, use the type of the get accessor if one is present - if (func.kind === SyntaxKind.SetAccessor && !hasNonBindableDynamicName(func)) { + if (func.kind === SyntaxKind.SetAccessor && hasBindableName(func)) { const getter = getDeclarationOfKind(getSymbolOfNode(declaration.parent), SyntaxKind.GetAccessor); if (getter) { const getterSignature = getSignatureFromDeclaration(getter); @@ -9877,10 +9877,10 @@ namespace ts { } /** - * Indicates whether a declaration has a dynamic name that cannot be late-bound. + * Indicates whether a declaration has an early-bound name or a dynamic name that can be late-bound. */ - function hasNonBindableDynamicName(node: Declaration) { - return hasDynamicName(node) && !hasLateBindableName(node); + function hasBindableName(node: Declaration) { + return !hasDynamicName(node) || hasLateBindableName(node); } /** @@ -11827,7 +11827,7 @@ namespace ts { // If only one accessor includes a this-type annotation, the other behaves as if it had the same type annotation if ((declaration.kind === SyntaxKind.GetAccessor || declaration.kind === SyntaxKind.SetAccessor) && - !hasNonBindableDynamicName(declaration) && + hasBindableName(declaration) && (!hasThisParameter || !thisParameter)) { const otherKind = declaration.kind === SyntaxKind.GetAccessor ? SyntaxKind.SetAccessor : SyntaxKind.GetAccessor; const other = getDeclarationOfKind(getSymbolOfNode(declaration), otherKind); @@ -12051,7 +12051,7 @@ namespace ts { if (typeNode) { return getTypeFromTypeNode(typeNode); } - if (declaration.kind === SyntaxKind.GetAccessor && !hasNonBindableDynamicName(declaration)) { + if (declaration.kind === SyntaxKind.GetAccessor && hasBindableName(declaration)) { const jsDocType = isInJSFile(declaration) && getTypeForDeclarationFromJSDocComment(declaration); if (jsDocType) { return jsDocType; @@ -24414,7 +24414,7 @@ namespace ts { const objectLiteral = element.parent; const type = getApparentTypeOfContextualType(objectLiteral, contextFlags); if (type) { - if (!hasNonBindableDynamicName(element)) { + if (hasBindableName(element)) { // For a (non-symbol) computed property, there is no reason to look up the name // in the type. It will just be "__computed", which does not appear in any // SymbolTable. @@ -32305,7 +32305,7 @@ namespace ts { if (isPrivateIdentifier(node.name)) { error(node.name, Diagnostics.An_accessor_cannot_be_named_with_a_private_identifier); } - if (!hasNonBindableDynamicName(node)) { + if (hasBindableName(node)) { // TypeScript 1.0 spec (April 2014): 8.4.3 // Accessors for the same member name must specify the same accessibility. const otherKind = node.kind === SyntaxKind.GetAccessor ? SyntaxKind.SetAccessor : SyntaxKind.GetAccessor; @@ -33631,7 +33631,7 @@ namespace ts { checkComputedPropertyName(node.name); } - if (!hasNonBindableDynamicName(node)) { + if (hasBindableName(node)) { // first we want to check the local symbol that contain this declaration // - if node.localSymbol !== undefined - this is current declaration is exported and localSymbol points to the local symbol // - if node.localSymbol === undefined - this node is non-exported so we can just pick the result of getSymbolOfNode @@ -35634,7 +35634,7 @@ namespace ts { // Only process instance properties with computed names here. // Static properties cannot be in conflict with indexers, // and properties with literal names were already checked. - if (!hasSyntacticModifier(member, ModifierFlags.Static) && hasNonBindableDynamicName(member)) { + if (!hasSyntacticModifier(member, ModifierFlags.Static) && !hasBindableName(member)) { const symbol = getSymbolOfNode(member); const propType = getTypeOfSymbol(symbol); checkIndexConstraintForProperty(symbol, propType, type, declaredStringIndexer, stringIndexType, IndexKind.String); From 33046e389abd2c51c42cff9aedfce1343389b64f Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 12 Jan 2021 14:04:03 -0800 Subject: [PATCH 05/92] Do not suggest paths inside node_modules/.pnpm as module specifiers (#42095) * Create symlink cache when a pnpm module is found * Keep pnpm-internal symlinks out of the symlink cache * Filter out pnpm path from realpath module specifier too * Use ignoredPaths instead of pnpm-specific path --- src/compiler/moduleSpecifiers.ts | 9 ++++++--- src/compiler/program.ts | 2 +- src/compiler/utilities.ts | 13 ++++++++++++- src/harness/fourslashImpl.ts | 2 +- tests/cases/fourslash/autoImportPnpm.ts | 24 ++++++++++++++++++++++++ 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 tests/cases/fourslash/autoImportPnpm.ts diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 38e0a0bc2e3e0..72332a2201fb6 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -290,7 +290,9 @@ namespace ts.moduleSpecifiers { const importedFileNames = [...(referenceRedirect ? [referenceRedirect] : emptyArray), importedFileName, ...redirects]; const targets = importedFileNames.map(f => getNormalizedAbsolutePath(f, cwd)); if (!preferSymlinks) { - const result = forEach(targets, p => cb(p, referenceRedirect === p)); + // Symlinks inside ignored paths are already filtered out of the symlink cache, + // so we only need to remove them from the realpath filenames. + const result = forEach(targets, p => !containsIgnoredPath(p) && cb(p, referenceRedirect === p)); if (result) return result; } const links = host.getSymlinkCache @@ -318,8 +320,9 @@ namespace ts.moduleSpecifiers { } }); }); - return result || - (preferSymlinks ? forEach(targets, p => cb(p, p === referenceRedirect)) : undefined); + return result || (preferSymlinks + ? forEach(targets, p => containsIgnoredPath(p) ? undefined : cb(p, p === referenceRedirect)) + : undefined); } interface ModulePath { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 0756ac92f3071..10ac23aa196ea 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3756,7 +3756,7 @@ namespace ts { } function handleDirectoryCouldBeSymlink(directory: string) { - if (!host.getResolvedProjectReferences()) return; + if (!host.getResolvedProjectReferences() || containsIgnoredPath(directory)) return; // Because we already watch node_modules, handle symlinks in there if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) return; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b40527cb03e53..85a19df7f0694 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6092,7 +6092,14 @@ namespace ts { getSymlinkedFiles: () => symlinkedFiles, getSymlinkedDirectories: () => symlinkedDirectories, setSymlinkedFile: (path, real) => (symlinkedFiles || (symlinkedFiles = new Map())).set(path, real), - setSymlinkedDirectory: (path, directory) => (symlinkedDirectories || (symlinkedDirectories = new Map())).set(path, directory), + setSymlinkedDirectory: (path, directory) => { + // Large, interconnected dependency graphs in pnpm will have a huge number of symlinks + // where both the realpath and the symlink path are inside node_modules/.pnpm. Since + // this path is never a candidate for a module specifier, we can ignore it entirely. + if (!containsIgnoredPath(path)) { + (symlinkedDirectories || (symlinkedDirectories = new Map())).set(path, directory); + } + } }; } @@ -7066,4 +7073,8 @@ namespace ts { return false; } } + + export function containsIgnoredPath(path: string) { + return some(ignoredPaths, p => stringContains(path, p)); + } } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 6355cb15acaba..15d0be1a143ba 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -3022,7 +3022,7 @@ namespace FourSlash { this.editScriptAndUpdateMarkers(fileName, span.start, span.start + insertedText.length, deletedText); } if (expectedTextArray.length !== actualTextArray.length) { - this.raiseError(`Expected ${expectedTextArray.length} import fixes, got ${actualTextArray.length}`); + this.raiseError(`Expected ${expectedTextArray.length} import fixes, got ${actualTextArray.length}:\n\n${actualTextArray.join("\n\n" + "-".repeat(20) + "\n\n")}`); } ts.zipWith(expectedTextArray, actualTextArray, (expected, actual, index) => { if (expected !== actual) { diff --git a/tests/cases/fourslash/autoImportPnpm.ts b/tests/cases/fourslash/autoImportPnpm.ts new file mode 100644 index 0000000000000..91d52ab798406 --- /dev/null +++ b/tests/cases/fourslash/autoImportPnpm.ts @@ -0,0 +1,24 @@ +/// + +// @Filename: /tsconfig.json +//// { "compilerOptions": { "module": "commonjs" } } + +// @Filename: /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/package.json +//// { "types": "dist/mobx.d.ts" } + +// @Filename: /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx/dist/mobx.d.ts +//// export declare function autorun(): void; + +// @Filename: /index.ts +//// autorun/**/ + +// @Filename: /utils.ts +//// import "mobx"; + +// @link: /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx -> /node_modules/mobx +// @link: /node_modules/.pnpm/mobx@6.0.4/node_modules/mobx -> /node_modules/.pnpm/cool-mobx-dependent@1.2.3/node_modules/mobx + +goTo.marker(""); +verify.importFixAtPosition([`import { autorun } from "mobx"; + +autorun`]); From 9171aa5a1be8dc69f953b8545f0f02c16f192285 Mon Sep 17 00:00:00 2001 From: Klaus Meinhardt Date: Wed, 13 Jan 2021 12:20:46 +0100 Subject: [PATCH 06/92] fix forEachChildRecursively (#42300) --- src/compiler/parser.ts | 85 +++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 6e6f1dcc19777..cd61ad8ec807d 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -558,61 +558,54 @@ namespace ts { * and while doing so, handles traversing the structure without relying on the callstack to encode the tree structure. */ export function forEachChildRecursively(rootNode: Node, cbNode: (node: Node, parent: Node) => T | "skip" | undefined, cbNodes?: (nodes: NodeArray, parent: Node) => T | "skip" | undefined): T | undefined { - - const stack: Node[] = [rootNode]; - while (stack.length) { - const parent = stack.pop()!; - const res = visitAllPossibleChildren(parent, gatherPossibleChildren(parent)); - if (res) { - return res; - } - } - - return; - - function gatherPossibleChildren(node: Node) { - const children: (Node | NodeArray)[] = []; - forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal - return children; - - function addWorkItem(n: Node | NodeArray) { - children.unshift(n); - } - } - - function visitAllPossibleChildren(parent: Node, children: readonly (Node | NodeArray)[]) { - for (const child of children) { - if (isArray(child)) { - if (cbNodes) { - const res = cbNodes(child, parent); - if (res) { - if (res === "skip") continue; - return res; - } - } - - for (let i = child.length - 1; i >= 0; i--) { - const realChild = child[i]; - const res = cbNode(realChild, parent); - if (res) { - if (res === "skip") continue; - return res; - } - stack.push(realChild); - } - } - else { - stack.push(child); - const res = cbNode(child, parent); + const queue: (Node | NodeArray)[] = gatherPossibleChildren(rootNode); + const parents: Node[] = []; // tracks parent references for elements in queue + while (parents.length < queue.length) { + parents.push(rootNode); + } + while (queue.length !== 0) { + const current = queue.pop()!; + const parent = parents.pop()!; + if (isArray(current)) { + if (cbNodes) { + const res = cbNodes(current, parent); if (res) { if (res === "skip") continue; return res; } } + for (let i = current.length - 1; i >= 0; --i) { + queue.push(current[i]); + parents.push(parent); + } + } + else { + const res = cbNode(current, parent); + if (res) { + if (res === "skip") continue; + return res; + } + if (current.kind >= SyntaxKind.FirstNode) { + // add children in reverse order to the queue, so popping gives the first child + for (const child of gatherPossibleChildren(current)) { + queue.push(child); + parents.push(current); + } + } } } } + function gatherPossibleChildren(node: Node) { + const children: (Node | NodeArray)[] = []; + forEachChild(node, addWorkItem, addWorkItem); // By using a stack above and `unshift` here, we emulate a depth-first preorder traversal + return children; + + function addWorkItem(n: Node | NodeArray) { + children.unshift(n); + } + } + export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false, scriptKind?: ScriptKind): SourceFile { tracing.push(tracing.Phase.Parse, "createSourceFile", { path: fileName }, /*separateBeginAndEnd*/ true); performance.mark("beforeParse"); From 368cdfd29ace559e257a3c92b12212c626a5a692 Mon Sep 17 00:00:00 2001 From: Chris West Date: Wed, 13 Jan 2021 23:51:08 +0000 Subject: [PATCH 07/92] fix: const enums + isolatedModules emit invalid code (#41933) * chore: failing test for const enums and isolatedModules * fix: const enums + isolatedModules emit invalid code In `isolatedModules` mode, the compiler does not inline const enums, but also decides not to `import` them, leaving invalid code that throws a `ReferenceError` at runtime. This code: ``` import { SomeEnum } from './bar'; sink(SomeEnum.VALUE); ``` ..should compile to either: ``` var { SomeEnum } = require('./bar'); sink(SomeEnum.VALUE); ``` ..or (with const enum inlining): ``` sink(1 /* VALUE */); ``` ..but actually compiles to: ``` sink(SomeEnum.VALUE); ``` ..with no imports, which throws a ReferenceError at runtime. --- The compiler has already realised that the symbol is a referenced const enum, it just doesn't use this information when it comes to deciding whether to emit an import. This commit additionally checks that information, if we are compiling in isolatedModules mode. --- In my opinion, this is not the correct fix, but it is the simplest. In `isolatedModules` mode, `const enum` should probably be a compile error (because there are no benefits and the complexity is high, and, apparently, buggy). If not, the compiler should not be checking whether something is a const enum, and should just be treating it as a regular enum, and checking as if it was? Fixes #40499. * chore: extra test for type-only * feat: explicitly ban --isolatedModules --preserveConstEnums false * feat: isolatedModules implies preserveConstEnum * Update src/compiler/diagnosticMessages.json Co-authored-by: Andrew Branch * chore: compiler test for argument incompatibility * Add and fix test for namespace import of const enum * Fix additional bug with reexport of const-enum-only module Co-authored-by: Andrew Branch Co-authored-by: Andrew Branch --- src/compiler/binder.ts | 2 +- src/compiler/checker.ts | 25 +++++++--- src/compiler/diagnosticMessages.json | 4 ++ src/compiler/program.ts | 4 ++ src/compiler/transformers/ts.ts | 5 +- src/compiler/utilities.ts | 4 ++ ...ceCausesNoImport(isolatedmodules=false).js | 35 +++++++++++++ ...sesNoImport(isolatedmodules=false).symbols | 40 +++++++++++++++ ...ausesNoImport(isolatedmodules=false).types | 39 +++++++++++++++ ...nceCausesNoImport(isolatedmodules=true).js | 42 ++++++++++++++++ ...usesNoImport(isolatedmodules=true).symbols | 40 +++++++++++++++ ...CausesNoImport(isolatedmodules=true).types | 39 +++++++++++++++ ...stEnumNamespaceReferenceCausesNoImport2.js | 50 +++++++++++++++++++ .../isolatedModulesImportConstEnum.js | 25 ++++++++++ .../isolatedModulesImportConstEnum.symbols | 20 ++++++++ .../isolatedModulesImportConstEnum.types | 21 ++++++++ .../isolatedModulesImportConstEnumTypeOnly.js | 22 ++++++++ ...atedModulesImportConstEnumTypeOnly.symbols | 14 ++++++ ...olatedModulesImportConstEnumTypeOnly.types | 13 +++++ ...odulesRequiresPreserveConstEnum.errors.txt | 8 +++ ...solatedModulesRequiresPreserveConstEnum.js | 8 +++ ...edModulesRequiresPreserveConstEnum.symbols | 5 ++ ...atedModulesRequiresPreserveConstEnum.types | 5 ++ ...nstEnumNamespaceReferenceCausesNoImport.ts | 2 + ...stEnumNamespaceReferenceCausesNoImport2.ts | 24 +++++++++ .../isolatedModulesImportConstEnum.ts | 13 +++++ .../isolatedModulesImportConstEnumTypeOnly.ts | 8 +++ ...solatedModulesRequiresPreserveConstEnum.ts | 8 +++ 28 files changed, 514 insertions(+), 11 deletions(-) create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).js create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).symbols create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).types create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).js create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).symbols create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).types create mode 100644 tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport2.js create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnum.js create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnum.symbols create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnum.types create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.js create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.symbols create mode 100644 tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.types create mode 100644 tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.errors.txt create mode 100644 tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.js create mode 100644 tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.symbols create mode 100644 tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.types create mode 100644 tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts create mode 100644 tests/cases/compiler/isolatedModulesImportConstEnum.ts create mode 100644 tests/cases/compiler/isolatedModulesImportConstEnumTypeOnly.ts create mode 100644 tests/cases/compiler/isolatedModulesRequiresPreserveConstEnum.ts diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 11b1955869d9d..b397bbf28d5d5 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -3435,7 +3435,7 @@ namespace ts { function shouldReportErrorOnModuleDeclaration(node: ModuleDeclaration): boolean { const instanceState = getModuleInstanceState(node); - return instanceState === ModuleInstanceState.Instantiated || (instanceState === ModuleInstanceState.ConstEnumOnly && !!options.preserveConstEnums); + return instanceState === ModuleInstanceState.Instantiated || (instanceState === ModuleInstanceState.ConstEnumOnly && shouldPreserveConstEnums(options)); } function checkUnreachable(node: Node): boolean { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index af8faea439c33..70bd5d08ebf25 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2395,7 +2395,7 @@ namespace ts { } else { Debug.assert(!!(result.flags & SymbolFlags.ConstEnum)); - if (compilerOptions.preserveConstEnums) { + if (shouldPreserveConstEnums(compilerOptions)) { diagnosticMessage = error(errorLocation, Diagnostics.Enum_0_used_before_its_declaration, declarationName); } } @@ -23215,7 +23215,13 @@ namespace ts { if (isNonLocalAlias(symbol, /*excludes*/ SymbolFlags.Value) && !isInTypeQuery(location) && !getTypeOnlyAliasDeclaration(symbol)) { const target = resolveAlias(symbol); if (target.flags & SymbolFlags.Value) { - if (compilerOptions.preserveConstEnums && isExportOrExportExpression(location) || !isConstEnumOrConstEnumOnlyModule(target)) { + // An alias resolving to a const enum cannot be elided if (1) 'isolatedModules' is enabled + // (because the const enum value will not be inlined), or if (2) the alias is an export + // of a const enum declaration that will be preserved. + if (compilerOptions.isolatedModules || + shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(location) || + !isConstEnumOrConstEnumOnlyModule(target) + ) { markAliasSymbolAsReferenced(symbol); } else { @@ -26271,7 +26277,11 @@ namespace ts { } prop = getPropertyOfType(apparentType, right.escapedText); } - if (isIdentifier(left) && parentSymbol && !(prop && isConstEnumOrConstEnumOnlyModule(prop))) { + // In `Foo.Bar.Baz`, 'Foo' is not referenced if 'Bar' is a const enum or a module containing only const enums. + // The exceptions are: + // 1. if 'isolatedModules' is enabled, because the const enum value will not be inlined, and + // 2. if 'preserveConstEnums' is enabled and the expression is itself an export, e.g. `export = Foo.Bar.Baz`. + if (isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules || !(prop && isConstEnumOrConstEnumOnlyModule(prop)) || shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) { markAliasReferenced(parentSymbol, node); } @@ -36648,7 +36658,7 @@ namespace ts { if (symbol.flags & SymbolFlags.ValueModule && !inAmbientContext && symbol.declarations.length > 1 - && isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules)) { + && isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions))) { const firstNonAmbientClassOrFunc = getFirstNonAmbientClassOrFunctionDeclaration(symbol); if (firstNonAmbientClassOrFunc) { if (getSourceFileOfNode(node) !== getSourceFileOfNode(firstNonAmbientClassOrFunc)) { @@ -38571,7 +38581,7 @@ namespace ts { // const enums and modules that contain only const enums are not considered values from the emit perspective // unless 'preserveConstEnums' option is set to true return !!(target.flags & SymbolFlags.Value) && - (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target)); + (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target)); } function isConstEnumOrConstEnumOnlyModule(s: Symbol): boolean { @@ -38581,13 +38591,14 @@ namespace ts { function isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean { if (isAliasSymbolDeclaration(node)) { const symbol = getSymbolOfNode(node); - if (symbol && getSymbolLinks(symbol).referenced) { + const links = symbol && getSymbolLinks(symbol); + if (links?.referenced) { return true; } const target = getSymbolLinks(symbol!).target; // TODO: GH#18217 if (target && getEffectiveModifierFlags(node) & ModifierFlags.Export && target.flags & SymbolFlags.Value && - (compilerOptions.preserveConstEnums || !isConstEnumOrConstEnumOnlyModule(target))) { + (shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) { // An `export import ... =` of a value symbol is always considered referenced return true; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 8162ea6b3eff6..d96b2957da6ae 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -3813,6 +3813,10 @@ "category": "Error", "code": 5090 }, + "Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled.": { + "category": "Error", + "code": 5091 + }, "Generates a sourcemap for each corresponding '.d.ts' file.": { "category": "Message", diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 10ac23aa196ea..bc7e006801d94 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3157,6 +3157,10 @@ namespace ts { createDiagnosticForOptionName(Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher, "isolatedModules", "target"); } + if (options.preserveConstEnums === false) { + createDiagnosticForOptionName(Diagnostics.Option_preserveConstEnums_cannot_be_disabled_when_isolatedModules_is_enabled, "preserveConstEnums", "isolatedModules"); + } + const firstNonExternalModuleSourceFile = find(files, f => !isExternalModule(f) && !isSourceFileJS(f) && !f.isDeclarationFile && f.scriptKind !== ScriptKind.JSON); if (firstNonExternalModuleSourceFile) { const span = getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile); diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 9cc9c1c3fc92e..0d24f332c15bd 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -2316,8 +2316,7 @@ namespace ts { */ function shouldEmitEnumDeclaration(node: EnumDeclaration) { return !isEnumConst(node) - || compilerOptions.preserveConstEnums - || compilerOptions.isolatedModules; + || shouldPreserveConstEnums(compilerOptions); } /** @@ -2507,7 +2506,7 @@ namespace ts { // If we can't find a parse tree node, assume the node is instantiated. return true; } - return isInstantiatedModule(node, !!compilerOptions.preserveConstEnums || !!compilerOptions.isolatedModules); + return isInstantiatedModule(node, shouldPreserveConstEnums(compilerOptions)); } /** diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 85a19df7f0694..8afa94823694f 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6001,6 +6001,10 @@ namespace ts { return !!(compilerOptions.declaration || compilerOptions.composite); } + export function shouldPreserveConstEnums(compilerOptions: CompilerOptions): boolean { + return !!(compilerOptions.preserveConstEnums || compilerOptions.isolatedModules); + } + export function isIncrementalCompilation(options: CompilerOptions) { return !!(options.incremental || options.composite); } diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).js b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).js new file mode 100644 index 0000000000000..145cb9d37e835 --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).js @@ -0,0 +1,35 @@ +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts] //// + +//// [foo.ts] +export const enum ConstFooEnum { + Some, + Values, + Here +}; +export function fooFunc(): void { /* removed */ } +//// [index.ts] +import * as Foo from "./foo"; + +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} + +//// [foo.js] +"use strict"; +exports.__esModule = true; +exports.fooFunc = void 0; +; +function fooFunc() { } +exports.fooFunc = fooFunc; +//// [index.js] +"use strict"; +exports.__esModule = true; +function check(x) { + switch (x) { + case 0 /* Some */: + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).symbols b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).symbols new file mode 100644 index 0000000000000..92a8501383484 --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).symbols @@ -0,0 +1,40 @@ +=== tests/cases/compiler/foo.ts === +export const enum ConstFooEnum { +>ConstFooEnum : Symbol(ConstFooEnum, Decl(foo.ts, 0, 0)) + + Some, +>Some : Symbol(ConstFooEnum.Some, Decl(foo.ts, 0, 32)) + + Values, +>Values : Symbol(ConstFooEnum.Values, Decl(foo.ts, 1, 9)) + + Here +>Here : Symbol(ConstFooEnum.Here, Decl(foo.ts, 2, 11)) + +}; +export function fooFunc(): void { /* removed */ } +>fooFunc : Symbol(fooFunc, Decl(foo.ts, 4, 2)) + +=== tests/cases/compiler/index.ts === +import * as Foo from "./foo"; +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) + +function check(x: Foo.ConstFooEnum): void { +>check : Symbol(check, Decl(index.ts, 0, 29)) +>x : Symbol(x, Decl(index.ts, 2, 15)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) +>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) + + switch (x) { +>x : Symbol(x, Decl(index.ts, 2, 15)) + + case Foo.ConstFooEnum.Some: +>Foo.ConstFooEnum.Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32)) +>Foo.ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) +>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) +>Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32)) + + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).types b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).types new file mode 100644 index 0000000000000..dc9c6ea705b47 --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=false).types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/foo.ts === +export const enum ConstFooEnum { +>ConstFooEnum : ConstFooEnum + + Some, +>Some : ConstFooEnum.Some + + Values, +>Values : ConstFooEnum.Values + + Here +>Here : ConstFooEnum.Here + +}; +export function fooFunc(): void { /* removed */ } +>fooFunc : () => void + +=== tests/cases/compiler/index.ts === +import * as Foo from "./foo"; +>Foo : typeof Foo + +function check(x: Foo.ConstFooEnum): void { +>check : (x: Foo.ConstFooEnum) => void +>x : Foo.ConstFooEnum +>Foo : any + + switch (x) { +>x : Foo.ConstFooEnum + + case Foo.ConstFooEnum.Some: +>Foo.ConstFooEnum.Some : Foo.ConstFooEnum.Some +>Foo.ConstFooEnum : typeof Foo.ConstFooEnum +>Foo : typeof Foo +>ConstFooEnum : typeof Foo.ConstFooEnum +>Some : Foo.ConstFooEnum.Some + + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).js b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).js new file mode 100644 index 0000000000000..4f282ee36fb3b --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).js @@ -0,0 +1,42 @@ +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts] //// + +//// [foo.ts] +export const enum ConstFooEnum { + Some, + Values, + Here +}; +export function fooFunc(): void { /* removed */ } +//// [index.ts] +import * as Foo from "./foo"; + +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} + +//// [foo.js] +"use strict"; +exports.__esModule = true; +exports.fooFunc = exports.ConstFooEnum = void 0; +var ConstFooEnum; +(function (ConstFooEnum) { + ConstFooEnum[ConstFooEnum["Some"] = 0] = "Some"; + ConstFooEnum[ConstFooEnum["Values"] = 1] = "Values"; + ConstFooEnum[ConstFooEnum["Here"] = 2] = "Here"; +})(ConstFooEnum = exports.ConstFooEnum || (exports.ConstFooEnum = {})); +; +function fooFunc() { } +exports.fooFunc = fooFunc; +//// [index.js] +"use strict"; +exports.__esModule = true; +var Foo = require("./foo"); +function check(x) { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).symbols b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).symbols new file mode 100644 index 0000000000000..92a8501383484 --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).symbols @@ -0,0 +1,40 @@ +=== tests/cases/compiler/foo.ts === +export const enum ConstFooEnum { +>ConstFooEnum : Symbol(ConstFooEnum, Decl(foo.ts, 0, 0)) + + Some, +>Some : Symbol(ConstFooEnum.Some, Decl(foo.ts, 0, 32)) + + Values, +>Values : Symbol(ConstFooEnum.Values, Decl(foo.ts, 1, 9)) + + Here +>Here : Symbol(ConstFooEnum.Here, Decl(foo.ts, 2, 11)) + +}; +export function fooFunc(): void { /* removed */ } +>fooFunc : Symbol(fooFunc, Decl(foo.ts, 4, 2)) + +=== tests/cases/compiler/index.ts === +import * as Foo from "./foo"; +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) + +function check(x: Foo.ConstFooEnum): void { +>check : Symbol(check, Decl(index.ts, 0, 29)) +>x : Symbol(x, Decl(index.ts, 2, 15)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) +>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) + + switch (x) { +>x : Symbol(x, Decl(index.ts, 2, 15)) + + case Foo.ConstFooEnum.Some: +>Foo.ConstFooEnum.Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32)) +>Foo.ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 6)) +>ConstFooEnum : Symbol(Foo.ConstFooEnum, Decl(foo.ts, 0, 0)) +>Some : Symbol(Foo.ConstFooEnum.Some, Decl(foo.ts, 0, 32)) + + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).types b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).types new file mode 100644 index 0000000000000..dc9c6ea705b47 --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport(isolatedmodules=true).types @@ -0,0 +1,39 @@ +=== tests/cases/compiler/foo.ts === +export const enum ConstFooEnum { +>ConstFooEnum : ConstFooEnum + + Some, +>Some : ConstFooEnum.Some + + Values, +>Values : ConstFooEnum.Values + + Here +>Here : ConstFooEnum.Here + +}; +export function fooFunc(): void { /* removed */ } +>fooFunc : () => void + +=== tests/cases/compiler/index.ts === +import * as Foo from "./foo"; +>Foo : typeof Foo + +function check(x: Foo.ConstFooEnum): void { +>check : (x: Foo.ConstFooEnum) => void +>x : Foo.ConstFooEnum +>Foo : any + + switch (x) { +>x : Foo.ConstFooEnum + + case Foo.ConstFooEnum.Some: +>Foo.ConstFooEnum.Some : Foo.ConstFooEnum.Some +>Foo.ConstFooEnum : typeof Foo.ConstFooEnum +>Foo : typeof Foo +>ConstFooEnum : typeof Foo.ConstFooEnum +>Some : Foo.ConstFooEnum.Some + + break; + } +} diff --git a/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport2.js b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport2.js new file mode 100644 index 0000000000000..02a802f20ea9a --- /dev/null +++ b/tests/baselines/reference/constEnumNamespaceReferenceCausesNoImport2.js @@ -0,0 +1,50 @@ +//// [tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts] //// + +//// [foo.ts] +export module ConstEnumOnlyModule { + export const enum ConstFooEnum { + Some, + Values, + Here + } +} + +//// [reexport.ts] +import * as Foo from "./foo"; +export = Foo.ConstEnumOnlyModule; + +//// [index.ts] +import Foo = require("./reexport"); +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} + +//// [foo.js] +"use strict"; +exports.__esModule = true; +exports.ConstEnumOnlyModule = void 0; +var ConstEnumOnlyModule; +(function (ConstEnumOnlyModule) { + var ConstFooEnum; + (function (ConstFooEnum) { + ConstFooEnum[ConstFooEnum["Some"] = 0] = "Some"; + ConstFooEnum[ConstFooEnum["Values"] = 1] = "Values"; + ConstFooEnum[ConstFooEnum["Here"] = 2] = "Here"; + })(ConstFooEnum = ConstEnumOnlyModule.ConstFooEnum || (ConstEnumOnlyModule.ConstFooEnum = {})); +})(ConstEnumOnlyModule = exports.ConstEnumOnlyModule || (exports.ConstEnumOnlyModule = {})); +//// [reexport.js] +"use strict"; +var Foo = require("./foo"); +module.exports = Foo.ConstEnumOnlyModule; +//// [index.js] +"use strict"; +exports.__esModule = true; +function check(x) { + switch (x) { + case 0 /* Some */: + break; + } +} diff --git a/tests/baselines/reference/isolatedModulesImportConstEnum.js b/tests/baselines/reference/isolatedModulesImportConstEnum.js new file mode 100644 index 0000000000000..6af32fc5e9026 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnum.js @@ -0,0 +1,25 @@ +//// [tests/cases/compiler/isolatedModulesImportConstEnum.ts] //// + +//// [file1.ts] +import { Foo } from './file2'; +console.log(Foo.BAR); + +//// [file2.ts] +export const enum Foo { + BAR, +} + + +//// [file2.js] +"use strict"; +exports.__esModule = true; +exports.Foo = void 0; +var Foo; +(function (Foo) { + Foo[Foo["BAR"] = 0] = "BAR"; +})(Foo = exports.Foo || (exports.Foo = {})); +//// [file1.js] +"use strict"; +exports.__esModule = true; +var file2_1 = require("./file2"); +console.log(file2_1.Foo.BAR); diff --git a/tests/baselines/reference/isolatedModulesImportConstEnum.symbols b/tests/baselines/reference/isolatedModulesImportConstEnum.symbols new file mode 100644 index 0000000000000..797b8825c7d1e --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnum.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/file1.ts === +import { Foo } from './file2'; +>Foo : Symbol(Foo, Decl(file1.ts, 0, 8)) + +console.log(Foo.BAR); +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>Foo.BAR : Symbol(Foo.BAR, Decl(file2.ts, 0, 23)) +>Foo : Symbol(Foo, Decl(file1.ts, 0, 8)) +>BAR : Symbol(Foo.BAR, Decl(file2.ts, 0, 23)) + +=== tests/cases/compiler/file2.ts === +export const enum Foo { +>Foo : Symbol(Foo, Decl(file2.ts, 0, 0)) + + BAR, +>BAR : Symbol(Foo.BAR, Decl(file2.ts, 0, 23)) +} + diff --git a/tests/baselines/reference/isolatedModulesImportConstEnum.types b/tests/baselines/reference/isolatedModulesImportConstEnum.types new file mode 100644 index 0000000000000..70f9856d66393 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnum.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/file1.ts === +import { Foo } from './file2'; +>Foo : typeof Foo + +console.log(Foo.BAR); +>console.log(Foo.BAR) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>Foo.BAR : Foo +>Foo : typeof Foo +>BAR : Foo + +=== tests/cases/compiler/file2.ts === +export const enum Foo { +>Foo : Foo + + BAR, +>BAR : Foo.BAR +} + diff --git a/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.js b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.js new file mode 100644 index 0000000000000..3781ecf9eed6d --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/isolatedModulesImportConstEnumTypeOnly.ts] //// + +//// [enum.ts] +export const enum Foo { Bar } + +//// [index.ts] +import { Foo } from "./enum"; +function f(foo: Foo) { return; } + + +//// [enum.js] +"use strict"; +exports.__esModule = true; +exports.Foo = void 0; +var Foo; +(function (Foo) { + Foo[Foo["Bar"] = 0] = "Bar"; +})(Foo = exports.Foo || (exports.Foo = {})); +//// [index.js] +"use strict"; +exports.__esModule = true; +function f(foo) { return; } diff --git a/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.symbols b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.symbols new file mode 100644 index 0000000000000..52fb92e2c7129 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/enum.ts === +export const enum Foo { Bar } +>Foo : Symbol(Foo, Decl(enum.ts, 0, 0)) +>Bar : Symbol(Foo.Bar, Decl(enum.ts, 0, 23)) + +=== tests/cases/compiler/index.ts === +import { Foo } from "./enum"; +>Foo : Symbol(Foo, Decl(index.ts, 0, 8)) + +function f(foo: Foo) { return; } +>f : Symbol(f, Decl(index.ts, 0, 29)) +>foo : Symbol(foo, Decl(index.ts, 1, 11)) +>Foo : Symbol(Foo, Decl(index.ts, 0, 8)) + diff --git a/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.types b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.types new file mode 100644 index 0000000000000..fea6ef63fee20 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesImportConstEnumTypeOnly.types @@ -0,0 +1,13 @@ +=== tests/cases/compiler/enum.ts === +export const enum Foo { Bar } +>Foo : Foo +>Bar : Foo.Bar + +=== tests/cases/compiler/index.ts === +import { Foo } from "./enum"; +>Foo : typeof Foo + +function f(foo: Foo) { return; } +>f : (foo: Foo) => void +>foo : Foo + diff --git a/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.errors.txt b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.errors.txt new file mode 100644 index 0000000000000..70ddd6b8b8b4a --- /dev/null +++ b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.errors.txt @@ -0,0 +1,8 @@ +error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. + + +!!! error TS5091: Option 'preserveConstEnums' cannot be disabled when 'isolatedModules' is enabled. +==== tests/cases/compiler/file1.ts (0 errors) ==== + export {}; + + \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.js b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.js new file mode 100644 index 0000000000000..0691bf23e3870 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.js @@ -0,0 +1,8 @@ +//// [file1.ts] +export {}; + + + +//// [file1.js] +"use strict"; +exports.__esModule = true; diff --git a/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.symbols b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.symbols new file mode 100644 index 0000000000000..39ef3fa478d07 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.symbols @@ -0,0 +1,5 @@ +=== tests/cases/compiler/file1.ts === +export {}; +No type information for this code. +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.types b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.types new file mode 100644 index 0000000000000..39ef3fa478d07 --- /dev/null +++ b/tests/baselines/reference/isolatedModulesRequiresPreserveConstEnum.types @@ -0,0 +1,5 @@ +=== tests/cases/compiler/file1.ts === +export {}; +No type information for this code. +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts b/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts index 3df68067ef5c9..f43f740ba9142 100644 --- a/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts +++ b/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport.ts @@ -1,3 +1,5 @@ +// @isolatedModules: true, false + // @filename: foo.ts export const enum ConstFooEnum { Some, diff --git a/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts b/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts new file mode 100644 index 0000000000000..06abeafd1fbaa --- /dev/null +++ b/tests/cases/compiler/constEnumNamespaceReferenceCausesNoImport2.ts @@ -0,0 +1,24 @@ +// @preserveConstEnums: true +// @noTypesAndSymbols: true + +// @filename: foo.ts +export module ConstEnumOnlyModule { + export const enum ConstFooEnum { + Some, + Values, + Here + } +} + +// @filename: reexport.ts +import * as Foo from "./foo"; +export = Foo.ConstEnumOnlyModule; + +// @filename: index.ts +import Foo = require("./reexport"); +function check(x: Foo.ConstFooEnum): void { + switch (x) { + case Foo.ConstFooEnum.Some: + break; + } +} \ No newline at end of file diff --git a/tests/cases/compiler/isolatedModulesImportConstEnum.ts b/tests/cases/compiler/isolatedModulesImportConstEnum.ts new file mode 100644 index 0000000000000..46768cb75a108 --- /dev/null +++ b/tests/cases/compiler/isolatedModulesImportConstEnum.ts @@ -0,0 +1,13 @@ +// @isolatedModules: true +// @module: commonjs + +// @filename: file1.ts + +import { Foo } from './file2'; +console.log(Foo.BAR); + +// @filename: file2.ts + +export const enum Foo { + BAR, +} diff --git a/tests/cases/compiler/isolatedModulesImportConstEnumTypeOnly.ts b/tests/cases/compiler/isolatedModulesImportConstEnumTypeOnly.ts new file mode 100644 index 0000000000000..85b89be6e7533 --- /dev/null +++ b/tests/cases/compiler/isolatedModulesImportConstEnumTypeOnly.ts @@ -0,0 +1,8 @@ +// @isolatedModules: true + +// @filename: enum.ts +export const enum Foo { Bar } + +// @filename: index.ts +import { Foo } from "./enum"; +function f(foo: Foo) { return; } diff --git a/tests/cases/compiler/isolatedModulesRequiresPreserveConstEnum.ts b/tests/cases/compiler/isolatedModulesRequiresPreserveConstEnum.ts new file mode 100644 index 0000000000000..34d601df00bf8 --- /dev/null +++ b/tests/cases/compiler/isolatedModulesRequiresPreserveConstEnum.ts @@ -0,0 +1,8 @@ +// @isolatedModules: true +// @preserveConstEnums: false +// @module: commonjs + +// @filename: file1.ts + +export {}; + From 33ea6c581a260dc217979ce59714dd0ce73ddbca Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Thu, 14 Jan 2021 14:48:40 -0800 Subject: [PATCH 08/92] Fix indentation for closing > of ExpressionWithTypeArguments (#42341) --- src/services/formatting/formatting.ts | 1 + src/services/formatting/smartIndenter.ts | 2 +- tests/cases/fourslash/formatMultilineExtendsGeneric.ts | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/cases/fourslash/formatMultilineExtendsGeneric.ts diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index ee32d0a4dfdde..de41f3d768fee 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -592,6 +592,7 @@ namespace ts.formatting { case SyntaxKind.JsxOpeningElement: case SyntaxKind.JsxClosingElement: case SyntaxKind.JsxSelfClosingElement: + case SyntaxKind.ExpressionWithTypeArguments: return false; } break; diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index b8af97350f7df..b759643c87a7a 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -581,7 +581,7 @@ namespace ts.formatting { if (childKind === SyntaxKind.TypeLiteral || childKind === SyntaxKind.TupleType) { return false; } - // falls through + break; } // No explicit rule for given nodes so the result will follow the default value argument return indentByDefault; diff --git a/tests/cases/fourslash/formatMultilineExtendsGeneric.ts b/tests/cases/fourslash/formatMultilineExtendsGeneric.ts new file mode 100644 index 0000000000000..e0cdf54d2516b --- /dev/null +++ b/tests/cases/fourslash/formatMultilineExtendsGeneric.ts @@ -0,0 +1,9 @@ +/// + +//// class Favorite extends Array< +//// string +//// > { +//// private foo = 2 +//// } + +verify.formatDocumentChangesNothing(); From c83f7698501eca9486499acc1593fe87e1257fa5 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 15 Jan 2021 03:02:48 +0200 Subject: [PATCH 09/92] fix(41405): allow using property access as reference to function (#41429) --- .../codefixes/convertToAsyncFunction.ts | 16 ++-- src/services/suggestionDiagnostics.ts | 28 ++++--- .../services/convertToAsyncFunction.ts | 84 +++++++++++++++++++ .../convertToAsyncFunction_ResRef1.ts | 25 ++++++ .../convertToAsyncFunction_ResRef2.ts | 21 +++++ .../convertToAsyncFunction_ResRef3.ts | 19 +++++ ...nvertToAsyncFunction_ResRefNoReturnVal1.ts | 25 ++++++ 7 files changed, 202 insertions(+), 16 deletions(-) create mode 100644 tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef1.ts create mode 100644 tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef2.ts create mode 100644 tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef3.ts create mode 100644 tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRefNoReturnVal1.ts diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index fb064d024fcd9..3fc61d8b45d3b 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -65,7 +65,7 @@ namespace ts.codefix { const isInJavascript = isInJSFile(functionToConvert); const setOfExpressionsToReturn = getAllPromiseExpressionsToReturn(functionToConvert, checker); const functionToConvertRenamed = renameCollidingVarNames(functionToConvert, checker, synthNamesMap); - const returnStatements = functionToConvertRenamed.body && isBlock(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body) : emptyArray; + const returnStatements = functionToConvertRenamed.body && isBlock(functionToConvertRenamed.body) ? getReturnStatementsWithPromiseHandlers(functionToConvertRenamed.body, checker) : emptyArray; const transformer: Transformer = { checker, synthNamesMap, setOfExpressionsToReturn, isInJSFile: isInJavascript }; if (!returnStatements.length) { return; @@ -90,10 +90,10 @@ namespace ts.codefix { } } - function getReturnStatementsWithPromiseHandlers(body: Block): readonly ReturnStatement[] { + function getReturnStatementsWithPromiseHandlers(body: Block, checker: TypeChecker): readonly ReturnStatement[] { const res: ReturnStatement[] = []; forEachReturnStatement(body, ret => { - if (isReturnStatementWithFixablePromiseHandler(ret)) res.push(ret); + if (isReturnStatementWithFixablePromiseHandler(ret, checker)) res.push(ret); }); return res; } @@ -374,13 +374,14 @@ namespace ts.codefix { case SyntaxKind.NullKeyword: // do not produce a transformed statement for a null argument break; + case SyntaxKind.PropertyAccessExpression: case SyntaxKind.Identifier: // identifier includes undefined if (!argName) { // undefined was argument passed to promise handler break; } - const synthCall = factory.createCallExpression(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, isSynthIdentifier(argName) ? [argName.identifier] : []); + const synthCall = factory.createCallExpression(getSynthesizedDeepClone(func as Identifier | PropertyAccessExpression), /*typeArguments*/ undefined, isSynthIdentifier(argName) ? [argName.identifier] : []); if (shouldReturn(parent, transformer)) { return maybeAnnotateAndReturn(synthCall, parent.typeArguments?.[0]); } @@ -410,7 +411,7 @@ namespace ts.codefix { for (const statement of funcBody.statements) { if (isReturnStatement(statement)) { seenReturnStatement = true; - if (isReturnStatementWithFixablePromiseHandler(statement)) { + if (isReturnStatementWithFixablePromiseHandler(statement, transformer.checker)) { refactoredStmts = refactoredStmts.concat(getInnerTransformationBody(transformer, [statement], prevArgName)); } else { @@ -432,7 +433,7 @@ namespace ts.codefix { seenReturnStatement); } else { - const innerRetStmts = isFixablePromiseHandler(funcBody) ? [factory.createReturnStatement(funcBody)] : emptyArray; + const innerRetStmts = isFixablePromiseHandler(funcBody, transformer.checker) ? [factory.createReturnStatement(funcBody)] : emptyArray; const innerCbBody = getInnerTransformationBody(transformer, innerRetStmts, prevArgName); if (innerCbBody.length > 0) { @@ -536,6 +537,9 @@ namespace ts.codefix { else if (isIdentifier(funcNode)) { name = getMapEntryOrDefault(funcNode); } + else if (isPropertyAccessExpression(funcNode) && isIdentifier(funcNode.name)) { + name = getMapEntryOrDefault(funcNode.name); + } // return undefined argName when arg is null or undefined // eslint-disable-next-line no-in-operator diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index 8d557d4edcb2d..a002f8533e260 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -114,7 +114,7 @@ namespace ts { return !isAsyncFunction(node) && node.body && isBlock(node.body) && - hasReturnStatementWithPromiseHandler(node.body) && + hasReturnStatementWithPromiseHandler(node.body, checker) && returnsPromise(node, checker); } @@ -129,25 +129,25 @@ namespace ts { return isBinaryExpression(commonJsModuleIndicator) ? commonJsModuleIndicator.left : commonJsModuleIndicator; } - function hasReturnStatementWithPromiseHandler(body: Block): boolean { - return !!forEachReturnStatement(body, isReturnStatementWithFixablePromiseHandler); + function hasReturnStatementWithPromiseHandler(body: Block, checker: TypeChecker): boolean { + return !!forEachReturnStatement(body, statement => isReturnStatementWithFixablePromiseHandler(statement, checker)); } - export function isReturnStatementWithFixablePromiseHandler(node: Node): node is ReturnStatement & { expression: CallExpression } { - return isReturnStatement(node) && !!node.expression && isFixablePromiseHandler(node.expression); + export function isReturnStatementWithFixablePromiseHandler(node: Node, checker: TypeChecker): node is ReturnStatement & { expression: CallExpression } { + return isReturnStatement(node) && !!node.expression && isFixablePromiseHandler(node.expression, checker); } // Should be kept up to date with transformExpression in convertToAsyncFunction.ts - export function isFixablePromiseHandler(node: Node): boolean { + export function isFixablePromiseHandler(node: Node, checker: TypeChecker): boolean { // ensure outermost call exists and is a promise handler - if (!isPromiseHandler(node) || !node.arguments.every(isFixablePromiseArgument)) { + if (!isPromiseHandler(node) || !node.arguments.every(arg => isFixablePromiseArgument(arg, checker))) { return false; } // ensure all chained calls are valid let currentNode = node.expression; while (isPromiseHandler(currentNode) || isPropertyAccessExpression(currentNode)) { - if (isCallExpression(currentNode) && !currentNode.arguments.every(isFixablePromiseArgument)) { + if (isCallExpression(currentNode) && !currentNode.arguments.every(arg => isFixablePromiseArgument(arg, checker))) { return false; } currentNode = currentNode.expression; @@ -171,7 +171,7 @@ namespace ts { } // should be kept up to date with getTransformationBody in convertToAsyncFunction.ts - function isFixablePromiseArgument(arg: Expression): boolean { + function isFixablePromiseArgument(arg: Expression, checker: TypeChecker): boolean { switch (arg.kind) { case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: @@ -179,8 +179,16 @@ namespace ts { visitedNestedConvertibleFunctions.set(getKeyFromNode(arg as FunctionLikeDeclaration), true); // falls through case SyntaxKind.NullKeyword: - case SyntaxKind.Identifier: // identifier includes undefined return true; + case SyntaxKind.Identifier: + case SyntaxKind.PropertyAccessExpression: { + const symbol = checker.getSymbolAtLocation(arg); + if (!symbol) { + return false; + } + return checker.isUndefinedSymbol(symbol) || + some(skipAlias(symbol, checker).declarations, d => isFunctionLike(d) || hasInitializer(d) && !!d.initializer && isFunctionLike(d.initializer)); + } default: return false; } diff --git a/src/testRunner/unittests/services/convertToAsyncFunction.ts b/src/testRunner/unittests/services/convertToAsyncFunction.ts index 5b09aba9549ae..0a36a9ebfcfe9 100644 --- a/src/testRunner/unittests/services/convertToAsyncFunction.ts +++ b/src/testRunner/unittests/services/convertToAsyncFunction.ts @@ -539,6 +539,7 @@ function [#|f|]():Promise { } ` ); + _testConvertToAsyncFunction("convertToAsyncFunction_NoRes3", ` function [#|f|]():Promise { return fetch('https://typescriptlang.org').catch(rej => console.log(rej)); @@ -600,6 +601,7 @@ function [#|f|]():Promise { } ` ); + _testConvertToAsyncFunction("convertToAsyncFunction_ResRef", ` function [#|f|]():Promise { return fetch('https://typescriptlang.org').then(res); @@ -609,6 +611,75 @@ function res(result){ } ` ); + + _testConvertToAsyncFunction("convertToAsyncFunction_ResRef1", ` +class Foo { + public [#|method|](): Promise { + return fetch('a').then(this.foo); + } + + private foo(res) { + return res.ok; + } +} + `); + + _testConvertToAsyncFunction("convertToAsyncFunction_ResRef2", ` +class Foo { + public [#|method|](): Promise { + return fetch('a').then(this.foo); + } + + private foo = res => res; +} + `); + + _testConvertToAsyncFunction("convertToAsyncFunction_ResRef3", ` +const res = (result) => { + return result.ok; +} +function [#|f|](): Promise { + return fetch('https://typescriptlang.org').then(res); +} + ` + ); + + _testConvertToAsyncFunctionFailed("convertToAsyncFunction_NoSuggestionResRef1", ` +const res = 1; +function [#|f|]() { + return fetch('https://typescriptlang.org').then(res); +} +` + ); + + _testConvertToAsyncFunctionFailed("convertToAsyncFunction_NoSuggestionResRef2", ` +class Foo { + private foo = 1; + public [#|method|](): Promise { + return fetch('a').then(this.foo); + } +} +` + ); + + _testConvertToAsyncFunctionFailed("convertToAsyncFunction_NoSuggestionResRef3", ` +const res = undefined; +function [#|f|]() { + return fetch('https://typescriptlang.org').then(res); +} +` + ); + + _testConvertToAsyncFunctionFailed("convertToAsyncFunction_NoSuggestionResRef4", ` +class Foo { + private foo = undefined; + public [#|method|](): Promise { + return fetch('a').then(this.foo); + } +} +` + ); + _testConvertToAsyncFunction("convertToAsyncFunction_ResRefNoReturnVal", ` function [#|f|]():Promise { return fetch('https://typescriptlang.org').then(res); @@ -618,6 +689,19 @@ function res(result){ } ` ); + + _testConvertToAsyncFunction("convertToAsyncFunction_ResRefNoReturnVal1", ` +class Foo { + public [#|method|](): Promise { + return fetch('a').then(this.foo); + } + + private foo(res) { + console.log(res); + } +} + `); + _testConvertToAsyncFunction("convertToAsyncFunction_NoBrackets", ` function [#|f|]():Promise { return fetch('https://typescriptlang.org').then(result => console.log(result)); diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef1.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef1.ts new file mode 100644 index 0000000000000..b9041b7588e11 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef1.ts @@ -0,0 +1,25 @@ +// ==ORIGINAL== + +class Foo { + public /*[#|*/method/*|]*/(): Promise { + return fetch('a').then(this.foo); + } + + private foo(res) { + return res.ok; + } +} + +// ==ASYNC FUNCTION::Convert to async function== + +class Foo { + public async method(): Promise { + const res = await fetch('a'); + return this.foo(res); + } + + private foo(res) { + return res.ok; + } +} + \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef2.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef2.ts new file mode 100644 index 0000000000000..e67729fdcf385 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef2.ts @@ -0,0 +1,21 @@ +// ==ORIGINAL== + +class Foo { + public /*[#|*/method/*|]*/(): Promise { + return fetch('a').then(this.foo); + } + + private foo = res => res; +} + +// ==ASYNC FUNCTION::Convert to async function== + +class Foo { + public async method(): Promise { + const res = await fetch('a'); + return this.foo(res); + } + + private foo = res => res; +} + \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef3.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef3.ts new file mode 100644 index 0000000000000..07a6b17cf2fd5 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRef3.ts @@ -0,0 +1,19 @@ +// ==ORIGINAL== + +const res = (result) => { + return result.ok; +} +function /*[#|*/f/*|]*/(): Promise { + return fetch('https://typescriptlang.org').then(res); +} + +// ==ASYNC FUNCTION::Convert to async function== + +const res = (result) => { + return result.ok; +} +async function f(): Promise { + const result = await fetch('https://typescriptlang.org'); + return res(result); +} + \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRefNoReturnVal1.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRefNoReturnVal1.ts new file mode 100644 index 0000000000000..23c41b28bda67 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_ResRefNoReturnVal1.ts @@ -0,0 +1,25 @@ +// ==ORIGINAL== + +class Foo { + public /*[#|*/method/*|]*/(): Promise { + return fetch('a').then(this.foo); + } + + private foo(res) { + console.log(res); + } +} + +// ==ASYNC FUNCTION::Convert to async function== + +class Foo { + public async method(): Promise { + const res = await fetch('a'); + return this.foo(res); + } + + private foo(res) { + console.log(res); + } +} + \ No newline at end of file From 995023c2a7f206b92c6741be768e23254bf6860f Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Thu, 14 Jan 2021 21:38:55 -0800 Subject: [PATCH 10/92] Fix double asterisk formatting in JSDoc --- src/compiler/parser.ts | 11 +- .../quickInfoJsDocTextFormatting1.ts | 101 ++++++++++++++++++ 2 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index cd61ad8ec807d..0b404578806bd 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -7602,8 +7602,15 @@ namespace ts { if (state === JSDocState.BeginningOfLine) { // leading asterisks start recording on the *next* (non-whitespace) token state = JSDocState.SawAsterisk; - indent += 1; - break; + + if (lookAhead(() => nextTokenJSDoc() === SyntaxKind.AsteriskToken)) { + pushComment(scanner.getTokenText()); + tok = nextTokenJSDoc(); + } + else { + indent += 1; + break; + } } // record the * as a comment // falls through diff --git a/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts b/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts new file mode 100644 index 0000000000000..97e9712ed3c75 --- /dev/null +++ b/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts @@ -0,0 +1,101 @@ +/// + +// Regression test for #33386 + +//// /** +//// * @param {number} var1 **Highlighted text** +//// * @param {string} var2 Another **Highlighted text** +//// */ +//// function f1(var1, var2) { } +//// +//// /** +//// * @param {number} var1 *This asterisk gets trimmed unfortunatelly +//// * @param {string} var2 Another *Regular text with an asterisk +//// */ +//// function f2(var1, var2) { } +//// +//// /** +//// * @param {number} var1 +//// * *Regular text with an asterisk +//// * @param {string} var2 +//// * Another *Regular text with an asterisk +//// */ +//// function f3(var1, var2) { } +//// +//// /** +//// * @param {number} var1 +//// * **Highlighted text** +//// * @param {string} var2 +//// * Another **Highlighted text** +//// */ +//// function f4(var1, var2) { } +//// +//// /** +//// * @param {number} var1 +//// **Highlighted text** +//// * @param {string} var2 +//// Another **Highlighted text** +//// */ +//// function f5(var1, var2) { } +//// +//// f1(/*1*/); +//// f2(/*2*/); +//// f3(/*3*/); +//// f4(/*4*/); +//// f5(/*5*/); + +verify.signatureHelp({ + marker: "1", + parameterDocComment: "**Highlighted text**", + tags: [{ + name: "param", + text: "var1 **Highlighted text**" + }, { + name: "param", + text: "var2 Another **Highlighted text**" + }] +}); +verify.signatureHelp({ + marker: "2", + parameterDocComment: "This asterisk gets trimmed unfortunatelly", + tags: [{ + name: "param", + text: "var1 This asterisk gets trimmed unfortunatelly" + }, { + name: "param", + text: "var2 Another *Regular text with an asterisk" + }] +}); +verify.signatureHelp({ + marker: "3", + parameterDocComment: "*Regular text with an asterisk", + tags: [{ + name: "param", + text: "var1 *Regular text with an asterisk" + }, { + name: "param", + text: "var2 Another *Regular text with an asterisk" + }] +}); +verify.signatureHelp({ + marker: "4", + parameterDocComment: "**Highlighted text**", + tags: [{ + name: "param", + text: "var1 **Highlighted text**" + }, { + name: "param", + text: "var2 Another **Highlighted text**" + }] +}); +verify.signatureHelp({ + marker: "5", + parameterDocComment: "**Highlighted text**", + tags: [{ + name: "param", + text: "var1 **Highlighted text**" + }, { + name: "param", + text: "var2 Another **Highlighted text**" + }] +}); \ No newline at end of file From 22f8fa443b75eb5cced42deff6398a409abb5646 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 15 Jan 2021 06:49:09 +0000 Subject: [PATCH 11/92] Update package-lock.json --- package-lock.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 72f3b28b3ffd8..6d82a06324c76 100644 --- a/package-lock.json +++ b/package-lock.json @@ -324,9 +324,9 @@ } }, "@octokit/openapi-types": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.2.0.tgz", - "integrity": "sha512-274lNUDonw10kT8wHg8fCcUc1ZjZHbWv0/TbAwb0ojhBQqZYc1cQ/4yqTVTtPMDeZ//g7xVEYe/s3vURkRghPg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.0.tgz", + "integrity": "sha512-Own8lHWVi5eEfLOnsIzAx16BoRbpkzac3QDUCxIqYMf4bjz+AGpv17UfRn1Va4lVmjwOpvZglpFI3mmxuQ+sIQ==", "dev": true }, "@octokit/plugin-paginate-rest": { @@ -402,12 +402,12 @@ } }, "@octokit/types": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.2.1.tgz", - "integrity": "sha512-jHs9OECOiZxuEzxMZcXmqrEO8GYraHF+UzNVH2ACYh8e/Y7YoT+hUf9ldvVd6zIvWv4p3NdxbQ0xx3ku5BnSiA==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.0.tgz", + "integrity": "sha512-OYlk5Di9daD0x948qhMqIgq6XLkm/2w0lgzibDgqrf+LfuAPL12WQaF/N2dO6ipOMW7Xe1jMattZiEd2bRR4Rg==", "dev": true, "requires": { - "@octokit/openapi-types": "^2.2.0", + "@octokit/openapi-types": "^2.3.0", "@types/node": ">= 8" } }, @@ -585,9 +585,9 @@ "dev": true }, "@types/node": { - "version": "14.14.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", - "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==", + "version": "14.14.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz", + "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==", "dev": true }, "@types/node-fetch": { From 8324dec9e991144f346e7a0b187adbb6c9a86a60 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Fri, 15 Jan 2021 19:52:46 +0200 Subject: [PATCH 12/92] feat(33715): include methods of class defined in a property (#42164) --- src/services/navigationBar.ts | 35 ++- .../navigationBarPropertyDeclarations.ts | 295 ++++++++++++++++++ 2 files changed, 317 insertions(+), 13 deletions(-) create mode 100644 tests/cases/fourslash/navigationBarPropertyDeclarations.ts diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 0ace63aaced71..2158270142a1e 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -183,6 +183,17 @@ namespace ts.NavigationBar { endNode(); } + function addNodeWithRecursiveInitializer(node: VariableDeclaration | PropertyAssignment | BindingElement | PropertyDeclaration): void { + if (node.initializer && isFunctionOrClassExpression(node.initializer)) { + startNode(node); + forEachChild(node.initializer, addChildrenRecursively); + endNode(); + } + else { + addNodeWithRecursiveChild(node, node.initializer); + } + } + /** Look for navigation bar items in node's subtree, adding them to the current `parent`. */ function addChildrenRecursively(node: Node | undefined): void { curCancellationToken.throwIfCancellationRequested(); @@ -215,8 +226,12 @@ namespace ts.NavigationBar { break; case SyntaxKind.PropertyDeclaration: + if (!hasDynamicName(node)) { + addNodeWithRecursiveInitializer(node); + } + break; case SyntaxKind.PropertySignature: - if (!hasDynamicName((node))) { + if (!hasDynamicName(node)) { addLeafNode(node); } break; @@ -255,22 +270,16 @@ namespace ts.NavigationBar { break; case SyntaxKind.BindingElement: case SyntaxKind.PropertyAssignment: - case SyntaxKind.VariableDeclaration: - const { name, initializer } = node; - if (isBindingPattern(name)) { - addChildrenRecursively(name); - } - else if (initializer && isFunctionOrClassExpression(initializer)) { - // Add a node for the VariableDeclaration, but not for the initializer. - startNode(node); - forEachChild(initializer, addChildrenRecursively); - endNode(); + case SyntaxKind.VariableDeclaration: { + const child = node; + if (isBindingPattern(child.name)) { + addChildrenRecursively(child.name); } else { - addNodeWithRecursiveChild(node, initializer); + addNodeWithRecursiveInitializer(child); } break; - + } case SyntaxKind.FunctionDeclaration: const nameNode = (node).name; // If we see a function declaration track as a possible ES5 class diff --git a/tests/cases/fourslash/navigationBarPropertyDeclarations.ts b/tests/cases/fourslash/navigationBarPropertyDeclarations.ts new file mode 100644 index 0000000000000..4de14049ab795 --- /dev/null +++ b/tests/cases/fourslash/navigationBarPropertyDeclarations.ts @@ -0,0 +1,295 @@ +/// + +////class A { +//// public A1 = class { +//// public x = 1; +//// private y() {} +//// protected z() {} +//// } +//// +//// public A2 = { +//// x: 1, +//// y() {}, +//// z() {} +//// } +//// +//// public A3 = function () {} +//// public A4 = () => {} +//// public A5 = 1; +//// public A6 = "A6"; +//// +//// public ["A7"] = class { +//// public x = 1; +//// private y() {} +//// protected z() {} +//// } +//// +//// public [1] = { +//// x: 1, +//// y() {}, +//// z() {} +//// } +//// +//// public [1 + 1] = 1; +////} + +verify.navigationTree({ + text: "", + kind: "script", + childItems: [ + { + text: "A", + kind: "class", + childItems: [ + { + text: "[1]", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property" + }, + { + text: "y", + kind: "method" + }, + { + text: "z", + kind: "method" + } + ] + }, + { + text: "A1", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property", + kindModifiers: "public" + }, + { + text: "y", + kind: "method", + kindModifiers: "private" + }, + { + text: "z", + kind: "method", + kindModifiers: "protected" + } + ] + }, + { + text: "A2", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property" + }, + { + text: "y", + kind: "method" + }, + { + text: "z", + kind: "method" + } + ] + }, + { + text: "A3", + kind: "property", + kindModifiers: "public" + }, + { + text: "A4", + kind: "property", + kindModifiers: "public" + }, + { + text: "A5", + kind: "property", + kindModifiers: "public" + }, + { + text: "A6", + kind: "property", + kindModifiers: "public" + }, + { + text: "[\"A7\"]", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property", + kindModifiers: "public" + }, + { + text: "y", + kind: "method", + kindModifiers: "private" + }, + { + text: "z", + kind: "method", + kindModifiers: "protected" + } + ] + } + ] + } + ] +}); + +verify.navigationBar([ + { + text: "", + kind: "script", + childItems: [ + { + text: "A", + kind: "class" + } + ] + }, + { + text: "A", + kind: "class", + childItems: [ + { + text: "[1]", + kind: "property", + kindModifiers: "public" + }, + { + text: "A1", + kind: "property", + kindModifiers: "public" + }, + { + text: "A2", + kind: "property", + kindModifiers: "public" + }, + { + text: "A3", + kind: "property", + kindModifiers: "public" + }, + { + text: "A4", + kind: "property", + kindModifiers: "public" + }, + { + text: "A5", + kind: "property", + kindModifiers: "public" + }, + { + text: "A6", + kind: "property", + kindModifiers: "public" + }, + { + text: "[\"A7\"]", + kind: "property", + kindModifiers: "public" + } + ], + indent: 1 + }, + { + text: "[1]", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property" + }, + { + text: "y", + kind: "method" + }, + { + text: "z", + kind: "method" + } + ], + indent: 2 + }, + { + text: "A1", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property", + kindModifiers: "public" + }, + { + text: "y", + kind: "method", + kindModifiers: "private" + }, + { + text: "z", + kind: "method", + kindModifiers: "protected" + } + ], + indent: 2 + }, + { + text: "A2", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property" + }, + { + text: "y", + kind: "method" + }, + { + text: "z", + kind: "method" + } + ], + indent: 2 + }, + { + text: "[\"A7\"]", + kind: "property", + kindModifiers: "public", + childItems: [ + { + text: "x", + kind: "property", + kindModifiers: "public" + }, + { + text: "y", + kind: "method", + kindModifiers: "private" + }, + { + text: "z", + kind: "method", + kindModifiers: "protected" + } + ], + indent: 2 + } +]); From 0aa77fcea737775103ecf7ad029da0784053d74b Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 15 Jan 2021 15:42:23 -0800 Subject: [PATCH 13/92] Update user baselines +cc @sandersn (#41496) Co-authored-by: typescript-bot --- .../baselines/reference/docker/azure-sdk.log | 265 +++++------ tests/baselines/reference/docker/pyright.log | 10 +- tests/baselines/reference/docker/vue-next.log | 264 ++++------- .../user/TypeScript-Node-Starter.log | 51 ++- .../user/TypeScript-WeChat-Starter.log | 7 +- tests/baselines/reference/user/acorn.log | 32 +- .../reference/user/adonis-framework.log | 22 +- tests/baselines/reference/user/axios-src.log | 25 +- tests/baselines/reference/user/bcryptjs.log | 2 +- .../user/chrome-devtools-frontend.log | 46 +- tests/baselines/reference/user/debug.log | 45 +- tests/baselines/reference/user/discord.js.log | 12 +- .../reference/user/enhanced-resolve.log | 2 - .../reference/user/follow-redirects.log | 2 +- tests/baselines/reference/user/formik.log | 13 - tests/baselines/reference/user/fp-ts.log | 10 + .../baselines/reference/user/graceful-fs.log | 2 +- tests/baselines/reference/user/lodash.log | 22 +- tests/baselines/reference/user/npm.log | 69 ++- tests/baselines/reference/user/npmlog.log | 5 +- tests/baselines/reference/user/uglify-js.log | 427 +++++++++--------- tests/baselines/reference/user/webpack.log | 72 --- 22 files changed, 620 insertions(+), 785 deletions(-) delete mode 100644 tests/baselines/reference/user/formik.log create mode 100644 tests/baselines/reference/user/fp-ts.log delete mode 100644 tests/baselines/reference/user/webpack.log diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index 46b6d2421c9f9..bbbaa40566b27 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,140 +2,147 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 15.1.0 (unstable) +Node.js version is 15.5.1 (unstable) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... -BLOCKED (51) -================================ -@azure/abort-controller -@azure/core-auth -@azure/logger -@azure/core-http -@azure/core-asynciterator-polyfill -@azure/identity -@azure/communication-common -@azure/core-amqp -@azure/core-lro -@azure/core-paging -@azure/dev-tool -@azure/test-utils-recorder -@azure/communication-administration -@azure/core-https -@azure/core-xml -@azure/event-hubs -@azure/event-processor-host -@azure/keyvault-secrets -@azure/schema-registry -@azure/storage-blob -@azure/ai-anomaly-detector -@azure/ai-form-recognizer -@azure/ai-metrics-advisor -@azure/ai-text-analytics -@azure/app-configuration -@azure/communication-chat -@azure/communication-sms -@azure/core-arm -@azure/core-client -@azure/core-tracing -@azure/cosmos -@azure/data-tables -@azure/digital-twins-core -@azure/eventgrid -@azure/eventhubs-checkpointstore-blob -@azure/keyvault-admin -@azure/keyvault-certificates -@azure/keyvault-common -@azure/keyvault-keys -@azure/monitor-opentelemetry-exporter -@azure/schema-registry-avro -@azure/search-documents -@azure/service-bus -@azure/storage-blob-changefeed -@azure/storage-file-datalake -@azure/storage-file-share -@azure/storage-internal-avro -@azure/storage-queue -@azure/template -@azure/test-utils-perfstress -testhub -================================ -FAILURE (1) -================================ -@azure/eslint-plugin-azure-sdk (? seconds) ->>> @azure/eslint-plugin-azure-sdk -tsc -p tsconfig.build.json && prettier --write dist/**/*.{js,json,md} -../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:6:11 - error TS2300: Duplicate identifier 'Linter'. -6 interface Linter { - ~~~~~~ -../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:21:19 - error TS2300: Duplicate identifier 'Linter'. -21 declare namespace Linter { - ~~~~~~ -../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:106:15 - error TS2300: Duplicate identifier 'Linter'. -106 declare const Linter: new () => Linter; - ~~~~~~ -../../temp/node_modules/.pnpm/@typescript-eslint/typescript-estree@X.X.X_typescript@X.X.X/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:3:3999 - error TS2694: Namespace 'ts' has no exported member 'JSDocAuthorTag'. -3 export declare type TSNode = ts.Node & (ts.Modifier | ts.Identifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.CommentRange | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag); - ~~~~~~~~~~~~~~ -Found 4 errors. -================================ -Error: Project(s) failed -rush rebuild - Errors! (? seconds) +==[ @azure/eslint-plugin-azure-sdk ]==============================[ 1 of 58 ]== +"@azure/abort-controller" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/communication-administration" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/communication-chat" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/communication-common" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/communication-sms" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-amqp" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/event-hubs" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/eventhubs-checkpointstore-blob" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/service-bus" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/eventgrid" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-auth" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/ai-anomaly-detector" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/ai-form-recognizer" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/ai-metrics-advisor" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/ai-text-analytics" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-client" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-http" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/app-configuration" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/attestation" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-lro" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/keyvault-admin" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/keyvault-certificates" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/keyvault-keys" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/keyvault-secrets" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-blob" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-blob-changefeed" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-file-datalake" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/synapse-artifacts" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/data-tables" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/digital-twins-core" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/identity" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/schema-registry" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/schema-registry-avro" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-queue" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/keyvault-common" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/opentelemetry-exporter-azure-monitor" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/search-documents" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-file-share" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/synapse-access-control" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/synapse-managed-private-endpoints" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/synapse-monitoring" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/synapse-spark" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/template" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/test-utils-perfstress" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/test-utils-recorder" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/storage-internal-avro" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/test-utils-multi-version" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-https" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-asynciterator-polyfill" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-paging" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-tracing" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-xml" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/cosmos" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/dev-tool" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/event-processor-host" is blocked by "@azure/eslint-plugin-azure-sdk". +"testhub" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/logger" is blocked by "@azure/eslint-plugin-azure-sdk". +==[ BLOCKED: 57 projects ]===================================================== +These projects were blocked by dependencies that failed: + @azure/abort-controller + @azure/ai-anomaly-detector + @azure/ai-form-recognizer + @azure/ai-metrics-advisor + @azure/ai-text-analytics + @azure/app-configuration + @azure/attestation + @azure/communication-administration + @azure/communication-chat + @azure/communication-common + @azure/communication-sms + @azure/core-amqp + @azure/core-asynciterator-polyfill + @azure/core-auth + @azure/core-client + @azure/core-http + @azure/core-https + @azure/core-lro + @azure/core-paging + @azure/core-tracing + @azure/core-xml + @azure/cosmos + @azure/data-tables + @azure/dev-tool + @azure/digital-twins-core + @azure/event-hubs + @azure/event-processor-host + @azure/eventgrid + @azure/eventhubs-checkpointstore-blob + @azure/identity + @azure/keyvault-admin + @azure/keyvault-certificates + @azure/keyvault-common + @azure/keyvault-keys + @azure/keyvault-secrets + @azure/logger + @azure/opentelemetry-exporter-azure-monitor + @azure/schema-registry + @azure/schema-registry-avro + @azure/search-documents + @azure/service-bus + @azure/storage-blob + @azure/storage-blob-changefeed + @azure/storage-file-datalake + @azure/storage-file-share + @azure/storage-internal-avro + @azure/storage-queue + @azure/synapse-access-control + @azure/synapse-artifacts + @azure/synapse-managed-private-endpoints + @azure/synapse-monitoring + @azure/synapse-spark + @azure/template + @azure/test-utils-multi-version + @azure/test-utils-perfstress + @azure/test-utils-recorder + testhub +==[ FAILURE: 1 project ]======================================================= +--[ FAILURE: @azure/eslint-plugin-azure-sdk ]----------------[ ? seconds ]-- +Invoking: tsc -p tsconfig.build.json && prettier --write dist/**/*.{js,json,md} +../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts:22:136 - error TS2307: Cannot find module '@typescript-eslint/scope-manager/dist/scope/BlockScope'. +22 declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.Property | TSESTree.MethodDefinition, initialScope?: import("@typescript-eslint/scope-manager/dist/scope/BlockScope").BlockScope | import("@typescript-eslint/scope-manager/dist/scope/CatchScope").CatchScope | import("@typescript-eslint/scope-manager/dist/scope/ClassScope").ClassScope | import("@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope").ConditionalTypeScope | import("@typescript-eslint/scope-manager/dist/scope/ForScope").ForScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope").FunctionExpressionNameScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionScope").FunctionScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope").FunctionTypeScope | import("@typescript-eslint/scope-manager/dist/scope/GlobalScope").GlobalScope | import("@typescript-eslint/scope-manager/dist/scope/MappedTypeScope").MappedTypeScope | import("@typescript-eslint/scope-manager/dist/scope/ModuleScope").ModuleScope | import("@typescript-eslint/scope-manager/dist/scope/SwitchScope").SwitchScope | import("@typescript-eslint/scope-manager/dist/scope/TSEnumScope").TSEnumScope | import("@typescript-eslint/scope-manager/dist/scope/TSModuleScope").TSModuleScope | import("@typescript-eslint/scope-manager/dist/scope/TypeScope").TypeScope | import("@typescript-eslint/scope-manager/dist/scope/WithScope").WithScope | undefined) => string | null; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts:22:214 - error TS2307: Cannot find module '@typescript-eslint/scope-manager/dist/scope/CatchScope'. +22 declare const getPropertyName: (node: TSESTree.MemberExpression | TSESTree.Property | TSESTree.MethodDefinition, initialScope?: import("@typescript-eslint/scope-manager/dist/scope/BlockScope").BlockScope | import("@typescript-eslint/scope-manager/dist/scope/CatchScope").CatchScope | import("@typescript-eslint/scope-manager/dist/scope/ClassScope").ClassScope | import("@typescript-eslint/scope-manager/dist/scope/ConditionalTypeScope").ConditionalTypeScope | import("@typescript-eslint/scope-manager/dist/scope/ForScope").ForScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionExpressionNameScope").FunctionExpressionNameScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionScope").FunctionScope | import("@typescript-eslint/scope-manager/dist/scope/FunctionTypeScope").FunctionTypeScope | import("@typescript-eslint/scope-manager/dist/scope/GlobalScope").GlobalScope | import("@typescript-eslint/scope-manager/dist/scope/MappedTypeScope").MappedTypeScope | import("@typescript-eslint/scope-manager/dist/scope/ModuleScope").ModuleScope | import("@typescript-eslint/scope-manager/dist/scope/SwitchScope").SwitchScope | import("@typescript-eslint/scope-manager/dist/scope/TSEnumScope").TSEnumScope | import("@typescript-eslint/scope-manager/dist/scope/TSModuleScope").TSModuleScope | import("@typescript-eslint/scope-manager/dist/scope/TypeScope").TypeScope | import("@typescript-eslint/scope-manager/dist/scope/WithScope").WithScope | undefined) => string | null; + ...260 lines omitted... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +src/rules/ts-use-interface-parameters.ts:13:8 - error TS2307: Cannot find module '@typescript-eslint/typescript-estree/dist/parser-options'. +13 } from "@typescript-eslint/typescript-estree/dist/parser-options"; + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Found 55 errors. +rush rebuild (? seconds) Standard error: Your version of Node.js (X.X.X) has not been tested with this release of Rush. Please consider installing a newer version of the "@microsoft/rush" package, or downgrading Node.js. Your version of Node.js (X.X.X) is an odd-numbered release. These releases frequently have bugs. Please consider installing a Long Term Support (LTS) version instead. -XX of XX: [@azure/eslint-plugin-azure-sdk] failed! -XX of XX: [@azure/abort-controller] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/communication-administration] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/communication-chat] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/communication-common] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/communication-sms] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-amqp] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/event-hubs] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/eventhubs-checkpointstore-blob] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/service-bus] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-auth] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/ai-anomaly-detector] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/ai-form-recognizer] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/ai-metrics-advisor] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/ai-text-analytics] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-client] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-http] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/app-configuration] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-arm] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-lro] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/keyvault-admin] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/keyvault-certificates] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/keyvault-keys] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/keyvault-secrets] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-blob] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-blob-changefeed] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-file-datalake] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/data-tables] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/digital-twins-core] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/eventgrid] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/identity] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/schema-registry] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/schema-registry-avro] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-queue] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/keyvault-common] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/monitor-opentelemetry-exporter] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/search-documents] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-file-share] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/template] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/test-utils-perfstress] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/test-utils-recorder] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/storage-internal-avro] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-https] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-asynciterator-polyfill] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-paging] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-tracing] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/core-xml] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/cosmos] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/dev-tool] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/event-processor-host] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [testhub] blocked by [@azure/eslint-plugin-azure-sdk]! -XX of XX: [@azure/logger] blocked by [@azure/eslint-plugin-azure-sdk]! -[@azure/eslint-plugin-azure-sdk] Returned error code: 2 +Returned error code: 2 +"@azure/eslint-plugin-azure-sdk" failed to build. +Projects failed to build. diff --git a/tests/baselines/reference/docker/pyright.log b/tests/baselines/reference/docker/pyright.log index 72a0cf2c4f4ed..aa5412d777c7a 100644 --- a/tests/baselines/reference/docker/pyright.log +++ b/tests/baselines/reference/docker/pyright.log @@ -1,17 +1,9 @@ -Exit Code: 2 +Exit Code: 0 Standard output: -pyright-internal: src/tests/harness/utils.ts(328,12): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? Standard error: lerna notice cli vX.X.X lerna info Executing command in 3 packages: "tsc --noEmit" -lerna ERR! Received non-zero exit code 2 during execution lerna success exec Executed command in 3 packages: "tsc --noEmit" -npm ERR! code 2 -npm ERR! path /pyright -npm ERR! command failed -npm ERR! command sh -c lerna exec --stream --concurrency 1 --no-bail -- tsc --noEmit -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log diff --git a/tests/baselines/reference/docker/vue-next.log b/tests/baselines/reference/docker/vue-next.log index 6a2071a9605c4..f790e8d748b79 100644 --- a/tests/baselines/reference/docker/vue-next.log +++ b/tests/baselines/reference/docker/vue-next.log @@ -1,10 +1,10 @@ -Exit Code: 0 +Exit Code: 7 Standard output: > build > node scripts/build.js "--types" Rolling up type definitions for compiler-core... -Analysis will use the bundled TypeScript version 4.0.5 +Analysis will use the bundled TypeScript version 4.1.3 *** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. Writing: /vue-next/temp/compiler-core.api.json The API report is up to date: temp/compiler-core.api.md @@ -12,216 +12,130 @@ Writing package typings: /vue-next/packages/compiler-core/dist/compiler-core.d.t Writing package typings: /vue-next/dist/compiler-core.d.ts API Extractor completed successfully. Rolling up type definitions for compiler-dom... -Analysis will use the bundled TypeScript version 4.0.5 +Analysis will use the bundled TypeScript version 4.1.3 *** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. Writing: /vue-next/temp/compiler-dom.api.json The API report is up to date: temp/compiler-dom.api.md Writing package typings: /vue-next/packages/compiler-dom/dist/compiler-dom.d.ts Writing package typings: /vue-next/dist/compiler-dom.d.ts API Extractor completed successfully. -Rolling up type definitions for compiler-sfc... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/compiler-sfc.api.json -The API report is up to date: temp/compiler-sfc.api.md -Writing package typings: /vue-next/packages/compiler-sfc/dist/compiler-sfc.d.ts -Writing package typings: /vue-next/dist/compiler-sfc.d.ts -API Extractor completed successfully. Rolling up type definitions for compiler-ssr... -Analysis will use the bundled TypeScript version 4.0.5 +Analysis will use the bundled TypeScript version 4.1.3 *** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. Writing: /vue-next/temp/compiler-ssr.api.json The API report is up to date: temp/compiler-ssr.api.md Writing package typings: /vue-next/packages/compiler-ssr/dist/compiler-ssr.d.ts Writing package typings: /vue-next/dist/compiler-ssr.d.ts -API Extractor completed successfully. -Rolling up type definitions for reactivity... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/reactivity.api.json -The API report is up to date: temp/reactivity.api.md -Writing package typings: /vue-next/packages/reactivity/dist/reactivity.d.ts -Writing package typings: /vue-next/dist/reactivity.d.ts -API Extractor completed successfully. -Rolling up type definitions for runtime-core... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/runtime-core.api.json -The API report is up to date: temp/runtime-core.api.md -Writing package typings: /vue-next/packages/runtime-core/dist/runtime-core.d.ts -Writing package typings: /vue-next/dist/runtime-core.d.ts -API Extractor completed successfully. -Rolling up type definitions for runtime-dom... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/runtime-dom.api.json -The API report is up to date: temp/runtime-dom.api.md -Writing package typings: /vue-next/packages/runtime-dom/dist/runtime-dom.d.ts -Writing package typings: /vue-next/dist/runtime-dom.d.ts -API Extractor completed successfully. -Rolling up type definitions for server-renderer... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/server-renderer.api.json -The API report is up to date: temp/server-renderer.api.md -Writing package typings: /vue-next/packages/server-renderer/dist/server-renderer.d.ts -Writing package typings: /vue-next/dist/server-renderer.d.ts -API Extractor completed successfully. -Rolling up type definitions for shared... -Analysis will use the bundled TypeScript version 4.0.5 +Rolling up type definitions for compiler-sfc... +Analysis will use the bundled TypeScript version 4.1.3 *** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/shared.api.json -The API report is up to date: temp/shared.api.md -Writing package typings: /vue-next/packages/shared/dist/shared.d.ts -Writing package typings: /vue-next/dist/shared.d.ts +Writing: /vue-next/temp/compiler-sfc.api.json +The API report is up to date: temp/compiler-sfc.api.md +Writing package typings: /vue-next/packages/compiler-sfc/dist/compiler-sfc.d.ts +Writing package typings: /vue-next/dist/compiler-sfc.d.ts API Extractor completed successfully. -Rolling up type definitions for vue... -Analysis will use the bundled TypeScript version 4.0.5 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/vue.api.json -The API report is up to date: temp/vue.api.md -Writing package typings: /vue-next/packages/vue/dist/vue.d.ts -Writing package typings: /vue-next/dist/vue.d.ts API Extractor completed successfully. -compiler-dom.global.prod.js min:44.24kb / gzip:17.04kb / brotli:15.46kb -reactivity.global.prod.js min:8.37kb / gzip:3.24kb / brotli:3.00kb -runtime-dom.global.prod.js min:68.76kb / gzip:26.44kb / brotli:23.91kb -size-check.global.prod.js min:39.98kb / gzip:15.95kb / brotli:14.55kb -vue.global.prod.js min:105.87kb / gzip:40.15kb / brotli:36.04kb Standard error: /vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.esm-bundler.js... -created packages/compiler-core/dist/compiler-core.esm-bundler.js in ?s -/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.js... -created packages/compiler-core/dist/compiler-core.cjs.js in ?s -/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.prod.js... -created packages/compiler-core/dist/compiler-core.cjs.prod.js in ?s -Warning: dist/packages/compiler-core/src/options.d.ts:36:25 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/compiler-core/src/options.d.ts:36:26 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/compiler-core/src/options.d.ts:36:19 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -Warning: dist/packages/compiler-core/src/options.d.ts:36:20 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -Warning: dist/packages/compiler-core/src/options.d.ts:59:39 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/compiler-core/src/options.d.ts:59:21 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -Warning: dist/packages/compiler-core/src/options.d.ts:80:42 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/compiler-core/src/options.d.ts:80:43 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/compiler-core/src/options.d.ts:80:35 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -Warning: dist/packages/compiler-core/src/options.d.ts:80:36 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm-bundler.js... created packages/compiler-dom/dist/compiler-dom.esm-bundler.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm-browser.js... +created packages/compiler-core/dist/compiler-core.esm-bundler.js in ?s +/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.js... created packages/compiler-dom/dist/compiler-dom.esm-browser.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.cjs.js... +created packages/compiler-core/dist/compiler-core.cjs.js in ?s +/vue-next/packages/compiler-core/src/index.ts → packages/compiler-core/dist/compiler-core.cjs.prod.js... created packages/compiler-dom/dist/compiler-dom.cjs.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.global.js... +created packages/compiler-core/dist/compiler-core.cjs.prod.js in ?s created packages/compiler-dom/dist/compiler-dom.global.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.esm-browser.prod.js... created packages/compiler-dom/dist/compiler-dom.esm-browser.prod.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.cjs.prod.js... created packages/compiler-dom/dist/compiler-dom.cjs.prod.js in ?s /vue-next/packages/compiler-dom/src/index.ts → packages/compiler-dom/dist/compiler-dom.global.prod.js... -(!) Missing global variable names -Use output.globals to specify browser global variable names corresponding to external modules -@babel/parser (guessing 'parser') -estree-walker (guessing 'estreeWalker') -created packages/compiler-dom/dist/compiler-dom.global.prod.js in ?s +Warning: dist/packages/compiler-core/src/options.d.ts:36:25 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:36:26 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:36:19 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:36:20 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:87:42 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:87:43 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:87:35 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:87:36 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:128:39 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:128:21 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:149:42 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:149:43 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +Warning: dist/packages/compiler-core/src/options.d.ts:149:35 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +Warning: dist/packages/compiler-core/src/options.d.ts:149:36 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" /vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.cjs.js... +created packages/compiler-dom/dist/compiler-dom.global.prod.js in ?s +/vue-next/packages/compiler-ssr/src/index.ts → packages/compiler-ssr/dist/compiler-ssr.cjs.js... created packages/compiler-sfc/dist/compiler-sfc.cjs.js in ?s /vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.global.js... -created packages/compiler-sfc/dist/compiler-sfc.global.js in ?s -/vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.esm-browser.js... -created packages/compiler-sfc/dist/compiler-sfc.esm-browser.js in ?s -/vue-next/packages/compiler-ssr/src/index.ts → packages/compiler-ssr/dist/compiler-ssr.cjs.js... created packages/compiler-ssr/dist/compiler-ssr.cjs.js in ?s +(!) Missing shims for Node.js built-ins +Creating a browser bundle that depends on 'path', 'url' and 'util'. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills +(!) Missing global variable names +Use output.globals to specify browser global variable names corresponding to external modules +path (guessing 'path') +url (guessing 'url') +util (guessing 'require$$0') +created packages/compiler-sfc/dist/compiler-sfc.global.js in ?s +Warning: dist/packages/compiler-sfc/src/compileScript.d.ts:27:36 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag +Warning: dist/packages/compiler-sfc/src/compileScript.d.ts:27:23 - (tsdoc-html-tag-missing-equals) The HTML element has an invalid attribute: Expecting "=" after HTML attribute name +Warning: dist/packages/compiler-sfc/src/compileStyle.d.ts:18:8 - (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative /vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm-bundler.js... -created packages/reactivity/dist/reactivity.esm-bundler.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm-browser.js... -created packages/reactivity/dist/reactivity.esm-browser.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.js... -created packages/reactivity/dist/reactivity.cjs.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.global.js... -created packages/reactivity/dist/reactivity.global.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.esm-browser.prod.js... -created packages/reactivity/dist/reactivity.esm-browser.prod.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.cjs.prod.js... -created packages/reactivity/dist/reactivity.cjs.prod.js in ?s -/vue-next/packages/reactivity/src/index.ts → packages/reactivity/dist/reactivity.global.prod.js... -created packages/reactivity/dist/reactivity.global.prod.js in ?s /vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.esm-bundler.js... -created packages/runtime-core/dist/runtime-core.esm-bundler.js in ?s -/vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.cjs.js... -created packages/runtime-core/dist/runtime-core.cjs.js in ?s -/vue-next/packages/runtime-core/src/index.ts → packages/runtime-core/dist/runtime-core.cjs.prod.js... -created packages/runtime-core/dist/runtime-core.cjs.prod.js in ?s -Warning: dist/packages/runtime-core/src/index.d.ts:33:9 - (TS2717) Subsequent property declarations must have the same type. Property 'runtimeCoreBailTypes' must be of type 'VNode | { $: ComponentInternalInstance; }', but here has type 'VNode | { $: ComponentInternalInstance; }'. -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm-bundler.js... -created packages/runtime-dom/dist/runtime-dom.esm-bundler.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm-browser.js... -created packages/runtime-dom/dist/runtime-dom.esm-browser.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.cjs.js... -created packages/runtime-dom/dist/runtime-dom.cjs.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.global.js... -created packages/runtime-dom/dist/runtime-dom.global.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.esm-browser.prod.js... -created packages/runtime-dom/dist/runtime-dom.esm-browser.prod.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.cjs.prod.js... -created packages/runtime-dom/dist/runtime-dom.cjs.prod.js in ?s -/vue-next/packages/runtime-dom/src/index.ts → packages/runtime-dom/dist/runtime-dom.global.prod.js... -created packages/runtime-dom/dist/runtime-dom.global.prod.js in ?s -/vue-next/packages/server-renderer/src/index.ts → packages/server-renderer/dist/server-renderer.cjs.js... -(!) Unresolved dependencies -https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -stream (imported by packages/server-renderer/src/renderToStream.ts) -created packages/server-renderer/dist/server-renderer.cjs.js in ?s -/vue-next/packages/server-renderer/src/index.ts → packages/server-renderer/dist/server-renderer.cjs.prod.js... -(!) Unresolved dependencies -https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -stream (imported by packages/server-renderer/src/renderToStream.ts) -created packages/server-renderer/dist/server-renderer.cjs.prod.js in ?s -/vue-next/packages/shared/src/index.ts → packages/shared/dist/shared.esm-bundler.js... -created packages/shared/dist/shared.esm-bundler.js in ?s -/vue-next/packages/shared/src/index.ts → packages/shared/dist/shared.cjs.js... -created packages/shared/dist/shared.cjs.js in ?s -/vue-next/packages/shared/src/index.ts → packages/shared/dist/shared.cjs.prod.js... -created packages/shared/dist/shared.cjs.prod.js in ?s -Warning: dist/packages/shared/src/index.d.ts:15:12 - (tsdoc-characters-after-block-tag) The token "@babel" looks like a TSDoc tag but contains an invalid character "/"; if it is not a tag, use a backslash to escape the "@" -Warning: dist/packages/shared/src/makeMap.d.ts:5:9 - (tsdoc-unnecessary-backslash) A backslash can only be used to escape a punctuation character -Warning: dist/packages/shared/src/makeMap.d.ts:5:11 - (tsdoc-unnecessary-backslash) A backslash can only be used to escape a punctuation character -Warning: dist/packages/shared/src/makeMap.d.ts:5:17 - (tsdoc-unnecessary-backslash) A backslash can only be used to escape a punctuation character -Warning: dist/packages/shared/src/makeMap.d.ts:5:19 - (tsdoc-unnecessary-backslash) A backslash can only be used to escape a punctuation character -Warning: dist/packages/shared/src/toDisplayString.d.ts:2:36 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/shared/src/toDisplayString.d.ts:2:37 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -Warning: dist/packages/shared/src/toDisplayString.d.ts:2:19 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -Warning: dist/packages/shared/src/toDisplayString.d.ts:2:20 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -/vue-next/packages/size-check/src/index.ts → packages/size-check/dist/size-check.global.js... -created packages/size-check/dist/size-check.global.js in ?s -/vue-next/packages/size-check/src/index.ts → packages/size-check/dist/size-check.global.prod.js... -created packages/size-check/dist/size-check.global.prod.js in ?s -/vue-next/packages/template-explorer/src/index.ts → packages/template-explorer/dist/template-explorer.global.js... -created packages/template-explorer/dist/template-explorer.global.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.esm-bundler.js... -created packages/vue/dist/vue.esm-bundler.js in ?s -/vue-next/packages/vue/src/runtime.ts → packages/vue/dist/vue.runtime.esm-bundler.js... -created packages/vue/dist/vue.runtime.esm-bundler.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.cjs.js... -created packages/vue/dist/vue.cjs.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.global.js... -created packages/vue/dist/vue.global.js in ?s -/vue-next/packages/vue/src/runtime.ts → packages/vue/dist/vue.runtime.global.js... -created packages/vue/dist/vue.runtime.global.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.esm-browser.js... -created packages/vue/dist/vue.esm-browser.js in ?s -/vue-next/packages/vue/src/runtime.ts → packages/vue/dist/vue.runtime.esm-browser.js... -created packages/vue/dist/vue.runtime.esm-browser.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.cjs.prod.js... -created packages/vue/dist/vue.cjs.prod.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.global.prod.js... -created packages/vue/dist/vue.global.prod.js in ?s -/vue-next/packages/vue/src/runtime.ts → packages/vue/dist/vue.runtime.global.prod.js... -created packages/vue/dist/vue.runtime.global.prod.js in ?s -/vue-next/packages/vue/src/index.ts → packages/vue/dist/vue.esm-browser.prod.js... -created packages/vue/dist/vue.esm-browser.prod.js in ?s -/vue-next/packages/vue/src/runtime.ts → packages/vue/dist/vue.runtime.esm-browser.prod.js... -created packages/vue/dist/vue.runtime.esm-browser.prod.js in ?s +[!] (plugin rpt2) Error: /vue-next/packages/reactivity/src/baseHandlers.ts(192,3): semantic error TS2322: Type '(target: object) => (string | number | symbol)[]' is not assignable to type '(target: object) => ArrayLike'. + Type '(string | number | symbol)[]' is not assignable to type 'ArrayLike'. + Index signatures are incompatible. + Type 'string | number | symbol' is not assignable to type 'string | symbol'. + Type 'number' is not assignable to type 'string | symbol'. +packages/reactivity/src/baseHandlers.ts +Error: /vue-next/packages/reactivity/src/baseHandlers.ts(192,3): semantic error TS2322: Type '(target: object) => (string | number | symbol)[]' is not assignable to type '(target: object) => ArrayLike'. + Type '(string | number | symbol)[]' is not assignable to type 'ArrayLike'. + Index signatures are incompatible. + Type 'string | number | symbol' is not assignable to type 'string | symbol'. + Type 'number' is not assignable to type 'string | symbol'. + at error (/vue-next/node_modules/rollup/dist/shared/rollup.js:5265:30) + at throwPluginError (/vue-next/node_modules/rollup/dist/shared/rollup.js:17972:12) + at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18579:24) + at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18141:38) + at RollupContext.error (/vue-next/node_modules/rollup-plugin-typescript2/src/rollupcontext.ts:37:18) + at /vue-next/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:41:11 + at arrayEach (/vue-next/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11) + at Function.forEach (/vue-next/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:9368:14) + at _.each (/vue-next/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:9:2) + at Object.transform (/vue-next/node_modules/rollup-plugin-typescript2/src/index.ts:242:5) +/vue-next/node_modules/brotli/build/encode.js:3 +1'. +src/app.ts(75,21): error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'. +src/app.ts(116,30): error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'. +src/config/passport.ts(14,5): error TS2349: This expression is not callable. + Type 'User' has no call signatures. +src/config/passport.ts(18,24): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(18,29): error TS7006: Parameter 'user' implicitly has an 'any' type. +src/config/passport.ts(28,51): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(71,49): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(71,54): error TS7006: Parameter 'existingUser' implicitly has an 'any' type. +src/config/passport.ts(77,45): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(92,49): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(92,54): error TS7006: Parameter 'existingUser' implicitly has an 'any' type. +src/config/passport.ts(97,59): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/config/passport.ts(97,64): error TS7006: Parameter 'existingEmailUser' implicitly has an 'any' type. +src/controllers/user.ts(51,38): error TS2339: Property 'returnTo' does not exist on type 'Session & Partial'. +src/controllers/user.ts(101,46): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/controllers/user.ts(101,51): error TS7006: Parameter 'existingUser' implicitly has an 'any' type. +src/controllers/user.ts(146,29): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/controllers/user.ts(153,19): error TS2769: No overload matches this call. + Overload 1 of 3, '(options?: SaveOptions): Promise', gave the following error. + Type '(err: WriteError) => void' has no properties in common with type 'SaveOptions'. + Overload 2 of 3, '(options?: SaveOptions, fn?: (err: NativeError, doc: UserDocument) => void): void', gave the following error. + Type '(err: WriteError) => void' has no properties in common with type 'SaveOptions'. + Overload 3 of 3, '(fn?: (err: NativeError, doc: UserDocument) => void): void', gave the following error. + Argument of type '(err: WriteError) => void' is not assignable to parameter of type '(err: NativeError, doc: UserDocument) => void'. + Types of parameters 'err' and 'err' are incompatible. + Type 'NativeError' is missing the following properties from type 'WriteError': code, index, errmsg +src/controllers/user.ts(183,29): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/controllers/user.ts(186,19): error TS2769: No overload matches this call. + Overload 1 of 3, '(options?: SaveOptions): Promise', gave the following error. + Type '(err: WriteError) => void' has no properties in common with type 'SaveOptions'. + Overload 2 of 3, '(options?: SaveOptions, fn?: (err: NativeError, doc: UserDocument) => void): void', gave the following error. + Type '(err: WriteError) => void' has no properties in common with type 'SaveOptions'. + Overload 3 of 3, '(fn?: (err: NativeError, doc: UserDocument) => void): void', gave the following error. + Argument of type '(err: WriteError) => void' is not assignable to parameter of type '(err: NativeError, doc: UserDocument) => void'. + Types of parameters 'err' and 'err' are incompatible. + Type 'NativeError' is not assignable to type 'WriteError'. +src/controllers/user.ts(215,29): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/controllers/user.ts(349,54): error TS7006: Parameter 'err' implicitly has an 'any' type. +src/models/User.ts(81,15): error TS2339: Property 'email' does not exist on type 'Document'. +src/models/User.ts(84,54): error TS2339: Property 'email' does not exist on type 'Document'. diff --git a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log index ffbea15477bbf..04c1a1db03d35 100644 --- a/tests/baselines/reference/user/TypeScript-WeChat-Starter.log +++ b/tests/baselines/reference/user/TypeScript-WeChat-Starter.log @@ -1,11 +1,6 @@ Exit Code: 2 Standard output: -node_modules/@types/connect/index.d.ts(21,42): error TS2689: Cannot extend an interface 'http.IncomingMessage'. Did you mean 'implements'? -node_modules/@types/serve-static/index.d.ts(18,45): error TS2694: Namespace '"http"' has no exported member 'OutgoingMessage'. -node_modules/@types/serve-static/index.d.ts(25,49): error TS2694: Namespace '"http"' has no exported member 'OutgoingMessage'. -node_modules/@types/serve-static/index.d.ts(25,72): error TS2694: Namespace '"http"' has no exported member 'OutgoingMessage'. -node_modules/@types/serve-static/index.d.ts(98,45): error TS2694: Namespace '"http"' has no exported member 'OutgoingMessage'. -node_modules/@types/serve-static/index.d.ts(102,56): error TS2694: Namespace '"http"' has no exported member 'OutgoingMessage'. +node_modules/@types/connect/index.d.ts(20,42): error TS2689: Cannot extend an interface 'http.IncomingMessage'. Did you mean 'implements'? diff --git a/tests/baselines/reference/user/acorn.log b/tests/baselines/reference/user/acorn.log index 368f26b5eef66..2fa0b829304cd 100644 --- a/tests/baselines/reference/user/acorn.log +++ b/tests/baselines/reference/user/acorn.log @@ -479,32 +479,26 @@ node_modules/acorn/acorn/dist/bin.js(54,30): error TS2769: No overload matches t Argument of type '2 | null' is not assignable to parameter of type 'string | number | undefined'. Type 'null' is not assignable to type 'string | number | undefined'. node_modules/acorn/acorn/dist/bin.js(58,23): error TS2769: No overload matches this call. - Overload 1 of 3, '(path: string | number | Buffer | URL, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Buffer', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. - Overload 2 of 3, '(path: string | number | Buffer | URL, options: { encoding: BufferEncoding; flag?: string | undefined; } | "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | ... 4 more ... | "hex"): string', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. - Overload 3 of 3, '(path: string | number | Buffer | URL, options?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | (BaseEncodingOptions & { ...; }) | null | undefined): string | Buffer', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. + Overload 1 of 3, '(path: number | PathLike, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Buffer', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. + Type 'undefined' is not assignable to type 'number | PathLike'. + Overload 2 of 3, '(path: number | PathLike, options: { encoding: BufferEncoding; flag?: string | undefined; } | BufferEncoding): string', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. + Overload 3 of 3, '(path: number | PathLike, options?: BufferEncoding | (BaseEncodingOptions & { flag?: string | undefined; }) | null | undefined): string | Buffer', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. node_modules/acorn/bin/_acorn.js(51,30): error TS2339: Property 'getToken' does not exist on type 'Parser'. node_modules/acorn/bin/_acorn.js(59,30): error TS2769: No overload matches this call. Overload 1 of 2, '(value: any, replacer?: ((this: any, key: string, value: any) => any) | undefined, space?: string | number | undefined): string', gave the following error. Argument of type 'null' is not assignable to parameter of type '((this: any, key: string, value: any) => any) | undefined'. Overload 2 of 2, '(value: any, replacer?: (string | number)[] | null | undefined, space?: string | number | undefined): string', gave the following error. Argument of type '2 | null' is not assignable to parameter of type 'string | number | undefined'. - Type 'null' is not assignable to type 'string | number | undefined'. node_modules/acorn/bin/_acorn.js(63,23): error TS2769: No overload matches this call. - Overload 1 of 3, '(path: string | number | Buffer | URL, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Buffer', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. - Overload 2 of 3, '(path: string | number | Buffer | URL, options: { encoding: BufferEncoding; flag?: string | undefined; } | "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | ... 4 more ... | "hex"): string', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. - Overload 3 of 3, '(path: string | number | Buffer | URL, options?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | (BaseEncodingOptions & { ...; }) | null | undefined): string | Buffer', gave the following error. - Argument of type 'string | undefined' is not assignable to parameter of type 'string | number | Buffer | URL'. - Type 'undefined' is not assignable to type 'string | number | Buffer | URL'. + Overload 1 of 3, '(path: number | PathLike, options?: { encoding?: null | undefined; flag?: string | undefined; } | null | undefined): Buffer', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. + Overload 2 of 3, '(path: number | PathLike, options: { encoding: BufferEncoding; flag?: string | undefined; } | BufferEncoding): string', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. + Overload 3 of 3, '(path: number | PathLike, options?: BufferEncoding | (BaseEncodingOptions & { flag?: string | undefined; }) | null | undefined): string | Buffer', gave the following error. + Argument of type 'string | undefined' is not assignable to parameter of type 'number | PathLike'. node_modules/acorn/bin/run_test262.js(3,21): error TS2307: Cannot find module 'test262-parser-runner' or its corresponding type declarations. node_modules/acorn/dist/acorn.es.js(36,1): error TS2322: Type 'null' is not assignable to type 'string'. node_modules/acorn/dist/acorn.es.js(36,32): error TS2322: Type 'null' is not assignable to type 'string'. diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index 29ca20938d17a..ecd5417f154a1 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -35,19 +35,19 @@ node_modules/adonis-framework/src/Config/index.js(39,15): error TS2304: Cannot f node_modules/adonis-framework/src/Config/index.js(58,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Encryption/index.js(53,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Encryption/index.js(71,34): error TS2769: No overload matches this call. - Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string', gave the following error. + Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: BinaryToTextEncoding): string', gave the following error. Argument of type 'string' is not assignable to parameter of type 'undefined'. - Overload 2 of 4, '(data: string, input_encoding: "utf8" | "ascii" | "binary" | undefined, output_encoding: HexBase64BinaryEncoding): string', gave the following error. - Argument of type 'string' is not assignable to parameter of type '"utf8" | "ascii" | "binary" | undefined'. + Overload 2 of 4, '(data: string, input_encoding: Encoding | undefined, output_encoding: BinaryToTextEncoding): string', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'Encoding | undefined'. node_modules/adonis-framework/src/Encryption/index.js(77,27): error TS2322: Type 'string' is not assignable to type 'Buffer'. node_modules/adonis-framework/src/Encryption/index.js(77,50): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. node_modules/adonis-framework/src/Encryption/index.js(85,23): error TS8024: JSDoc '@param' tag has name 'value', but there is no parameter with that name. node_modules/adonis-framework/src/Encryption/index.js(87,15): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/src/Encryption/index.js(101,62): error TS2769: No overload matches this call. - Overload 1 of 4, '(data: ArrayBufferView, input_encoding: "base64" | "binary" | "hex" | undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. - Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. - Overload 2 of 4, '(data: string, input_encoding: "base64" | "binary" | "hex" | undefined, output_encoding: Utf8AsciiBinaryEncoding): string', gave the following error. - Argument of type 'string' is not assignable to parameter of type 'Utf8AsciiBinaryEncoding'. +node_modules/adonis-framework/src/Encryption/index.js(101,21): error TS2769: No overload matches this call. + Overload 1 of 4, '(data: ArrayBufferView, input_encoding: undefined, output_encoding: Encoding): string', gave the following error. + Argument of type '"base64"' is not assignable to parameter of type 'undefined'. + Overload 2 of 4, '(data: string, input_encoding: BinaryToTextEncoding | undefined, output_encoding: Encoding): string', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'Encoding'. node_modules/adonis-framework/src/Encryption/index.js(102,5): error TS2322: Type 'string' is not assignable to type 'Buffer & string'. Type 'string' is not assignable to type 'Buffer'. node_modules/adonis-framework/src/Encryption/index.js(102,33): error TS2345: Argument of type 'string' is not assignable to parameter of type 'BufferEncoding'. @@ -72,8 +72,8 @@ node_modules/adonis-framework/src/Event/index.js(207,24): error TS2304: Cannot f node_modules/adonis-framework/src/Event/index.js(256,52): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. Type 'Function' provides no match for the signature '(...values: any[]): void'. node_modules/adonis-framework/src/Event/index.js(264,28): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. -node_modules/adonis-framework/src/Event/index.js(271,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[event: string, name: any, handler: TimerHandler]'. -node_modules/adonis-framework/src/Event/index.js(278,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[event: string, name: any, handler: TimerHandler]'. +node_modules/adonis-framework/src/Event/index.js(271,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[event: string, name: any, handler: string | Function]'. +node_modules/adonis-framework/src/Event/index.js(278,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[event: string, name: any, handler: string | Function]'. node_modules/adonis-framework/src/Event/index.js(294,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. node_modules/adonis-framework/src/Exceptions/index.js(13,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. node_modules/adonis-framework/src/Exceptions/index.js(27,21): error TS2554: Expected 0 arguments, but got 3. @@ -125,7 +125,7 @@ node_modules/adonis-framework/src/Request/index.js(466,15): error TS2304: Cannot node_modules/adonis-framework/src/Request/index.js(468,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Request/index.js(480,14): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Request/index.js(482,15): error TS2304: Cannot find name 'Mixed'. -node_modules/adonis-framework/src/Request/index.js(499,17): error TS2551: Property '_params' does not exist on type 'Request'. Did you mean 'param'? +node_modules/adonis-framework/src/Request/index.js(499,17): error TS2551: Property '_params' does not exist on type 'Request'. Did you mean 'params'? node_modules/adonis-framework/src/Request/index.js(523,15): error TS2304: Cannot find name 'Objecr'. node_modules/adonis-framework/src/Request/index.js(572,23): error TS8029: JSDoc '@param' tag has name 'pattern', but there is no parameter with that name. It would match 'arguments' if it had an array type. node_modules/adonis-framework/src/Request/index.js(600,17): error TS2554: Expected 2 arguments, but got 1. diff --git a/tests/baselines/reference/user/axios-src.log b/tests/baselines/reference/user/axios-src.log index 6c9b9a57adf2d..83b628fd48844 100644 --- a/tests/baselines/reference/user/axios-src.log +++ b/tests/baselines/reference/user/axios-src.log @@ -1,17 +1,20 @@ Exit Code: 2 Standard output: lib/adapters/http.js(13,19): error TS2732: Cannot find module './../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension. -lib/adapters/http.js(84,22): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. +lib/adapters/http.js(22,12): error TS2304: Cannot find name 'AxiosProxyConfig'. +lib/adapters/http.js(34,5): error TS2532: Object is possibly 'undefined'. +lib/adapters/http.js(38,11): error TS2339: Property 'beforeRedirect' does not exist on type 'ClientRequestArgs'. +lib/adapters/http.js(109,22): error TS2345: Argument of type 'string | null' is not assignable to parameter of type 'string'. Type 'null' is not assignable to type 'string'. -lib/adapters/http.js(121,17): error TS2531: Object is possibly 'null'. -lib/adapters/http.js(121,40): error TS2531: Object is possibly 'null'. -lib/adapters/http.js(225,23): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(231,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(237,13): error TS2322: Type 'string' is not assignable to type 'Buffer'. -lib/adapters/http.js(239,15): error TS2322: Type 'string' is not assignable to type 'Buffer'. -lib/adapters/http.js(239,45): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. -lib/adapters/http.js(252,40): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(281,42): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(146,17): error TS2531: Object is possibly 'null'. +lib/adapters/http.js(146,40): error TS2531: Object is possibly 'null'. +lib/adapters/http.js(241,23): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(247,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(253,13): error TS2322: Type 'string' is not assignable to type 'Buffer'. +lib/adapters/http.js(255,15): error TS2322: Type 'string' is not assignable to type 'Buffer'. +lib/adapters/http.js(255,45): error TS2345: Argument of type 'Buffer' is not assignable to parameter of type 'string'. +lib/adapters/http.js(268,40): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(297,42): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. lib/adapters/xhr.js(65,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. lib/adapters/xhr.js(77,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. lib/adapters/xhr.js(84,51): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. @@ -49,7 +52,7 @@ lib/core/enhanceError.js(38,18): error TS2339: Property 'code' does not exist on lib/core/settle.js(20,7): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. lib/helpers/buildURL.js(22,49): error TS1016: A required parameter cannot follow an optional parameter. lib/helpers/cookies.js(16,56): error TS2551: Property 'toGMTString' does not exist on type 'Date'. Did you mean 'toUTCString'? -lib/utils.js(273,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. +lib/utils.js(271,20): error TS8029: JSDoc '@param' tag has name 'obj1', but there is no parameter with that name. It would match 'arguments' if it had an array type. diff --git a/tests/baselines/reference/user/bcryptjs.log b/tests/baselines/reference/user/bcryptjs.log index 11e3f3638be44..9f9c929d985c2 100644 --- a/tests/baselines/reference/user/bcryptjs.log +++ b/tests/baselines/reference/user/bcryptjs.log @@ -28,7 +28,7 @@ node_modules/bcryptjs/src/bcrypt/util.js(20,5): error TS2304: Cannot find name ' node_modules/bcryptjs/src/wrap.js(37,26): error TS2304: Cannot find name 'define'. node_modules/bcryptjs/src/wrap.js(37,51): error TS2304: Cannot find name 'define'. node_modules/bcryptjs/src/wrap.js(38,9): error TS2304: Cannot find name 'define'. -node_modules/bcryptjs/src/wrap.js(49,12): error TS2552: Cannot find name 'bcrypt'. Did you mean 'Crypto'? +node_modules/bcryptjs/src/wrap.js(49,12): error TS2552: Cannot find name 'bcrypt'. Did you mean 'crypto'? node_modules/bcryptjs/tests/suite.js(3,23): error TS2307: Cannot find module 'bcrypt' or its corresponding type declarations. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index 615af100290c1..e371b230d8fd5 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -1,6 +1,6 @@ Exit Code: 2 Standard output: -../../../../built/local/lib.es5.d.ts(1451,11): error TS2300: Duplicate identifier 'ArrayLike'. +../../../../built/local/lib.es5.d.ts(1463,11): error TS2300: Duplicate identifier 'ArrayLike'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(77,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/Runtime.js(78,16): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -11,7 +11,7 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(270,9): error TS2322: node_modules/chrome-devtools-frontend/front_end/Runtime.js(280,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(283,12): error TS2554: Expected 2-3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/Runtime.js(525,9): error TS2322: Type 'Window' is not assignable to type 'Window & typeof globalThis'. - Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 839 more. + Type 'Window' is missing the following properties from type 'typeof globalThis': globalThis, eval, parseInt, parseFloat, and 838 more. node_modules/chrome-devtools-frontend/front_end/Runtime.js(527,49): error TS2352: Conversion of type 'Window & typeof globalThis' to type 'new () => any' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Type 'Window & typeof globalThis' provides no match for the signature 'new (): any'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(539,24): error TS2351: This expression is not constructable. @@ -22,7 +22,7 @@ node_modules/chrome-devtools-frontend/front_end/Runtime.js(705,5): error TS2322: node_modules/chrome-devtools-frontend/front_end/Runtime.js(715,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(729,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(746,5): error TS2322: Type 'Window | {}' is not assignable to type 'Window'. - Type '{}' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 224 more. + Type '{}' is missing the following properties from type 'Window': applicationCache, clientInformation, closed, customElements, and 226 more. node_modules/chrome-devtools-frontend/front_end/Runtime.js(1083,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/Runtime.js(1088,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/Tests.js(203,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -593,6 +593,10 @@ node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/repo node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/report-renderer.js(110,47): error TS2304: Cannot find name 'Util'. node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/report-renderer.js(172,8): error TS2339: Property 'ReportRenderer' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/report-renderer.js(193,21): error TS2503: Cannot find namespace 'DetailsRenderer'. +node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/util.js(75,54): error TS2345: Argument of type '{ month: string; day: string; year: string; hour: string; minute: string; timeZoneName: string; }' is not assignable to parameter of type 'DateTimeFormatOptions'. + Types of property 'year' are incompatible. + Type 'string' is not assignable to type '"numeric" | "2-digit"'. +node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/util.js(82,52): error TS2345: Argument of type '{ month: string; day: string; year: string; hour: string; minute: string; timeZoneName: string; }' is not assignable to parameter of type 'DateTimeFormatOptions'. node_modules/chrome-devtools-frontend/front_end/audits2/lighthouse/renderer/util.js(124,5): error TS2739: Type '{}' is missing the following properties from type '{ numPathParts: number; preserveQuery: boolean; preserveHost: boolean; }': numPathParts, preserveQuery, preserveHost node_modules/chrome-devtools-frontend/front_end/audits2_test_runner/Audits2TestRunner.js(53,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/audits2_test_runner/Audits2TestRunner.js(76,33): error TS2339: Property 'textElement' does not exist on type 'Element'. @@ -1017,6 +1021,10 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(18584,28): error TS2792: Cannot find module '../web-inspector'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(18840,20): error TS2792: Cannot find module '../report/v2/renderer/util.js'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19198,56): error TS2339: Property '_onRequestStarted' does not exist on type 'NetworkLog'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19364,47): error TS2345: Argument of type '{ month: string; day: string; year: string; hour: string; minute: string; timeZoneName: string; }' is not assignable to parameter of type 'DateTimeFormatOptions'. + Types of property 'year' are incompatible. + Type 'string' is not assignable to type '"numeric" | "2-digit"'. +node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19371,43): error TS2345: Argument of type '{ month: string; day: string; year: string; hour: string; minute: string; timeZoneName: string; }' is not assignable to parameter of type 'DateTimeFormatOptions'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19499,6): error TS2339: Property 'Util' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19512,22): error TS2792: Cannot find module './gather/driver.js'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(19513,28): error TS2792: Cannot find module './gather/gather-runner'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? @@ -5244,20 +5252,20 @@ node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(27 node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(289,16): error TS2339: Property 'window' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(293,19): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(305,10): error TS2769: No overload matches this call. - Overload 1 of 3, '(tagName: "object" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | ... 99 more ... | "wbr", options?: ElementCreationOptions): HTMLElement | ... 70 more ... | HTMLUListElement', gave the following error. - Argument of type 'string' is not assignable to parameter of type '"object" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | ... 99 more ... | "wbr"'. - Overload 2 of 3, '(tagName: "listing" | "xmp", options?: ElementCreationOptions): HTMLPreElement', gave the following error. - Argument of type 'string' is not assignable to parameter of type '"listing" | "xmp"'. + Overload 1 of 3, '(tagName: keyof HTMLElementTagNameMap, options?: ElementCreationOptions): HTMLElement | HTMLCanvasElement | ... 69 more ... | HTMLUListElement', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'keyof HTMLElementTagNameMap'. + Overload 2 of 3, '(tagName: keyof HTMLElementDeprecatedTagNameMap, options?: ElementCreationOptions): HTMLPreElement', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'keyof HTMLElementDeprecatedTagNameMap'. Overload 3 of 3, '(tagName: string, options?: ElementCreationOptions): HTMLElement', gave the following error. Type 'string' has no properties in common with type 'ElementCreationOptions'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(314,34): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'string'. Type 'number' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(323,20): error TS2339: Property 'createElementWithClass' does not exist on type 'Document'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(324,17): error TS2769: No overload matches this call. - Overload 1 of 3, '(tagName: "object" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | ... 99 more ... | "wbr", options?: ElementCreationOptions): HTMLElement | ... 70 more ... | HTMLUListElement', gave the following error. - Argument of type 'string' is not assignable to parameter of type '"object" | "link" | "small" | "sub" | "sup" | "track" | "progress" | "a" | "abbr" | "address" | "applet" | "area" | "article" | "aside" | "audio" | "b" | "base" | "basefont" | "bdi" | ... 99 more ... | "wbr"'. - Overload 2 of 3, '(tagName: "listing" | "xmp", options?: ElementCreationOptions): HTMLPreElement', gave the following error. - Argument of type 'string' is not assignable to parameter of type '"listing" | "xmp"'. + Overload 1 of 3, '(tagName: keyof HTMLElementTagNameMap, options?: ElementCreationOptions): HTMLElement | HTMLCanvasElement | ... 69 more ... | HTMLUListElement', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'keyof HTMLElementTagNameMap'. + Overload 2 of 3, '(tagName: keyof HTMLElementDeprecatedTagNameMap, options?: ElementCreationOptions): HTMLPreElement', gave the following error. + Argument of type 'string' is not assignable to parameter of type 'keyof HTMLElementDeprecatedTagNameMap'. Overload 3 of 3, '(tagName: string, options?: ElementCreationOptions): HTMLElement', gave the following error. Type 'string' has no properties in common with type 'ElementCreationOptions'. node_modules/chrome-devtools-frontend/front_end/dom_extension/DOMExtension.js(338,19): error TS2339: Property 'createElementWithClass' does not exist on type 'Document'. @@ -5619,7 +5627,7 @@ node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js( node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(755,33): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(758,36): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(813,22): error TS2339: Property 'index' does not exist on type 'DOMNode'. -node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(920,9): error TS2740: Type 'Node & ParentNode' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 64 more. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(920,9): error TS2740: Type 'Node & ParentNode' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 64 more. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(930,13): error TS2339: Property 'type' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(1106,44): error TS2339: Property 'keysArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(1110,89): error TS2339: Property 'scrollTop' does not exist on type 'Node & ParentNode'. @@ -5774,7 +5782,7 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(10 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1056,29): error TS2339: Property '_section' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1073,24): error TS2339: Property '_section' does not exist on type 'ChildNode'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1074,29): error TS2339: Property '_section' does not exist on type 'ChildNode'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1087,7): error TS2740: Type 'ChildNode' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 68 more. +node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1087,7): error TS2740: Type 'ChildNode' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 68 more. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1088,38): error TS2339: Property '_section' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1090,36): error TS2339: Property '_section' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1099,7): error TS2322: Type 'ChildNode' is not assignable to type 'Element'. @@ -6084,8 +6092,6 @@ node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUt node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(295,16): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(295,68): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window & typeof globalThis'. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(296,41): error TS2339: Property 'devtoolsFrameworkEventListeners' does not exist on type 'Window & typeof globalThis'. -node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(306,66): error TS2349: This expression is not callable. - Each member of the union type '((callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any) => U[]) | ((callbackfn: (value: { handler: any; useCapture: boolean; passive: boolean; once: boolean; type: string; }, index: number, array: { ...; }[]) => U, thisArg?: any) => U[])' has signatures, but none of those signatures are compatible with each other. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(324,5): error TS2741: Property 'internalHandlers' is missing in type '{ eventListeners: any[]; }' but required in type '{ eventListeners: EventListenerObjectInInspectedPage[]; internalHandlers: (() => any)[]; }'. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersUtils.js(371,103): error TS2322: Type '{ type: any; useCapture: any; passive: any; once: any; handler: any; remove: any; }' is not assignable to type 'EventListenerObjectInInspectedPage'. Object literal may only specify known properties, and 'remove' does not exist in type 'EventListenerObjectInInspectedPage'. @@ -6240,6 +6246,7 @@ node_modules/chrome-devtools-frontend/front_end/externs.js(803,13): error TS2355 node_modules/chrome-devtools-frontend/front_end/externs.js(805,9): error TS2339: Property 'prototype' does not exist on type 'typeof Console'. node_modules/chrome-devtools-frontend/front_end/externs.js(811,13): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/externs.js(817,12): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/chrome-devtools-frontend/front_end/externs.js(819,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'ResizeObserver' must be of type '{ new (callback: ResizeObserverCallback): ResizeObserver; prototype: ResizeObserver; }', but here has type 'typeof ResizeObserver'. node_modules/chrome-devtools-frontend/front_end/formatter/FormatterWorkerPool.js(28,40): error TS2339: Property 'keysArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/formatter/FormatterWorkerPool.js(74,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/formatter/FormatterWorkerPool.js(162,14): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. @@ -11233,7 +11240,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1595 node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1609,18): error TS2339: Property 'preciseMillisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1652,69): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1657,64): error TS2345: Argument of type 'new (width?: number, height?: number) => HTMLImageElement' is not assignable to parameter of type 'Node'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1675,5): error TS2740: Type 'DocumentFragment' is missing the following properties from type 'Element': assignedSlot, attributes, classList, className, and 64 more. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1675,5): error TS2740: Type 'DocumentFragment' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 64 more. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1684,30): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1685,16): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineUIUtils.js(1687,13): error TS2339: Property 'createTextChild' does not exist on type 'Element'. @@ -12242,6 +12249,9 @@ node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(26,17): error TS70 node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(28,17): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(31,21): error TS2339: Property '_observer' does not exist on type 'typeof XWidget'. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(32,18): error TS2339: Property '_observer' does not exist on type 'typeof XWidget'. +node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(34,28): error TS2339: Property '_visible' does not exist on type 'Element'. +node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(34,53): error TS2339: Property '_onResizedCallback' does not exist on type 'Element'. +node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(35,26): error TS2339: Property '_onResizedCallback' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(39,16): error TS2339: Property '_observer' does not exist on type 'typeof XWidget'. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(48,25): error TS2339: Property 'parentNodeOrShadowHost' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(56,19): error TS2339: Property 'parentNodeOrShadowHost' does not exist on type 'Node'. @@ -12249,8 +12259,8 @@ node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(75,15): error TS70 node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(82,15): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(89,15): error TS7014: Function type, which lacks return-type annotation, implicitly has an 'any' return type. node_modules/chrome-devtools-frontend/front_end/ui/XWidget.js(100,7): error TS2769: No overload matches this call. - Overload 1 of 2, '(type: "fullscreenchange" | "fullscreenerror", listener: (this: Element, ev: Event) => any, options?: boolean | EventListenerOptions): void', gave the following error. - Argument of type '"scroll"' is not assignable to parameter of type '"fullscreenchange" | "fullscreenerror"'. + Overload 1 of 2, '(type: keyof ElementEventMap, listener: (this: Element, ev: Event) => any, options?: boolean | EventListenerOptions): void', gave the following error. + Argument of type '"scroll"' is not assignable to parameter of type 'keyof ElementEventMap'. Overload 2 of 2, '(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void', gave the following error. Argument of type '{ passive: boolean; capture: false; }' is not assignable to parameter of type 'boolean | EventListenerOptions'. Object literal may only specify known properties, and 'passive' does not exist in type 'EventListenerOptions'. diff --git a/tests/baselines/reference/user/debug.log b/tests/baselines/reference/user/debug.log index c219a41f1acd3..c6383f455c42a 100644 --- a/tests/baselines/reference/user/debug.log +++ b/tests/baselines/reference/user/debug.log @@ -1,48 +1,5 @@ Exit Code: 2 Standard output: -node_modules/debug/dist/debug.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable. -node_modules/debug/dist/debug.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable. -node_modules/debug/dist/debug.js(8,21): error TS2304: Cannot find name 'define'. -node_modules/debug/dist/debug.js(8,46): error TS2304: Cannot find name 'define'. -node_modules/debug/dist/debug.js(9,5): error TS2304: Cannot find name 'define'. -node_modules/debug/dist/debug.js(33,38): error TS2554: Expected 1 arguments, but got 2. -node_modules/debug/dist/debug.js(34,32): error TS2554: Expected 1 arguments, but got 2. -node_modules/debug/dist/debug.js(36,21): error TS2339: Property 'code' does not exist on type 'Error'. -node_modules/debug/dist/debug.js(89,38): error TS2339: Property 'length' does not exist on type 'string | number'. - Property 'length' does not exist on type 'number'. -node_modules/debug/dist/debug.js(90,24): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'string'. - Type 'number' is not assignable to type 'string'. -node_modules/debug/dist/debug.js(91,47): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. - Type 'string' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(92,41): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. - Type 'string' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(92,57): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'number'. - Type 'string' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(110,11): error TS2322: Type 'undefined' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(116,11): error TS2322: Type 'undefined' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(169,13): error TS2322: Type 'undefined' is not assignable to type 'number'. -node_modules/debug/dist/debug.js(501,30): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(501,66): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(530,18): error TS2339: Property 'diff' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/dist/debug.js(531,18): error TS2339: Property 'prev' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/dist/debug.js(532,18): error TS2339: Property 'curr' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/dist/debug.js(563,25): error TS2551: Property 'formatArgs' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. Did you mean 'formatters'? -node_modules/debug/dist/debug.js(564,30): error TS2339: Property 'log' does not exist on type '{ (...args: any[]): void; namespace: string; enabled: boolean; useColors: any; color: string | number; destroy: () => boolean; extend: (namespace: any, delimiter: any) => Function; }'. -node_modules/debug/dist/debug.js(564,49): error TS2339: Property 'log' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(570,41): error TS2339: Property 'useColors' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(577,34): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(578,25): error TS2339: Property 'init' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(609,23): error TS2339: Property 'save' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(680,19): error TS2304: Cannot find name 'Mixed'. -node_modules/debug/dist/debug.js(681,20): error TS2304: Cannot find name 'Mixed'. -node_modules/debug/dist/debug.js(694,40): error TS2339: Property 'load' does not exist on type '{ (namespace: string): Function; debug: ...; default: ...; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. -node_modules/debug/dist/debug.js(733,82): error TS2339: Property 'type' does not exist on type 'Process'. -node_modules/debug/dist/debug.js(733,120): error TS2339: Property '__nwjs' does not exist on type 'Process'. -node_modules/debug/dist/debug.js(744,146): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'? -node_modules/debug/dist/debug.js(745,78): error TS2339: Property 'firebug' does not exist on type 'Console'. -node_modules/debug/dist/debug.js(745,89): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -node_modules/debug/dist/debug.js(799,156): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[message?: any, ...optionalParams: any[]]'. -node_modules/debug/dist/debug.js(851,21): error TS2304: Cannot find name 'LocalStorage'. node_modules/debug/src/browser.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable. node_modules/debug/src/browser.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable. node_modules/debug/src/browser.js(34,74): error TS2339: Property 'type' does not exist on type 'Process'. @@ -80,7 +37,7 @@ node_modules/debug/src/node.js(55,48): error TS2345: Argument of type 'string | node_modules/debug/src/node.js(56,5): error TS2322: Type 'false' is not assignable to type 'string | undefined'. node_modules/debug/src/node.js(58,5): error TS2322: Type 'null' is not assignable to type 'string | undefined'. node_modules/debug/src/node.js(60,5): error TS2322: Type 'number' is not assignable to type 'string | undefined'. -node_modules/debug/src/node.js(108,55): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[format: any, ...param: any[]]'. +node_modules/debug/src/node.js(108,55): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[format?: any, ...param: any[]]'. node_modules/debug/src/node.js(136,3): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. diff --git a/tests/baselines/reference/user/discord.js.log b/tests/baselines/reference/user/discord.js.log index 0189878cdff4e..53e46907c28d5 100644 --- a/tests/baselines/reference/user/discord.js.log +++ b/tests/baselines/reference/user/discord.js.log @@ -11,12 +11,12 @@ node_modules/discord.js/typings/index.d.ts(133,43): error TS2694: Namespace 'Nod node_modules/discord.js/typings/index.d.ts(135,93): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. node_modules/discord.js/typings/index.d.ts(136,92): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. node_modules/discord.js/typings/index.d.ts(137,79): error TS2694: Namespace 'NodeJS' has no exported member 'Immediate'. -node_modules/discord.js/typings/index.d.ts(282,30): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. -node_modules/discord.js/typings/index.d.ts(283,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. -node_modules/discord.js/typings/index.d.ts(1819,103): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. -node_modules/discord.js/typings/index.d.ts(1821,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. -node_modules/discord.js/typings/index.d.ts(1824,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. -node_modules/discord.js/typings/index.d.ts(3145,21): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(283,30): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(284,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(1805,103): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(1807,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(1810,34): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. +node_modules/discord.js/typings/index.d.ts(3155,21): error TS2694: Namespace 'NodeJS' has no exported member 'Timeout'. diff --git a/tests/baselines/reference/user/enhanced-resolve.log b/tests/baselines/reference/user/enhanced-resolve.log index 780485538801a..b75f62638f53e 100644 --- a/tests/baselines/reference/user/enhanced-resolve.log +++ b/tests/baselines/reference/user/enhanced-resolve.log @@ -18,14 +18,12 @@ node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(143,18): error TS2769 Type 'null' is not assignable to type 'Timeout'. Overload 2 of 2, '(handle?: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. - Type 'null' is not assignable to type 'number | undefined'. node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(162,18): error TS2769: No overload matches this call. Overload 1 of 2, '(intervalId: Timeout): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'Timeout'. Type 'null' is not assignable to type 'Timeout'. Overload 2 of 2, '(handle?: number | undefined): void', gave the following error. Argument of type 'Timeout | null' is not assignable to parameter of type 'number | undefined'. - Type 'null' is not assignable to type 'number | undefined'. node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(192,20): error TS2322: Type 'null' is not assignable to type '(path: any, callback: any) => void'. node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(197,24): error TS2322: Type 'null' is not assignable to type '(path: any) => any'. node_modules/enhanced-resolve/lib/CachedInputFileSystem.js(202,23): error TS2322: Type 'null' is not assignable to type '(path: any, callback: any) => void'. diff --git a/tests/baselines/reference/user/follow-redirects.log b/tests/baselines/reference/user/follow-redirects.log index 27e1be3cf166b..8f7b8f82e0909 100644 --- a/tests/baselines/reference/user/follow-redirects.log +++ b/tests/baselines/reference/user/follow-redirects.log @@ -20,7 +20,7 @@ node_modules/follow-redirects/index.js(360,14): error TS2339: Property 'emit' do node_modules/follow-redirects/index.js(372,13): error TS2339: Property 'cause' does not exist on type 'CustomError'. node_modules/follow-redirects/index.js(373,12): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. node_modules/follow-redirects/index.js(380,10): error TS2339: Property 'emit' does not exist on type 'RedirectableRequest'. -node_modules/follow-redirects/index.js(492,25): error TS2339: Property 'code' does not exist on type 'Error'. +node_modules/follow-redirects/index.js(498,25): error TS2339: Property 'code' does not exist on type 'Error'. diff --git a/tests/baselines/reference/user/formik.log b/tests/baselines/reference/user/formik.log deleted file mode 100644 index 3025734fc91d2..0000000000000 --- a/tests/baselines/reference/user/formik.log +++ /dev/null @@ -1,13 +0,0 @@ -Exit Code: 2 -Standard output: -node_modules/formik/dist/Formik.d.ts(1,22): error TS6053: File '../../../tests/cases/user/formik/node_modules/formik/dist/types/index.d.ts' not found. -node_modules/formik/dist/Formik.d.ts(23,96): error TS7016: Could not find a declaration file for module 'scheduler'. '../../../tests/cases/user/formik/node_modules/scheduler/index.js' implicitly has an 'any' type. - Try `npm i --save-dev @types/scheduler` if it exists or add a new declaration (.d.ts) file containing `declare module 'scheduler';` -node_modules/formik/dist/Formik.d.ts(27,98): error TS7016: Could not find a declaration file for module 'scheduler'. '../../../tests/cases/user/formik/node_modules/scheduler/index.js' implicitly has an 'any' type. - Try `npm i --save-dev @types/scheduler` if it exists or add a new declaration (.d.ts) file containing `declare module 'scheduler';` -node_modules/formik/dist/Formik.d.ts(28,103): error TS7016: Could not find a declaration file for module 'scheduler'. '../../../tests/cases/user/formik/node_modules/scheduler/index.js' implicitly has an 'any' type. - Try `npm i --save-dev @types/scheduler` if it exists or add a new declaration (.d.ts) file containing `declare module 'scheduler';` - - - -Standard error: diff --git a/tests/baselines/reference/user/fp-ts.log b/tests/baselines/reference/user/fp-ts.log new file mode 100644 index 0000000000000..2da48077db7b6 --- /dev/null +++ b/tests/baselines/reference/user/fp-ts.log @@ -0,0 +1,10 @@ +Exit Code: 2 +Standard output: +test/Either.ts(244,33): error TS2345: Argument of type 'Either' is not assignable to parameter of type 'Either<`invalid color ${string}`, string>'. + Type 'Left' is not assignable to type 'Either<`invalid color ${string}`, string>'. + Type 'Left' is not assignable to type 'Left<`invalid color ${string}`>'. + Type 'string' is not assignable to type '`invalid color ${string}`'. + + + +Standard error: diff --git a/tests/baselines/reference/user/graceful-fs.log b/tests/baselines/reference/user/graceful-fs.log index a6c9696259878..68089e941289f 100644 --- a/tests/baselines/reference/user/graceful-fs.log +++ b/tests/baselines/reference/user/graceful-fs.log @@ -5,7 +5,7 @@ node_modules/graceful-fs/clone.js(15,38): error TS2345: Argument of type 'Proper Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. node_modules/graceful-fs/graceful-fs.js(34,3): error TS2322: Type '(msg: string, ...param: any[]) => void' is not assignable to type '() => void'. -node_modules/graceful-fs/graceful-fs.js(37,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[format: any, ...param: any[]]'. +node_modules/graceful-fs/graceful-fs.js(37,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[format?: any, ...param: any[]]'. node_modules/graceful-fs/graceful-fs.js(52,3): error TS2741: Property '__promisify__' is missing in type '(fd: any, cb: any) => void' but required in type 'typeof close'. node_modules/graceful-fs/graceful-fs.js(74,30): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[fd: number]'. node_modules/graceful-fs/graceful-fs.js(86,13): error TS2554: Expected 0 arguments, but got 1. diff --git a/tests/baselines/reference/user/lodash.log b/tests/baselines/reference/user/lodash.log index aa74e2a00fa29..6dbbada2d9ae2 100644 --- a/tests/baselines/reference/user/lodash.log +++ b/tests/baselines/reference/user/lodash.log @@ -53,8 +53,8 @@ node_modules/lodash/_baseFlatten.js(24,22): error TS2349: This expression is not node_modules/lodash/_baseFlatten.js(24,22): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_baseFlatten.js(24,22): error TS2722: Cannot invoke an object which is possibly 'undefined'. node_modules/lodash/_baseHas.js(15,26): error TS1016: A required parameter cannot follow an optional parameter. -node_modules/lodash/_baseHas.js(16,56): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'. - Type 'any[]' is not assignable to type 'string | number | symbol'. +node_modules/lodash/_baseHas.js(16,56): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'PropertyKey'. + Type 'any[]' is not assignable to type 'PropertyKey'. Type 'any[]' is not assignable to type 'string'. node_modules/lodash/_baseHasIn.js(9,28): error TS1016: A required parameter cannot follow an optional parameter. node_modules/lodash/_baseHasIn.js(10,28): error TS2360: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. @@ -125,7 +125,7 @@ node_modules/lodash/_createFlow.js(56,13): error TS2454: Variable 'wrapper' is u node_modules/lodash/_createFlow.js(57,13): error TS2454: Variable 'wrapper' is used before being assigned. node_modules/lodash/_createFlow.js(57,21): error TS2339: Property 'thru' does not exist on type 'LodashWrapper'. node_modules/lodash/_createFlow.js(65,24): error TS2339: Property 'plant' does not exist on type 'LodashWrapper'. -node_modules/lodash/_createHybrid.js(44,49): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createHybrid.js(44,49): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. node_modules/lodash/_createHybrid.js(59,42): error TS2345: Argument of type 'any[] | undefined' is not assignable to parameter of type 'any[]'. Type 'undefined' is not assignable to type 'any[]'. @@ -133,7 +133,7 @@ node_modules/lodash/_createHybrid.js(62,52): error TS2345: Argument of type 'any Type 'undefined' is not assignable to type 'any[]'. node_modules/lodash/_createHybrid.js(64,15): error TS2454: Variable 'holdersCount' is used before being assigned. node_modules/lodash/_createHybrid.js(65,31): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/_createHybrid.js(68,9): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createHybrid.js(68,9): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. node_modules/lodash/_createHybrid.js(68,46): error TS2339: Property 'placeholder' does not exist on type '(...args: any[]) => any'. node_modules/lodash/_createHybrid.js(69,40): error TS2532: Object is possibly 'undefined'. @@ -141,16 +141,16 @@ node_modules/lodash/_createHybrid.js(73,38): error TS2538: Type 'Function' canno node_modules/lodash/_createHybrid.js(81,18): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_createHybrid.js(82,7): error TS2322: Type 'number | undefined' is not assignable to type 'number'. Type 'undefined' is not assignable to type 'number'. -node_modules/lodash/_createWrap.js(94,29): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createWrap.js(94,29): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. -node_modules/lodash/_createWrap.js(96,26): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createWrap.js(96,26): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. node_modules/lodash/_createWrap.js(97,100): error TS2532: Object is possibly 'undefined'. -node_modules/lodash/_createWrap.js(98,28): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createWrap.js(98,28): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. -node_modules/lodash/_createWrap.js(100,44): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[func: TimerHandler, bitmask: number, thisArg?: any, partials?: any[] | undefined, holders?: any[] | undefined, partialsRight?: any[] | undefined, holdersRight?: any[] | undefined, argPos?: any[] | undefined, ary?: number | undefined, arity?: number | undefined]'. +node_modules/lodash/_createWrap.js(100,44): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[func: string | Function, bitmask: number, thisArg?: any, partials?: any[] | undefined, holders?: any[] | undefined, partialsRight?: any[] | undefined, holdersRight?: any[] | undefined, argPos?: any[] | undefined, ary?: number | undefined, arity?: number | undefined]'. Target requires 2 element(s) but source may have fewer. -node_modules/lodash/_createWrap.js(103,51): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. +node_modules/lodash/_createWrap.js(103,51): error TS2345: Argument of type 'string | Function' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. node_modules/lodash/_customDefaultsMerge.js(22,35): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'. node_modules/lodash/_customOmitClone.js(9,20): error TS8024: JSDoc '@param' tag has name 'key', but there is no parameter with that name. @@ -253,9 +253,7 @@ node_modules/lodash/core.js(2199,41): error TS8024: JSDoc '@param' tag has name node_modules/lodash/core.js(2489,21): error TS1345: An expression of type 'void' cannot be tested for truthiness. node_modules/lodash/core.js(2489,37): error TS2554: Expected 0 arguments, but got 1. node_modules/lodash/core.js(2660,12): error TS2554: Expected 3-5 arguments, but got 2. -node_modules/lodash/core.js(3261,58): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'. - Type 'any[]' is not assignable to type 'string | number | symbol'. - Type 'any[]' is not assignable to type 'string'. +node_modules/lodash/core.js(3261,58): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'PropertyKey'. node_modules/lodash/core.js(3370,53): error TS2538: Type 'any[]' cannot be used as an index type. node_modules/lodash/core.js(3440,41): error TS2769: No overload matches this call. The last overload gave the following error. diff --git a/tests/baselines/reference/user/npm.log b/tests/baselines/reference/user/npm.log index 707e9e05391cc..3ecc41015c968 100644 --- a/tests/baselines/reference/user/npm.log +++ b/tests/baselines/reference/user/npm.log @@ -107,7 +107,7 @@ node_modules/npm/lib/config.js(84,19): error TS2339: Property 'config' does not node_modules/npm/lib/config.js(85,15): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/config.js(87,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/config.js(93,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'. -node_modules/npm/lib/config.js(118,31): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/config.js(118,31): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/config.js(135,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/config.js(136,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'. @@ -170,7 +170,7 @@ node_modules/npm/lib/config/core.js(208,24): error TS2339: Property 'list' does node_modules/npm/lib/config/core.js(237,21): error TS2339: Property 'sources' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(245,17): error TS2339: Property 'emit' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(279,8): error TS2339: Property '_saving' does not exist on type 'Conf'. -node_modules/npm/lib/config/core.js(288,39): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/config/core.js(288,39): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/config/core.js(307,8): error TS2339: Property 'sources' does not exist on type 'Conf'. node_modules/npm/lib/config/core.js(308,8): error TS2339: Property 'push' does not exist on type 'Conf'. @@ -181,8 +181,6 @@ node_modules/npm/lib/config/core.js(409,29): error TS2769: No overload matches t Argument of type '(orig: string, esc: any, name: any) => string | undefined' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. -node_modules/npm/lib/config/defaults.js(20,52): error TS2345: Argument of type 'never[]' is not assignable to parameter of type '[format: any, ...param: any[]]'. - Property '0' is optional in type 'never[]' but required in type '[format: any, ...param: any[]]'. node_modules/npm/lib/config/defaults.js(234,24): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? node_modules/npm/lib/config/defaults.js(234,42): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? node_modules/npm/lib/config/defaults.js(235,24): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? @@ -250,7 +248,7 @@ node_modules/npm/lib/config/pacote.js(84,31): error TS2339: Property 'config' do node_modules/npm/lib/config/pacote.js(89,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/config/pacote.js(90,38): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/config/pacote.js(110,60): error TS2339: Property 'config' does not exist on type 'EventEmitter'. -node_modules/npm/lib/config/set-user.js(22,18): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/config/set-user.js(22,18): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/dedupe.js(35,32): error TS2339: Property 'dir' does not exist on type 'EventEmitter'. node_modules/npm/lib/dedupe.js(37,11): error TS2339: Property 'command' does not exist on type 'EventEmitter'. @@ -414,7 +412,7 @@ node_modules/npm/lib/install/action/global-link.js(7,7): error TS2339: Property node_modules/npm/lib/install/action/refresh-package-json.js(31,43): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/install/action/remove.js(25,37): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'. node_modules/npm/lib/install/action/remove.js(25,51): error TS2339: Property 'prefix' does not exist on type 'EventEmitter'. -node_modules/npm/lib/install/action/remove.js(55,49): error TS2345: Argument of type '(mkdirEr: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/install/action/remove.js(55,49): error TS2345: Argument of type '(mkdirEr: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(mkdirEr: any) => void' has no properties in common with type 'Options'. node_modules/npm/lib/install/actions.js(126,24): error TS2339: Property 'limit' does not exist on type 'EventEmitter'. node_modules/npm/lib/install/actions.js(168,16): error TS2769: No overload matches this call. @@ -571,8 +569,6 @@ node_modules/npm/lib/npm.js(347,52): error TS2345: Argument of type 'PropertyDes Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. node_modules/npm/lib/npm.js(350,51): error TS2345: Argument of type 'PropertyDescriptor | undefined' is not assignable to parameter of type 'PropertyDescriptor & ThisType'. - Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. - Type 'undefined' is not assignable to type 'PropertyDescriptor'. node_modules/npm/lib/npm.js(377,20): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/npm.js(377,47): error TS2339: Property 'globalPrefix' does not exist on type 'EventEmitter'. node_modules/npm/lib/npm.js(377,66): error TS2339: Property 'localPrefix' does not exist on type 'EventEmitter'. @@ -643,7 +639,8 @@ node_modules/npm/lib/pack.js(127,15): error TS2339: Property 'config' does not e node_modules/npm/lib/pack.js(147,36): error TS2339: Property 'tmp' does not exist on type 'EventEmitter'. node_modules/npm/lib/pack.js(177,25): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/pack.js(299,17): error TS2339: Property 'config' does not exist on type 'EventEmitter'. -node_modules/npm/lib/pack.js(300,20): error TS2345: Argument of type 'string' is not assignable to parameter of type 'never'. +node_modules/npm/lib/pack.js(300,20): error TS2345: Argument of type '`--${string}=${any}`' is not assignable to parameter of type 'never'. + Type 'string' is not assignable to type 'never'. node_modules/npm/lib/pack.js(300,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/pack.js(333,15): error TS2531: Object is possibly 'null'. node_modules/npm/lib/pack.js(335,17): error TS2339: Property 'code' does not exist on type 'Error'. @@ -728,7 +725,7 @@ node_modules/npm/lib/search/all-package-metadata.js(33,30): error TS2339: Proper node_modules/npm/lib/search/all-package-metadata.js(36,35): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/search/all-package-metadata.js(146,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'. node_modules/npm/lib/search/all-package-metadata.js(239,20): error TS2339: Property 'cache' does not exist on type 'EventEmitter'. -node_modules/npm/lib/search/all-package-metadata.js(241,22): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/search/all-package-metadata.js(241,22): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/search/esearch.js(15,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/search/esearch.js(35,7): error TS2339: Property 'registry' does not exist on type 'EventEmitter'. @@ -797,7 +794,7 @@ node_modules/npm/lib/unpublish.js(97,70): error TS2339: Property 'registry' does node_modules/npm/lib/update.js(10,41): error TS2339: Property 'commands' does not exist on type 'EventEmitter'. node_modules/npm/lib/update.js(17,25): error TS2339: Property 'commands' does not exist on type 'EventEmitter'. node_modules/npm/lib/update.js(25,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'. -node_modules/npm/lib/utils/completion/file-completion.js(11,15): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/utils/completion/file-completion.js(11,15): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? node_modules/npm/lib/utils/completion/installed-deep.js(9,19): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/utils/completion/installed-deep.js(12,11): error TS2339: Property 'config' does not exist on type 'EventEmitter'. @@ -810,12 +807,11 @@ node_modules/npm/lib/utils/completion/installed-shallow.js(22,11): error TS2339: node_modules/npm/lib/utils/completion/installed-shallow.js(57,28): error TS2339: Property 'dir' does not exist on type 'EventEmitter'. node_modules/npm/lib/utils/completion/installed-shallow.js(66,23): error TS2339: Property 'globalDir' does not exist on type 'EventEmitter'. node_modules/npm/lib/utils/completion/installed-shallow.js(79,14): error TS2339: Property 'config' does not exist on type 'EventEmitter'. -node_modules/npm/lib/utils/correct-mkdir.js(74,25): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/utils/correct-mkdir.js(74,25): error TS2345: Argument of type '(er: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any) => any' has no properties in common with type 'Options'. Did you mean to call it? -node_modules/npm/lib/utils/correct-mkdir.js(89,18): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. - Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? -node_modules/npm/lib/utils/correct-mkdir.js(103,20): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/lib/utils/correct-mkdir.js(89,18): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'Mode | Options'. Value of type '(er: any, made: any) => any' has no properties in common with type 'Options'. Did you mean to call it? +node_modules/npm/lib/utils/correct-mkdir.js(103,20): error TS2345: Argument of type '(er: any, made: any) => any' is not assignable to parameter of type 'Mode | Options'. node_modules/npm/lib/utils/error-handler.js(12,21): error TS2339: Property 'rollbacks' does not exist on type 'EventEmitter'. node_modules/npm/lib/utils/error-handler.js(23,36): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/lib/utils/error-handler.js(29,16): error TS2339: Property 'version' does not exist on type 'EventEmitter'. @@ -952,7 +948,7 @@ node_modules/npm/test/common-tap.js(10,36): error TS2322: Type '(...args: any[]) Type '(...args: any[]) => void' is not assignable to type '(callback: (...args: any[]) => void, ...args: any[]) => Immediate'. Type 'void' is not assignable to type 'Immediate'. node_modules/npm/test/common-tap.js(12,28): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[callback: (...args: any[]) => void, ms: number, ...args: any[]]'. - Property '0' is optional in type 'any[]' but required in type '[callback: (...args: any[]) => void, ms: number, ...args: any[]]'. + Source provides no match for required element at position 0 in target. node_modules/npm/test/common-tap.js(175,17): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(181,31): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(192,12): error TS2339: Property '_storage' does not exist on type 'Environment'. @@ -1072,7 +1068,7 @@ node_modules/npm/test/tap/404-private-registry.js(1,20): error TS2307: Cannot fi node_modules/npm/test/tap/404-private-registry.js(6,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/access.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/access.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/access.js(19,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/access.js(19,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/add-named-update-protocol-port.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/add-named-update-protocol-port.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. @@ -1095,7 +1091,7 @@ node_modules/npm/test/tap/adduser-always-auth.js(4,18): error TS2307: Cannot fin node_modules/npm/test/tap/adduser-always-auth.js(6,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/adduser-legacy-auth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/adduser-legacy-auth.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/adduser-legacy-auth.js(45,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/adduser-legacy-auth.js(45,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/adduser-oauth.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/adduser-oauth.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. @@ -1224,7 +1220,7 @@ node_modules/npm/test/tap/deprecate.js(1,18): error TS2307: Cannot find module ' node_modules/npm/test/tap/deprecate.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/dist-tag.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/dist-tag.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/dist-tag.js(49,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/dist-tag.js(49,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/do-not-remove-other-bins.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/doctor.js(5,20): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. @@ -1513,12 +1509,10 @@ node_modules/npm/test/tap/owner.js(2,20): error TS2307: Cannot find module 'tap' node_modules/npm/test/tap/pack-files-and-ignores.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/pack-files-and-ignores.js(12,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/pack-scoped.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/pack-scoped.js(24,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/pack-scoped.js(25,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/pack-scoped.js(26,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/pack-scoped.js(24,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/pack-scoped.js(25,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. +node_modules/npm/test/tap/pack-scoped.js(26,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. node_modules/npm/test/tap/pack.js(5,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/peer-deps.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/peer-deps.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. @@ -1542,22 +1536,18 @@ node_modules/npm/test/tap/pick-manifest-from-registry-metadata.js(137,11): error node_modules/npm/test/tap/ping.js(5,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/ping.js(7,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/prepare.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/prepare.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/prepare.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/prepare.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/prepare.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepare.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. +node_modules/npm/test/tap/prepare.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. node_modules/npm/test/tap/prepublish-only.js(4,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. node_modules/npm/test/tap/prepublish-only.js(5,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/prepublish-only.js(6,21): error TS2307: Cannot find module 'tacks' or its corresponding type declarations. node_modules/npm/test/tap/prepublish.js(3,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. -node_modules/npm/test/tap/prepublish.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/prepublish.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. - Type '(er: any) => void' has no properties in common with type 'Options'. -node_modules/npm/test/tap/prepublish.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/prepublish.js(16,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. Type '(er: any) => void' has no properties in common with type 'Options'. +node_modules/npm/test/tap/prepublish.js(17,17): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. +node_modules/npm/test/tap/prepublish.js(18,15): error TS2345: Argument of type '(er: any) => void' is not assignable to parameter of type 'Mode | Options'. node_modules/npm/test/tap/process-logger.js(2,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/process-logger.js(7,61): error TS2554: Expected 1-3 arguments, but got 4. node_modules/npm/test/tap/process-logger.js(8,37): error TS2769: No overload matches this call. @@ -1583,18 +1573,18 @@ node_modules/npm/test/tap/prune.js(5,18): error TS2307: Cannot find module 'npm- node_modules/npm/test/tap/prune.js(8,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-access-scoped.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-access-scoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. -node_modules/npm/test/tap/publish-access-scoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/publish-access-scoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'Mode | Options'. Type '() => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/publish-access-unscoped-restricted-fails.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-access-unscoped.js(4,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-access-unscoped.js(7,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. -node_modules/npm/test/tap/publish-access-unscoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'string | number | Options | undefined'. +node_modules/npm/test/tap/publish-access-unscoped.js(31,35): error TS2345: Argument of type '() => void' is not assignable to parameter of type 'Mode | Options'. Type '() => void' has no properties in common with type 'Options'. node_modules/npm/test/tap/publish-config.js(4,22): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-invalid-semver-tag.js(2,20): error TS2307: Cannot find module 'tap' or its corresponding type declarations. node_modules/npm/test/tap/publish-invalid-semver-tag.js(8,18): error TS2307: Cannot find module 'npm-registry-mock' or its corresponding type declarations. -node_modules/npm/test/tap/publish-invalid-semver-tag.js(26,59): error TS2345: Argument of type '{ name: string; version: string; }' is not assignable to parameter of type 'string | DataView | Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array'. - Type '{ name: string; version: string; }' is missing the following properties from type 'Float64Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 26 more. +node_modules/npm/test/tap/publish-invalid-semver-tag.js(26,59): error TS2345: Argument of type '{ name: string; version: string; }' is not assignable to parameter of type 'string | ArrayBufferView'. + Type '{ name: string; version: string; }' is missing the following properties from type 'BigUint64Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 26 more. node_modules/npm/test/tap/publish-invalid-semver-tag.js(37,9): error TS2339: Property 'load' does not exist on type 'EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(53,7): error TS2339: Property 'config' does not exist on type 'EventEmitter'. node_modules/npm/test/tap/publish-invalid-semver-tag.js(54,7): error TS2339: Property 'commands' does not exist on type 'EventEmitter'. @@ -1626,17 +1616,14 @@ node_modules/npm/test/tap/run-script.js(213,18): error TS2769: No overload match Type 'undefined' is not assignable to type 'string | RegExp'. Overload 2 of 3, '(pattern: string | RegExp): RegExp', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | RegExp'. - Type 'undefined' is not assignable to type 'string | RegExp'. Overload 3 of 3, '(pattern: string, flags?: string | undefined): RegExp', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. node_modules/npm/test/tap/run-script.js(256,18): error TS2769: No overload matches this call. Overload 1 of 3, '(pattern: string | RegExp, flags?: string | undefined): RegExp', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | RegExp'. - Type 'undefined' is not assignable to type 'string | RegExp'. Overload 2 of 3, '(pattern: string | RegExp): RegExp', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | RegExp'. - Type 'undefined' is not assignable to type 'string | RegExp'. Overload 3 of 3, '(pattern: string, flags?: string | undefined): RegExp', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. diff --git a/tests/baselines/reference/user/npmlog.log b/tests/baselines/reference/user/npmlog.log index 9dd48ebe40255..9277dee1127d0 100644 --- a/tests/baselines/reference/user/npmlog.log +++ b/tests/baselines/reference/user/npmlog.log @@ -13,8 +13,6 @@ node_modules/npmlog/log.js(162,12): error TS2339: Property 'progressEnabled' doe node_modules/npmlog/log.js(162,34): error TS2339: Property 'gauge' does not exist on type 'resume'. node_modules/npmlog/log.js(171,16): error TS2339: Property 'levels' does not exist on type '(Anonymous function)'. node_modules/npmlog/log.js(173,17): error TS2339: Property 'emit' does not exist on type '(Anonymous function)'. -node_modules/npmlog/log.js(194,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[format: any, ...param: any[]]'. - Property '0' is optional in type 'any[]' but required in type '[format: any, ...param: any[]]'. node_modules/npmlog/log.js(202,8): error TS2339: Property 'emit' does not exist on type '(Anonymous function)'. node_modules/npmlog/log.js(203,8): error TS2339: Property 'emit' does not exist on type '(Anonymous function)'. node_modules/npmlog/log.js(204,22): error TS2339: Property 'emit' does not exist on type '(Anonymous function)'. @@ -28,9 +26,8 @@ node_modules/npmlog/log.js(271,16): error TS2769: No overload matches this call. Overload 1 of 2, '(buffer: string | Uint8Array, cb?: ((err?: Error | undefined) => void) | undefined): boolean', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | Uint8Array'. Type 'undefined' is not assignable to type 'string | Uint8Array'. - Overload 2 of 2, '(str: string | Uint8Array, encoding?: "ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "latin1" | "binary" | "hex" | undefined, cb?: ((err?: Error | undefined) => void) | undefined): boolean', gave the following error. + Overload 2 of 2, '(str: string | Uint8Array, encoding?: BufferEncoding | undefined, cb?: ((err?: Error | undefined) => void) | undefined): boolean', gave the following error. Argument of type 'string | undefined' is not assignable to parameter of type 'string | Uint8Array'. - Type 'undefined' is not assignable to type 'string | Uint8Array'. diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index 3aa7803c19b1a..34b4feefa4830 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -1,173 +1,192 @@ Exit Code: 2 Standard output: node_modules/uglify-js/lib/ast.js(125,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/ast.js(318,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/ast.js(625,69): error TS2552: Cannot find name 'error'. Did you mean 'Error'? -node_modules/uglify-js/lib/ast.js(1216,5): error TS2322: Type '{ visit: (node: any, descend: any) => void; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(330,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(522,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(722,58): error TS2552: Cannot find name 'error'. Did you mean 'Error'? +node_modules/uglify-js/lib/ast.js(1446,5): error TS2322: Type '{ visit: (node: any, descend: any) => void; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, and 'visit' does not exist in type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1217,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1220,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1274,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1275,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1293,31): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1297,29): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(192,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(712,27): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(783,21): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(786,20): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(786,40): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(796,20): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(798,55): error TS2339: Property 'uses_arguments' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(803,40): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(871,26): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(880,56): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(884,34): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(894,49): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(909,42): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1023,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1028,12): error TS2339: Property 'defun_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1029,12): error TS2339: Property 'defun_visited' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1031,12): error TS2339: Property 'in_loop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1032,12): error TS2339: Property 'loop_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1037,12): error TS2339: Property 'safe_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1314,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1329,51): error TS2349: This expression is not callable. +node_modules/uglify-js/lib/ast.js(1447,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1450,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1504,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1505,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1521,52): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(194,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(612,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(689,27): error TS2339: Property 'name' does not exist on type 'reduce_defun'. +node_modules/uglify-js/lib/compress.js(708,16): error TS2339: Property 'walk' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(708,36): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(718,28): error TS2339: Property 'uses_arguments' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(719,16): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(722,32): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(737,47): error TS2339: Property 'value' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(738,20): error TS2339: Property 'value' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(985,20): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(985,46): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(985,72): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1017,26): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1026,56): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1030,26): error TS2339: Property 'in_arg' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1031,34): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1041,49): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1056,42): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1181,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1186,12): error TS2339: Property 'defun_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1187,12): error TS2339: Property 'defun_visited' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1189,12): error TS2339: Property 'in_loop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1190,12): error TS2339: Property 'loop_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1195,12): error TS2339: Property 'safe_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1243,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1271,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1544,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1559,51): error TS2349: This expression is not callable. Not all constituents of type 'true | ((node: any, tw: any) => any)' are callable. Type 'true' has no call signatures. -node_modules/uglify-js/lib/compress.js(1404,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1425,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1472,112): error TS2454: Variable 'args' is used before being assigned. -node_modules/uglify-js/lib/compress.js(1473,29): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1498,33): error TS2322: Type 'boolean' is not assignable to type 'number'. -node_modules/uglify-js/lib/compress.js(1500,29): error TS2322: Type 'boolean' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(1672,53): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1790,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1814,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1829,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1860,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1892,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1908,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1990,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2010,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2049,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2199,53): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. - Property '0' is optional in type 'number[]' but required in type '[start: number, deleteCount: number, ...items: never[]]'. -node_modules/uglify-js/lib/compress.js(2556,59): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2594,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. - Property '0' is optional in type 'any[]' but required in type '[start: number, deleteCount: number, ...items: never[]]'. -node_modules/uglify-js/lib/compress.js(2629,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(2817,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2834,27): error TS2339: Property 'required' does not exist on type 'any[]'. -node_modules/uglify-js/lib/compress.js(2839,43): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. +node_modules/uglify-js/lib/compress.js(1604,61): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1647,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1668,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1720,77): error TS2454: Variable 'args' is used before being assigned. +node_modules/uglify-js/lib/compress.js(1721,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1721,42): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1746,33): error TS2322: Type 'boolean' is not assignable to type 'number'. +node_modules/uglify-js/lib/compress.js(1748,29): error TS2322: Type 'boolean' is not assignable to type 'never'. +node_modules/uglify-js/lib/compress.js(1949,65): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1951,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1964,75): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(2105,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2131,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2133,68): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2140,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2171,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2201,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2216,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2240,35): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2316,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2336,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2375,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2533,53): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. + Source provides no match for required element at position 0 in target. +node_modules/uglify-js/lib/compress.js(2890,59): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2928,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. + Source provides no match for required element at position 0 in target. +node_modules/uglify-js/lib/compress.js(2963,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(3159,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3180,27): error TS2339: Property 'required' does not exist on type 'any[]'. +node_modules/uglify-js/lib/compress.js(3185,43): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. Type 'any' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(2878,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(2882,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(2928,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(2932,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(2997,22): error TS2339: Property 'is_undefined' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(2999,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3000,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3001,35): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3002,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3050,22): error TS2551: Property 'is_undefined' does not exist on type '(Anonymous function)'. Did you mean 'is_defined'? -node_modules/uglify-js/lib/compress.js(3051,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3052,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3053,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3057,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3099,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3103,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3189,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3193,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3241,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3245,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3494,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3716,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -node_modules/uglify-js/lib/compress.js(3717,25): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(3717,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -node_modules/uglify-js/lib/compress.js(3717,56): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(3734,48): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3745,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3753,24): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3835,48): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3853,33): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(4284,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4304,29): error TS2322: Type 'string' is not assignable to type 'boolean'. -node_modules/uglify-js/lib/compress.js(4455,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4473,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(4495,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(4565,52): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(4758,56): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(4759,54): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(4817,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4818,74): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(4875,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4922,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(5119,56): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. -node_modules/uglify-js/lib/compress.js(5243,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(5406,18): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5406,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5427,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(5437,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(5451,14): error TS2339: Property 'transform' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5457,34): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5522,32): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5615,18): error TS2339: Property 'enclosed' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5618,18): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5777,17): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. -node_modules/uglify-js/lib/compress.js(5793,29): error TS2339: Property 'left' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5804,29): error TS2339: Property 'right' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5921,23): error TS2454: Variable 'exprs' is used before being assigned. -node_modules/uglify-js/lib/compress.js(5922,20): error TS2454: Variable 'exprs' is used before being assigned. -node_modules/uglify-js/lib/compress.js(5976,28): error TS2339: Property 'expression' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5977,41): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5981,22): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(5984,42): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6015,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6017,44): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6021,56): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6022,12): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6090,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6146,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6161,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6271,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6273,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6440,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6641,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6647,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6687,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6923,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[pattern: string | RegExp, flags?: string | undefined]'. +node_modules/uglify-js/lib/compress.js(3224,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3228,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3274,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3278,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3342,22): error TS2339: Property 'is_undefined' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3344,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3345,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3346,28): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3350,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3399,22): error TS2551: Property 'is_undefined' does not exist on type '(Anonymous function)'. Did you mean 'is_defined'? +node_modules/uglify-js/lib/compress.js(3400,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3401,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3402,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3406,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3448,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3452,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3538,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3542,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3590,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3594,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3854,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4077,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +node_modules/uglify-js/lib/compress.js(4078,25): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(4078,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/compress.js(4078,56): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(4095,48): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4106,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(4114,24): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(4207,48): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4228,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(4696,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4716,29): error TS2322: Type 'string' is not assignable to type 'boolean'. +node_modules/uglify-js/lib/compress.js(4891,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4896,49): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4936,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(4964,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5027,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'marker' must be of type 'TreeWalker', but here has type '(node: any) => void'. +node_modules/uglify-js/lib/compress.js(5027,61): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5032,50): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5258,56): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5259,54): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5348,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5349,74): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5411,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5496,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(5739,56): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. +node_modules/uglify-js/lib/compress.js(5865,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6162,18): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6162,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6184,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6193,33): error TS2339: Property 'find_variable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6200,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6218,14): error TS2339: Property 'transform' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6224,34): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6292,32): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6386,18): error TS2339: Property 'enclosed' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6389,18): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6596,29): error TS2339: Property 'left' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6607,29): error TS2339: Property 'right' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6726,23): error TS2454: Variable 'exprs' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6727,20): error TS2454: Variable 'exprs' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6793,28): error TS2339: Property 'expression' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6794,41): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6798,22): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6801,42): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6832,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6834,44): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(6838,56): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(6839,12): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(6907,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6963,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(6978,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7101,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7103,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7270,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7469,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7475,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7518,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7793,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[pattern: string | RegExp, flags?: string | undefined]'. Target requires 1 element(s) but source may have fewer. -node_modules/uglify-js/lib/compress.js(7087,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7094,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; should_break: () => void; has_parens: () => boolean; newline: () => void; print: (str: any) => void; space: () => void; comma: () => void; colon: () => void; ... 20 more ...; parent: (n: any) => any; }'. -node_modules/uglify-js/lib/compress.js(7098,36): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(7103,41): error TS2339: Property 'get' does not exist on type 'string'. -node_modules/uglify-js/lib/compress.js(7255,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7259,21): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(7266,25): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(7275,25): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(7291,32): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(7295,27): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(7524,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7808,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. -node_modules/uglify-js/lib/compress.js(8454,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8544,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8615,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8621,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8624,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(9205,22): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. -node_modules/uglify-js/lib/compress.js(9205,63): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(9241,43): error TS2454: Variable 'property' is used before being assigned. -node_modules/uglify-js/lib/compress.js(9257,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(9260,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. -node_modules/uglify-js/lib/compress.js(9265,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(9304,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/minify.js(191,57): error TS2339: Property 'compress' does not exist on type 'Compressor'. -node_modules/uglify-js/lib/mozilla-ast.js(576,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(457,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(458,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/output.js(473,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/output.js(1137,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1435,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/compress.js(7957,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7964,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; should_break: () => void; has_parens: () => boolean; newline: () => void; print: (str: any) => void; space: () => void; comma: () => void; colon: () => void; ... 20 more ...; parent: (n: any) => any; }'. +node_modules/uglify-js/lib/compress.js(7968,36): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(7973,41): error TS2339: Property 'get' does not exist on type 'string'. +node_modules/uglify-js/lib/compress.js(7997,51): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8114,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8189,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8193,21): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8204,25): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8213,25): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8229,32): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(8233,27): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(8477,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8758,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. +node_modules/uglify-js/lib/compress.js(9409,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9499,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9568,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9574,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9577,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(10183,26): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +node_modules/uglify-js/lib/compress.js(10183,67): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(10218,43): error TS2454: Variable 'property' is used before being assigned. +node_modules/uglify-js/lib/compress.js(10239,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(10242,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. +node_modules/uglify-js/lib/compress.js(10247,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(10288,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/minify.js(197,57): error TS2339: Property 'compress' does not exist on type 'Compressor'. +node_modules/uglify-js/lib/mozilla-ast.js(573,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(459,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(460,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/output.js(475,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/output.js(1202,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1557,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/uglify-js/lib/parse.js(249,9): error TS2322: Type 'string | boolean' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'boolean'. node_modules/uglify-js/lib/parse.js(318,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. @@ -175,24 +194,25 @@ node_modules/uglify-js/lib/parse.js(318,20): error TS2345: Argument of type 'num node_modules/uglify-js/lib/parse.js(407,32): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. node_modules/uglify-js/lib/parse.js(418,32): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. node_modules/uglify-js/lib/parse.js(468,20): error TS2339: Property 'raw_source' does not exist on type 'RegExp'. -node_modules/uglify-js/lib/parse.js(576,57): error TS2339: Property 'push' does not exist on type 'never'. -node_modules/uglify-js/lib/parse.js(582,32): error TS2345: Argument of type 'never[]' is not assignable to parameter of type 'never'. -node_modules/uglify-js/lib/parse.js(675,13): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(708,69): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(708,83): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(752,31): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(758,17): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(785,21): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(804,21): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(931,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -node_modules/uglify-js/lib/parse.js(1049,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. -node_modules/uglify-js/lib/parse.js(1108,17): error TS2454: Variable 'cur' is used before being assigned. -node_modules/uglify-js/lib/parse.js(1306,32): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1406,20): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1412,20): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1498,48): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1524,35): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1569,52): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(586,57): error TS2339: Property 'push' does not exist on type 'never'. +node_modules/uglify-js/lib/parse.js(592,32): error TS2345: Argument of type 'never[]' is not assignable to parameter of type 'never'. +node_modules/uglify-js/lib/parse.js(687,13): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(720,69): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(720,83): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(764,31): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(770,17): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(792,21): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(808,21): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(827,21): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(951,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +node_modules/uglify-js/lib/parse.js(1114,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. +node_modules/uglify-js/lib/parse.js(1162,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. +node_modules/uglify-js/lib/parse.js(1222,17): error TS2454: Variable 'cur' is used before being assigned. +node_modules/uglify-js/lib/parse.js(1434,32): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1600,20): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1764,48): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1803,35): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1894,52): error TS2531: Object is possibly 'null'. node_modules/uglify-js/lib/propmangle.js(70,18): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | ... 4 more ... | ArrayConstructor'. Property 'prototype' does not exist on type 'Math'. node_modules/uglify-js/lib/propmangle.js(71,44): error TS2351: This expression is not constructable. @@ -202,34 +222,33 @@ node_modules/uglify-js/lib/propmangle.js(72,45): error TS2339: Property 'prototy Property 'prototype' does not exist on type 'Math'. node_modules/uglify-js/lib/propmangle.js(83,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/propmangle.js(146,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/propmangle.js(179,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/propmangle.js(176,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(83,26): error TS2339: Property 'defun' does not exist on type 'SymbolDef'. -node_modules/uglify-js/lib/scope.js(114,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(164,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/scope.js(203,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(207,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(216,28): error TS2339: Property 'def_global' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(221,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/scope.js(230,26): error TS2339: Property 'uses_eval' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(253,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(256,27): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(256,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(302,38): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(342,10): error TS2339: Property 'def_variable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(344,21): error TS2339: Property 'start' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(345,19): error TS2339: Property 'end' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(489,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(506,49): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/scope.js(550,31): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object | null'. -node_modules/uglify-js/lib/scope.js(553,30): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(577,30): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(116,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(166,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(205,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(210,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(267,28): error TS2339: Property 'def_global' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(269,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(281,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(290,26): error TS2339: Property 'uses_eval' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(305,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(308,27): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(308,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(360,38): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(403,10): error TS2339: Property 'def_variable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(405,21): error TS2339: Property 'start' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(406,19): error TS2339: Property 'end' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(552,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(584,49): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(642,31): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object | null'. +node_modules/uglify-js/lib/scope.js(645,30): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(669,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/sourcemap.js(82,11): error TS2339: Property 'index' does not exist on type 'any[]'. node_modules/uglify-js/lib/sourcemap.js(178,31): error TS2339: Property 'index' does not exist on type 'any[]'. node_modules/uglify-js/lib/sourcemap.js(186,34): error TS2339: Property 'index' does not exist on type 'any[]'. node_modules/uglify-js/lib/transform.js(47,21): error TS2345: Argument of type 'this' is not assignable to parameter of type 'TreeWalker'. Type 'TreeTransformer' is missing the following properties from type 'TreeWalker': currentNode, filter, root, whatToShow, and 10 more. -node_modules/uglify-js/tools/exit.js(10,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[code?: number | undefined]'. - Target allows only 1 element(s) but source may have more. node_modules/uglify-js/tools/exports.js(1,1): error TS2303: Circular definition of import alias '"Dictionary"'. node_modules/uglify-js/tools/exports.js(2,1): error TS2303: Circular definition of import alias '"List"'. node_modules/uglify-js/tools/exports.js(3,1): error TS2303: Circular definition of import alias '"minify"'. @@ -238,6 +257,10 @@ node_modules/uglify-js/tools/exports.js(5,1): error TS2303: Circular definition node_modules/uglify-js/tools/exports.js(6,1): error TS2303: Circular definition of import alias '"TreeTransformer"'. node_modules/uglify-js/tools/exports.js(7,1): error TS2303: Circular definition of import alias '"TreeWalker"'. node_modules/uglify-js/tools/node.js(64,26): error TS2339: Property 'minify' does not exist on type 'typeof import("/uglify-js/node_modules/uglify-js/tools/node")'. +node_modules/uglify-js/tools/tty.js(4,20): error TS2339: Property '_handle' does not exist on type 'WriteStream & { fd: 1; }'. +node_modules/uglify-js/tools/tty.js(5,20): error TS2339: Property '_handle' does not exist on type 'WriteStream & { fd: 2; }'. +node_modules/uglify-js/tools/tty.js(16,41): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[code?: number | undefined]'. + Target allows only 1 element(s) but source may have more. diff --git a/tests/baselines/reference/user/webpack.log b/tests/baselines/reference/user/webpack.log deleted file mode 100644 index 25a502aaf4b72..0000000000000 --- a/tests/baselines/reference/user/webpack.log +++ /dev/null @@ -1,72 +0,0 @@ -Exit Code: 2 -Standard output: -lib/Compilation.js(37,7): error TS2440: Import declaration conflicts with local declaration of 'Module'. -lib/Compilation.js(49,7): error TS2440: Import declaration conflicts with local declaration of 'WebpackError'. -lib/Compilation.js(53,7): error TS2440: Import declaration conflicts with local declaration of 'StatsFactory'. -lib/Compilation.js(54,7): error TS2440: Import declaration conflicts with local declaration of 'StatsPrinter'. -lib/Compiler.js(156,4): error TS2322: Type 'AsyncParallelHook' is not assignable to type 'AsyncParallelHook<[Compilation], Module>'. -lib/Compiler.js(156,4): error TS2322: Type 'AsyncParallelHook' is not assignable to type 'AsyncParallelHook<[Compilation], Module>'. - Types of property 'intercept' are incompatible. - Type '(interceptor: HookInterceptor) => void' is not assignable to type '(interceptor: HookInterceptor<[Compilation], void, Module>) => void'. - Types of parameters 'interceptor' and 'interceptor' are incompatible. - Type 'HookInterceptor<[Compilation], void, Module>' is not assignable to type 'HookInterceptor'. - Property '_UnsetAdditionalOptions' is missing in type 'Module' but required in type 'UnsetAdditionalOptions'. -lib/Compiler.js(158,4): error TS2322: Type 'AsyncSeriesHook' is not assignable to type 'AsyncParallelHook<[Compilation], Module>'. -lib/Compiler.js(158,4): error TS2322: Type 'AsyncSeriesHook' is not assignable to type 'AsyncParallelHook<[Compilation], Module>'. - Types of property 'intercept' are incompatible. - Type '(interceptor: HookInterceptor) => void' is not assignable to type '(interceptor: HookInterceptor<[Compilation], void, Module>) => void'. - Types of parameters 'interceptor' and 'interceptor' are incompatible. - Type 'HookInterceptor<[Compilation], void, Module>' is not assignable to type 'HookInterceptor'. -lib/ExportsInfo.js(1092,28): error TS1016: A required parameter cannot follow an optional parameter. -lib/FlagDependencyUsagePlugin.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/NormalModule.js(19,7): error TS2440: Import declaration conflicts with local declaration of 'Compilation'. -lib/RuntimeTemplate.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'InitFragment'. -lib/Template.js(8,9): error TS2440: Import declaration conflicts with local declaration of 'ConcatSource'. -lib/Watching.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Stats'. -lib/WebpackOptionsApply.js(79,10): error TS2300: Duplicate identifier 'ElectronTargetPlugin'. -lib/WebpackOptionsApply.js(83,10): error TS2300: Duplicate identifier 'ElectronTargetPlugin'. -lib/WebpackOptionsApply.js(87,10): error TS2300: Duplicate identifier 'ElectronTargetPlugin'. -lib/WebpackOptionsApply.js(96,10): error TS2300: Duplicate identifier 'ElectronTargetPlugin'. -lib/WebpackOptionsApply.js(100,10): error TS2300: Duplicate identifier 'ExternalsPlugin'. -lib/WebpackOptionsApply.js(104,10): error TS2300: Duplicate identifier 'ExternalsPlugin'. -lib/WebpackOptionsApply.js(107,10): error TS2300: Duplicate identifier 'ExternalsPlugin'. -lib/WebpackOptionsApply.js(158,10): error TS2300: Duplicate identifier 'ExternalsPlugin'. -lib/WebpackOptionsApply.js(423,12): error TS2300: Duplicate identifier 'OccurrenceChunkIdsPlugin'. -lib/WebpackOptionsApply.js(430,12): error TS2300: Duplicate identifier 'OccurrenceChunkIdsPlugin'. -lib/WebpackOptionsApply.js(481,12): error TS2300: Duplicate identifier 'MemoryCachePlugin'. -lib/WebpackOptionsApply.js(491,12): error TS2300: Duplicate identifier 'MemoryCachePlugin'. -lib/cache/ResolverCachePlugin.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'LazySet'. -lib/dependencies/CommonJsExportRequireDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/HarmonyExportImportedSpecifierDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/HarmonyImportDependency.js(9,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/HarmonyImportSpecifierDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/ImportDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/ModuleDecoratorDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/NullDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/RequireIncludeDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/dependencies/WorkerDependency.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Dependency'. -lib/javascript/EnableChunkLoadingPlugin.js(84,12): error TS2300: Duplicate identifier 'CommonJsChunkLoadingPlugin'. -lib/javascript/EnableChunkLoadingPlugin.js(91,12): error TS2300: Duplicate identifier 'CommonJsChunkLoadingPlugin'. -lib/library/EnableLibraryPlugin.js(79,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(89,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(99,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(109,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(119,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(129,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(139,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/library/EnableLibraryPlugin.js(150,12): error TS2300: Duplicate identifier 'AssignLibraryPlugin'. -lib/optimize/SplitChunksPlugin.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Chunk'. -lib/runtime/LoadScriptRuntimeModule.js(8,7): error TS2440: Import declaration conflicts with local declaration of 'Compilation'. -lib/util/registerExternalSerializer.js(319,16): error TS2339: Property 'errors' does not exist on type 'typeof ValidationError'. -lib/util/registerExternalSerializer.js(320,16): error TS2339: Property 'schema' does not exist on type 'typeof ValidationError'. -lib/util/registerExternalSerializer.js(322,17): error TS2339: Property 'headerName' does not exist on type 'typeof ValidationError'. -lib/util/registerExternalSerializer.js(323,25): error TS2339: Property 'baseDataPath' does not exist on type 'typeof ValidationError'. -lib/util/registerExternalSerializer.js(324,26): error TS2339: Property 'postFormatter' does not exist on type 'typeof ValidationError'. -lib/util/registerExternalSerializer.js(333,4): error TS2739: Type 'ValidationError' is missing the following properties from type 'typeof ValidationError': prototype, captureStackTrace, stackTraceLimit -lib/wasm-async/AsyncWebAssemblyModulesPlugin.js(9,7): error TS2440: Import declaration conflicts with local declaration of 'Compilation'. -lib/webpack.js(10,7): error TS2440: Import declaration conflicts with local declaration of 'Compiler'. -lib/webpack.js(11,7): error TS2440: Import declaration conflicts with local declaration of 'MultiCompiler'. - - - -Standard error: From d1e1e9dcccd03a4f3e8c02e657bea459b1e46861 Mon Sep 17 00:00:00 2001 From: chenjigeng <178854407@qq.com> Date: Sat, 16 Jan 2021 07:57:18 +0800 Subject: [PATCH 14/92] Feat/exclude completions of variable initializers (#42087) * feat: exclude declared variable when Object literal completions * feat: check undeclareVariable when completion * feat: add completion test case * feat: code optimization * feat: support shorthand property assignment * feat: add shorthand property assignment test case * feat: update completionPropertyShorthandForObjectLiteral test cases * feat: exclude completions of variable initializers * feat: update test cases * feat: add completionListWithoutVariableinitializer test case * feat: perfect the completionListWithoutVariableinitializer test case * feat: remove isIdentifier limit * feat: update test cases * feat: code optimization and filter out some binding cases * feat: update test case * feat: handle arrow function expressions without braces * feat: add arrow function expressions without braces test case * feat: check node.parent exist first * feat: optimization name * feat: optimize test cases * chore: code formatting * feat: perfect type --- src/services/completions.ts | 21 +++++++ tests/cases/fourslash/commentsClassMembers.ts | 3 +- ...stBuilderLocations_VariableDeclarations.ts | 9 ++- .../completionListInObjectLiteral5.ts | 26 ++++++++ .../completionListIsGlobalCompletion.ts | 9 +-- .../fourslash/completionListWithMeanings.ts | 14 ++++- ...ompletionListWithoutVariableinitializer.ts | 62 +++++++++++++++++++ ...etionPropertyShorthandForObjectLiteral2.ts | 9 ++- ...etionPropertyShorthandForObjectLiteral3.ts | 2 +- ...etionPropertyShorthandForObjectLiteral4.ts | 2 +- ...etionPropertyShorthandForObjectLiteral5.ts | 9 +-- .../fourslash/completionTypeAssertion.ts | 3 +- ...lobalCompletionListInsideObjectLiterals.ts | 6 +- .../tsxCompletionOnOpeningTagWithoutJSX1.ts | 3 +- 14 files changed, 158 insertions(+), 20 deletions(-) create mode 100644 tests/cases/fourslash/completionListInObjectLiteral5.ts create mode 100644 tests/cases/fourslash/completionListWithoutVariableinitializer.ts diff --git a/src/services/completions.ts b/src/services/completions.ts index 3e02ba7c20237..f0ad156956d82 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1504,6 +1504,8 @@ namespace ts.Completions { : KeywordCompletionFilters.TypeKeywords; } + const variableDeclaration = getVariableDeclaration(location); + filterMutate(symbols, symbol => { if (!isSourceFile(location)) { // export = /**/ here we want to get all meanings, so any symbol is ok @@ -1511,6 +1513,12 @@ namespace ts.Completions { return true; } + // Filter out variables from their own initializers + // `const a = /* no 'a' here */` + if (variableDeclaration && symbol.valueDeclaration === variableDeclaration) { + return false; + } + symbol = skipAlias(symbol, typeChecker); // import m = /**/ <-- It can only access namespace (if typing import = x. this would get member symbols and not namespace) @@ -1529,6 +1537,19 @@ namespace ts.Completions { }); } + function getVariableDeclaration(property: Node): VariableDeclaration | undefined { + const variableDeclaration = findAncestor(property, node => + isFunctionBlock(node) || isArrowFunctionBody(node) || isBindingPattern(node) + ? "quit" + : isVariableDeclaration(node)); + + return variableDeclaration as VariableDeclaration | undefined; + } + + function isArrowFunctionBody(node: Node) { + return node.parent && isArrowFunction(node.parent) && node.parent.body === node; + }; + function isTypeOnlyCompletion(): boolean { return insideJsDocTagTypeExpression || !isContextTokenValueLocation(contextToken) && diff --git a/tests/cases/fourslash/commentsClassMembers.ts b/tests/cases/fourslash/commentsClassMembers.ts index 1e17f0327fe7e..3cc9b27172958 100644 --- a/tests/cases/fourslash/commentsClassMembers.ts +++ b/tests/cases/fourslash/commentsClassMembers.ts @@ -201,7 +201,8 @@ verify.completions( ], }, { marker: ["29", "33", "38", "109"], includes: locals }, - { marker: ["35", "40", "87"], includes: locals, isNewIdentifierLocation: true }, + { marker: ["35", "40"], includes: locals, isNewIdentifierLocation: true }, + { marker: ["87"], includes: locals.filter(local => local === 'i1_s_p') , isNewIdentifierLocation: true }, { marker: "31", includes: { name: "b", text: "(parameter) b: number", documentation: "number to add" } }, { marker: "42", includes: { name: "value", text: "(parameter) value: number", documentation: "this is value" }, isNewIdentifierLocation: true }, { marker: ["45", "52", "59"], includes: { name: "b", text: "(parameter) b: number" } }, diff --git a/tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts b/tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts index af119f40be57f..eaad02afcc52f 100644 --- a/tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts +++ b/tests/cases/fourslash/completionListBuilderLocations_VariableDeclarations.ts @@ -26,8 +26,15 @@ ////var y = 10; y=/*var12*/ +// first declaration verify.completions({ - marker: test.markers(), + marker: ["var1"], + exact: completion.globalsPlus(["y", "C"]), + isNewIdentifierLocation: true +}); + +verify.completions({ + marker: ["var2", "var3", "var4", "var5", "var6", "var7", "var8", "var9", "var10", "var11", "var12"], exact: completion.globalsPlus(["x", "y", "C"]), isNewIdentifierLocation: true }); diff --git a/tests/cases/fourslash/completionListInObjectLiteral5.ts b/tests/cases/fourslash/completionListInObjectLiteral5.ts new file mode 100644 index 0000000000000..eb245d748bf41 --- /dev/null +++ b/tests/cases/fourslash/completionListInObjectLiteral5.ts @@ -0,0 +1,26 @@ +/// + +////const o = 'something' +////const obj = { +//// prop: o/*1*/, +//// pro() { +//// const obj1 = { +//// p:{ +//// s: { +//// h: { +//// hh: o/*2*/ +//// }, +//// someFun() { +//// o/*3*/ +//// } +//// } +//// } +//// } +//// }, +//// o/*4*/ +////} + +verify.completions({ marker: ["1"], excludes: ['obj'], includes: ['o'] }); +verify.completions({ marker: ["2"], excludes: ['obj1'], includes: ['o', 'obj'] }); +verify.completions({ marker: ["3"], includes: ['o', 'obj', 'obj1'] }); +verify.completions({ marker: ["4"], includes: ['o'], excludes: ['obj'] }); \ No newline at end of file diff --git a/tests/cases/fourslash/completionListIsGlobalCompletion.ts b/tests/cases/fourslash/completionListIsGlobalCompletion.ts index 91cd1a0f9c7e5..7184e50499e00 100644 --- a/tests/cases/fourslash/completionListIsGlobalCompletion.ts +++ b/tests/cases/fourslash/completionListIsGlobalCompletion.ts @@ -41,12 +41,13 @@ verify.completions( { marker: ["1", "3", "6", "8", "12", "14"], exact: undefined, isGlobalCompletion: false }, { marker: "2", exact: ["a.ts", "file.ts"], isGlobalCompletion: false, isNewIdentifierLocation: true }, { marker: ["4", "19"], exact: [], isGlobalCompletion: false }, - { marker: ["5", "11", "18"], exact: globals, isGlobalCompletion: true }, + { marker: ["5", "11"], exact: globals, isGlobalCompletion: true }, + { marker: ["18"], exact: globals.filter(name => name !== 'user'), isGlobalCompletion: true }, { marker: "7", exact: completion.globalsInsideFunction(x), isGlobalCompletion: true }, { marker: "9", exact: ["x", "y"], isGlobalCompletion: false }, { marker: "10", exact: completion.classElementKeywords, isGlobalCompletion: false, isNewIdentifierLocation: true }, - { marker: "13", exact: globals, isGlobalCompletion: false }, - { marker: "15", exact: globals, isGlobalCompletion: true, isNewIdentifierLocation: true }, - { marker: "16", exact: [...x, completion.globalThisEntry, ...completion.globalsVars, completion.undefinedVarEntry], isGlobalCompletion: false }, + { marker: "13", exact: globals.filter(name => name !== 'z'), isGlobalCompletion: false }, + { marker: "15", exact: globals.filter(name => name !== 'x'), isGlobalCompletion: true, isNewIdentifierLocation: true }, + { marker: "16", exact: [...x, completion.globalThisEntry, ...completion.globalsVars, completion.undefinedVarEntry].filter(name => name !== 'user'), isGlobalCompletion: false }, { marker: "17", exact: completion.globalKeywords, isGlobalCompletion: false }, ); diff --git a/tests/cases/fourslash/completionListWithMeanings.ts b/tests/cases/fourslash/completionListWithMeanings.ts index 034607d08c021..82c69d43a48de 100644 --- a/tests/cases/fourslash/completionListWithMeanings.ts +++ b/tests/cases/fourslash/completionListWithMeanings.ts @@ -36,10 +36,20 @@ const types: ReadonlyArray = [ ...completion.typeKeywords, ]; +const filterValuesByName = (name: string) => { + return values.filter(entry => { + if (typeof entry === 'string') { + return entry !== name; + } + + return entry.name !== name; + }) +} + verify.completions( - { marker: "valueExpr", exact: values, isNewIdentifierLocation: true }, + { marker: "valueExpr", exact: filterValuesByName('tt'), isNewIdentifierLocation: true }, { marker: "typeExpr", exact: types, }, - { marker: "valueExprInObjectLiteral", exact: values }, + { marker: "valueExprInObjectLiteral", exact: filterValuesByName('yy') }, { marker: "membertypeExpr", exact: [{ name: "point3", text: "interface m3.point3" }] }, { marker: "membervalueExpr", exact: [{ name: "zz2", text: "var m3.zz2: number" }] }, ); diff --git a/tests/cases/fourslash/completionListWithoutVariableinitializer.ts b/tests/cases/fourslash/completionListWithoutVariableinitializer.ts new file mode 100644 index 0000000000000..7ef57ca66e196 --- /dev/null +++ b/tests/cases/fourslash/completionListWithoutVariableinitializer.ts @@ -0,0 +1,62 @@ +/// + +//// const a = a/*1*/; +//// const b = a && b/*2*/; +//// const c = [{ prop: [c/*3*/] }]; +//// const d = () => { d/*4*/ }; +//// const e = () => expression/*5*/ +//// const f = { prop() { e/*6*/ } }; +//// const fn = (p = /*7*/) => {} +//// const { g, h = /*8*/ } = { ... } +//// const [ g1, h1 = /*9*/ ] = [ ... ] + +verify.completions({ + marker: ["1"], + excludes: ["a"], + isNewIdentifierLocation: true, +}); + +verify.completions({ + marker: ["2"], + excludes: ["b"], + includes: ["a"], +}); + +verify.completions({ + marker: ["3"], + excludes: ["c"], + includes: ["a", "b"], + isNewIdentifierLocation: true, +}); + +verify.completions({ + marker: ["4"], + includes: ["a", "b", "c", "d"], +}); + +verify.completions({ + marker: ["5"], + includes: ["a", "b", "c", "d", "e"], +}); + +verify.completions({ + marker: ["6"], + includes: ["a", "b", "c", "d", "e"], +}); + +verify.completions({ + marker: ["7"], + includes: ["a", "b", "c", "d", "e"], + excludes: ["fn"], +}); + +verify.completions({ + marker: ["8"], + includes: ["a", "b", "c", "d", "e", "fn"], +}); + +verify.completions({ + marker: ["9"], + includes: ["a", "b", "c", "d", "e", "fn"], +}); + diff --git a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral2.ts b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral2.ts index ec54418c77935..40aa223b7eced 100644 --- a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral2.ts +++ b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral2.ts @@ -12,6 +12,11 @@ //// }; verify.completions({ - marker: test.markers(), - exact: completion.globalsPlus(["foo", "bar", "obj1", "obj2"]), + marker: ["1"], + exact: completion.globalsPlus(["foo", "bar", "obj2"]), +}); + +verify.completions({ + marker: ["2"], + exact: completion.globalsPlus(["foo", "bar", "obj1"]), }); diff --git a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral3.ts b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral3.ts index 0a6fad60b293e..70c1f60055425 100644 --- a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral3.ts +++ b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral3.ts @@ -7,5 +7,5 @@ verify.completions({ marker: ["1"], - exact: completion.globalsPlus(["foo", "bar", "obj"]) + exact: completion.globalsPlus(["foo", "bar"]), }); diff --git a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral4.ts b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral4.ts index 35daa6185a3f1..a720bcc1dc6b2 100644 --- a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral4.ts +++ b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral4.ts @@ -7,5 +7,5 @@ verify.completions({ marker: ["1"], - exact: completion.globalsPlus(["foo", "bar", "obj"]) + exact: completion.globalsPlus(["foo", "bar"]), }); diff --git a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral5.ts b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral5.ts index 74ded23477463..979b0b2afe767 100644 --- a/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral5.ts +++ b/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral5.ts @@ -4,10 +4,11 @@ //// export const exportedConstant = 0; // @Filename: /b.ts +//// const foo = 'foo' //// const obj = { exp/**/ verify.completions({ - marker: "", - exact: completion.globalsPlus(["obj"]), - preferences: { includeCompletionsForModuleExports: true } -}); \ No newline at end of file + marker: "", + exact: completion.globalsPlus(["foo"]), + preferences: { includeCompletionsForModuleExports: true }, +}); diff --git a/tests/cases/fourslash/completionTypeAssertion.ts b/tests/cases/fourslash/completionTypeAssertion.ts index bb5c6f8abda29..fbfe72ac455cc 100644 --- a/tests/cases/fourslash/completionTypeAssertion.ts +++ b/tests/cases/fourslash/completionTypeAssertion.ts @@ -1,5 +1,6 @@ /// -//// var x = this as/*1*/ +//// var x = 'something' +//// var y = this as/*1*/ verify.completions({marker: "1", exact: completion.globalsPlus(["x"]) }) diff --git a/tests/cases/fourslash/globalCompletionListInsideObjectLiterals.ts b/tests/cases/fourslash/globalCompletionListInsideObjectLiterals.ts index 503758461489b..00d5ef2c6e0d6 100644 --- a/tests/cases/fourslash/globalCompletionListInsideObjectLiterals.ts +++ b/tests/cases/fourslash/globalCompletionListInsideObjectLiterals.ts @@ -28,6 +28,8 @@ // 5, 6: Literal member completion after member name with empty member expression. const exact = ["p1", "p2", "p3", "p4", ...completion.globalsPlus(["ObjectLiterals"])]; verify.completions( - { marker: ["1",], exact, isNewIdentifierLocation: true }, - { marker: ["2", "3", "4", "5", "6"], exact } + { marker: ["1",], exact: exact.filter(name => name !== 'p1'), isNewIdentifierLocation: true }, + { marker: ["2", "3"], exact: exact.filter(name => name !== 'p2') }, + { marker: ["4"], exact: exact.filter(name => name !== 'p3' ) }, + { marker: ["5", "6"], exact: exact.filter(name => name !== 'p4') }, ); diff --git a/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts b/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts index c7f3b3f26bebb..256c4280f856d 100644 --- a/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts +++ b/tests/cases/fourslash/tsxCompletionOnOpeningTagWithoutJSX1.ts @@ -1,6 +1,7 @@ /// //@Filename: file.tsx -//// var x = Date: Fri, 15 Jan 2021 17:23:01 -0800 Subject: [PATCH 15/92] Fix type parameter lookup for TypeAlias LibraryManagedAttributes (#42245) --- src/compiler/checker.ts | 13 ++-- ...sxLibraryManagedAttributesUnusedGeneric.js | 34 +++++++++ ...raryManagedAttributesUnusedGeneric.symbols | 70 +++++++++++++++++++ ...ibraryManagedAttributesUnusedGeneric.types | 51 ++++++++++++++ ...xLibraryManagedAttributesUnusedGeneric.tsx | 30 ++++++++ 5 files changed, 193 insertions(+), 5 deletions(-) create mode 100644 tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.js create mode 100644 tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.symbols create mode 100644 tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types create mode 100644 tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 70bd5d08ebf25..6875be4f893ba 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -24771,16 +24771,19 @@ namespace ts { function getJsxManagedAttributesFromLocatedAttributes(context: JsxOpeningLikeElement, ns: Symbol, attributesType: Type) { const managedSym = getJsxLibraryManagedAttributes(ns); if (managedSym) { - const declaredManagedType = getDeclaredTypeOfSymbol(managedSym); + const declaredManagedType = getDeclaredTypeOfSymbol(managedSym); // fetches interface type, or initializes symbol links type parmaeters const ctorType = getStaticTypeOfReferencedJsxConstructor(context); + if (managedSym.flags & SymbolFlags.TypeAlias) { + const params = getSymbolLinks(managedSym).typeParameters; + if (length(params) >= 2) { + const args = fillMissingTypeArguments([ctorType, attributesType], params, 2, isInJSFile(context)); + return getTypeAliasInstantiation(managedSym, args); + } + } if (length((declaredManagedType as GenericType).typeParameters) >= 2) { const args = fillMissingTypeArguments([ctorType, attributesType], (declaredManagedType as GenericType).typeParameters, 2, isInJSFile(context)); return createTypeReference((declaredManagedType as GenericType), args); } - else if (length(declaredManagedType.aliasTypeArguments) >= 2) { - const args = fillMissingTypeArguments([ctorType, attributesType], declaredManagedType.aliasTypeArguments, 2, isInJSFile(context)); - return getTypeAliasInstantiation(declaredManagedType.aliasSymbol!, args); - } } return attributesType; } diff --git a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.js b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.js new file mode 100644 index 0000000000000..d994e109fecf6 --- /dev/null +++ b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.js @@ -0,0 +1,34 @@ +//// [jsxLibraryManagedAttributesUnusedGeneric.tsx] +// @ts-ignore +import React from 'react' + +declare const jsx: typeof React.createElement +namespace jsx { + export namespace JSX { + export interface Element {} + export interface ElementClass {} + export interface ElementAttributesProperty {} + export interface ElementChildrenAttribute {} + export interface IntrinsicAttributes {} + export interface IntrinsicClassAttributes {} + export type IntrinsicElements = { + div: { className: string } + } + // Works + // export type LibraryManagedAttributes = P & { css: string }; + + // Equivalent to above, but fails + export type WithCSSProp

= P & { css: string } + export type LibraryManagedAttributes = WithCSSProp

+ + } +} + +declare const Comp: (p: { className?: string }) => null + +; + +//// [jsxLibraryManagedAttributesUnusedGeneric.js] +"use strict"; +exports.__esModule = true; +jsx(Comp, { css: "color:hotpink;" }); diff --git a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.symbols b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.symbols new file mode 100644 index 0000000000000..648be8bafaef1 --- /dev/null +++ b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.symbols @@ -0,0 +1,70 @@ +=== tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx === +// @ts-ignore +import React from 'react' +>React : Symbol(React, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 1, 6)) + +declare const jsx: typeof React.createElement +>jsx : Symbol(jsx, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 3, 13), Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 3, 45)) +>React : Symbol(React, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 1, 6)) + +namespace jsx { +>jsx : Symbol(jsx, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 3, 13), Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 3, 45)) + + export namespace JSX { +>JSX : Symbol(JSX, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 4, 15)) + + export interface Element {} +>Element : Symbol(Element, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 5, 26)) + + export interface ElementClass {} +>ElementClass : Symbol(ElementClass, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 6, 35)) + + export interface ElementAttributesProperty {} +>ElementAttributesProperty : Symbol(ElementAttributesProperty, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 7, 40)) + + export interface ElementChildrenAttribute {} +>ElementChildrenAttribute : Symbol(ElementChildrenAttribute, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 8, 53)) + + export interface IntrinsicAttributes {} +>IntrinsicAttributes : Symbol(IntrinsicAttributes, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 9, 52)) + + export interface IntrinsicClassAttributes {} +>IntrinsicClassAttributes : Symbol(IntrinsicClassAttributes, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 10, 47)) +>T : Symbol(T, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 11, 50)) + + export type IntrinsicElements = { +>IntrinsicElements : Symbol(IntrinsicElements, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 11, 55)) + + div: { className: string } +>div : Symbol(div, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 12, 41)) +>className : Symbol(className, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 13, 18)) + } + // Works + // export type LibraryManagedAttributes = P & { css: string }; + + // Equivalent to above, but fails + export type WithCSSProp

= P & { css: string } +>WithCSSProp : Symbol(WithCSSProp, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 14, 9)) +>P : Symbol(P, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 19, 32)) +>P : Symbol(P, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 19, 32)) +>css : Symbol(css, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 19, 42)) + + export type LibraryManagedAttributes = WithCSSProp

+>LibraryManagedAttributes : Symbol(LibraryManagedAttributes, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 19, 56)) +>C : Symbol(C, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 20, 45)) +>P : Symbol(P, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 20, 47)) +>WithCSSProp : Symbol(WithCSSProp, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 14, 9)) +>P : Symbol(P, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 20, 47)) + + } +} + +declare const Comp: (p: { className?: string }) => null +>Comp : Symbol(Comp, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 25, 13)) +>p : Symbol(p, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 25, 21)) +>className : Symbol(className, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 25, 25)) + +; +>Comp : Symbol(Comp, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 25, 13)) +>css : Symbol(css, Decl(jsxLibraryManagedAttributesUnusedGeneric.tsx, 27, 6)) + diff --git a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types new file mode 100644 index 0000000000000..f47bd7afddd62 --- /dev/null +++ b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types @@ -0,0 +1,51 @@ +=== tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx === +// @ts-ignore +import React from 'react' +>React : any + +declare const jsx: typeof React.createElement +>jsx : error +>React.createElement : error +>React : any +>createElement : any + +namespace jsx { + export namespace JSX { + export interface Element {} + export interface ElementClass {} + export interface ElementAttributesProperty {} + export interface ElementChildrenAttribute {} + export interface IntrinsicAttributes {} + export interface IntrinsicClassAttributes {} + export type IntrinsicElements = { +>IntrinsicElements : IntrinsicElements + + div: { className: string } +>div : { className: string; } +>className : string + } + // Works + // export type LibraryManagedAttributes = P & { css: string }; + + // Equivalent to above, but fails + export type WithCSSProp

= P & { css: string } +>WithCSSProp : WithCSSProp

+>css : string + + export type LibraryManagedAttributes = WithCSSProp

+>LibraryManagedAttributes : WithCSSProp

+ + } +} + +declare const Comp: (p: { className?: string }) => null +>Comp : (p: { className?: string;}) => null +>p : { className?: string; } +>className : string +>null : null + +; +> : jsx.JSX.Element +>Comp : (p: { className?: string; }) => null +>css : string + diff --git a/tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx b/tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx new file mode 100644 index 0000000000000..6112a4151e3db --- /dev/null +++ b/tests/cases/compiler/jsxLibraryManagedAttributesUnusedGeneric.tsx @@ -0,0 +1,30 @@ +// @jsx: react +// @jsxFactory: jsx +// @ts-ignore +import React from 'react' + +declare const jsx: typeof React.createElement +namespace jsx { + export namespace JSX { + export interface Element {} + export interface ElementClass {} + export interface ElementAttributesProperty {} + export interface ElementChildrenAttribute {} + export interface IntrinsicAttributes {} + export interface IntrinsicClassAttributes {} + export type IntrinsicElements = { + div: { className: string } + } + // Works + // export type LibraryManagedAttributes = P & { css: string }; + + // Equivalent to above, but fails + export type WithCSSProp

= P & { css: string } + export type LibraryManagedAttributes = WithCSSProp

+ + } +} + +declare const Comp: (p: { className?: string }) => null + +; \ No newline at end of file From 70c82cab756b4c7103eda44e127ea1f87c00ad8b Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Fri, 15 Jan 2021 16:00:55 -1000 Subject: [PATCH 16/92] Include alias type arguments in keys for aliased types (#42365) --- src/compiler/checker.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6875be4f893ba..8e4b9e48a2828 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12325,6 +12325,10 @@ namespace ts { return result; } + function getAliasId(aliasSymbol: Symbol | undefined, aliasTypeArguments: readonly Type[] | undefined) { + return aliasSymbol ? `@${getSymbolId(aliasSymbol)}` + (aliasTypeArguments ? `:${getTypeListId(aliasTypeArguments)}` : "") : ""; + } + // This function is used to propagate certain flags when creating new object type references and union types. // It is only necessary to do so if a constituent type might be the undefined type, the null type, the type // of an object literal or the anyFunctionType. This is because there are operations in the type checker @@ -12453,7 +12457,7 @@ namespace ts { } const links = getSymbolLinks(symbol); const typeParameters = links.typeParameters!; - const id = getTypeListId(typeArguments) + (aliasSymbol ? `@${getSymbolId(aliasSymbol)}` : ""); + const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); let instantiation = links.instantiations!.get(id); if (!instantiation) { links.instantiations!.set(id, instantiation = instantiateTypeWithAlias(type, @@ -13487,7 +13491,7 @@ namespace ts { origin.flags & TypeFlags.Union ? `|${getTypeListId((origin).types)}` : origin.flags & TypeFlags.Intersection ? `&${getTypeListId((origin).types)}` : `#${(origin).type.id}`; - const id = typeKey + (aliasSymbol ? `@${getSymbolId(aliasSymbol)}` : ""); + const id = typeKey + getAliasId(aliasSymbol, aliasTypeArguments); let type = unionTypes.get(id); if (!type) { type = createUnionType(types, aliasSymbol, aliasTypeArguments, origin); @@ -13724,7 +13728,7 @@ namespace ts { if (typeSet.length === 1) { return typeSet[0]; } - const id = getTypeListId(typeSet) + (aliasSymbol ? `@${getSymbolId(aliasSymbol)}` : ""); + const id = getTypeListId(typeSet) + getAliasId(aliasSymbol, aliasTypeArguments); let result = intersectionTypes.get(id); if (!result) { if (includes & TypeFlags.Union) { @@ -14486,7 +14490,7 @@ namespace ts { return objectType; } // Defer the operation by creating an indexed access type. - const id = objectType.id + "," + indexType.id + (shouldIncludeUndefined ? "?" : "") + (aliasSymbol ? `@${getSymbolId(aliasSymbol)}` : ""); + const id = objectType.id + "," + indexType.id + (shouldIncludeUndefined ? "?" : "") + getAliasId(aliasSymbol, aliasTypeArguments); let type = indexedAccessTypes.get(id); if (!type) { indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, aliasSymbol, aliasTypeArguments, shouldIncludeUndefined)); @@ -15481,15 +15485,15 @@ namespace ts { const combinedMapper = combineTypeMappers(type.mapper, mapper); const typeArguments = map(typeParameters, t => getMappedType(t, combinedMapper)); const newAliasSymbol = aliasSymbol || type.aliasSymbol; - const id = getTypeListId(typeArguments) + (newAliasSymbol ? `@${getSymbolId(newAliasSymbol)}` : ""); + const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); + const id = getTypeListId(typeArguments) + getAliasId(newAliasSymbol, newAliasTypeArguments); if (!target.instantiations) { target.instantiations = new Map(); - target.instantiations.set(getTypeListId(typeParameters) + (target.aliasSymbol ? `@${getSymbolId(target.aliasSymbol)}` : ""), target); + target.instantiations.set(getTypeListId(typeParameters) + getAliasId(target.aliasSymbol, target.aliasTypeArguments), target); } let result = target.instantiations.get(id); if (!result) { const newMapper = createTypeMapper(typeParameters, typeArguments); - const newAliasTypeArguments = aliasSymbol ? aliasTypeArguments : instantiateTypes(type.aliasTypeArguments, mapper); result = target.objectFlags & ObjectFlags.Reference ? createDeferredTypeReference((type).target, (type).node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & ObjectFlags.Mapped ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments); @@ -15657,7 +15661,7 @@ namespace ts { // mapper to the type parameters to produce the effective list of type arguments, and compute the // instantiation cache key from the type IDs of the type arguments. const typeArguments = map(root.outerTypeParameters, t => getMappedType(t, mapper)); - const id = getTypeListId(typeArguments) + (aliasSymbol ? `@${getSymbolId(aliasSymbol)}` : ""); + const id = getTypeListId(typeArguments) + getAliasId(aliasSymbol, aliasTypeArguments); let result = root.instantiations!.get(id); if (!result) { const newMapper = createTypeMapper(root.outerTypeParameters, typeArguments); From b5bab16a962dd6e02fe65f6d5eb5a0de11cb9d5b Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Sat, 16 Jan 2021 06:49:45 +0000 Subject: [PATCH 17/92] Update package-lock.json --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6d82a06324c76..7e12c1a4ea911 100644 --- a/package-lock.json +++ b/package-lock.json @@ -330,12 +330,12 @@ "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.0.tgz", - "integrity": "sha512-+zARyncLjt9b0FjqPAbJo4ss7HOlBi1nprq+cPlw5vu2+qjy7WvlXhtXFdRHQbSL1Pt+bfAKaLADEkkvg8sP8w==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.1.tgz", + "integrity": "sha512-dUsxsEIrBqhlQNfXRhMhXOTQi0SSG38+QWcPGO226HFPFJk44vWukegHfMG3496vLv9T2oT7IuAGssGpcUg5bQ==", "dev": true, "requires": { - "@octokit/types": "^6.0.1" + "@octokit/types": "^6.3.1" } }, "@octokit/plugin-request-log": { @@ -402,9 +402,9 @@ } }, "@octokit/types": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.0.tgz", - "integrity": "sha512-OYlk5Di9daD0x948qhMqIgq6XLkm/2w0lgzibDgqrf+LfuAPL12WQaF/N2dO6ipOMW7Xe1jMattZiEd2bRR4Rg==", + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.1.tgz", + "integrity": "sha512-SyOaprLWVPS6QhbZY8hF9Oydx/UUnslKq1NyNUr4CN42UEPC3+9AvrYrDm4UvaU1D5u/vVMuSZOicFqOielRXQ==", "dev": true, "requires": { "@octokit/openapi-types": "^2.3.0", From 852c7027e9ea69031cedb404979e2f3c4d6cce3f Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Mon, 18 Jan 2021 06:50:43 +0000 Subject: [PATCH 18/92] Update package-lock.json --- package-lock.json | 100 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e12c1a4ea911..a1f6011145a4a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4684,25 +4684,39 @@ }, "dependencies": { "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "version": "1.18.0-next.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", + "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", "has": "^1.0.3", "has-symbols": "^1.0.1", "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", + "is-negative-zero": "^2.0.1", "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", + "object-inspect": "^1.9.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" } }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -4714,6 +4728,26 @@ "has-symbols": "^1.0.1", "object-keys": "^1.1.1" } + }, + "string.prototype.trimend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } } } }, @@ -8290,25 +8324,39 @@ }, "dependencies": { "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "version": "1.18.0-next.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz", + "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==", "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2", "has": "^1.0.3", "has-symbols": "^1.0.1", "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", + "is-negative-zero": "^2.0.1", "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", + "object-inspect": "^1.9.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.3", + "string.prototype.trimstart": "^1.0.3" } }, + "is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true + }, + "object-inspect": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", + "dev": true + }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -8320,6 +8368,26 @@ "has-symbols": "^1.0.1", "object-keys": "^1.1.1" } + }, + "string.prototype.trimend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", + "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", + "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3" + } } } }, From 621e0afe00137efb96049e98e139094274bc235c Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Mon, 18 Jan 2021 07:05:11 -0800 Subject: [PATCH 19/92] Accept merge-conflicted baseline (#42398) --- .../reference/jsxLibraryManagedAttributesUnusedGeneric.types | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types index f47bd7afddd62..46f0e28a4b31a 100644 --- a/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types +++ b/tests/baselines/reference/jsxLibraryManagedAttributesUnusedGeneric.types @@ -33,7 +33,7 @@ namespace jsx { >css : string export type LibraryManagedAttributes = WithCSSProp

->LibraryManagedAttributes : WithCSSProp

+>LibraryManagedAttributes : LibraryManagedAttributes } } From b34e680cd0e7ad48cae150f2f79dfe475456ce9b Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Tue, 19 Jan 2021 06:51:13 +0000 Subject: [PATCH 20/92] Update package-lock.json --- package-lock.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1f6011145a4a..ac9b506b5642b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -324,9 +324,9 @@ } }, "@octokit/openapi-types": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.0.tgz", - "integrity": "sha512-Own8lHWVi5eEfLOnsIzAx16BoRbpkzac3QDUCxIqYMf4bjz+AGpv17UfRn1Va4lVmjwOpvZglpFI3mmxuQ+sIQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.1.tgz", + "integrity": "sha512-KTzpRDT07euvbBYbPs121YDqq5DT94nBDFIyogsDhOnWL8yDCHev6myeiPTgS+VLmyUbdNCYu6L/gVj+Bd1q8Q==", "dev": true }, "@octokit/plugin-paginate-rest": { @@ -402,12 +402,12 @@ } }, "@octokit/types": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.1.tgz", - "integrity": "sha512-SyOaprLWVPS6QhbZY8hF9Oydx/UUnslKq1NyNUr4CN42UEPC3+9AvrYrDm4UvaU1D5u/vVMuSZOicFqOielRXQ==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.2.tgz", + "integrity": "sha512-H6cbnDumWOQJneyNKCBWgnktRqTWcEm6gq2cIS3frtVgpCqB8zguromnjIWJW375btjnxwmbYBTEAEouruZ2Yw==", "dev": true, "requires": { - "@octokit/openapi-types": "^2.3.0", + "@octokit/openapi-types": "^2.3.1", "@types/node": ">= 8" } }, From 147384c932146f6f64b5964f01d79b4716139466 Mon Sep 17 00:00:00 2001 From: Zuckjet <1083941774@qq.com> Date: Wed, 20 Jan 2021 01:13:26 +0800 Subject: [PATCH 21/92] Fix typos in comments (#42396) --- lib/tsserver.js | 6 +++--- lib/tsserverlibrary.js | 6 +++--- lib/typescript.js | 6 +++--- lib/typescriptServices.js | 6 +++--- lib/typingsInstaller.js | 6 +++--- src/compiler/builder.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/resolutionCache.ts | 2 +- src/compiler/utilitiesPublic.ts | 2 +- src/server/project.ts | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/tsserver.js b/lib/tsserver.js index da00976fe12d9..fea2c7355c212 100644 --- a/lib/tsserver.js +++ b/lib/tsserver.js @@ -106237,7 +106237,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109353,7 +109353,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110505,7 +110505,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/tsserverlibrary.js b/lib/tsserverlibrary.js index 1cf869df83039..871fc59961b13 100644 --- a/lib/tsserverlibrary.js +++ b/lib/tsserverlibrary.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typescript.js b/lib/typescript.js index bdb7d8ef61977..48c2fc2c63cea 100644 --- a/lib/typescript.js +++ b/lib/typescript.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typescriptServices.js b/lib/typescriptServices.js index f8c52a49c2096..bf9fd8adc3ce6 100644 --- a/lib/typescriptServices.js +++ b/lib/typescriptServices.js @@ -106431,7 +106431,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109547,7 +109547,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110699,7 +110699,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/lib/typingsInstaller.js b/lib/typingsInstaller.js index e3a7a2c154dd1..4f9a74223a677 100644 --- a/lib/typingsInstaller.js +++ b/lib/typingsInstaller.js @@ -106226,7 +106226,7 @@ var ts; var oldSourceFile = oldSourceFiles_1[_i]; var newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } @@ -109342,7 +109342,7 @@ var ts; var newReferences; // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || @@ -110494,7 +110494,7 @@ var ts; var resolvedModules = []; var compilerOptions = resolutionHost.getCompilationSettings(); var hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect var program = resolutionHost.getCurrentProgram(); var oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); var unmatchedRedirects = oldRedirect ? diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 8d09baa270540..45db667aa99ea 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -216,7 +216,7 @@ namespace ts { // if not using old state, every file is changed if (!useOldState || - // File wasnt present in old state + // File wasn't present in old state !(oldInfo = oldState!.fileInfos.get(sourceFilePath)) || // versions dont match oldInfo.version !== info.version || diff --git a/src/compiler/program.ts b/src/compiler/program.ts index bc7e006801d94..c1c34d1eef0cd 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1016,7 +1016,7 @@ namespace ts { for (const oldSourceFile of oldSourceFiles) { const newFile = getSourceFileByPath(oldSourceFile.resolvedPath); if (shouldCreateNewSourceFile || !newFile || - // old file wasnt redirect but new file is + // old file wasn't redirect but new file is (oldSourceFile.resolvedPath === oldSourceFile.path && newFile.resolvedPath !== oldSourceFile.path)) { host.onReleaseOldSourceFile(oldSourceFile, oldProgram.getCompilerOptions(), !!getSourceFileByPath(oldSourceFile.path)); } diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 6848ecb4bc911..3242a44ee220c 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -361,7 +361,7 @@ namespace ts { const compilerOptions = resolutionHost.getCompilationSettings(); const hasInvalidatedNonRelativeUnresolvedImport = logChanges && isFileWithInvalidatedNonRelativeUnresolvedImports(path); - // All the resolutions in this file are invalidated if this file wasnt resolved using same redirect + // All the resolutions in this file are invalidated if this file wasn't resolved using same redirect const program = resolutionHost.getCurrentProgram(); const oldRedirect = program && program.getResolvedProjectReferenceToRedirect(containingFile); const unmatchedRedirects = oldRedirect ? diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 6722e7ad5be1f..fcb82c377e3e7 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -311,7 +311,7 @@ namespace ts { // nodes like variable declarations and binding elements can returned a view of their flags // that includes the modifiers from their container. i.e. flags like export/declare aren't // stored on the variable declaration directly, but on the containing variable statement - // (if it has one). Similarly, flags for let/const are store on the variable declaration + // (if it has one). Similarly, flags for let/const are stored on the variable declaration // list. By calling this function, all those flags are combined so that the client can treat // the node as if it actually had those flags. export function getCombinedNodeFlags(node: Node): NodeFlags { diff --git a/src/server/project.ts b/src/server/project.ts index 6323e458227cb..21f3f55eb2696 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -102,7 +102,7 @@ namespace ts.server { /** * The project root can be script info - if root is present, - * or it could be just normalized path if root wasnt present on the host(only for non inferred project) + * or it could be just normalized path if root wasn't present on the host(only for non inferred project) */ /* @internal */ export interface ProjectRootFile { From 98e9e77255ba40c890bb19e5cf05c2e91d72ccab Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Tue, 19 Jan 2021 15:55:01 -0800 Subject: [PATCH 22/92] Fixed JSDoc with only one asterisk in comment --- src/compiler/parser.ts | 16 +++++----------- .../fourslash/quickInfoJsDocTextFormatting1.ts | 6 +++--- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 0b404578806bd..8f854d750c515 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -7602,15 +7602,8 @@ namespace ts { if (state === JSDocState.BeginningOfLine) { // leading asterisks start recording on the *next* (non-whitespace) token state = JSDocState.SawAsterisk; - - if (lookAhead(() => nextTokenJSDoc() === SyntaxKind.AsteriskToken)) { - pushComment(scanner.getTokenText()); - tok = nextTokenJSDoc(); - } - else { - indent += 1; - break; - } + indent += 1; + break; } // record the * as a comment // falls through @@ -7695,13 +7688,14 @@ namespace ts { skipWhitespaceOrAsterisk(); const { name, isBracketed } = parseBracketNameInPropertyAndParamTag(); - skipWhitespace(); + const indentText = skipWhitespaceOrAsterisk(); if (isNameFirst) { typeExpression = tryParseTypeExpression(); } - const comment = parseTagComments(indent + scanner.getStartPos() - start); + const comment = parseTrailingTagComments(indent + scanner.getStartPos() - start, getNodePos(), indent, indentText); + const nestedTypeLiteral = target !== PropertyLikeParse.CallbackParameter && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { typeExpression = nestedTypeLiteral; diff --git a/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts b/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts index 97e9712ed3c75..334a01243151f 100644 --- a/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts +++ b/tests/cases/fourslash/quickInfoJsDocTextFormatting1.ts @@ -9,7 +9,7 @@ //// function f1(var1, var2) { } //// //// /** -//// * @param {number} var1 *This asterisk gets trimmed unfortunatelly +//// * @param {number} var1 *Regular text with an asterisk //// * @param {string} var2 Another *Regular text with an asterisk //// */ //// function f2(var1, var2) { } @@ -57,10 +57,10 @@ verify.signatureHelp({ }); verify.signatureHelp({ marker: "2", - parameterDocComment: "This asterisk gets trimmed unfortunatelly", + parameterDocComment: "*Regular text with an asterisk", tags: [{ name: "param", - text: "var1 This asterisk gets trimmed unfortunatelly" + text: "var1 *Regular text with an asterisk" }, { name: "param", text: "var2 Another *Regular text with an asterisk" From 0d494abc773986abe41b7904adc7a4eb404923d1 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Tue, 19 Jan 2021 18:02:35 -0800 Subject: [PATCH 23/92] Add missing unwrap call for the inferredExtendsType (#42409) --- src/compiler/checker.ts | 2 +- .../nondistributiveConditionalTypeInfer.js | 16 +++++ ...ondistributiveConditionalTypeInfer.symbols | 61 +++++++++++++++++++ .../nondistributiveConditionalTypeInfer.types | 35 +++++++++++ .../nondistributiveConditionalTypeInfer.ts | 13 ++++ 5 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 tests/baselines/reference/nondistributiveConditionalTypeInfer.js create mode 100644 tests/baselines/reference/nondistributiveConditionalTypeInfer.symbols create mode 100644 tests/baselines/reference/nondistributiveConditionalTypeInfer.types create mode 100644 tests/cases/compiler/nondistributiveConditionalTypeInfer.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8e4b9e48a2828..3d709be779fca 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14613,7 +14613,7 @@ namespace ts { combinedMapper = mergeTypeMappers(mapper, context.mapper); } // Instantiate the extends type including inferences for 'infer T' type parameters - const inferredExtendsType = combinedMapper ? instantiateType(root.extendsType, combinedMapper) : extendsType; + const inferredExtendsType = combinedMapper ? instantiateType(unwrapNondistributiveConditionalTuple(root, root.extendsType), combinedMapper) : extendsType; // We attempt to resolve the conditional type only when the check and extends types are non-generic if (!checkTypeInstantiable && !isGenericObjectType(inferredExtendsType) && !isGenericIndexType(inferredExtendsType)) { // Return falseType for a definitely false extends check. We check an instantiations of the two diff --git a/tests/baselines/reference/nondistributiveConditionalTypeInfer.js b/tests/baselines/reference/nondistributiveConditionalTypeInfer.js new file mode 100644 index 0000000000000..968f3c1a4d757 --- /dev/null +++ b/tests/baselines/reference/nondistributiveConditionalTypeInfer.js @@ -0,0 +1,16 @@ +//// [nondistributiveConditionalTypeInfer.ts] +type _R = [T] extends [{ _R: (_: infer R) => void }] ? R : never; +type _E = [T] extends [{ _E: () => infer E }] ? E : never; +type _A = [T] extends [{ _A: () => infer A }] ? A : never; + +interface Sync { + _R: (_: R) => void; + _E: () => E; + _A: () => A; +} + +type R = _R>; +type E = _E>; +type A = _A>; + +//// [nondistributiveConditionalTypeInfer.js] diff --git a/tests/baselines/reference/nondistributiveConditionalTypeInfer.symbols b/tests/baselines/reference/nondistributiveConditionalTypeInfer.symbols new file mode 100644 index 0000000000000..133abc6c6a44a --- /dev/null +++ b/tests/baselines/reference/nondistributiveConditionalTypeInfer.symbols @@ -0,0 +1,61 @@ +=== tests/cases/compiler/nondistributiveConditionalTypeInfer.ts === +type _R = [T] extends [{ _R: (_: infer R) => void }] ? R : never; +>_R : Symbol(_R, Decl(nondistributiveConditionalTypeInfer.ts, 0, 0)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 0, 8)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 0, 8)) +>_R : Symbol(_R, Decl(nondistributiveConditionalTypeInfer.ts, 0, 27)) +>_ : Symbol(_, Decl(nondistributiveConditionalTypeInfer.ts, 0, 33)) +>R : Symbol(R, Decl(nondistributiveConditionalTypeInfer.ts, 0, 41)) +>R : Symbol(R, Decl(nondistributiveConditionalTypeInfer.ts, 0, 41)) + +type _E = [T] extends [{ _E: () => infer E }] ? E : never; +>_E : Symbol(_E, Decl(nondistributiveConditionalTypeInfer.ts, 0, 68)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 1, 8)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 1, 8)) +>_E : Symbol(_E, Decl(nondistributiveConditionalTypeInfer.ts, 1, 27)) +>E : Symbol(E, Decl(nondistributiveConditionalTypeInfer.ts, 1, 43)) +>E : Symbol(E, Decl(nondistributiveConditionalTypeInfer.ts, 1, 43)) + +type _A = [T] extends [{ _A: () => infer A }] ? A : never; +>_A : Symbol(_A, Decl(nondistributiveConditionalTypeInfer.ts, 1, 61)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 2, 8)) +>T : Symbol(T, Decl(nondistributiveConditionalTypeInfer.ts, 2, 8)) +>_A : Symbol(_A, Decl(nondistributiveConditionalTypeInfer.ts, 2, 27)) +>A : Symbol(A, Decl(nondistributiveConditionalTypeInfer.ts, 2, 43)) +>A : Symbol(A, Decl(nondistributiveConditionalTypeInfer.ts, 2, 43)) + +interface Sync { +>Sync : Symbol(Sync, Decl(nondistributiveConditionalTypeInfer.ts, 2, 61)) +>R : Symbol(R, Decl(nondistributiveConditionalTypeInfer.ts, 4, 15)) +>E : Symbol(E, Decl(nondistributiveConditionalTypeInfer.ts, 4, 17)) +>A : Symbol(A, Decl(nondistributiveConditionalTypeInfer.ts, 4, 20)) + + _R: (_: R) => void; +>_R : Symbol(Sync._R, Decl(nondistributiveConditionalTypeInfer.ts, 4, 25)) +>_ : Symbol(_, Decl(nondistributiveConditionalTypeInfer.ts, 5, 7)) +>R : Symbol(R, Decl(nondistributiveConditionalTypeInfer.ts, 4, 15)) + + _E: () => E; +>_E : Symbol(Sync._E, Decl(nondistributiveConditionalTypeInfer.ts, 5, 21)) +>E : Symbol(E, Decl(nondistributiveConditionalTypeInfer.ts, 4, 17)) + + _A: () => A; +>_A : Symbol(Sync._A, Decl(nondistributiveConditionalTypeInfer.ts, 6, 14)) +>A : Symbol(A, Decl(nondistributiveConditionalTypeInfer.ts, 4, 20)) +} + +type R = _R>; +>R : Symbol(R, Decl(nondistributiveConditionalTypeInfer.ts, 8, 1)) +>_R : Symbol(_R, Decl(nondistributiveConditionalTypeInfer.ts, 0, 0)) +>Sync : Symbol(Sync, Decl(nondistributiveConditionalTypeInfer.ts, 2, 61)) + +type E = _E>; +>E : Symbol(E, Decl(nondistributiveConditionalTypeInfer.ts, 10, 40)) +>_E : Symbol(_E, Decl(nondistributiveConditionalTypeInfer.ts, 0, 68)) +>Sync : Symbol(Sync, Decl(nondistributiveConditionalTypeInfer.ts, 2, 61)) + +type A = _A>; +>A : Symbol(A, Decl(nondistributiveConditionalTypeInfer.ts, 11, 40)) +>_A : Symbol(_A, Decl(nondistributiveConditionalTypeInfer.ts, 1, 61)) +>Sync : Symbol(Sync, Decl(nondistributiveConditionalTypeInfer.ts, 2, 61)) + diff --git a/tests/baselines/reference/nondistributiveConditionalTypeInfer.types b/tests/baselines/reference/nondistributiveConditionalTypeInfer.types new file mode 100644 index 0000000000000..ec301cfb34434 --- /dev/null +++ b/tests/baselines/reference/nondistributiveConditionalTypeInfer.types @@ -0,0 +1,35 @@ +=== tests/cases/compiler/nondistributiveConditionalTypeInfer.ts === +type _R = [T] extends [{ _R: (_: infer R) => void }] ? R : never; +>_R : _R +>_R : (_: infer R) => void +>_ : R + +type _E = [T] extends [{ _E: () => infer E }] ? E : never; +>_E : _E +>_E : () => infer E + +type _A = [T] extends [{ _A: () => infer A }] ? A : never; +>_A : _A +>_A : () => infer A + +interface Sync { + _R: (_: R) => void; +>_R : (_: R) => void +>_ : R + + _E: () => E; +>_E : () => E + + _A: () => A; +>_A : () => A +} + +type R = _R>; +>R : number + +type E = _E>; +>E : string + +type A = _A>; +>A : void + diff --git a/tests/cases/compiler/nondistributiveConditionalTypeInfer.ts b/tests/cases/compiler/nondistributiveConditionalTypeInfer.ts new file mode 100644 index 0000000000000..01d70af644bd7 --- /dev/null +++ b/tests/cases/compiler/nondistributiveConditionalTypeInfer.ts @@ -0,0 +1,13 @@ +type _R = [T] extends [{ _R: (_: infer R) => void }] ? R : never; +type _E = [T] extends [{ _E: () => infer E }] ? E : never; +type _A = [T] extends [{ _A: () => infer A }] ? A : never; + +interface Sync { + _R: (_: R) => void; + _E: () => E; + _A: () => A; +} + +type R = _R>; +type E = _E>; +type A = _A>; \ No newline at end of file From 1cef53f9f5e9e731d666d485fd69c5c6e7c2420c Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 20 Jan 2021 06:52:39 +0000 Subject: [PATCH 24/92] Update package-lock.json --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index ac9b506b5642b..be0c05d70b028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -585,9 +585,9 @@ "dev": true }, "@types/node": { - "version": "14.14.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.21.tgz", - "integrity": "sha512-cHYfKsnwllYhjOzuC5q1VpguABBeecUp24yFluHpn/BQaVxB1CuQ1FSRZCzrPxrkIfWISXV2LbeoBthLWg0+0A==", + "version": "14.14.22", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz", + "integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==", "dev": true }, "@types/node-fetch": { @@ -7954,9 +7954,9 @@ "dev": true }, "uglify-js": { - "version": "3.12.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz", - "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==", + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.5.tgz", + "integrity": "sha512-SgpgScL4T7Hj/w/GexjnBHi3Ien9WS1Rpfg5y91WXMj9SY997ZCQU76mH4TpLwwfmMvoOU8wiaRkIf6NaH3mtg==", "dev": true, "optional": true }, From a231b23772929418c2a82d7b5e3a69f596678ac8 Mon Sep 17 00:00:00 2001 From: Armando Aguirre Date: Tue, 19 Jan 2021 23:02:56 -0800 Subject: [PATCH 25/92] Fix start position on JSDoc parsin --- src/compiler/parser.ts | 2 +- tests/cases/fourslash/commentsLinePreservation.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 8f854d750c515..30f4c5a6a252e 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -7694,7 +7694,7 @@ namespace ts { typeExpression = tryParseTypeExpression(); } - const comment = parseTrailingTagComments(indent + scanner.getStartPos() - start, getNodePos(), indent, indentText); + const comment = parseTrailingTagComments(start, getNodePos(), indent, indentText); const nestedTypeLiteral = target !== PropertyLikeParse.CallbackParameter && parseNestedTypeLiteral(typeExpression, name, target, indent); if (nestedTypeLiteral) { diff --git a/tests/cases/fourslash/commentsLinePreservation.ts b/tests/cases/fourslash/commentsLinePreservation.ts index 3bf2165014ec9..47a796ac2520d 100644 --- a/tests/cases/fourslash/commentsLinePreservation.ts +++ b/tests/cases/fourslash/commentsLinePreservation.ts @@ -129,16 +129,16 @@ verify.quickInfos({ 3: ["(parameter) param1: string", "first line of param\n\nparam information third line"], g: ["function g(param1: string): void", "This is firstLine\nThis is second Line"], - 4: ["(parameter) param1: string", "param information first line"], + 4: ["(parameter) param1: string", " param information first line"], h: ["function h(param1: string): void", "This is firstLine\nThis is second Line"], - 5: ["(parameter) param1: string", "param information first line\n\nparam information third line"], + 5: ["(parameter) param1: string", " param information first line\n\n param information third line"], i: ["function i(param1: string): void", "This is firstLine\nThis is second Line"], - 6: ["(parameter) param1: string", "param information first line\n\nparam information third line"], + 6: ["(parameter) param1: string", " param information first line\n\n param information third line"], j: ["function j(param1: string): void", "This is firstLine\nThis is second Line"], - 7: ["(parameter) param1: string", "param information first line\n\nparam information third line"], + 7: ["(parameter) param1: string", " param information first line\n\n param information third line"], k: ["function k(param1: string): void", "This is firstLine\nThis is second Line"], 8: ["(parameter) param1: string", "hello"], From 028f14c507aeacc02dfb525f4eba02f46b02ea88 Mon Sep 17 00:00:00 2001 From: Anders Hejlsberg Date: Wed, 20 Jan 2021 06:37:02 -1000 Subject: [PATCH 26/92] Filter origin types when filtering union types (#42378) * When filtering a union type, also filter its origin type, if any * Accept new baselines --- src/compiler/checker.ts | 22 ++++++++++++++++++- .../exhaustiveSwitchStatements1.errors.txt | 4 ++-- .../exhaustiveSwitchStatements1.types | 4 ++-- .../observableInferenceCanBeMade.types | 2 +- .../partiallyDiscriminantedUnions.types | 2 +- .../spreadBooleanRespectsFreshness.types | 4 ++-- .../stringLiteralCheckedInIf02.types | 2 +- 7 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 3d709be779fca..4e630203b8631 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21689,7 +21689,27 @@ namespace ts { if (type.flags & TypeFlags.Union) { const types = (type).types; const filtered = filter(types, f); - return filtered === types ? type : getUnionTypeFromSortedList(filtered, (type).objectFlags); + if (filtered === types) { + return type; + } + const origin = (type).origin; + let newOrigin: Type | undefined; + if (origin && origin.flags & TypeFlags.Union) { + // If the origin type is a (denormalized) union type, filter its non-union constituents. If that ends + // up removing a smaller number of types than in the normalized constituent set (meaning some of the + // filtered types are within nested unions in the origin), then we can't construct a new origin type. + // Otherwise, if we have exactly one type left in the origin set, return that as the filtered type. + // Otherwise, construct a new filtered origin type. + const originTypes = (origin).types; + const originFiltered = filter(originTypes, t => !!(t.flags & TypeFlags.Union) || f(t)); + if (originTypes.length - originFiltered.length === types.length - filtered.length) { + if (originFiltered.length === 1) { + return originFiltered[0]; + } + newOrigin = createOriginUnionOrIntersectionType(TypeFlags.Union, originFiltered); + } + } + return getUnionTypeFromSortedList(filtered, (type).objectFlags, /*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, newOrigin); } return type.flags & TypeFlags.Never || f(type) ? type : neverType; } diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt index e958397f81a50..a8e02b04aa8db 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(7,9): error TS7027: Unreachable code detected. -tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap. +tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error TS2367: This condition will always return 'false' since the types 'keyof O' and '"c"' have no overlap. ==== tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts (2 errors) ==== @@ -241,7 +241,7 @@ tests/cases/conformance/controlFlow/exhaustiveSwitchStatements1.ts(235,5): error } k === 'c'; // Error ~~~~~~~~~ -!!! error TS2367: This condition will always return 'false' since the types '"a" | "b"' and '"c"' have no overlap. +!!! error TS2367: This condition will always return 'false' since the types 'keyof O' and '"c"' have no overlap. return o[k]; } \ No newline at end of file diff --git a/tests/baselines/reference/exhaustiveSwitchStatements1.types b/tests/baselines/reference/exhaustiveSwitchStatements1.types index 79e4483212c6b..043bb099f0161 100644 --- a/tests/baselines/reference/exhaustiveSwitchStatements1.types +++ b/tests/baselines/reference/exhaustiveSwitchStatements1.types @@ -695,12 +695,12 @@ function ff(o: O, k: K) { } k === 'c'; // Error >k === 'c' : boolean ->k : "a" | "b" +>k : keyof O >'c' : "c" return o[k]; >o[k] : number >o : O ->k : "a" | "b" +>k : keyof O } diff --git a/tests/baselines/reference/observableInferenceCanBeMade.types b/tests/baselines/reference/observableInferenceCanBeMade.types index e2c0a68f81f32..6931e042adb5b 100644 --- a/tests/baselines/reference/observableInferenceCanBeMade.types +++ b/tests/baselines/reference/observableInferenceCanBeMade.types @@ -52,6 +52,6 @@ function asObservable(input: string | ObservableInput): Observableinput : string >from(input) : Observable >from : >(input: O) => Observable> ->input : Subscribable | Subscribable +>input : ObservableInput } diff --git a/tests/baselines/reference/partiallyDiscriminantedUnions.types b/tests/baselines/reference/partiallyDiscriminantedUnions.types index ecfbefb65bf72..f1d44249c0eb2 100644 --- a/tests/baselines/reference/partiallyDiscriminantedUnions.types +++ b/tests/baselines/reference/partiallyDiscriminantedUnions.types @@ -95,7 +95,7 @@ function fail(s: Shapes) { if (s.kind === "circle") { >s.kind === "circle" : boolean >s.kind : "square" | "circle" ->s : Square | Circle +>s : Shape >kind : "square" | "circle" >"circle" : "circle" diff --git a/tests/baselines/reference/spreadBooleanRespectsFreshness.types b/tests/baselines/reference/spreadBooleanRespectsFreshness.types index 5263d6c3261a7..cd20dc31944b6 100644 --- a/tests/baselines/reference/spreadBooleanRespectsFreshness.types +++ b/tests/baselines/reference/spreadBooleanRespectsFreshness.types @@ -27,6 +27,6 @@ foo1 = [...Array.isArray(foo2) ? foo2 : [foo2]]; >isArray : (arg: any) => arg is any[] >foo2 : Foo >foo2 : FooArray ->[foo2] : (string | false)[] ->foo2 : string | false +>[foo2] : FooBase[] +>foo2 : FooBase diff --git a/tests/baselines/reference/stringLiteralCheckedInIf02.types b/tests/baselines/reference/stringLiteralCheckedInIf02.types index f81c05f1c3a44..8056c2dd43a27 100644 --- a/tests/baselines/reference/stringLiteralCheckedInIf02.types +++ b/tests/baselines/reference/stringLiteralCheckedInIf02.types @@ -29,7 +29,7 @@ function f(foo: T) { >foo : T return foo; ->foo : "a" | "b" +>foo : S } else { return foo[0]; From 9d286a21aef56a2d9687198daa23ac224d10ad37 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Wed, 20 Jan 2021 08:51:28 -0800 Subject: [PATCH 27/92] Update user baselines +cc @sandersn (#42366) Co-authored-by: typescript-bot --- tests/baselines/reference/docker/vue-next.log | 32 +- tests/baselines/reference/user/uglify-js.log | 423 +++++++++--------- 2 files changed, 236 insertions(+), 219 deletions(-) diff --git a/tests/baselines/reference/docker/vue-next.log b/tests/baselines/reference/docker/vue-next.log index f790e8d748b79..341dfe8014d00 100644 --- a/tests/baselines/reference/docker/vue-next.log +++ b/tests/baselines/reference/docker/vue-next.log @@ -19,13 +19,6 @@ The API report is up to date: temp/compiler-dom.api.md Writing package typings: /vue-next/packages/compiler-dom/dist/compiler-dom.d.ts Writing package typings: /vue-next/dist/compiler-dom.d.ts API Extractor completed successfully. -Rolling up type definitions for compiler-ssr... -Analysis will use the bundled TypeScript version 4.1.3 -*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. -Writing: /vue-next/temp/compiler-ssr.api.json -The API report is up to date: temp/compiler-ssr.api.md -Writing package typings: /vue-next/packages/compiler-ssr/dist/compiler-ssr.d.ts -Writing package typings: /vue-next/dist/compiler-ssr.d.ts Rolling up type definitions for compiler-sfc... Analysis will use the bundled TypeScript version 4.1.3 *** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. @@ -34,6 +27,13 @@ The API report is up to date: temp/compiler-sfc.api.md Writing package typings: /vue-next/packages/compiler-sfc/dist/compiler-sfc.d.ts Writing package typings: /vue-next/dist/compiler-sfc.d.ts API Extractor completed successfully. +Rolling up type definitions for compiler-ssr... +Analysis will use the bundled TypeScript version 4.1.3 +*** The target project appears to use TypeScript X.X.X-insiders.xxxxxxxx which is newer than the bundled compiler engine; consider upgrading API Extractor. +Writing: /vue-next/temp/compiler-ssr.api.json +The API report is up to date: temp/compiler-ssr.api.md +Writing package typings: /vue-next/packages/compiler-ssr/dist/compiler-ssr.d.ts +Writing package typings: /vue-next/dist/compiler-ssr.d.ts API Extractor completed successfully. @@ -75,10 +75,9 @@ Warning: dist/packages/compiler-core/src/options.d.ts:149:35 - (tsdoc-malformed- Warning: dist/packages/compiler-core/src/options.d.ts:149:36 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" /vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.cjs.js... created packages/compiler-dom/dist/compiler-dom.global.prod.js in ?s -/vue-next/packages/compiler-ssr/src/index.ts → packages/compiler-ssr/dist/compiler-ssr.cjs.js... created packages/compiler-sfc/dist/compiler-sfc.cjs.js in ?s /vue-next/packages/compiler-sfc/src/index.ts → packages/compiler-sfc/dist/compiler-sfc.global.js... -created packages/compiler-ssr/dist/compiler-ssr.cjs.js in ?s +/vue-next/packages/compiler-ssr/src/index.ts → packages/compiler-ssr/dist/compiler-ssr.cjs.js... (!) Missing shims for Node.js built-ins Creating a browser bundle that depends on 'path', 'url' and 'util'. You might need to include https://github.com/ionic-team/rollup-plugin-node-polyfills (!) Missing global variable names @@ -87,6 +86,7 @@ path (guessing 'path') url (guessing 'url') util (guessing 'require$$0') created packages/compiler-sfc/dist/compiler-sfc.global.js in ?s +created packages/compiler-ssr/dist/compiler-ssr.cjs.js in ?s Warning: dist/packages/compiler-sfc/src/compileScript.d.ts:27:36 - (tsdoc-escape-greater-than) The ">" character should be escaped using a backslash to avoid confusion with an HTML tag Warning: dist/packages/compiler-sfc/src/compileScript.d.ts:27:23 - (tsdoc-html-tag-missing-equals) The HTML element has an invalid attribute: Expecting "=" after HTML attribute name Warning: dist/packages/compiler-sfc/src/compileStyle.d.ts:18:8 - (tsdoc-missing-deprecation-message) The @deprecated block must include a deprecation message, e.g. describing the recommended alternative @@ -103,10 +103,10 @@ Error: /vue-next/packages/reactivity/src/baseHandlers.ts(192,3): semantic error Index signatures are incompatible. Type 'string | number | symbol' is not assignable to type 'string | symbol'. Type 'number' is not assignable to type 'string | symbol'. - at error (/vue-next/node_modules/rollup/dist/shared/rollup.js:5265:30) - at throwPluginError (/vue-next/node_modules/rollup/dist/shared/rollup.js:17972:12) - at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18579:24) - at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18141:38) + at error (/vue-next/node_modules/rollup/dist/shared/rollup.js:4533:30) + at throwPluginError (/vue-next/node_modules/rollup/dist/shared/rollup.js:18092:12) + at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18699:24) + at Object.error (/vue-next/node_modules/rollup/dist/shared/rollup.js:18261:38) at RollupContext.error (/vue-next/node_modules/rollup-plugin-typescript2/src/rollupcontext.ts:37:18) at /vue-next/node_modules/rollup-plugin-typescript2/src/print-diagnostics.ts:41:11 at arrayEach (/vue-next/node_modules/rollup-plugin-typescript2/node_modules/lodash/lodash.js:516:11) @@ -116,13 +116,13 @@ Error: /vue-next/packages/reactivity/src/baseHandlers.ts(192,3): semantic error /vue-next/node_modules/brotli/build/encode.js:3 1 void; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(331,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(524,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/ast.js(775,58): error TS2552: Cannot find name 'error'. Did you mean 'Error'? +node_modules/uglify-js/lib/ast.js(1507,5): error TS2322: Type '{ visit: (node: any, descend: any) => void; parent: (n: any) => any; push: typeof push; pop: typeof pop; self: () => any; find_parent: (type: any) => any; has_directive: (type: any) => any; loopcontrol_target: (node: any) => any; in_boolean_context: () => boolean | undefined; }' is not assignable to type 'TreeWalker'. Object literal may only specify known properties, and 'visit' does not exist in type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1447,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1450,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1504,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1505,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/ast.js(1521,52): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(194,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(612,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(689,27): error TS2339: Property 'name' does not exist on type 'reduce_defun'. -node_modules/uglify-js/lib/compress.js(708,16): error TS2339: Property 'walk' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(708,36): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(718,28): error TS2339: Property 'uses_arguments' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(719,16): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(722,32): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(737,47): error TS2339: Property 'value' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(738,20): error TS2339: Property 'value' does not exist on type 'reduce_iife'. -node_modules/uglify-js/lib/compress.js(985,20): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(985,46): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(985,72): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1017,26): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1026,56): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1030,26): error TS2339: Property 'in_arg' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1031,34): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1041,49): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1056,42): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(1181,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1186,12): error TS2339: Property 'defun_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1187,12): error TS2339: Property 'defun_visited' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1189,12): error TS2339: Property 'in_loop' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1190,12): error TS2339: Property 'loop_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1195,12): error TS2339: Property 'safe_ids' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1243,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1271,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1544,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1559,51): error TS2349: This expression is not callable. +node_modules/uglify-js/lib/ast.js(1508,14): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1511,14): error TS2339: Property 'pop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1565,25): error TS2339: Property 'self' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1566,37): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/ast.js(1582,52): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(196,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(614,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(704,27): error TS2339: Property 'name' does not exist on type 'reduce_defun'. +node_modules/uglify-js/lib/compress.js(723,16): error TS2339: Property 'walk' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(723,36): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(733,28): error TS2339: Property 'uses_arguments' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(734,16): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(737,32): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(741,20): error TS2339: Property 'rest' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(741,62): error TS2339: Property 'rest' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(743,50): error TS2339: Property 'argnames' does not exist on type 'reduce_iife'. +node_modules/uglify-js/lib/compress.js(1002,20): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1002,46): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1002,72): error TS2339: Property 'name' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1034,26): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1043,56): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1047,26): error TS2339: Property 'in_arg' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1048,34): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1058,49): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1073,42): error TS2339: Property 'scope' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(1198,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1203,12): error TS2339: Property 'defun_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1204,12): error TS2339: Property 'defun_visited' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1206,12): error TS2339: Property 'in_loop' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1207,12): error TS2339: Property 'loop_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1212,12): error TS2339: Property 'safe_ids' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(1260,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1288,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1558,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1573,51): error TS2349: This expression is not callable. Not all constituents of type 'true | ((node: any, tw: any) => any)' are callable. Type 'true' has no call signatures. -node_modules/uglify-js/lib/compress.js(1604,61): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1647,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1668,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(1720,77): error TS2454: Variable 'args' is used before being assigned. -node_modules/uglify-js/lib/compress.js(1721,33): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1721,42): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(1746,33): error TS2322: Type 'boolean' is not assignable to type 'number'. -node_modules/uglify-js/lib/compress.js(1748,29): error TS2322: Type 'boolean' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(1949,65): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(1951,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(1964,75): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(2105,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2131,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2133,68): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2140,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2171,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2201,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2216,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(2240,35): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2316,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2336,42): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2375,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2533,53): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. +node_modules/uglify-js/lib/compress.js(1627,61): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1670,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1691,53): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(1746,77): error TS2454: Variable 'args' is used before being assigned. +node_modules/uglify-js/lib/compress.js(1747,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1747,42): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(1772,33): error TS2322: Type 'boolean' is not assignable to type 'number'. +node_modules/uglify-js/lib/compress.js(1774,29): error TS2322: Type 'boolean' is not assignable to type 'never'. +node_modules/uglify-js/lib/compress.js(1999,65): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(2001,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2014,75): error TS2339: Property 'find_parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(2169,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2195,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2197,68): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2204,46): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2235,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2265,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2280,39): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2304,35): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2310,45): error TS2339: Property 'stack' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2311,33): error TS2339: Property 'stack' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2313,33): error TS2339: Property 'stack' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(2395,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2415,42): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2454,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2612,53): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. Source provides no match for required element at position 0 in target. -node_modules/uglify-js/lib/compress.js(2890,59): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(2928,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. +node_modules/uglify-js/lib/compress.js(2977,59): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3015,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[start: number, deleteCount: number, ...items: never[]]'. Source provides no match for required element at position 0 in target. -node_modules/uglify-js/lib/compress.js(2963,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(3159,34): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(3180,27): error TS2339: Property 'required' does not exist on type 'any[]'. -node_modules/uglify-js/lib/compress.js(3185,43): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. +node_modules/uglify-js/lib/compress.js(3050,26): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(3246,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(3267,27): error TS2339: Property 'required' does not exist on type 'any[]'. +node_modules/uglify-js/lib/compress.js(3272,43): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. Type 'any' is not assignable to type 'never'. -node_modules/uglify-js/lib/compress.js(3224,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3228,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3274,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3278,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3342,22): error TS2339: Property 'is_undefined' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3344,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3345,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3346,28): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3350,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3399,22): error TS2551: Property 'is_undefined' does not exist on type '(Anonymous function)'. Did you mean 'is_defined'? -node_modules/uglify-js/lib/compress.js(3400,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3401,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3402,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3406,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3448,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3452,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3538,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3542,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3590,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(3594,20): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(3854,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4077,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -node_modules/uglify-js/lib/compress.js(4078,25): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(4078,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. -node_modules/uglify-js/lib/compress.js(4078,56): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/compress.js(4095,48): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4106,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(4114,24): error TS2790: The operand of a 'delete' operator must be optional. -node_modules/uglify-js/lib/compress.js(4207,48): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4228,33): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(4696,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4716,29): error TS2322: Type 'string' is not assignable to type 'boolean'. -node_modules/uglify-js/lib/compress.js(4891,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4896,49): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(4936,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(4964,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(5027,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'marker' must be of type 'TreeWalker', but here has type '(node: any) => void'. -node_modules/uglify-js/lib/compress.js(5027,61): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(5032,50): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5258,56): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(5259,54): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(5348,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5349,74): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(5411,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(5496,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(5739,56): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. -node_modules/uglify-js/lib/compress.js(5865,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(6162,18): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6162,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6184,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(6193,33): error TS2339: Property 'find_variable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6200,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. -node_modules/uglify-js/lib/compress.js(6218,14): error TS2339: Property 'transform' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6224,34): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6292,32): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6386,18): error TS2339: Property 'enclosed' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6389,18): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6596,29): error TS2339: Property 'left' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6607,29): error TS2339: Property 'right' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6726,23): error TS2454: Variable 'exprs' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6727,20): error TS2454: Variable 'exprs' is used before being assigned. -node_modules/uglify-js/lib/compress.js(6793,28): error TS2339: Property 'expression' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6794,41): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6798,22): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6801,42): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/compress.js(6832,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6834,44): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6838,56): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6839,12): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(6907,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(6963,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(6978,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(7101,33): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7103,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(7270,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(7469,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7475,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(7518,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(7793,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[pattern: string | RegExp, flags?: string | undefined]'. +node_modules/uglify-js/lib/compress.js(3311,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3315,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3361,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3365,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3429,22): error TS2339: Property 'is_undefined' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3431,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3432,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3433,28): error TS2339: Property 'definition' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3437,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3486,22): error TS2551: Property 'is_undefined' does not exist on type '(Anonymous function)'. Did you mean 'is_defined'? +node_modules/uglify-js/lib/compress.js(3487,49): error TS2339: Property 'is_declared' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3488,22): error TS2339: Property 'is_immutable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3489,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3493,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3535,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3539,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3625,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3629,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3677,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(3681,20): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(3944,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4175,55): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. +node_modules/uglify-js/lib/compress.js(4176,25): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(4176,55): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/compress.js(4176,56): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/compress.js(4193,48): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4204,30): error TS2339: Property 'fixed_value' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(4212,24): error TS2790: The operand of a 'delete' operator must be optional. +node_modules/uglify-js/lib/compress.js(4306,54): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4327,33): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(4798,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4818,29): error TS2322: Type 'string' is not assignable to type 'boolean'. +node_modules/uglify-js/lib/compress.js(5012,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5017,49): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5061,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5089,33): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5152,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'marker' must be of type 'TreeWalker', but here has type '(node: any) => void'. +node_modules/uglify-js/lib/compress.js(5152,61): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5157,50): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5380,56): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5381,54): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(5476,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5477,74): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(5539,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(5640,29): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(5730,58): error TS2339: Property 'has_directive' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(5891,56): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never[]'. +node_modules/uglify-js/lib/compress.js(6017,12): error TS2339: Property 'push' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6351,18): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6351,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6373,24): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6382,33): error TS2339: Property 'find_variable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6389,28): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. +node_modules/uglify-js/lib/compress.js(6407,14): error TS2339: Property 'transform' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6413,34): error TS2339: Property 'argnames' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6481,32): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(6575,18): error TS2339: Property 'enclosed' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6578,18): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6785,29): error TS2339: Property 'left' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6796,29): error TS2339: Property 'right' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6924,23): error TS2454: Variable 'exprs' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6925,20): error TS2454: Variable 'exprs' is used before being assigned. +node_modules/uglify-js/lib/compress.js(6998,28): error TS2339: Property 'expression' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(6999,41): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(7003,22): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(7006,42): error TS2339: Property 'operator' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/compress.js(7037,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7039,44): error TS2339: Property 'loopcontrol_target' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7043,56): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7044,12): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7112,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7168,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7183,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7306,33): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7308,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7475,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7674,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(7680,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(7723,21): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(7867,18): error TS2403: Subsequent variable declarations must have the same type. Variable 'i' must be of type 'any', but here has type 'number'. +node_modules/uglify-js/lib/compress.js(8009,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[pattern: string | RegExp, flags?: string | undefined]'. Target requires 1 element(s) but source may have fewer. -node_modules/uglify-js/lib/compress.js(7957,45): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(7964,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; should_break: () => void; has_parens: () => boolean; newline: () => void; print: (str: any) => void; space: () => void; comma: () => void; colon: () => void; ... 20 more ...; parent: (n: any) => any; }'. -node_modules/uglify-js/lib/compress.js(7968,36): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(7973,41): error TS2339: Property 'get' does not exist on type 'string'. -node_modules/uglify-js/lib/compress.js(7997,51): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8114,37): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8189,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8193,21): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(8204,25): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(8213,25): error TS2322: Type 'null' is not assignable to type 'any[]'. -node_modules/uglify-js/lib/compress.js(8229,32): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(8233,27): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(8477,38): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(8758,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. -node_modules/uglify-js/lib/compress.js(9409,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(9499,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(9568,39): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(9574,41): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/compress.js(9577,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/compress.js(10183,26): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. -node_modules/uglify-js/lib/compress.js(10183,67): error TS2532: Object is possibly 'undefined'. -node_modules/uglify-js/lib/compress.js(10218,43): error TS2454: Variable 'property' is used before being assigned. -node_modules/uglify-js/lib/compress.js(10239,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(10242,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. -node_modules/uglify-js/lib/compress.js(10247,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. -node_modules/uglify-js/lib/compress.js(10288,34): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8173,45): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8180,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: (half: any) => void; should_break: () => void; has_parens: () => boolean; newline: () => void; print: (str: any) => void; space: () => void; comma: () => void; colon: () => void; ... 20 more ...; parent: (n: any) => any; }'. +node_modules/uglify-js/lib/compress.js(8184,36): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(8189,41): error TS2339: Property 'get' does not exist on type 'string'. +node_modules/uglify-js/lib/compress.js(8316,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8401,37): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8475,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(8479,21): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8490,25): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8499,25): error TS2322: Type 'null' is not assignable to type 'any[]'. +node_modules/uglify-js/lib/compress.js(8515,32): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(8519,27): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(8803,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9106,18): error TS2454: Variable 'is_strict_comparison' is used before being assigned. +node_modules/uglify-js/lib/compress.js(9607,38): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9773,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9863,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9932,39): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9938,41): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(9941,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/compress.js(10556,26): error TS2358: The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter. +node_modules/uglify-js/lib/compress.js(10556,67): error TS2532: Object is possibly 'undefined'. +node_modules/uglify-js/lib/compress.js(10591,43): error TS2454: Variable 'property' is used before being assigned. +node_modules/uglify-js/lib/compress.js(10612,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(10615,46): error TS2339: Property 'has_side_effects' does not exist on type 'number'. +node_modules/uglify-js/lib/compress.js(10620,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'value' must be of type 'number', but here has type 'any'. +node_modules/uglify-js/lib/compress.js(10662,34): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/minify.js(197,57): error TS2339: Property 'compress' does not exist on type 'Compressor'. node_modules/uglify-js/lib/mozilla-ast.js(573,33): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/output.js(459,37): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/output.js(460,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/output.js(475,16): error TS2339: Property 'push' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/output.js(1202,44): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/output.js(1557,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. +node_modules/uglify-js/lib/output.js(1217,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/output.js(1586,58): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. node_modules/uglify-js/lib/parse.js(249,9): error TS2322: Type 'string | boolean' is not assignable to type 'boolean'. Type 'string' is not assignable to type 'boolean'. node_modules/uglify-js/lib/parse.js(318,20): error TS2345: Argument of type 'number | undefined' is not assignable to parameter of type 'number'. @@ -202,17 +209,26 @@ node_modules/uglify-js/lib/parse.js(720,83): error TS2531: Object is possibly 'n node_modules/uglify-js/lib/parse.js(764,31): error TS2531: Object is possibly 'null'. node_modules/uglify-js/lib/parse.js(770,17): error TS2531: Object is possibly 'null'. node_modules/uglify-js/lib/parse.js(792,21): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(808,21): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(827,21): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(951,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -node_modules/uglify-js/lib/parse.js(1114,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. -node_modules/uglify-js/lib/parse.js(1162,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. -node_modules/uglify-js/lib/parse.js(1222,17): error TS2454: Variable 'cur' is used before being assigned. -node_modules/uglify-js/lib/parse.js(1434,32): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1600,20): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1764,48): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1803,35): error TS2531: Object is possibly 'null'. -node_modules/uglify-js/lib/parse.js(1894,52): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(809,21): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(828,21): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(952,23): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +node_modules/uglify-js/lib/parse.js(1134,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. +node_modules/uglify-js/lib/parse.js(1179,26): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1179,62): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1184,9): error TS2322: Type 'any[]' is not assignable to type 'never[]'. +node_modules/uglify-js/lib/parse.js(1189,28): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1245,17): error TS2454: Variable 'cur' is used before being assigned. +node_modules/uglify-js/lib/parse.js(1474,32): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1498,19): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1499,23): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1499,71): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1645,20): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1688,32): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1817,48): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1856,35): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1959,52): error TS2531: Object is possibly 'null'. +node_modules/uglify-js/lib/parse.js(1982,23): error TS2339: Property 'rest' does not exist on type 'any[]'. +node_modules/uglify-js/lib/parse.js(1990,44): error TS2339: Property 'rest' does not exist on type 'any[]'. node_modules/uglify-js/lib/propmangle.js(70,18): error TS2339: Property 'prototype' does not exist on type 'ObjectConstructor | FunctionConstructor | StringConstructor | BooleanConstructor | NumberConstructor | ... 4 more ... | ArrayConstructor'. Property 'prototype' does not exist on type 'Math'. node_modules/uglify-js/lib/propmangle.js(71,44): error TS2351: This expression is not constructable. @@ -223,30 +239,31 @@ node_modules/uglify-js/lib/propmangle.js(72,45): error TS2339: Property 'prototy node_modules/uglify-js/lib/propmangle.js(83,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/propmangle.js(146,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/propmangle.js(176,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(83,26): error TS2339: Property 'defun' does not exist on type 'SymbolDef'. -node_modules/uglify-js/lib/scope.js(116,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(82,26): error TS2339: Property 'defun' does not exist on type 'SymbolDef'. +node_modules/uglify-js/lib/scope.js(115,29): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(166,41): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/scope.js(205,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. node_modules/uglify-js/lib/scope.js(210,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(267,28): error TS2339: Property 'def_global' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(269,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/scope.js(281,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. -node_modules/uglify-js/lib/scope.js(290,26): error TS2339: Property 'uses_eval' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(305,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(308,27): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(308,47): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(360,38): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(403,10): error TS2339: Property 'def_variable' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(405,21): error TS2339: Property 'start' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(406,19): error TS2339: Property 'end' does not exist on type '(Anonymous function)'. -node_modules/uglify-js/lib/scope.js(552,29): error TS2554: Expected 0 arguments, but got 1. -node_modules/uglify-js/lib/scope.js(584,49): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(247,62): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(269,28): error TS2339: Property 'def_global' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(271,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(283,33): error TS2339: Property 'parent' does not exist on type 'TreeWalker'. +node_modules/uglify-js/lib/scope.js(292,26): error TS2339: Property 'uses_eval' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(300,10): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(303,27): error TS2339: Property 'walk' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(303,47): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(355,38): error TS2339: Property 'variables' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(402,10): error TS2339: Property 'def_variable' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(404,21): error TS2339: Property 'start' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(405,19): error TS2339: Property 'end' does not exist on type '(Anonymous function)'. +node_modules/uglify-js/lib/scope.js(551,29): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/scope.js(583,49): error TS2339: Property 'has_directive' does not exist on type 'TreeWalker'. node_modules/uglify-js/lib/scope.js(642,31): error TS2345: Argument of type 'string' is not assignable to parameter of type 'object | null'. node_modules/uglify-js/lib/scope.js(645,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/scope.js(669,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/sourcemap.js(82,11): error TS2339: Property 'index' does not exist on type 'any[]'. -node_modules/uglify-js/lib/sourcemap.js(178,31): error TS2339: Property 'index' does not exist on type 'any[]'. -node_modules/uglify-js/lib/sourcemap.js(186,34): error TS2339: Property 'index' does not exist on type 'any[]'. +node_modules/uglify-js/lib/sourcemap.js(180,31): error TS2339: Property 'index' does not exist on type 'any[]'. +node_modules/uglify-js/lib/sourcemap.js(188,34): error TS2339: Property 'index' does not exist on type 'any[]'. node_modules/uglify-js/lib/transform.js(47,21): error TS2345: Argument of type 'this' is not assignable to parameter of type 'TreeWalker'. Type 'TreeTransformer' is missing the following properties from type 'TreeWalker': currentNode, filter, root, whatToShow, and 10 more. node_modules/uglify-js/tools/exports.js(1,1): error TS2303: Circular definition of import alias '"Dictionary"'. @@ -256,7 +273,7 @@ node_modules/uglify-js/tools/exports.js(4,1): error TS2303: Circular definition node_modules/uglify-js/tools/exports.js(5,1): error TS2303: Circular definition of import alias '"push_uniq"'. node_modules/uglify-js/tools/exports.js(6,1): error TS2303: Circular definition of import alias '"TreeTransformer"'. node_modules/uglify-js/tools/exports.js(7,1): error TS2303: Circular definition of import alias '"TreeWalker"'. -node_modules/uglify-js/tools/node.js(64,26): error TS2339: Property 'minify' does not exist on type 'typeof import("/uglify-js/node_modules/uglify-js/tools/node")'. +node_modules/uglify-js/tools/node.js(33,6): error TS2532: Object is possibly 'undefined'. node_modules/uglify-js/tools/tty.js(4,20): error TS2339: Property '_handle' does not exist on type 'WriteStream & { fd: 1; }'. node_modules/uglify-js/tools/tty.js(5,20): error TS2339: Property '_handle' does not exist on type 'WriteStream & { fd: 2; }'. node_modules/uglify-js/tools/tty.js(16,41): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[code?: number | undefined]'. From 0383b5cb4c96083c12ea1453bf129fe675abaac9 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Wed, 20 Jan 2021 12:15:36 -0800 Subject: [PATCH 28/92] Optimize import fixes for projects with many symlinks (#42150) * Create symlink cache when a pnpm module is found * Keep pnpm-internal symlinks out of the symlink cache * Filter out pnpm path from realpath module specifier too * Optimize symlink module specifier generation * Add trailing directory separators * Remove unneeded change * Fix paths losing case in cache * Fix missing absolutification --- src/compiler/moduleSpecifiers.ts | 26 +++++++++------- src/compiler/path.ts | 2 +- src/compiler/program.ts | 2 +- src/compiler/utilities.ts | 31 +++++++++++++------ .../autoImportSymlinkCaseSensitive.ts | 21 +++++++++++++ 5 files changed, 59 insertions(+), 23 deletions(-) create mode 100644 tests/cases/fourslash/autoImportSymlinkCaseSensitive.ts diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 72332a2201fb6..99ccfb8c98286 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -286,7 +286,8 @@ namespace ts.moduleSpecifiers { const getCanonicalFileName = hostGetCanonicalFileName(host); const cwd = host.getCurrentDirectory(); const referenceRedirect = host.isSourceOfProjectReferenceRedirect(importedFileName) ? host.getProjectReferenceRedirect(importedFileName) : undefined; - const redirects = host.redirectTargetsMap.get(toPath(importedFileName, cwd, getCanonicalFileName)) || emptyArray; + const importedPath = toPath(importedFileName, cwd, getCanonicalFileName); + const redirects = host.redirectTargetsMap.get(importedPath) || emptyArray; const importedFileNames = [...(referenceRedirect ? [referenceRedirect] : emptyArray), importedFileName, ...redirects]; const targets = importedFileNames.map(f => getNormalizedAbsolutePath(f, cwd)); if (!preferSymlinks) { @@ -299,22 +300,25 @@ namespace ts.moduleSpecifiers { ? host.getSymlinkCache() : discoverProbableSymlinks(host.getSourceFiles(), getCanonicalFileName, cwd); - const symlinkedDirectories = links.getSymlinkedDirectories(); - const useCaseSensitiveFileNames = !host.useCaseSensitiveFileNames || host.useCaseSensitiveFileNames(); - const result = symlinkedDirectories && forEachEntry(symlinkedDirectories, (resolved, path) => { - if (resolved === false) return undefined; - if (startsWithDirectory(importingFileName, resolved.realPath, getCanonicalFileName)) { - return undefined; // Don't want to a package to globally import from itself + const symlinkedDirectories = links.getSymlinkedDirectoriesByRealpath(); + const fullImportedFileName = getNormalizedAbsolutePath(importedFileName, cwd); + const result = symlinkedDirectories && forEachAncestorDirectory(getDirectoryPath(fullImportedFileName), realPathDirectory => { + const symlinkDirectories = symlinkedDirectories.get(ensureTrailingDirectorySeparator(toPath(realPathDirectory, cwd, getCanonicalFileName))); + if (!symlinkDirectories) return undefined; // Continue to ancestor directory + + // Don't want to a package to globally import from itself (importNameCodeFix_symlink_own_package.ts) + if (startsWithDirectory(importingFileName, realPathDirectory, getCanonicalFileName)) { + return false; // Stop search, each ancestor directory will also hit this condition } return forEach(targets, target => { - if (!containsPath(resolved.real, target, !useCaseSensitiveFileNames)) { + if (!startsWithDirectory(target, realPathDirectory, getCanonicalFileName)) { return; } - const relative = getRelativePathFromDirectory(resolved.real, target, getCanonicalFileName); - const option = resolvePath(path, relative); - if (!host.fileExists || host.fileExists(option)) { + const relative = getRelativePathFromDirectory(realPathDirectory, target, getCanonicalFileName); + for (const symlinkDirectory of symlinkDirectories) { + const option = resolvePath(symlinkDirectory, relative); const result = cb(option, target === referenceRedirect); if (result) return result; } diff --git a/src/compiler/path.ts b/src/compiler/path.ts index d4ee8600d7190..6a9374873b1a0 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -762,7 +762,7 @@ namespace ts { * Determines whether `fileName` starts with the specified `directoryName` using the provided path canonicalization callback. * Comparison is case-sensitive between the canonical paths. * - * @deprecated Use `containsPath` if possible. + * Use `containsPath` if file names are not already reduced and absolute. */ export function startsWithDirectory(fileName: string, directoryName: string, getCanonicalFileName: GetCanonicalFileName): boolean { const canonicalFileName = getCanonicalFileName(fileName); diff --git a/src/compiler/program.ts b/src/compiler/program.ts index c1c34d1eef0cd..d6ed0b1064801 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3777,7 +3777,7 @@ namespace ts { return; } - symlinkCache.setSymlinkedDirectory(directoryPath, { + symlinkCache.setSymlinkedDirectory(directory, { real: ensureTrailingDirectorySeparator(real), realPath }); diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 8afa94823694f..72806ae33c361 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -6083,32 +6083,43 @@ namespace ts { } export interface SymlinkCache { + /** Gets a map from symlink to realpath. Keys have trailing directory separators. */ getSymlinkedDirectories(): ReadonlyESMap | undefined; + /** Gets a map from realpath to symlinks. Keys have trailing directory separators. */ + getSymlinkedDirectoriesByRealpath(): MultiMap | undefined; + /** Gets a map from symlink to realpath */ getSymlinkedFiles(): ReadonlyESMap | undefined; - setSymlinkedDirectory(path: Path, directory: SymlinkedDirectory | false): void; - setSymlinkedFile(path: Path, real: string): void; + setSymlinkedDirectory(symlink: string, real: SymlinkedDirectory | false): void; + setSymlinkedFile(symlinkPath: Path, real: string): void; } - export function createSymlinkCache(): SymlinkCache { + export function createSymlinkCache(cwd: string, getCanonicalFileName: GetCanonicalFileName): SymlinkCache { let symlinkedDirectories: ESMap | undefined; + let symlinkedDirectoriesByRealpath: MultiMap | undefined; let symlinkedFiles: ESMap | undefined; return { getSymlinkedFiles: () => symlinkedFiles, getSymlinkedDirectories: () => symlinkedDirectories, + getSymlinkedDirectoriesByRealpath: () => symlinkedDirectoriesByRealpath, setSymlinkedFile: (path, real) => (symlinkedFiles || (symlinkedFiles = new Map())).set(path, real), - setSymlinkedDirectory: (path, directory) => { + setSymlinkedDirectory: (symlink, real) => { // Large, interconnected dependency graphs in pnpm will have a huge number of symlinks // where both the realpath and the symlink path are inside node_modules/.pnpm. Since // this path is never a candidate for a module specifier, we can ignore it entirely. - if (!containsIgnoredPath(path)) { - (symlinkedDirectories || (symlinkedDirectories = new Map())).set(path, directory); + let symlinkPath = toPath(symlink, cwd, getCanonicalFileName); + if (!containsIgnoredPath(symlinkPath)) { + symlinkPath = ensureTrailingDirectorySeparator(symlinkPath); + if (real !== false && !symlinkedDirectories?.has(symlinkPath)) { + (symlinkedDirectoriesByRealpath ||= createMultiMap()).add(ensureTrailingDirectorySeparator(real.realPath), symlink); + } + (symlinkedDirectories || (symlinkedDirectories = new Map())).set(symlinkPath, real); } } }; } export function discoverProbableSymlinks(files: readonly SourceFile[], getCanonicalFileName: GetCanonicalFileName, cwd: string): SymlinkCache { - const cache = createSymlinkCache(); + const cache = createSymlinkCache(cwd, getCanonicalFileName); const symlinks = flatten(mapDefined(files, sf => sf.resolvedModules && compact(arrayFrom(mapIterator(sf.resolvedModules.values(), res => res && res.originalPath && res.resolvedFileName !== res.originalPath ? [res.resolvedFileName, res.originalPath] as const : undefined))))); @@ -6116,7 +6127,7 @@ namespace ts { const [commonResolved, commonOriginal] = guessDirectorySymlink(resolvedPath, originalPath, cwd, getCanonicalFileName) || emptyArray; if (commonResolved && commonOriginal) { cache.setSymlinkedDirectory( - toPath(commonOriginal, cwd, getCanonicalFileName), + commonOriginal, { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) }); } } @@ -6124,8 +6135,8 @@ namespace ts { } function guessDirectorySymlink(a: string, b: string, cwd: string, getCanonicalFileName: GetCanonicalFileName): [string, string] | undefined { - const aParts = getPathComponents(toPath(a, cwd, getCanonicalFileName)); - const bParts = getPathComponents(toPath(b, cwd, getCanonicalFileName)); + const aParts = getPathComponents(getNormalizedAbsolutePath(a, cwd)); + const bParts = getPathComponents(getNormalizedAbsolutePath(b, cwd)); let isDirectory = false; while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && diff --git a/tests/cases/fourslash/autoImportSymlinkCaseSensitive.ts b/tests/cases/fourslash/autoImportSymlinkCaseSensitive.ts new file mode 100644 index 0000000000000..1ae2db666502e --- /dev/null +++ b/tests/cases/fourslash/autoImportSymlinkCaseSensitive.ts @@ -0,0 +1,21 @@ +/// + +// @Filename: /tsconfig.json +//// { "compilerOptions": { "module": "commonjs" } } + +// @Filename: /node_modules/.pnpm/mobx@6.0.4/node_modules/MobX/Foo.d.ts +//// export declare function autorun(): void; + +// @Filename: /index.ts +//// autorun/**/ + +// @Filename: /utils.ts +//// import "MobX/Foo"; + +// @link: /node_modules/.pnpm/mobx@6.0.4/node_modules/MobX -> /node_modules/MobX +// @link: /node_modules/.pnpm/mobx@6.0.4/node_modules/MobX -> /node_modules/.pnpm/cool-mobx-dependent@1.2.3/node_modules/MobX + +goTo.marker(""); +verify.importFixAtPosition([`import { autorun } from "MobX/Foo"; + +autorun`]); From 424b805d6166c5095be97d8328ebaf1968ec1028 Mon Sep 17 00:00:00 2001 From: Matt Kantor Date: Wed, 20 Jan 2021 15:23:34 -0800 Subject: [PATCH 29/92] Fix "Cannot find name 'global'. Did you mean 'global'?" (#42262) * Add tests for "Cannot find name 'global'. Did you mean 'global'?" * Fix "Cannot find name 'global'. Did you mean 'global'?" * Add an additional test case for spelling suggestions of "global". * Name the boolean for suggestions being global scope augmentations. --- src/compiler/checker.ts | 4 ++++ .../spellingSuggestionGlobal1.errors.txt | 10 ++++++++++ .../reference/spellingSuggestionGlobal1.js | 10 ++++++++++ .../reference/spellingSuggestionGlobal1.symbols | 8 ++++++++ .../reference/spellingSuggestionGlobal1.types | 11 +++++++++++ .../spellingSuggestionGlobal2.errors.txt | 12 ++++++++++++ .../reference/spellingSuggestionGlobal2.js | 12 ++++++++++++ .../reference/spellingSuggestionGlobal2.symbols | 12 ++++++++++++ .../reference/spellingSuggestionGlobal2.types | 17 +++++++++++++++++ .../spellingSuggestionGlobal3.errors.txt | 10 ++++++++++ .../reference/spellingSuggestionGlobal3.js | 8 ++++++++ .../reference/spellingSuggestionGlobal3.symbols | 7 +++++++ .../reference/spellingSuggestionGlobal3.types | 12 ++++++++++++ .../spellingSuggestionGlobal4.errors.txt | 10 ++++++++++ .../reference/spellingSuggestionGlobal4.js | 10 ++++++++++ .../reference/spellingSuggestionGlobal4.symbols | 8 ++++++++ .../reference/spellingSuggestionGlobal4.types | 11 +++++++++++ .../cases/compiler/spellingSuggestionGlobal1.ts | 3 +++ .../cases/compiler/spellingSuggestionGlobal2.ts | 4 ++++ .../cases/compiler/spellingSuggestionGlobal3.ts | 2 ++ .../cases/compiler/spellingSuggestionGlobal4.ts | 3 +++ 21 files changed, 184 insertions(+) create mode 100644 tests/baselines/reference/spellingSuggestionGlobal1.errors.txt create mode 100644 tests/baselines/reference/spellingSuggestionGlobal1.js create mode 100644 tests/baselines/reference/spellingSuggestionGlobal1.symbols create mode 100644 tests/baselines/reference/spellingSuggestionGlobal1.types create mode 100644 tests/baselines/reference/spellingSuggestionGlobal2.errors.txt create mode 100644 tests/baselines/reference/spellingSuggestionGlobal2.js create mode 100644 tests/baselines/reference/spellingSuggestionGlobal2.symbols create mode 100644 tests/baselines/reference/spellingSuggestionGlobal2.types create mode 100644 tests/baselines/reference/spellingSuggestionGlobal3.errors.txt create mode 100644 tests/baselines/reference/spellingSuggestionGlobal3.js create mode 100644 tests/baselines/reference/spellingSuggestionGlobal3.symbols create mode 100644 tests/baselines/reference/spellingSuggestionGlobal3.types create mode 100644 tests/baselines/reference/spellingSuggestionGlobal4.errors.txt create mode 100644 tests/baselines/reference/spellingSuggestionGlobal4.js create mode 100644 tests/baselines/reference/spellingSuggestionGlobal4.symbols create mode 100644 tests/baselines/reference/spellingSuggestionGlobal4.types create mode 100644 tests/cases/compiler/spellingSuggestionGlobal1.ts create mode 100644 tests/cases/compiler/spellingSuggestionGlobal2.ts create mode 100644 tests/cases/compiler/spellingSuggestionGlobal3.ts create mode 100644 tests/cases/compiler/spellingSuggestionGlobal4.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4e630203b8631..e67c96265274b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2028,6 +2028,10 @@ namespace ts { let suggestion: Symbol | undefined; if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) { suggestion = getSuggestedSymbolForNonexistentSymbol(originalLocation, name, meaning); + const isGlobalScopeAugmentationDeclaration = suggestion && suggestion.valueDeclaration && isAmbientModule(suggestion.valueDeclaration) && isGlobalScopeAugmentation(suggestion.valueDeclaration); + if (isGlobalScopeAugmentationDeclaration) { + suggestion = undefined; + } if (suggestion) { const suggestionName = symbolToString(suggestion); const diagnostic = error(errorLocation, suggestedNameNotFoundMessage, diagnosticName(nameArg!), suggestionName); diff --git a/tests/baselines/reference/spellingSuggestionGlobal1.errors.txt b/tests/baselines/reference/spellingSuggestionGlobal1.errors.txt new file mode 100644 index 0000000000000..491623ea37bf9 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal1.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/spellingSuggestionGlobal1.ts(3,1): error TS2304: Cannot find name 'global'. + + +==== tests/cases/compiler/spellingSuggestionGlobal1.ts (1 errors) ==== + export {} + declare global { const x: any } + global.x // should not suggest `global` (GH#42209) + ~~~~~~ +!!! error TS2304: Cannot find name 'global'. + \ No newline at end of file diff --git a/tests/baselines/reference/spellingSuggestionGlobal1.js b/tests/baselines/reference/spellingSuggestionGlobal1.js new file mode 100644 index 0000000000000..16d5da7ba8128 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal1.js @@ -0,0 +1,10 @@ +//// [spellingSuggestionGlobal1.ts] +export {} +declare global { const x: any } +global.x // should not suggest `global` (GH#42209) + + +//// [spellingSuggestionGlobal1.js] +"use strict"; +exports.__esModule = true; +global.x; // should not suggest `global` (GH#42209) diff --git a/tests/baselines/reference/spellingSuggestionGlobal1.symbols b/tests/baselines/reference/spellingSuggestionGlobal1.symbols new file mode 100644 index 0000000000000..e9d20fe53d7db --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal1.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/spellingSuggestionGlobal1.ts === +export {} +declare global { const x: any } +>global : Symbol(global, Decl(spellingSuggestionGlobal1.ts, 0, 9)) +>x : Symbol(x, Decl(spellingSuggestionGlobal1.ts, 1, 22)) + +global.x // should not suggest `global` (GH#42209) + diff --git a/tests/baselines/reference/spellingSuggestionGlobal1.types b/tests/baselines/reference/spellingSuggestionGlobal1.types new file mode 100644 index 0000000000000..1c4cd6a79e264 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal1.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/spellingSuggestionGlobal1.ts === +export {} +declare global { const x: any } +>global : typeof global +>x : any + +global.x // should not suggest `global` (GH#42209) +>global.x : any +>global : any +>x : any + diff --git a/tests/baselines/reference/spellingSuggestionGlobal2.errors.txt b/tests/baselines/reference/spellingSuggestionGlobal2.errors.txt new file mode 100644 index 0000000000000..813e64867f019 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal2.errors.txt @@ -0,0 +1,12 @@ +tests/cases/compiler/spellingSuggestionGlobal2.ts(4,1): error TS2552: Cannot find name 'global'. Did you mean 'globals'? + + +==== tests/cases/compiler/spellingSuggestionGlobal2.ts (1 errors) ==== + export {} + declare global { const x: any } + const globals = { x: true } + global.x // should suggest `globals` (GH#42209) + ~~~~~~ +!!! error TS2552: Cannot find name 'global'. Did you mean 'globals'? +!!! related TS2728 tests/cases/compiler/spellingSuggestionGlobal2.ts:3:7: 'globals' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/spellingSuggestionGlobal2.js b/tests/baselines/reference/spellingSuggestionGlobal2.js new file mode 100644 index 0000000000000..b7da56d7f494b --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal2.js @@ -0,0 +1,12 @@ +//// [spellingSuggestionGlobal2.ts] +export {} +declare global { const x: any } +const globals = { x: true } +global.x // should suggest `globals` (GH#42209) + + +//// [spellingSuggestionGlobal2.js] +"use strict"; +exports.__esModule = true; +var globals = { x: true }; +global.x; // should suggest `globals` (GH#42209) diff --git a/tests/baselines/reference/spellingSuggestionGlobal2.symbols b/tests/baselines/reference/spellingSuggestionGlobal2.symbols new file mode 100644 index 0000000000000..e7cd40a83f946 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal2.symbols @@ -0,0 +1,12 @@ +=== tests/cases/compiler/spellingSuggestionGlobal2.ts === +export {} +declare global { const x: any } +>global : Symbol(global, Decl(spellingSuggestionGlobal2.ts, 0, 9)) +>x : Symbol(x, Decl(spellingSuggestionGlobal2.ts, 1, 22)) + +const globals = { x: true } +>globals : Symbol(globals, Decl(spellingSuggestionGlobal2.ts, 2, 5)) +>x : Symbol(x, Decl(spellingSuggestionGlobal2.ts, 2, 17)) + +global.x // should suggest `globals` (GH#42209) + diff --git a/tests/baselines/reference/spellingSuggestionGlobal2.types b/tests/baselines/reference/spellingSuggestionGlobal2.types new file mode 100644 index 0000000000000..07463a102285c --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal2.types @@ -0,0 +1,17 @@ +=== tests/cases/compiler/spellingSuggestionGlobal2.ts === +export {} +declare global { const x: any } +>global : typeof global +>x : any + +const globals = { x: true } +>globals : { x: boolean; } +>{ x: true } : { x: boolean; } +>x : boolean +>true : true + +global.x // should suggest `globals` (GH#42209) +>global.x : any +>global : any +>x : any + diff --git a/tests/baselines/reference/spellingSuggestionGlobal3.errors.txt b/tests/baselines/reference/spellingSuggestionGlobal3.errors.txt new file mode 100644 index 0000000000000..a3d49611fbfdf --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal3.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/spellingSuggestionGlobal3.ts(2,1): error TS2552: Cannot find name 'globals'. Did you mean 'global'? + + +==== tests/cases/compiler/spellingSuggestionGlobal3.ts (1 errors) ==== + const global = { x: true } + globals.x // should suggest `global` (GH#42209) + ~~~~~~~ +!!! error TS2552: Cannot find name 'globals'. Did you mean 'global'? +!!! related TS2728 tests/cases/compiler/spellingSuggestionGlobal3.ts:1:7: 'global' is declared here. + \ No newline at end of file diff --git a/tests/baselines/reference/spellingSuggestionGlobal3.js b/tests/baselines/reference/spellingSuggestionGlobal3.js new file mode 100644 index 0000000000000..9ce2c0d55298d --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal3.js @@ -0,0 +1,8 @@ +//// [spellingSuggestionGlobal3.ts] +const global = { x: true } +globals.x // should suggest `global` (GH#42209) + + +//// [spellingSuggestionGlobal3.js] +var global = { x: true }; +globals.x; // should suggest `global` (GH#42209) diff --git a/tests/baselines/reference/spellingSuggestionGlobal3.symbols b/tests/baselines/reference/spellingSuggestionGlobal3.symbols new file mode 100644 index 0000000000000..44a64fd50f01f --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal3.symbols @@ -0,0 +1,7 @@ +=== tests/cases/compiler/spellingSuggestionGlobal3.ts === +const global = { x: true } +>global : Symbol(global, Decl(spellingSuggestionGlobal3.ts, 0, 5)) +>x : Symbol(x, Decl(spellingSuggestionGlobal3.ts, 0, 16)) + +globals.x // should suggest `global` (GH#42209) + diff --git a/tests/baselines/reference/spellingSuggestionGlobal3.types b/tests/baselines/reference/spellingSuggestionGlobal3.types new file mode 100644 index 0000000000000..d5708befef7a8 --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal3.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/spellingSuggestionGlobal3.ts === +const global = { x: true } +>global : { x: boolean; } +>{ x: true } : { x: boolean; } +>x : boolean +>true : true + +globals.x // should suggest `global` (GH#42209) +>globals.x : any +>globals : any +>x : any + diff --git a/tests/baselines/reference/spellingSuggestionGlobal4.errors.txt b/tests/baselines/reference/spellingSuggestionGlobal4.errors.txt new file mode 100644 index 0000000000000..0e3a0853a479e --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal4.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/spellingSuggestionGlobal4.ts(3,1): error TS2304: Cannot find name 'global'. + + +==== tests/cases/compiler/spellingSuggestionGlobal4.ts (1 errors) ==== + export {} + declare global { var x: any } + global.x // should not suggest `global` (GH#42209) + ~~~~~~ +!!! error TS2304: Cannot find name 'global'. + \ No newline at end of file diff --git a/tests/baselines/reference/spellingSuggestionGlobal4.js b/tests/baselines/reference/spellingSuggestionGlobal4.js new file mode 100644 index 0000000000000..d9e6c2b9a7c3c --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal4.js @@ -0,0 +1,10 @@ +//// [spellingSuggestionGlobal4.ts] +export {} +declare global { var x: any } +global.x // should not suggest `global` (GH#42209) + + +//// [spellingSuggestionGlobal4.js] +"use strict"; +exports.__esModule = true; +global.x; // should not suggest `global` (GH#42209) diff --git a/tests/baselines/reference/spellingSuggestionGlobal4.symbols b/tests/baselines/reference/spellingSuggestionGlobal4.symbols new file mode 100644 index 0000000000000..862216dbdb19b --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal4.symbols @@ -0,0 +1,8 @@ +=== tests/cases/compiler/spellingSuggestionGlobal4.ts === +export {} +declare global { var x: any } +>global : Symbol(global, Decl(spellingSuggestionGlobal4.ts, 0, 9)) +>x : Symbol(x, Decl(spellingSuggestionGlobal4.ts, 1, 20)) + +global.x // should not suggest `global` (GH#42209) + diff --git a/tests/baselines/reference/spellingSuggestionGlobal4.types b/tests/baselines/reference/spellingSuggestionGlobal4.types new file mode 100644 index 0000000000000..9fd8b3367164c --- /dev/null +++ b/tests/baselines/reference/spellingSuggestionGlobal4.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/spellingSuggestionGlobal4.ts === +export {} +declare global { var x: any } +>global : typeof global +>x : any + +global.x // should not suggest `global` (GH#42209) +>global.x : any +>global : any +>x : any + diff --git a/tests/cases/compiler/spellingSuggestionGlobal1.ts b/tests/cases/compiler/spellingSuggestionGlobal1.ts new file mode 100644 index 0000000000000..74e534da54dfe --- /dev/null +++ b/tests/cases/compiler/spellingSuggestionGlobal1.ts @@ -0,0 +1,3 @@ +export {} +declare global { const x: any } +global.x // should not suggest `global` (GH#42209) diff --git a/tests/cases/compiler/spellingSuggestionGlobal2.ts b/tests/cases/compiler/spellingSuggestionGlobal2.ts new file mode 100644 index 0000000000000..5914f9990b30a --- /dev/null +++ b/tests/cases/compiler/spellingSuggestionGlobal2.ts @@ -0,0 +1,4 @@ +export {} +declare global { const x: any } +const globals = { x: true } +global.x // should suggest `globals` (GH#42209) diff --git a/tests/cases/compiler/spellingSuggestionGlobal3.ts b/tests/cases/compiler/spellingSuggestionGlobal3.ts new file mode 100644 index 0000000000000..853290a8d0210 --- /dev/null +++ b/tests/cases/compiler/spellingSuggestionGlobal3.ts @@ -0,0 +1,2 @@ +const global = { x: true } +globals.x // should suggest `global` (GH#42209) diff --git a/tests/cases/compiler/spellingSuggestionGlobal4.ts b/tests/cases/compiler/spellingSuggestionGlobal4.ts new file mode 100644 index 0000000000000..a100ca4653b8a --- /dev/null +++ b/tests/cases/compiler/spellingSuggestionGlobal4.ts @@ -0,0 +1,3 @@ +export {} +declare global { var x: any } +global.x // should not suggest `global` (GH#42209) From 2f47527b99028d969ea90352a13dffc005a50a7d Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Thu, 21 Jan 2021 06:51:56 +0000 Subject: [PATCH 30/92] Update package-lock.json --- package-lock.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index be0c05d70b028..8888ed64591d9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -324,18 +324,18 @@ } }, "@octokit/openapi-types": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.1.tgz", - "integrity": "sha512-KTzpRDT07euvbBYbPs121YDqq5DT94nBDFIyogsDhOnWL8yDCHev6myeiPTgS+VLmyUbdNCYu6L/gVj+Bd1q8Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-3.0.0.tgz", + "integrity": "sha512-jOp1CVRw+OBJaZtG9QzZggvJXvyzgDXuW948SWsDiwmyDuCjeYCiF3TDD/qvhpF580RfP7iBIos4AVU6yhgMlA==", "dev": true }, "@octokit/plugin-paginate-rest": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.1.tgz", - "integrity": "sha512-dUsxsEIrBqhlQNfXRhMhXOTQi0SSG38+QWcPGO226HFPFJk44vWukegHfMG3496vLv9T2oT7IuAGssGpcUg5bQ==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.8.0.tgz", + "integrity": "sha512-HtuEQ2AYE4YFEBQN0iHmMsIvVucd5RsnwJmRKIsfAg1/ZeoMaU+jXMnTAZqIUEmcVJA27LjHUm3f1hxf8Fpdxw==", "dev": true, "requires": { - "@octokit/types": "^6.3.1" + "@octokit/types": "^6.4.0" } }, "@octokit/plugin-request-log": { @@ -402,12 +402,12 @@ } }, "@octokit/types": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.2.tgz", - "integrity": "sha512-H6cbnDumWOQJneyNKCBWgnktRqTWcEm6gq2cIS3frtVgpCqB8zguromnjIWJW375btjnxwmbYBTEAEouruZ2Yw==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.4.0.tgz", + "integrity": "sha512-1FEmuVppZE2zG0rBdQlviRz5cp0udyI63zyhBVPrm0FRNAsQkAXU7IYWQg1XvhChFut8YbFYN1usQpk54D6/4w==", "dev": true, "requires": { - "@octokit/openapi-types": "^2.3.1", + "@octokit/openapi-types": "^3.0.0", "@types/node": ">= 8" } }, From 71d4ee5d605110fe4f761c27cfcb592add69e9af Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Thu, 21 Jan 2021 13:06:56 -0800 Subject: [PATCH 31/92] Preserve alias information where possible when looking up union and intersection base constraints (#42430) --- src/compiler/checker.ts | 10 + .../checkJsxChildrenCanBeTupleType.symbols | 10 +- ...SFXContextualTypeInferredCorrectly.symbols | 4 +- .../jsDeclarationsReactComponents.symbols | 16 +- ...fusableWithMultipleChildrenNoError.symbols | 6 +- ...plexSignatureHasApplicabilityError.symbols | 12 +- ...arationsWithEsModuleInteropNoCrash.symbols | 4 +- ...essionNotCountedAsChild(jsx=react).symbols | 8 +- ...onNotCountedAsChild(jsx=react-jsx).symbols | 8 +- ...otCountedAsChild(jsx=react-jsxdev).symbols | 8 +- .../jsxFragmentFactoryNoUnusedLocals.symbols | 8 +- ...portForSideEffectsNonExtantNoError.symbols | 4 +- ...ntrinsicElementsTypeArgumentErrors.symbols | 36 +- ...rrorWhenTagExpectsTooManyArguments.symbols | 16 +- ...jsTransformChildren(jsx=react-jsx).symbols | 4 +- ...ransformChildren(jsx=react-jsxdev).symbols | 4 +- ...ansformCustomImport(jsx=react-jsx).symbols | 8 +- ...formCustomImport(jsx=react-jsxdev).symbols | 8 +- ...mCustomImportPragma(jsx=react-jsx).symbols | 16 +- ...stomImportPragma(jsx=react-jsxdev).symbols | 16 +- ...CjsTransformKeyProp(jsx=react-jsx).symbols | 8 +- ...TransformKeyProp(jsx=react-jsxdev).symbols | 8 +- ...KeyPropCustomImport(jsx=react-jsx).symbols | 8 +- ...PropCustomImport(jsx=react-jsxdev).symbols | 8 +- ...pCustomImportPragma(jsx=react-jsx).symbols | 16 +- ...stomImportPragma(jsx=react-jsxdev).symbols | 16 +- ...tedSelfClosingChild(jsx=react-jsx).symbols | 22 +- ...SelfClosingChild(jsx=react-jsxdev).symbols | 22 +- ...ormSubstitutesNames(jsx=react-jsx).symbols | 4 +- ...SubstitutesNames(jsx=react-jsxdev).symbols | 4 +- ...itutesNamesFragment(jsx=react-jsx).symbols | 8 +- ...tesNamesFragment(jsx=react-jsxdev).symbols | 8 +- .../reference/jsxPartialSpread.symbols | 4 +- .../reactDefaultPropsInferenceSuccess.symbols | 12 +- ...tUnusedInNewJSXEmit(jsx=react-jsx).symbols | 2 +- ...usedInNewJSXEmit(jsx=react-jsxdev).symbols | 2 +- .../spellingSuggestionJSXAttribute.symbols | 8 +- ...edComponentsInstantiaionLimitNotReached.js | 201 ++++++ ...ponentsInstantiaionLimitNotReached.symbols | 644 ++++++++++++++++++ ...omponentsInstantiaionLimitNotReached.types | 381 +++++++++++ .../tsxSpreadDoesNotReportExcessProps.symbols | 4 +- .../tsxStatelessComponentDefaultProps.symbols | 2 +- ...edComponentsInstantiaionLimitNotReached.ts | 196 ++++++ tests/lib/react16.d.ts | 126 ++++ 44 files changed, 1739 insertions(+), 181 deletions(-) create mode 100644 tests/baselines/reference/styledComponentsInstantiaionLimitNotReached.js create mode 100644 tests/baselines/reference/styledComponentsInstantiaionLimitNotReached.symbols create mode 100644 tests/baselines/reference/styledComponentsInstantiaionLimitNotReached.types create mode 100644 tests/cases/compiler/styledComponentsInstantiaionLimitNotReached.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e67c96265274b..efb46b2efbdfc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11209,11 +11209,21 @@ namespace ts { if (t.flags & TypeFlags.UnionOrIntersection) { const types = (t).types; const baseTypes: Type[] = []; + let different = false; for (const type of types) { const baseType = getBaseConstraint(type); if (baseType) { + if (baseType !== type) { + different = true; + } baseTypes.push(baseType); } + else { + different = true; + } + } + if (!different) { + return t; } return t.flags & TypeFlags.Union && baseTypes.length === types.length ? getUnionType(baseTypes) : t.flags & TypeFlags.Intersection && baseTypes.length ? getIntersectionType(baseTypes) : diff --git a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols index 05c7042ad1025..eb16e5a085075 100644 --- a/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols +++ b/tests/baselines/reference/checkJsxChildrenCanBeTupleType.symbols @@ -29,10 +29,10 @@ const test = >ResizablePanel : Symbol(ResizablePanel, Decl(checkJsxChildrenCanBeTupleType.tsx, 6, 1))

->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >ResizablePanel : Symbol(ResizablePanel, Decl(checkJsxChildrenCanBeTupleType.tsx, 6, 1)) @@ -42,13 +42,13 @@ const testErr = >ResizablePanel : Symbol(ResizablePanel, Decl(checkJsxChildrenCanBeTupleType.tsx, 6, 1))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >ResizablePanel : Symbol(ResizablePanel, Decl(checkJsxChildrenCanBeTupleType.tsx, 6, 1)) diff --git a/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.symbols b/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.symbols index 13675eb985d7e..3d30cc6bc6685 100644 --- a/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.symbols +++ b/tests/baselines/reference/checkJsxUnionSFXContextualTypeInferredCorrectly.symbols @@ -39,8 +39,8 @@ export function ComponentWithUnion(props: PM | PS) { >PS : Symbol(PS, Decl(checkJsxUnionSFXContextualTypeInferredCorrectly.tsx, 2, 26)) return

; ->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react16.d.ts, 2430, 106)) ->h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react16.d.ts, 2430, 106)) +>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react16.d.ts, 2556, 106)) +>h1 : Symbol(JSX.IntrinsicElements.h1, Decl(react16.d.ts, 2556, 106)) } // Usage with React tsx diff --git a/tests/baselines/reference/jsDeclarationsReactComponents.symbols b/tests/baselines/reference/jsDeclarationsReactComponents.symbols index 43739a502a000..f5f5f935ee683 100644 --- a/tests/baselines/reference/jsDeclarationsReactComponents.symbols +++ b/tests/baselines/reference/jsDeclarationsReactComponents.symbols @@ -12,7 +12,7 @@ const TabbedShowLayout = ({ }) => { return (
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ); }; @@ -56,13 +56,13 @@ const TabbedShowLayout = () => { return (
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(jsDeclarationsReactComponents2.jsx, 6, 12)) >key : Symbol(key, Decl(jsDeclarationsReactComponents2.jsx, 6, 25)) ok
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ); }; @@ -92,13 +92,13 @@ const TabbedShowLayout = () => { return (
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(jsDeclarationsReactComponents3.jsx, 6, 12)) >key : Symbol(key, Decl(jsDeclarationsReactComponents3.jsx, 6, 25)) ok
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ); }; @@ -126,7 +126,7 @@ const TabbedShowLayout = (/** @type {{className: string}}*/prop) => { return (
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(jsDeclarationsReactComponents4.jsx, 3, 12)) >prop.className : Symbol(className, Decl(jsDeclarationsReactComponents4.jsx, 1, 38)) >prop : Symbol(prop, Decl(jsDeclarationsReactComponents4.jsx, 1, 26)) @@ -135,7 +135,7 @@ const TabbedShowLayout = (/** @type {{className: string}}*/prop) => { ok
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ); }; @@ -165,7 +165,7 @@ function Tree({ allowDropOnRoot }) { >allowDropOnRoot : Symbol(allowDropOnRoot, Decl(jsDeclarationsReactComponents5.jsx, 3, 15)) return
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } Tree.propTypes = { diff --git a/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.symbols b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.symbols index 93737d2a6f8a0..b71806c0fd0d8 100644 --- a/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.symbols +++ b/tests/baselines/reference/jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.symbols @@ -23,7 +23,7 @@ function TabLayout(props: Props) { >Props : Symbol(Props, Decl(jsxChildrenSingleChildConfusableWithMultipleChildrenNoError.tsx, 4, 36)) return
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } export class App extends React.Component<{}> { @@ -40,10 +40,10 @@ export class App extends React.Component<{}> { {[ ['Users',
], ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ['Products',
] ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ]} diff --git a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.symbols b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.symbols index fb4c9ee121385..5898f14113507 100644 --- a/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.symbols +++ b/tests/baselines/reference/jsxComplexSignatureHasApplicabilityError.symbols @@ -183,8 +183,8 @@ export type ValueComponentType = React.ComponentTypeHandlerRendererResult : Symbol(HandlerRendererResult, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 53, 106)) ->JSX : Symbol(JSX, Decl(react16.d.ts, 2367, 12)) ->Element : Symbol(JSX.Element, Decl(react16.d.ts, 2368, 23)) +>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) +>Element : Symbol(JSX.Element, Decl(react16.d.ts, 2494, 23)) // Handlers export type FocusOptionHandler = (option: Option) => void; @@ -1005,8 +1005,8 @@ export interface ReactSelectProps extends React.PropsnoResultsText : Symbol(ReactSelectProps.noResultsText, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 438, 18)) ->JSX : Symbol(JSX, Decl(react16.d.ts, 2367, 12)) ->Element : Symbol(JSX.Element, Decl(react16.d.ts, 2368, 23)) +>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) +>Element : Symbol(JSX.Element, Decl(react16.d.ts, 2494, 23)) /** * onBlur handler: function (event) {} @@ -1146,8 +1146,8 @@ export interface ReactSelectProps extends React.Propsplaceholder : Symbol(ReactSelectProps.placeholder, Decl(jsxComplexSignatureHasApplicabilityError.tsx, 524, 22)) ->JSX : Symbol(JSX, Decl(react16.d.ts, 2367, 12)) ->Element : Symbol(JSX.Element, Decl(react16.d.ts, 2368, 23)) +>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) +>Element : Symbol(JSX.Element, Decl(react16.d.ts, 2494, 23)) /** * whether the selected option is removed from the dropdown on multi selects diff --git a/tests/baselines/reference/jsxDeclarationsWithEsModuleInteropNoCrash.symbols b/tests/baselines/reference/jsxDeclarationsWithEsModuleInteropNoCrash.symbols index 1efb61e125860..d0b4ea17dcec2 100644 --- a/tests/baselines/reference/jsxDeclarationsWithEsModuleInteropNoCrash.symbols +++ b/tests/baselines/reference/jsxDeclarationsWithEsModuleInteropNoCrash.symbols @@ -30,9 +30,9 @@ function Foo({ bar }) { >bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 12, 14)) return
{bar}
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >bar : Symbol(bar, Decl(jsxDeclarationsWithEsModuleInteropNoCrash.jsx, 12, 14)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } Foo.propTypes = propTypes; diff --git a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react).symbols b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react).symbols index f8c95e444e28b..d60398280eeb7 100644 --- a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react).symbols +++ b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react).symbols @@ -18,11 +18,11 @@ function Wrapper(props: Props) { >Props : Symbol(Props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 30)) return
{props.children}
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props.children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) >props : Symbol(props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 7, 17)) >children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } const element = ( @@ -33,8 +33,8 @@ const element = ( {/* comment */}
Hello
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) diff --git a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).symbols b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).symbols index f8c95e444e28b..d60398280eeb7 100644 --- a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsx).symbols @@ -18,11 +18,11 @@ function Wrapper(props: Props) { >Props : Symbol(Props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 30)) return
{props.children}
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props.children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) >props : Symbol(props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 7, 17)) >children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } const element = ( @@ -33,8 +33,8 @@ const element = ( {/* comment */}
Hello
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) diff --git a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).symbols index f8c95e444e28b..d60398280eeb7 100644 --- a/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxEmptyExpressionNotCountedAsChild(jsx=react-jsxdev).symbols @@ -18,11 +18,11 @@ function Wrapper(props: Props) { >Props : Symbol(Props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 1, 30)) return
{props.children}
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props.children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) >props : Symbol(props, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 7, 17)) >children : Symbol(Props.children, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 3, 17)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } const element = ( @@ -33,8 +33,8 @@ const element = ( {/* comment */}
Hello
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >Wrapper : Symbol(Wrapper, Decl(jsxEmptyExpressionNotCountedAsChild.tsx, 5, 1)) diff --git a/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.symbols b/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.symbols index cbd2a790aaffa..ad5eefe8a8a02 100644 --- a/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.symbols +++ b/tests/baselines/reference/jsxFragmentFactoryNoUnusedLocals.symbols @@ -22,18 +22,18 @@ export function Counter({ count = 0 }: CounterProps) { return <>

{cnt}

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) >cnt : Symbol(cnt, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 8, 11)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) ->button : Symbol(JSX.IntrinsicElements.button, Decl(react16.d.ts, 2406, 96)) +>button : Symbol(JSX.IntrinsicElements.button, Decl(react16.d.ts, 2532, 96)) >onClick : Symbol(onClick, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 11, 15)) >setCnt : Symbol(setCnt, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 8, 15)) >prev : Symbol(prev, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 11, 39)) >prev : Symbol(prev, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 11, 39)) >type : Symbol(type, Decl(jsxFragmentFactoryNoUnusedLocals.tsx, 11, 58)) ->button : Symbol(JSX.IntrinsicElements.button, Decl(react16.d.ts, 2406, 96)) +>button : Symbol(JSX.IntrinsicElements.button, Decl(react16.d.ts, 2532, 96)) } diff --git a/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.symbols b/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.symbols index f64e0072861f5..bac91088acf24 100644 --- a/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.symbols +++ b/tests/baselines/reference/jsxImportForSideEffectsNonExtantNoError.symbols @@ -7,6 +7,6 @@ import "./App.css"; // doesn't actually exist const tag =
; >tag : Symbol(tag, Decl(jsxImportForSideEffectsNonExtantNoError.tsx, 5, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.symbols b/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.symbols index 0f00830ff3836..f7d660158aa40 100644 --- a/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.symbols +++ b/tests/baselines/reference/jsxIntrinsicElementsTypeArgumentErrors.symbols @@ -6,58 +6,58 @@ import * as React from "react"; // opening + closing const a = >
; // empty type args >a : Symbol(a, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 4, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b = >
; // trailing comma type args >b : Symbol(b, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 6, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const c = >
; // nonexistant type args >c : Symbol(c, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 8, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const d = >>
; // nested missing type args >d : Symbol(d, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 10, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const e = >>
; // existing but incorrect nested type args >e : Symbol(e, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 12, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const f = >
; // existing type argument with no internal issues >f : Symbol(f, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 14, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) // self-closing const g = />; // empty type args >g : Symbol(g, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 17, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const h = />; // trailing comma type args >h : Symbol(h, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 19, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const i = />; // nonexistant type args >i : Symbol(i, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 21, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const j = >/>; // nested missing type args >j : Symbol(j, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 23, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const k = >/>; // existing but incorrect nested type args >k : Symbol(k, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 25, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) const l = />; // existing type argument with no internal issues >l : Symbol(l, Decl(jsxIntrinsicElementsTypeArgumentErrors.tsx, 27, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols index ce2ae27e6e285..04fbef1f422b5 100644 --- a/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols +++ b/tests/baselines/reference/jsxIssuesErrorWhenTagExpectsTooManyArguments.symbols @@ -20,8 +20,8 @@ function MyComp4(props: MyProps, context: any, bad: any, verybad: any) { >verybad : Symbol(verybad, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 8, 56)) return
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } function MyComp3(props: MyProps, context: any, bad: any) { >MyComp3 : Symbol(MyComp3, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 10, 1)) @@ -31,8 +31,8 @@ function MyComp3(props: MyProps, context: any, bad: any) { >bad : Symbol(bad, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 11, 46)) return
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } function MyComp2(props: MyProps, context: any) { >MyComp2 : Symbol(MyComp2, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 13, 1)) @@ -41,8 +41,8 @@ function MyComp2(props: MyProps, context: any) { >context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 14, 32)) return
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } const a = ; // using `MyComp` as a component should error - it expects more arguments than react provides @@ -66,8 +66,8 @@ declare function MyTagWithOptionalNonJSXBits(props: MyProps, context: any, nonRe >MyProps : Symbol(MyProps, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 2, 31)) >context : Symbol(context, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 22, 60)) >nonReactArg : Symbol(nonReactArg, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 22, 74)) ->JSX : Symbol(JSX, Decl(react16.d.ts, 2367, 12)) ->Element : Symbol(JSX.Element, Decl(react16.d.ts, 2368, 23)) +>JSX : Symbol(JSX, Decl(react16.d.ts, 2493, 12)) +>Element : Symbol(JSX.Element, Decl(react16.d.ts, 2494, 23)) const d = ; // Technically OK, but probably questionable >d : Symbol(d, Decl(jsxIssuesErrorWhenTagExpectsTooManyArguments.tsx, 23, 5)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).symbols index 9bdb4e987b5cd..5215f7f5980ed 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsx).symbols @@ -2,8 +2,8 @@ /// const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformChildren.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).symbols index 9bdb4e987b5cd..5215f7f5980ed 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformChildren(jsx=react-jsxdev).symbols @@ -2,8 +2,8 @@ /// const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformChildren.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).symbols index adc13ae6506c8..bf77d75b070ca 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsx).symbols @@ -4,14 +4,14 @@ const a = <> >a : Symbol(a, Decl(jsxJsxsCjsTransformCustomImport.tsx, 1, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(jsxJsxsCjsTransformCustomImport.tsx, 4, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).symbols index adc13ae6506c8..bf77d75b070ca 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImport(jsx=react-jsxdev).symbols @@ -4,14 +4,14 @@ const a = <> >a : Symbol(a, Decl(jsxJsxsCjsTransformCustomImport.tsx, 1, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(jsxJsxsCjsTransformCustomImport.tsx, 4, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).symbols index c4bd360c1a3ea..3605d596d4792 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsx).symbols @@ -6,14 +6,14 @@ const a = <> >a : Symbol(a, Decl(react.tsx, 3, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(react.tsx, 6, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) @@ -25,14 +25,14 @@ const a = <> >a : Symbol(a, Decl(preact.tsx, 2, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(preact.tsx, 5, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).symbols index c4bd360c1a3ea..3605d596d4792 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformCustomImportPragma(jsx=react-jsxdev).symbols @@ -6,14 +6,14 @@ const a = <> >a : Symbol(a, Decl(react.tsx, 3, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(react.tsx, 6, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) @@ -25,14 +25,14 @@ const a = <> >a : Symbol(a, Decl(preact.tsx, 2, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >className : Symbol(className, Decl(preact.tsx, 5, 6)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).symbols index 2dada593db2fa..2fc0a754ceba1 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsx).symbols @@ -6,17 +6,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformKeyProp.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyProp.tsx, 2, 14)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyProp.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(jsxJsxsCjsTransformKeyProp.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyProp.tsx, 1, 5)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyProp.tsx, 3, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).symbols index 2dada593db2fa..2fc0a754ceba1 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyProp(jsx=react-jsxdev).symbols @@ -6,17 +6,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformKeyProp.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyProp.tsx, 2, 14)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyProp.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(jsxJsxsCjsTransformKeyProp.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyProp.tsx, 1, 5)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyProp.tsx, 3, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).symbols index 801d791f75ef1..d6c5fbdcc50fb 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsx).symbols @@ -6,17 +6,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 2, 14)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 1, 5)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 3, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).symbols index 801d791f75ef1..d6c5fbdcc50fb 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImport(jsx=react-jsxdev).symbols @@ -6,17 +6,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 2, 14)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 1, 5)) >key : Symbol(key, Decl(jsxJsxsCjsTransformKeyPropCustomImport.tsx, 3, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).symbols index 433cf36d0b5d2..20b34e4ce457c 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsx).symbols @@ -8,17 +8,17 @@ const props2 = { answer: 42 } const a2 =
text
; >a2 : Symbol(a2, Decl(react.tsx, 4, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(react.tsx, 4, 15)) >props2 : Symbol(props2, Decl(react.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b2 =
text
; >b2 : Symbol(b2, Decl(react.tsx, 5, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props2 : Symbol(props2, Decl(react.tsx, 3, 5)) >key : Symbol(key, Decl(react.tsx, 5, 27)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; @@ -31,17 +31,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(preact.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(preact.tsx, 3, 14)) >props : Symbol(props, Decl(preact.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(preact.tsx, 4, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(preact.tsx, 2, 5)) >key : Symbol(key, Decl(preact.tsx, 4, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).symbols index 433cf36d0b5d2..20b34e4ce457c 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformKeyPropCustomImportPragma(jsx=react-jsxdev).symbols @@ -8,17 +8,17 @@ const props2 = { answer: 42 } const a2 =
text
; >a2 : Symbol(a2, Decl(react.tsx, 4, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(react.tsx, 4, 15)) >props2 : Symbol(props2, Decl(react.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b2 =
text
; >b2 : Symbol(b2, Decl(react.tsx, 5, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props2 : Symbol(props2, Decl(react.tsx, 3, 5)) >key : Symbol(key, Decl(react.tsx, 5, 27)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; @@ -31,17 +31,17 @@ const props = { answer: 42 } const a =
text
; >a : Symbol(a, Decl(preact.tsx, 3, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(preact.tsx, 3, 14)) >props : Symbol(props, Decl(preact.tsx, 2, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) const b =
text
; >b : Symbol(b, Decl(preact.tsx, 4, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >props : Symbol(props, Decl(preact.tsx, 2, 5)) >key : Symbol(key, Decl(preact.tsx, 4, 25)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsx).symbols index a5b6314f416f0..76380055b9466 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsx).symbols @@ -9,13 +9,13 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) @@ -25,16 +25,16 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) @@ -44,19 +44,19 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) {[1, 2].map(i =>
{i}
)} >[1, 2].map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 25)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsxdev).symbols index a5b6314f416f0..76380055b9466 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformNestedSelfClosingChild(jsx=react-jsxdev).symbols @@ -9,13 +9,13 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) @@ -25,16 +25,16 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) @@ -44,19 +44,19 @@ console.log( >log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) {[1, 2].map(i =>
{i}
)} >[1, 2].map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) >key : Symbol(key, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 25)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) >i : Symbol(i, Decl(jsxJsxsCjsTransformNestedSelfClosingChild.tsx, 18, 16)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) ) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).symbols index f9c6220bda54d..46b6e95d0d43d 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsx).symbols @@ -2,7 +2,7 @@ /// const a =
>a : Symbol(a, Decl(jsxJsxsCjsTransformSubstitutesNames.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).symbols index f9c6220bda54d..46b6e95d0d43d 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNames(jsx=react-jsxdev).symbols @@ -2,7 +2,7 @@ /// const a =
>a : Symbol(a, Decl(jsxJsxsCjsTransformSubstitutesNames.tsx, 1, 5)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) export {}; diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).symbols b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).symbols index 900b88a374742..a3705840eafd9 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsx).symbols @@ -4,13 +4,13 @@ const a = <> >a : Symbol(a, Decl(jsxJsxsCjsTransformSubstitutesNamesFragment.tsx, 1, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).symbols b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).symbols index 900b88a374742..a3705840eafd9 100644 --- a/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/jsxJsxsCjsTransformSubstitutesNamesFragment(jsx=react-jsxdev).symbols @@ -4,13 +4,13 @@ const a = <> >a : Symbol(a, Decl(jsxJsxsCjsTransformSubstitutesNamesFragment.tsx, 1, 5))

->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) text
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) diff --git a/tests/baselines/reference/jsxPartialSpread.symbols b/tests/baselines/reference/jsxPartialSpread.symbols index 7b0a171064992..bb7321d0022a6 100644 --- a/tests/baselines/reference/jsxPartialSpread.symbols +++ b/tests/baselines/reference/jsxPartialSpread.symbols @@ -4,8 +4,8 @@ const Select = (p: {value?: unknown}) =>

; >Select : Symbol(Select, Decl(jsxPartialSpread.tsx, 1, 5)) >p : Symbol(p, Decl(jsxPartialSpread.tsx, 1, 16)) >value : Symbol(value, Decl(jsxPartialSpread.tsx, 1, 20)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) ->p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2467, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) +>p : Symbol(JSX.IntrinsicElements.p, Decl(react16.d.ts, 2593, 102)) import React from 'react'; >React : Symbol(React, Decl(jsxPartialSpread.tsx, 2, 6)) diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols index f5cff116a4c2e..a91eb411eab80 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols @@ -42,8 +42,8 @@ class FieldFeedback

extends React.Component

{ >render : Symbol(FieldFeedback.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 15, 4)) return

Hello
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } } @@ -89,8 +89,8 @@ class FieldFeedbackBeta

extends React.Component

>render : Symbol(FieldFeedbackBeta.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 31, 4)) return

Hello
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } } @@ -153,8 +153,8 @@ class FieldFeedback2

extends FieldFeedbac >when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 38)) return

Hello
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } } diff --git a/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsx).symbols b/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsx).symbols index f7edf35f27f2c..217bf16ee658f 100644 --- a/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsx).symbols +++ b/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsx).symbols @@ -8,7 +8,7 @@ function Bar() { >Bar : Symbol(Bar, Decl(index.tsx, 2, 26)) return
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } export function Foo() { diff --git a/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsxdev).symbols b/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsxdev).symbols index f7edf35f27f2c..217bf16ee658f 100644 --- a/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsxdev).symbols +++ b/tests/baselines/reference/reactImportUnusedInNewJSXEmit(jsx=react-jsxdev).symbols @@ -8,7 +8,7 @@ function Bar() { >Bar : Symbol(Bar, Decl(index.tsx, 2, 26)) return
; ->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } export function Foo() { diff --git a/tests/baselines/reference/spellingSuggestionJSXAttribute.symbols b/tests/baselines/reference/spellingSuggestionJSXAttribute.symbols index b6cc2d6eb50d3..bf37711d7dc41 100644 --- a/tests/baselines/reference/spellingSuggestionJSXAttribute.symbols +++ b/tests/baselines/reference/spellingSuggestionJSXAttribute.symbols @@ -20,19 +20,19 @@ class MyComp extends React.Component<{ className?: string, htmlFor?: string }> { >htmlFor : Symbol(htmlFor, Decl(spellingSuggestionJSXAttribute.tsx, 6, 58)) ; ->a : Symbol(JSX.IntrinsicElements.a, Decl(react16.d.ts, 2390, 41)) +>a : Symbol(JSX.IntrinsicElements.a, Decl(react16.d.ts, 2516, 41)) >class : Symbol(class, Decl(spellingSuggestionJSXAttribute.tsx, 7, 2)) ; // should have no fix ->a : Symbol(JSX.IntrinsicElements.a, Decl(react16.d.ts, 2390, 41)) +>a : Symbol(JSX.IntrinsicElements.a, Decl(react16.d.ts, 2516, 41)) >for : Symbol(for, Decl(spellingSuggestionJSXAttribute.tsx, 8, 2))
->div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2546, 114)) } BackButton.defaultProps = { >BackButton.defaultProps : Symbol(BackButton.defaultProps, Decl(tsxStatelessComponentDefaultProps.tsx, 9, 1)) diff --git a/tests/cases/compiler/styledComponentsInstantiaionLimitNotReached.ts b/tests/cases/compiler/styledComponentsInstantiaionLimitNotReached.ts new file mode 100644 index 0000000000000..725f7b7221a4d --- /dev/null +++ b/tests/cases/compiler/styledComponentsInstantiaionLimitNotReached.ts @@ -0,0 +1,196 @@ +/// +import * as React from "react"; + +interface REACT_STATICS { + childContextTypes: true; + contextType: true; + contextTypes: true; + defaultProps: true; + displayName: true; + getDefaultProps: true; + getDerivedStateFromError: true; + getDerivedStateFromProps: true; + mixins: true; + propTypes: true; + type: true; +} + +interface KNOWN_STATICS { + name: true; + length: true; + prototype: true; + caller: true; + callee: true; + arguments: true; + arity: true; +} + +interface MEMO_STATICS { + '$$typeof': true; + compare: true; + defaultProps: true; + displayName: true; + propTypes: true; + type: true; +} + +interface FORWARD_REF_STATICS { + '$$typeof': true; + render: true; + defaultProps: true; + displayName: true; + propTypes: true; +} + + +type NonReactStatics< + S extends React.ComponentType, + C extends { + [key: string]: true + } = {} + > = { + [key in Exclude< + keyof S, + S extends React.MemoExoticComponent + ? keyof MEMO_STATICS | keyof C + : S extends React.ForwardRefExoticComponent + ? keyof FORWARD_REF_STATICS | keyof C + : keyof REACT_STATICS | keyof KNOWN_STATICS | keyof C + >]: S[key] + }; + +export type AnyStyledComponent = StyledComponent | StyledComponent; +export type StyledComponent< + C extends keyof JSX.IntrinsicElements | React.ComponentType, + T extends object, + O extends object = {}, + A extends keyof any = never + > = // the "string" allows this to be used as an object key + // I really want to avoid this if possible but it's the only way to use nesting with object styles... + string & + StyledComponentBase & + NonReactStatics ? C : never>; + +export type StyledComponentProps< + // The Component from whose props are derived + C extends string | React.ComponentType, + // The Theme from the current context + T extends object, + // The other props added by the template + O extends object, + // The props that are made optional by .attrs + A extends keyof any + > = + // Distribute O if O is a union type + O extends object + ? WithOptionalTheme< + Omit< + ReactDefaultizedProps< + C, + React.ComponentPropsWithRef< + C extends IntrinsicElementsKeys | React.ComponentType ? C : never + > + > & + O, + A + > & + Partial< + Pick< + React.ComponentPropsWithRef< + C extends IntrinsicElementsKeys | React.ComponentType ? C : never + > & + O, + A + > + >, + T + > & + WithChildrenIfReactComponentClass + : never; + +type Defaultize = P extends any + ? string extends keyof P + ? P + : Pick> & + Partial>> & + Partial>> + : never; + +type ReactDefaultizedProps = C extends { defaultProps: infer D } ? Defaultize : P; + +type WithChildrenIfReactComponentClass> = C extends React.ComponentClass< + any +> + ? { children?: React.ReactNode } + : {}; +export type IntrinsicElementsKeys = keyof JSX.IntrinsicElements; +type WithOptionalTheme

= Omit & { + theme?: T; +}; + +type ForwardRefExoticBase

= Pick, keyof React.ForwardRefExoticComponent>; + +type StyledComponentPropsWithAs< + C extends string | React.ComponentType, + T extends object, + O extends object, + A extends keyof any, + F extends string | React.ComponentType = C + > = StyledComponentProps & { as?: C; forwardedAs?: F }; + +export type StyledComponentInnerOtherProps = C extends StyledComponent< + any, + any, + infer O, + any +> + ? O + : C extends StyledComponent + ? O + : never; +export type StyledComponentInnerAttrs = C extends StyledComponent + ? A + : never; + +export interface StyledComponentBase< + C extends string | React.ComponentType, + T extends object, + O extends object = {}, + A extends keyof any = never + > extends ForwardRefExoticBase> { + // add our own fake call signature to implement the polymorphic 'as' prop + (props: StyledComponentProps & { as?: never; forwardedAs?: never }): React.ReactElement< + StyledComponentProps + >; + = C, FAsC extends string | React.ComponentType = AsC>( + props: StyledComponentPropsWithAs, + ): React.ReactElement>; + + withComponent( + component: WithC, + ): StyledComponent< + StyledComponentInnerComponent, + T, + O & StyledComponentInnerOtherProps, + A | StyledComponentInnerAttrs + >; + withComponent>( + component: WithC, + ): StyledComponent; +} + +export type StyledComponentInnerComponent> = C extends StyledComponent< + infer I, + any, + any, + any +> + ? I + : C extends StyledComponent + ? I + : C; +export type StyledComponentPropsWithRef< + C extends keyof JSX.IntrinsicElements | React.ComponentType + > = C extends AnyStyledComponent + ? React.ComponentPropsWithRef> // shouldn't have an instantiation limit error + : React.ComponentPropsWithRef; \ No newline at end of file diff --git a/tests/lib/react16.d.ts b/tests/lib/react16.d.ts index ce59d6ea86a58..0070951628232 100644 --- a/tests/lib/react16.d.ts +++ b/tests/lib/react16.d.ts @@ -2348,6 +2348,132 @@ declare module "react" { */ componentStack: string; } + + // Exotic components and their APIs + // ---------------------------------------------------------------------- + interface MutableRefObject { + current: T; + } + + type ForwardedRef = ((instance: T | null) => void) | MutableRefObject | null; + + interface ForwardRefRenderFunction { + (props: PropsWithChildren

, ref: ForwardedRef): ReactElement | null; + displayName?: string; + // explicit rejected with `never` required due to + // https://github.com/microsoft/TypeScript/issues/36826 + /** + * defaultProps are not supported on render functions + */ + defaultProps?: never; + /** + * propTypes are not supported on render functions + */ + propTypes?: never; + } + + function createRef(): RefObject; + + type WeakValidationMap = { + [K in keyof T]?: null extends T[K] + ? Validator + : undefined extends T[K] + ? Validator + : Validator + }; + + // will show `ForwardRef(${Component.displayName || Component.name})` in devtools by default, + // but can be given its own specific name + interface ForwardRefExoticComponent

extends NamedExoticComponent

{ + defaultProps?: Partial

; + propTypes?: WeakValidationMap

; + } + + function forwardRef(render: ForwardRefRenderFunction): ForwardRefExoticComponent & RefAttributes>; + + /** Ensures that the props do not include ref at all */ + type PropsWithoutRef

= + // Just Pick would be sufficient for this, but I'm trying to avoid unnecessary mapping over union types + // https://github.com/Microsoft/TypeScript/issues/28339 + 'ref' extends keyof P + ? Pick> + : P; + /** Ensures that the props do not include string ref, which cannot be forwarded */ + type PropsWithRef

= + // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}. + 'ref' extends keyof P + ? P extends { ref?: infer R } + ? string extends R + ? PropsWithoutRef

& { ref?: Exclude } + : P + : P + : P; + + type PropsWithChildren

= P & { children?: ReactNode }; + type JSXElementConstructor

= + | ((props: P) => ReactElement | null) + | (new (props: P) => Component); + type ElementType

= + { + [K in keyof JSX.IntrinsicElements]: P extends JSX.IntrinsicElements[K] ? K : never + }[keyof JSX.IntrinsicElements] | + ComponentType

; + + interface RefAttributes extends Attributes { + ref?: Ref; + } + + /** + * NOTE: prefer ComponentPropsWithRef, if the ref is forwarded, + * or ComponentPropsWithoutRef when refs are not supported. + */ + type ComponentProps> = + T extends JSXElementConstructor + ? P + : T extends keyof JSX.IntrinsicElements + ? JSX.IntrinsicElements[T] + : {}; + type ComponentPropsWithRef = + T extends ComponentClass + ? PropsWithoutRef

& RefAttributes> + : PropsWithRef>; + type ComponentPropsWithoutRef = + PropsWithoutRef>; + + // will show `Memo(${Component.displayName || Component.name})` in devtools by default, + // but can be given its own specific name + type MemoExoticComponent> = NamedExoticComponent> & { + readonly type: T; + }; + + function memo

( + Component: SFC

, + propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean + ): NamedExoticComponent

; + function memo>( + Component: T, + propsAreEqual?: (prevProps: Readonly>, nextProps: Readonly>) => boolean + ): MemoExoticComponent; + + type LazyExoticComponent> = ExoticComponent> & { + readonly _result: T; + }; + + function lazy>( + factory: () => Promise<{ default: T }> + ): LazyExoticComponent; + + interface ExoticComponent

{ + /** + * **NOTE**: Exotic components are not callable. + */ + (props: P): (ReactElement|null); + readonly $$typeof: symbol; + } + + interface NamedExoticComponent

extends ExoticComponent

{ + displayName?: string; + } } // Declared props take priority over inferred props From 4c62f6e7d62188d8fecb92300c72d1435924cb64 Mon Sep 17 00:00:00 2001 From: TypeScript Bot Date: Fri, 22 Jan 2021 06:51:52 +0000 Subject: [PATCH 32/92] Update package-lock.json --- package-lock.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8888ed64591d9..ade4d1a23f82f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -324,9 +324,9 @@ } }, "@octokit/openapi-types": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-3.0.0.tgz", - "integrity": "sha512-jOp1CVRw+OBJaZtG9QzZggvJXvyzgDXuW948SWsDiwmyDuCjeYCiF3TDD/qvhpF580RfP7iBIos4AVU6yhgMlA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-3.2.0.tgz", + "integrity": "sha512-X7yW/fpzF3uTAE+LbPD3HEeeU+/49o0V4kNA/yv8jQ3BDpFayv/osTOhY1y1mLXljW2bOJcOCSGZo4jFKPJ6Vw==", "dev": true }, "@octokit/plugin-paginate-rest": { @@ -345,12 +345,12 @@ "dev": true }, "@octokit/plugin-rest-endpoint-methods": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.4.1.tgz", - "integrity": "sha512-+v5PcvrUcDeFXf8hv1gnNvNLdm4C0+2EiuWt9EatjjUmfriM1pTMM+r4j1lLHxeBQ9bVDmbywb11e3KjuavieA==", + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.7.0.tgz", + "integrity": "sha512-IXw4hgC6aejdEi92CaA/FvvyTg7/GDuJeWgXxZFVFS/HDa6+QG3BZBJunuLTcWX36XVwVBugDwlGCEHGjDeGMg==", "dev": true, "requires": { - "@octokit/types": "^6.1.0", + "@octokit/types": "^6.4.2", "deprecation": "^2.3.1" } }, @@ -390,24 +390,24 @@ } }, "@octokit/rest": { - "version": "18.0.12", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.12.tgz", - "integrity": "sha512-hNRCZfKPpeaIjOVuNJzkEL6zacfZlBPV8vw8ReNeyUkVvbuCvvrrx8K8Gw2eyHHsmd4dPlAxIXIZ9oHhJfkJpw==", + "version": "18.0.13", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.13.tgz", + "integrity": "sha512-uKm01nBLn8hx8AW+msRn4zyHG74P1COWwJOr94dg25TxMG3l9MIxzO9hp2nOc20EVl9+lFhVtLP+dYJrKL1HAw==", "dev": true, "requires": { "@octokit/core": "^3.2.3", "@octokit/plugin-paginate-rest": "^2.6.2", "@octokit/plugin-request-log": "^1.0.2", - "@octokit/plugin-rest-endpoint-methods": "4.4.1" + "@octokit/plugin-rest-endpoint-methods": "4.7.0" } }, "@octokit/types": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.4.0.tgz", - "integrity": "sha512-1FEmuVppZE2zG0rBdQlviRz5cp0udyI63zyhBVPrm0FRNAsQkAXU7IYWQg1XvhChFut8YbFYN1usQpk54D6/4w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.5.0.tgz", + "integrity": "sha512-mzCy7lkYQv+kM58W37uTg/mWoJ4nvRDRCkjSdqlrgA28hJEYNJTMYiGTvmq39cdtnMPJd0hshysBEAaH4D5C7w==", "dev": true, "requires": { - "@octokit/openapi-types": "^3.0.0", + "@octokit/openapi-types": "^3.2.0", "@types/node": ">= 8" } }, From 80dfc6a45b5c4b00b7d0fa1ffa1e805f4ffe628b Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Fri, 22 Jan 2021 11:16:07 -0800 Subject: [PATCH 33/92] Only when typings file change for the project, schedule the update for the project (#42428) * Update and add test when typings dont change because of import name * Update project scheduling only when typings are set * Schedule update graph only if typings change Fixes #39326 --- src/compiler/resolutionCache.ts | 3 ++ src/server/editorServices.ts | 3 +- src/server/project.ts | 13 ++++-- .../unittests/tsserver/projectErrors.ts | 2 +- src/testRunner/unittests/tsserver/projects.ts | 2 +- .../unittests/tsserver/resolutionCache.ts | 10 +--- .../unittests/tsserver/typingsInstaller.ts | 46 +++++++++++++++---- 7 files changed, 52 insertions(+), 27 deletions(-) diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 3242a44ee220c..68c32d26c5930 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -16,6 +16,8 @@ namespace ts { setFilesWithInvalidatedNonRelativeUnresolvedImports(filesWithUnresolvedImports: ESMap): void; createHasInvalidatedResolution(forceAllFilesAsInvalidated?: boolean): HasInvalidatedResolution; hasChangedAutomaticTypeDirectiveNames(): boolean; + isFileWithInvalidatedNonRelativeUnresolvedImports(path: Path): boolean; + startCachingPerDirectoryResolution(): void; finishCachingPerDirectoryResolution(): void; @@ -208,6 +210,7 @@ namespace ts { invalidateResolutionsOfFailedLookupLocations, setFilesWithInvalidatedNonRelativeUnresolvedImports, createHasInvalidatedResolution, + isFileWithInvalidatedNonRelativeUnresolvedImports, updateTypeRootsWatch, closeTypeRootsWatch, clear diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 5787a5f01a678..864cc0268e2ce 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -922,13 +922,12 @@ namespace ts.server { case ActionSet: // Update the typing files and update the project project.updateTypingFiles(this.typingsCache.updateTypingsForProject(response.projectName, response.compilerOptions, response.typeAcquisition, response.unresolvedImports, response.typings)); - break; + return; case ActionInvalidate: // Do not clear resolution cache, there was changes detected in typings, so enque typing request and let it get us correct results this.typingsCache.enqueueInstallTypingsForProject(project, project.lastCachedUnresolvedImportsList, /*forceRefresh*/ true); return; } - this.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(project); } /*@internal*/ diff --git a/src/server/project.ts b/src/server/project.ts index 21f3f55eb2696..7c95a633dae79 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -1057,13 +1057,16 @@ namespace ts.server { /*@internal*/ updateTypingFiles(typingFiles: SortedReadonlyArray) { - enumerateInsertsAndDeletes(typingFiles, this.typingFiles, getStringComparer(!this.useCaseSensitiveFileNames()), + if (enumerateInsertsAndDeletes(typingFiles, this.typingFiles, getStringComparer(!this.useCaseSensitiveFileNames()), /*inserted*/ noop, removed => this.detachScriptInfoFromProject(removed) - ); - this.typingFiles = typingFiles; - // Invalidate files with unresolved imports - this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); + )) { + // If typing files changed, then only schedule project update + this.typingFiles = typingFiles; + // Invalidate files with unresolved imports + this.resolutionCache.setFilesWithInvalidatedNonRelativeUnresolvedImports(this.cachedUnresolvedImportsPerFile); + this.projectService.delayUpdateProjectGraphAndEnsureProjectStructureForOpenFiles(this); + } } /* @internal */ diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index 40312f9303ab0..4a5926afaca8e 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -409,7 +409,7 @@ namespace ts.projectSystem { checkErrors([serverUtilities.path, app.path]); function checkErrors(openFiles: [string, string]) { - verifyGetErrRequestNoErrors({ session, host, files: openFiles, existingTimeouts: 2 }); + verifyGetErrRequestNoErrors({ session, host, files: openFiles }); } }); diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index 65938314f115a..566d098416311 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -419,7 +419,7 @@ namespace ts.projectSystem { unresolvedImports: response.unresolvedImports, }); - host.checkTimeoutQueueLengthAndRun(1); + host.checkTimeoutQueueLength(0); assert.isUndefined(request); }); diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts index 7a88d42da050e..d3d4ff1361774 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -198,10 +198,7 @@ namespace ts.projectSystem { checkNumberOfProjects(service, { inferredProjects: 1 }); session.clearMessages(); - host.checkTimeoutQueueLengthAndRun(2); - - checkProjectUpdatedInBackgroundEvent(session, [file.path]); - + host.checkTimeoutQueueLength(0); verifyGetErrRequest({ session, host, @@ -240,10 +237,7 @@ namespace ts.projectSystem { checkNumberOfProjects(service, { inferredProjects: 1 }); session.clearMessages(); - host.checkTimeoutQueueLengthAndRun(2); - - checkProjectUpdatedInBackgroundEvent(session, [file.path]); - + host.checkTimeoutQueueLength(0); verifyGetErrRequest({ session, host, diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts index 8a449bccad7cd..5bb0fc9792a83 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -244,7 +244,7 @@ namespace ts.projectSystem { checkProjectActualFiles(p, [jqueryJs.path]); installer.installAll(/*expectedCount*/ 0); - host.checkTimeoutQueueLengthAndRun(2); + host.checkTimeoutQueueLength(0); checkNumberOfProjects(projectService, { inferredProjects: 1 }); // files should not be removed from project if ATA is skipped checkProjectActualFiles(p, [jqueryJs.path]); @@ -1024,9 +1024,8 @@ namespace ts.projectSystem { service.openClientFile(f.path); installer.checkPendingCommands(/*expectedCount*/ 0); - host.writeFile(fixedPackageJson.path, fixedPackageJson.content); - host.checkTimeoutQueueLengthAndRun(2); // To refresh the project and refresh inferred projects + host.checkTimeoutQueueLength(0); // expected install request installer.installAll(/*expectedCount*/ 1); host.checkTimeoutQueueLengthAndRun(2); @@ -1212,7 +1211,8 @@ namespace ts.projectSystem { } }; session.executeCommand(changeRequest); - host.checkTimeoutQueueLengthAndRun(2); // This enqueues the updategraph and refresh inferred projects + host.checkTimeoutQueueLength(0); + proj.updateGraph(); const version2 = proj.lastCachedUnresolvedImportsList; assert.strictEqual(version1, version2, "set of unresolved imports should change"); }); @@ -1837,6 +1837,7 @@ namespace ts.projectSystem { const appPath = "/a/b/app.js" as Path; const foooPath = "/a/b/node_modules/fooo/index.d.ts"; function verifyResolvedModuleOfFooo(project: server.Project) { + server.updateProjectIfDirty(project); const foooResolution = project.getLanguageService().getProgram()!.getSourceFileByPath(appPath)!.resolvedModules!.get("fooo")!; assert.equal(foooResolution.resolvedFileName, foooPath); return foooResolution; @@ -1851,6 +1852,7 @@ namespace ts.projectSystem { path: foooPath, content: `export var x: string;` }; + const host = createServerHost([app, fooo]); const installer = new (class extends Installer { constructor() { @@ -1873,6 +1875,17 @@ namespace ts.projectSystem { checkProjectActualFiles(proj, typingFiles.map(f => f.path).concat(app.path, fooo.path)); const foooResolution2 = verifyResolvedModuleOfFooo(proj); assert.strictEqual(foooResolution1, foooResolution2); + projectService.applyChangesInOpenFiles(/*openFiles*/ undefined, arrayIterator([{ + fileName: app.path, + changes: arrayIterator([{ + span: { start: 0, length: 0 }, + newText: `import * as bar from "bar";` + }]) + }])); + host.runQueuedTimeoutCallbacks(); // Update the graph + // Update the typing + host.checkTimeoutQueueLength(0); + assert.isFalse(proj.resolutionCache.isFileWithInvalidatedNonRelativeUnresolvedImports(app.path as Path)); } it("correctly invalidate the resolutions with typing names", () => { @@ -1883,6 +1896,10 @@ namespace ts.projectSystem { }); it("correctly invalidate the resolutions with typing names that are trimmed", () => { + const fooIndex: File = { + path: `${globalTypingsCacheLocation}/node_modules/foo/index.d.ts`, + content: "export function aa(): void;" + }; const fooAA: File = { path: `${globalTypingsCacheLocation}/node_modules/foo/a/a.d.ts`, content: "export function a (): void;" @@ -1899,7 +1916,7 @@ namespace ts.projectSystem { import * as a from "foo/a/a"; import * as b from "foo/a/b"; import * as c from "foo/a/c"; - `, ["foo"], [fooAA, fooAB, fooAC]); + `, ["foo"], [fooIndex, fooAA, fooAB, fooAC]); }); it("should handle node core modules", () => { @@ -1958,12 +1975,21 @@ declare module "stream" { host.checkTimeoutQueueLengthAndRun(2); checkProjectActualFiles(proj, [file.path, libFile.path, nodeTyping.path]); - // Here, since typings doesnt contain node typings and resolution fails and - // node typings go out of project, - // but because we handle core node modules when resolving from typings cache - // node typings are included in the project - host.checkTimeoutQueueLengthAndRun(2); + // Here, since typings dont change, there is no timeout scheduled + host.checkTimeoutQueueLength(0); + checkProjectActualFiles(proj, [file.path, libFile.path, nodeTyping.path]); + projectService.applyChangesInOpenFiles(/*openFiles*/ undefined, arrayIterator([{ + fileName: file.path, + changes: arrayIterator([{ + span: { start: file.content.indexOf("const"), length: 0 }, + newText: `const bar = require("bar");` + }]) + }])); + proj.updateGraph(); // Update the graph checkProjectActualFiles(proj, [file.path, libFile.path, nodeTyping.path]); + // Update the typing + host.checkTimeoutQueueLength(0); + assert.isFalse(proj.resolutionCache.isFileWithInvalidatedNonRelativeUnresolvedImports(file.path as Path)); }); }); From ee3fe472d7aa1bd8a5e3e07ac1c4965eeac0f25e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 22 Jan 2021 13:23:41 -0800 Subject: [PATCH 34/92] Fix broken user and docker tests (#42431) * Add --force to npm install script for user tests * Migrate prettier to docker * Fix vscode Dockerfile * Fix stack space issue in isJSLiteralType * Use --legacy-peer-deps based on npm version * Fix xterm.js Dockerfile --- src/compiler/checker.ts | 3 ++- src/testRunner/externalCompileRunner.ts | 10 +++++++--- tests/cases/docker/prettier/Dockerfile | 13 +++++++++++++ tests/cases/docker/vscode/Dockerfile | 1 + tests/cases/docker/xterm.js/Dockerfile | 4 ++-- tests/cases/user/prettier/test.json | 4 ---- tests/cases/user/prettier/tsconfig.json | 17 ----------------- 7 files changed, 25 insertions(+), 27 deletions(-) create mode 100644 tests/cases/docker/prettier/Dockerfile delete mode 100644 tests/cases/user/prettier/test.json delete mode 100644 tests/cases/user/prettier/tsconfig.json diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index efb46b2efbdfc..49c45384e6df5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -14109,7 +14109,8 @@ namespace ts { return some((type as IntersectionType).types, isJSLiteralType); } if (type.flags & TypeFlags.Instantiable) { - return isJSLiteralType(getResolvedBaseConstraint(type)); + const constraint = getResolvedBaseConstraint(type); + return constraint !== type && isJSLiteralType(constraint); } return false; } diff --git a/src/testRunner/externalCompileRunner.ts b/src/testRunner/externalCompileRunner.ts index 4f2cd9e477070..2b3a2ef9957dc 100644 --- a/src/testRunner/externalCompileRunner.ts +++ b/src/testRunner/externalCompileRunner.ts @@ -68,6 +68,9 @@ namespace Harness { cwd = config.path ? path.join(cwd, config.path) : submoduleDir; } + const npmVersionText = exec("npm", ["--version"], { cwd, stdio: "pipe" })?.trim(); + const npmVersion = npmVersionText ? ts.Version.tryParse(npmVersionText.trim()) : undefined; + const isV7OrLater = !!npmVersion && npmVersion.major >= 7; if (fs.existsSync(path.join(cwd, "package.json"))) { if (fs.existsSync(path.join(cwd, "package-lock.json"))) { fs.unlinkSync(path.join(cwd, "package-lock.json")); @@ -75,24 +78,25 @@ namespace Harness { if (fs.existsSync(path.join(cwd, "node_modules"))) { del.sync(path.join(cwd, "node_modules"), { force: true }); } - exec("npm", ["i", "--ignore-scripts"], { cwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure + exec("npm", ["i", "--ignore-scripts", ...(isV7OrLater ? ["--legacy-peer-deps"] : [])], { cwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure } const args = [path.join(IO.getWorkspaceRoot(), "built/local/tsc.js")]; if (types) { args.push("--types", types.join(",")); // Also actually install those types (for, eg, the js projects which need node) if (types.length) { - exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure + exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts", ...(isV7OrLater ? ["--legacy-peer-deps"] : [])], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure } } args.push("--noEmit"); Baseline.runBaseline(`${cls.kind()}/${directoryName}.log`, cls.report(cp.spawnSync(`node`, args, { cwd, timeout, shell: true }), cwd)); - function exec(command: string, args: string[], options: { cwd: string, timeout?: number }): void { + function exec(command: string, args: string[], options: { cwd: string, timeout?: number, stdio?: import("child_process").StdioOptions }): string | undefined { const res = cp.spawnSync(isWorker ? `${command} 2>&1` : command, args, { shell: true, stdio, ...options }); if (res.status !== 0) { throw new Error(`${command} ${args.join(" ")} for ${directoryName} failed: ${res.stdout && res.stdout.toString()}`); } + return options.stdio === "pipe" ? res.stdout.toString("utf8") : undefined; } }); }); diff --git a/tests/cases/docker/prettier/Dockerfile b/tests/cases/docker/prettier/Dockerfile new file mode 100644 index 0000000000000..750e5ba3b2aa2 --- /dev/null +++ b/tests/cases/docker/prettier/Dockerfile @@ -0,0 +1,13 @@ +FROM node:current +RUN npm i -g yarn --force +RUN git clone https://github.com/prettier/prettier.git /prettier +WORKDIR /prettier +RUN git pull +COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz +RUN mkdir /typescript +RUN tar -xzvf /typescript.tgz -C /typescript +RUN yarn add typescript@/typescript.tgz +RUN yarn +ENTRYPOINT [ "yarn" ] +# Build +CMD [ "build" ] \ No newline at end of file diff --git a/tests/cases/docker/vscode/Dockerfile b/tests/cases/docker/vscode/Dockerfile index da285512031f6..a9f810711b40e 100644 --- a/tests/cases/docker/vscode/Dockerfile +++ b/tests/cases/docker/vscode/Dockerfile @@ -10,6 +10,7 @@ COPY --from=typescript/typescript /typescript/typescript-*.tgz /typescript.tgz WORKDIR /vscode/build RUN yarn add typescript@/typescript.tgz WORKDIR /vscode/extensions +RUN yarn add rimraf RUN yarn add typescript@/typescript.tgz WORKDIR /vscode RUN yarn add typescript@/typescript.tgz diff --git a/tests/cases/docker/xterm.js/Dockerfile b/tests/cases/docker/xterm.js/Dockerfile index 179459d280e10..169d49893ba7e 100644 --- a/tests/cases/docker/xterm.js/Dockerfile +++ b/tests/cases/docker/xterm.js/Dockerfile @@ -1,5 +1,5 @@ -# node-pty doesn't build on node 12 right now, so we lock to 8 - the version xterm itself tests against :( -FROM node:8 +# node-pty doesn't build on node 12 right now, so we lock to 10 +FROM node:10 RUN git clone https://github.com/xtermjs/xterm.js.git /xtermjs WORKDIR /xtermjs RUN git pull diff --git a/tests/cases/user/prettier/test.json b/tests/cases/user/prettier/test.json deleted file mode 100644 index 7b04123842498..0000000000000 --- a/tests/cases/user/prettier/test.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "cloneUrl": "https://github.com/prettier/prettier.git", - "types": ["node"] -} diff --git a/tests/cases/user/prettier/tsconfig.json b/tests/cases/user/prettier/tsconfig.json deleted file mode 100644 index d3b1f270dbcb5..0000000000000 --- a/tests/cases/user/prettier/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "compilerOptions": { - "noImplicitAny": false, - "noImplicitThis": false, - "maxNodeModuleJsDepth": 0, - "strict": true, - "noEmit": true, - "allowJs": true, - "checkJs": true, - "types": ["node"], - "lib": ["esnext", "dom"], - "target": "esnext", - "module": "commonjs", - "pretty": false, - }, - "include": ["prettier/src"] -} From 786a7e86ef6d40f28c7f6e022c76b72494c2d3e1 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Fri, 22 Jan 2021 18:44:25 -0800 Subject: [PATCH 35/92] Update user baselines (#42451) * Update user baselines +cc @sandersn * Update user baselines Co-authored-by: typescript-bot --- .../baselines/reference/docker/azure-sdk.log | 11 +- .../reference/docker/office-ui-fabric.log | 1462 +++++++++++++---- tests/baselines/reference/docker/prettier.log | 28 + tests/baselines/reference/docker/vscode.log | 21 +- tests/baselines/reference/docker/vue-next.log | 16 +- tests/baselines/reference/docker/xterm.js.log | 23 + .../user/TypeScript-Node-Starter.log | 1 - 7 files changed, 1269 insertions(+), 293 deletions(-) create mode 100644 tests/baselines/reference/docker/prettier.log diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index bbbaa40566b27..c3c405cf11854 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,10 +2,10 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 15.5.1 (unstable) +Node.js version is 15.6.0 (unstable) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... -==[ @azure/eslint-plugin-azure-sdk ]==============================[ 1 of 58 ]== +==[ @azure/eslint-plugin-azure-sdk ]==============================[ 1 of 59 ]== "@azure/abort-controller" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/communication-administration" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/communication-chat" is blocked by "@azure/eslint-plugin-azure-sdk". @@ -54,6 +54,7 @@ Executing a maximum of ?simultaneous processes... "@azure/storage-internal-avro" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/test-utils-multi-version" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/core-https" is blocked by "@azure/eslint-plugin-azure-sdk". +"@azure/core-crypto" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/core-asynciterator-polyfill" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/core-paging" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/core-tracing" is blocked by "@azure/eslint-plugin-azure-sdk". @@ -63,7 +64,7 @@ Executing a maximum of ?simultaneous processes... "@azure/event-processor-host" is blocked by "@azure/eslint-plugin-azure-sdk". "testhub" is blocked by "@azure/eslint-plugin-azure-sdk". "@azure/logger" is blocked by "@azure/eslint-plugin-azure-sdk". -==[ BLOCKED: 57 projects ]===================================================== +==[ BLOCKED: 58 projects ]===================================================== These projects were blocked by dependencies that failed: @azure/abort-controller @azure/ai-anomaly-detector @@ -80,6 +81,7 @@ These projects were blocked by dependencies that failed: @azure/core-asynciterator-polyfill @azure/core-auth @azure/core-client + @azure/core-crypto @azure/core-http @azure/core-https @azure/core-lro @@ -141,8 +143,7 @@ rush rebuild (? seconds) Standard error: -Your version of Node.js (X.X.X) has not been tested with this release of Rush. Please consider installing a newer version of the "@microsoft/rush" package, or downgrading Node.js. -Your version of Node.js (X.X.X) is an odd-numbered release. These releases frequently have bugs. Please consider installing a Long Term Support (LTS) version instead. +Your version of Node.js (X.X.X) has not been tested with this release of the Rush engine. Please consider upgrading the "rushVersion" setting in rush.json, or downgrading Node.js. Returned error code: 2 "@azure/eslint-plugin-azure-sdk" failed to build. Projects failed to build. diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index e7243afc220d5..7876f01c26d28 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -1,5 +1,8 @@ Exit Code: 1 Standard output: +@fluentui/cra-template: yarn run vX.X.X +@fluentui/cra-template: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/cra-template: Done in ?s. @fluentui/eslint-plugin: yarn run vX.X.X @fluentui/eslint-plugin: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/eslint-plugin: Done in ?s. @@ -36,21 +39,21 @@ Standard output: @fluentui/a11y-testing: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/a11y-testing/tsconfig.json" @fluentui/a11y-testing: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/a11y-testing/tsconfig.json @fluentui/a11y-testing: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/a11y-testing/tsconfig.json" -@fluentui/a11y-testing: Done in ?s. +@fluentui/a11y-testing: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/codemods: yarn run vX.X.X @fluentui/codemods: $ just-scripts ts @fluentui/codemods: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/codemods/tsconfig.json @fluentui/codemods: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/codemods/tsconfig.json" @fluentui/codemods: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/codemods/tsconfig.json @fluentui/codemods: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/codemods/tsconfig.json" -@fluentui/codemods: Done in ?s. +@fluentui/codemods: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/example-data: yarn run vX.X.X @fluentui/example-data: $ just-scripts ts @fluentui/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @fluentui/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" @fluentui/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @fluentui/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -@fluentui/example-data: Done in ?s. +@fluentui/example-data: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/keyboard-key: yarn run vX.X.X @fluentui/keyboard-key: $ just-scripts ts @fluentui/keyboard-key: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/keyboard-key/tsconfig.json @@ -71,7 +74,7 @@ Standard output: @fluentui/react-conformance: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-conformance/tsconfig.json" @fluentui/react-conformance: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-conformance/tsconfig.json @fluentui/react-conformance: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-conformance/tsconfig.json" -@fluentui/react-conformance: Done in ?s. +@fluentui/react-conformance: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/set-version: yarn run vX.X.X @fluentui/set-version: $ just-scripts ts @fluentui/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @@ -119,14 +122,21 @@ Standard output: @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/date-time-utilities/tsconfig.json" @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/date-time-utilities/tsconfig.json @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/date-time-utilities/tsconfig.json" -@fluentui/date-time-utilities: Done in ?s. +@fluentui/date-time-utilities: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/dom-utilities: yarn run vX.X.X @fluentui/dom-utilities: $ just-scripts ts @fluentui/dom-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/dom-utilities/tsconfig.json @fluentui/dom-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/dom-utilities/tsconfig.json" @fluentui/dom-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/dom-utilities/tsconfig.json @fluentui/dom-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/dom-utilities/tsconfig.json" -@fluentui/dom-utilities: Done in ?s. +@fluentui/dom-utilities: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/make-styles: yarn run vX.X.X +@fluentui/make-styles: $ just-scripts ts +@fluentui/make-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/make-styles/tsconfig.json +@fluentui/make-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/make-styles/tsconfig.json" +@fluentui/make-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/make-styles/tsconfig.json +@fluentui/make-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/make-styles/tsconfig.json" +@fluentui/make-styles: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/merge-styles: yarn run vX.X.X @fluentui/merge-styles: $ just-scripts ts @fluentui/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json @@ -156,7 +166,7 @@ Standard output: @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-stylesheets/tsconfig.json" @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-stylesheets/tsconfig.json @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-stylesheets/tsconfig.json" -@fluentui/react-stylesheets: Done in ?s. +@fluentui/react-stylesheets: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-utilities: yarn run vX.X.X @fluentui/react-utilities: $ just-scripts ts @fluentui/react-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-utilities/tsconfig.json @@ -207,21 +217,14 @@ Standard output: @fluentui/react-compose: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-compose/tsconfig.json" @fluentui/react-compose: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-compose/tsconfig.json @fluentui/react-compose: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-compose/tsconfig.json" -@fluentui/react-compose: Done in ?s. -@fluentui/react-focus: yarn run vX.X.X -@fluentui/react-focus: $ just-scripts ts -@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json -@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" -@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json -@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" -@fluentui/react-focus: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-compose: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-hooks: yarn run vX.X.X @fluentui/react-hooks: $ just-scripts ts @fluentui/react-hooks: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-hooks/tsconfig.json @fluentui/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" @fluentui/react-hooks: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-hooks/tsconfig.json @fluentui/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" -@fluentui/react-hooks: Done in ?s. +@fluentui/react-hooks: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-icons-mdl2: yarn run vX.X.X @fluentui/react-icons-mdl2: $ just-scripts ts @fluentui/react-icons-mdl2: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-icons-mdl2/tsconfig.json @@ -268,13 +271,6 @@ Standard output: @fluentui/common-styles: yarn run vX.X.X @fluentui/common-styles: $ just-scripts ts @fluentui/common-styles: Done in ?s. -@fluentui/file-type-icons: yarn run vX.X.X -@fluentui/file-type-icons: $ just-scripts ts -@fluentui/file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/file-type-icons/tsconfig.json -@fluentui/file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/file-type-icons/tsconfig.json" -@fluentui/file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/file-type-icons/tsconfig.json -@fluentui/file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/file-type-icons/tsconfig.json" -@fluentui/file-type-icons: Done in ?s. @fluentui/font-icons-mdl2: yarn run vX.X.X @fluentui/font-icons-mdl2: $ just-scripts ts @fluentui/font-icons-mdl2: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/font-icons-mdl2/tsconfig.json @@ -289,6 +285,13 @@ Standard output: @fluentui/foundation-legacy: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/foundation-legacy/tsconfig.json @fluentui/foundation-legacy: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/foundation-legacy/tsconfig.json" @fluentui/foundation-legacy: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-file-type-icons: yarn run vX.X.X +@fluentui/react-file-type-icons: $ just-scripts ts +@fluentui/react-file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-file-type-icons/tsconfig.json +@fluentui/react-file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-file-type-icons/tsconfig.json" +@fluentui/react-file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-file-type-icons/tsconfig.json +@fluentui/react-file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-file-type-icons/tsconfig.json" +@fluentui/react-file-type-icons: Done in ?s. @fluentui/react-theme-provider: yarn run vX.X.X @fluentui/react-theme-provider: $ just-scripts ts @fluentui/react-theme-provider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-theme-provider/tsconfig.json @@ -306,6 +309,9 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-builder: yarn run vX.X.X @fluentui/react-builder: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-builder: Done in ?s. +@fluentui/react-northstar-prototypes: yarn run vX.X.X +@fluentui/react-northstar-prototypes: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-northstar-prototypes: Done in ?s. @fluentui/react-avatar: yarn run vX.X.X @fluentui/react-avatar: $ just-scripts ts @fluentui/react-avatar: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-avatar/tsconfig.json @@ -327,6 +333,13 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-flex: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-flex/tsconfig.json @fluentui/react-flex: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" @fluentui/react-flex: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-focus: yarn run vX.X.X +@fluentui/react-focus: $ just-scripts ts +@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json +@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" +@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json +@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" +@fluentui/react-focus: Done in ?s. @fluentui/react-image: yarn run vX.X.X @fluentui/react-image: $ just-scripts ts @fluentui/react-image: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-image/tsconfig.json @@ -334,13 +347,6 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-image: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-image/tsconfig.json @fluentui/react-image: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" @fluentui/react-image: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -@fluentui/react-internal: yarn run vX.X.X -@fluentui/react-internal: $ just-scripts ts -@fluentui/react-internal: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-internal/tsconfig.json -@fluentui/react-internal: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" -@fluentui/react-internal: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-internal/tsconfig.json -@fluentui/react-internal: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" -@fluentui/react-internal: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-text: yarn run vX.X.X @fluentui/react-text: $ just-scripts ts @fluentui/react-text: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-text/tsconfig.json @@ -351,6 +357,16 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/docs: yarn run vX.X.X @fluentui/docs: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/docs: Done in ?s. +@fluentui/react-internal: yarn run vX.X.X +@fluentui/react-internal: $ just-scripts ts +@fluentui/react-internal: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-internal/tsconfig.json +@fluentui/react-internal: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" +@fluentui/react-internal: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-internal/tsconfig.json +@fluentui/react-internal: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" +@fluentui/react-internal: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/perf: yarn run vX.X.X +@fluentui/perf: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/perf: Done in ?s. @fluentui/react-checkbox: yarn run vX.X.X @fluentui/react-checkbox: $ just-scripts ts @fluentui/react-checkbox: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-checkbox/tsconfig.json @@ -364,7 +380,7 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-date-time: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-date-time/tsconfig.json" @fluentui/react-date-time: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-date-time/tsconfig.json @fluentui/react-date-time: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-date-time/tsconfig.json" -@fluentui/react-date-time: Done in ?s. +@fluentui/react-date-time: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-link: yarn run vX.X.X @fluentui/react-link: $ just-scripts ts @fluentui/react-link: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-link/tsconfig.json @@ -385,7 +401,7 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-tabs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" @fluentui/react-tabs: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-tabs/tsconfig.json @fluentui/react-tabs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" -@fluentui/react-tabs: Done in ?s. +@fluentui/react-tabs: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-toggle: yarn run vX.X.X @fluentui/react-toggle: $ just-scripts ts @fluentui/react-toggle: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-toggle/tsconfig.json @@ -393,9 +409,6 @@ codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli @fluentui/react-toggle: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-toggle/tsconfig.json @fluentui/react-toggle: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" @fluentui/react-toggle: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -@fluentui/perf: yarn run vX.X.X -@fluentui/perf: $ /office-ui-fabric-react/node_modules/.bin/just ts -@fluentui/perf: Done in ?s. @fluentui/react: yarn run vX.X.X @fluentui/react: $ just-scripts ts @fluentui/react: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react/tsconfig.json @@ -409,7 +422,7 @@ a11y-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/types a11y-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/a11y-tests/tsconfig.json" a11y-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/a11y-tests/tsconfig.json a11y-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/a11y-tests/tsconfig.json" -a11y-tests: Done in ?s. +a11y-tests: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. codesandbox-react-template: yarn run vX.X.X codesandbox-react-template: $ just-scripts ts codesandbox-react-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-template/tsconfig.json @@ -430,7 +443,7 @@ server-rendered-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modu server-rendered-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/server-rendered-app/tsconfig.json" server-rendered-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/server-rendered-app/tsconfig.json server-rendered-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/server-rendered-app/tsconfig.json" -server-rendered-app: Done in ?s. +server-rendered-app: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. test-bundles: yarn run vX.X.X test-bundles: $ just-scripts ts test-bundles: Done in ?s. @@ -447,7 +460,7 @@ todo-app: Done in ?s. @fluentui/azure-themes: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/azure-themes/tsconfig.json" @fluentui/azure-themes: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/azure-themes/tsconfig.json @fluentui/azure-themes: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/azure-themes/tsconfig.json" -@fluentui/azure-themes: Done in ?s. +@fluentui/azure-themes: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-cards: yarn run vX.X.X @fluentui/react-cards: $ just-scripts ts @fluentui/react-cards: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-cards/tsconfig.json @@ -461,7 +474,7 @@ todo-app: Done in ?s. @fluentui/react-charting: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-charting/tsconfig.json" @fluentui/react-charting: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-charting/tsconfig.json @fluentui/react-charting: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-charting/tsconfig.json" -@fluentui/react-charting: Done in ?s. +@fluentui/react-charting: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-experiments: yarn run vX.X.X @fluentui/react-experiments: $ just-scripts ts @fluentui/react-experiments: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-experiments/tsconfig.json @@ -476,20 +489,13 @@ todo-app: Done in ?s. @fluentui/react-monaco-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-monaco-editor/tsconfig.json @fluentui/react-monaco-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-monaco-editor/tsconfig.json" @fluentui/react-monaco-editor: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -@fluentui/react-next: yarn run vX.X.X -@fluentui/react-next: $ just-scripts ts -@fluentui/react-next: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-next/tsconfig.json -@fluentui/react-next: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-next/tsconfig.json" -@fluentui/react-next: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-next/tsconfig.json -@fluentui/react-next: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-next/tsconfig.json" -@fluentui/react-next: Done in ?s. @fluentui/theme-samples: yarn run vX.X.X @fluentui/theme-samples: $ just-scripts ts @fluentui/theme-samples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme-samples/tsconfig.json @fluentui/theme-samples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/theme-samples/tsconfig.json" @fluentui/theme-samples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme-samples/tsconfig.json @fluentui/theme-samples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/theme-samples/tsconfig.json" -@fluentui/theme-samples: Done in ?s. +@fluentui/theme-samples: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/e2e: yarn run vX.X.X @fluentui/e2e: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/e2e: Done in ?s. @@ -514,20 +520,13 @@ todo-app: Done in ?s. @fluentui/react-docsite-components: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-docsite-components/tsconfig.json @fluentui/react-docsite-components: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-docsite-components/tsconfig.json" @fluentui/react-docsite-components: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -codesandbox-react-next-template: yarn run vX.X.X -codesandbox-react-next-template: $ just-scripts ts -codesandbox-react-next-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json -codesandbox-react-next-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json" -codesandbox-react-next-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json -codesandbox-react-next-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json" -codesandbox-react-next-template: Done in ?s. @fluentui/storybook: yarn run vX.X.X @fluentui/storybook: $ just-scripts ts @fluentui/storybook: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/storybook/tsconfig.json @fluentui/storybook: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/storybook/tsconfig.json" @fluentui/storybook: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/storybook/tsconfig.json @fluentui/storybook: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/storybook/tsconfig.json" -@fluentui/storybook: Done in ?s. +@fluentui/storybook: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. dom-tests: yarn run vX.X.X dom-tests: $ just-scripts ts dom-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/dom-tests/tsconfig.json @@ -548,7 +547,7 @@ vr-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescr vr-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" vr-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/vr-tests/tsconfig.json vr-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" -vr-tests: Done in ?s. +vr-tests: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-examples: yarn run vX.X.X @fluentui/react-examples: $ just-scripts ts @fluentui/react-examples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-examples/tsconfig.json @@ -562,7 +561,7 @@ vr-tests: Done in ?s. @fluentui/public-docsite-resources: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/public-docsite-resources/tsconfig.json" @fluentui/public-docsite-resources: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/public-docsite-resources/tsconfig.json @fluentui/public-docsite-resources: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/public-docsite-resources/tsconfig.json" -@fluentui/public-docsite-resources: Done in ?s. +@fluentui/public-docsite-resources: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/public-docsite: yarn run vX.X.X @fluentui/public-docsite: $ just-scripts ts @fluentui/public-docsite: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/public-docsite/tsconfig.json @@ -577,6 +576,8 @@ ssr-tests: Done in ?s. Standard error: +@fluentui/cra-template: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/cra-template: [XX:XX:XX XM] x Command not defined: ts @fluentui/eslint-plugin: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/eslint-plugin: [XX:XX:XX XM] x Command not defined: ts @fluentui/noop: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @@ -593,24 +594,16 @@ Standard error: @fluentui/scripts: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/scripts: at ChildProcess.emit (events.js:314:20) @fluentui/scripts: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/scripts: at maybeClose (internal/child_process.js:1021:16) -@fluentui/scripts: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/scripts: at maybeClose (internal/child_process.js:1022:16) +@fluentui/scripts: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/scripts: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/scripts: [XX:XX:XX XM] x stdout: @fluentui/scripts: [XX:XX:XX XM] x gulp/plugins/gulp-component-menu-behaviors.ts:1:38 - error TS2307: Cannot find module '@fluentui/a11y-testing' or its corresponding type declarations. @fluentui/scripts: 1 import * as behaviorDefinitions from '@fluentui/a11y-testing'; @fluentui/scripts: ~~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/scripts: gulp/plugins/util/getComponentInfo.ts:145:9 - error TS2322: Type 'Tag[]' is not assignable to type '{ title: string; description: string; type: null; name: string; }[]'. -@fluentui/scripts: Type 'Tag' is not assignable to type '{ title: string; description: string; type: null; name: string; }'. -@fluentui/scripts: Types of property 'type' are incompatible. -@fluentui/scripts: Type 'Type' is not assignable to type 'null'. -@fluentui/scripts: Type 'AllLiteral' is not assignable to type 'null'. -@fluentui/scripts: 145 tags, -@fluentui/scripts: ~~~~ -@fluentui/scripts: gulp/plugins/util/docs-types.ts:49:3 -@fluentui/scripts: 49 tags: { -@fluentui/scripts: ~~~~ -@fluentui/scripts: The expected type comes from property 'tags' which is declared here on type 'ComponentProp' +@fluentui/scripts: gulp/plugins/gulp-doctoc.ts:13:56 - error TS2554: Expected 1-2 arguments, but got 3. +@fluentui/scripts: 13 .then(() => runPrettier([file.path], false, true)) +@fluentui/scripts: ~~~~ @fluentui/scripts: gulp/plugins/util/tsLanguageService.ts:25:18 - error TS2569: Type 'IterableIterator' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. @fluentui/scripts: 25 return [...files.keys()]; @fluentui/scripts: ~~~~~~~~~~~~ @@ -633,15 +626,18 @@ Standard error: @fluentui/scripts: publish-beta.js:21:43 - error TS1212: Identifier expected. 'package' is a reserved word in strict mode. @fluentui/scripts: 21 console.log(`Publishing ${chalk.magenta(package.packageName)} in ${packagePath}`); @fluentui/scripts: ~~~~~~~ -@fluentui/scripts: tasks/webpack.ts:43:9 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? -@fluentui/scripts: 43 resolve(); +@fluentui/scripts: tasks/prettier.ts:4:39 - error TS2559: Type 'true' has no properties in common with type '{ runAsync?: boolean; nonRecursive?: boolean; check?: boolean; }'. +@fluentui/scripts: 4 runPrettierForFolder(process.cwd(), true); +@fluentui/scripts: ~~~~ +@fluentui/scripts: tasks/webpack.ts:67:9 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? +@fluentui/scripts: 67 resolve(); @fluentui/scripts: ~~~~~~~~~ @fluentui/scripts: ../node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34 @fluentui/scripts: 33 new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; @fluentui/scripts: ~~~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/scripts: An argument for 'value' was not provided. -@fluentui/scripts: tasks/webpack.ts:61:7 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? -@fluentui/scripts: 61 resolve(); +@fluentui/scripts: tasks/webpack.ts:85:7 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? +@fluentui/scripts: 85 resolve(); @fluentui/scripts: ~~~~~~~~~ @fluentui/scripts: ../node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34 @fluentui/scripts: 33 new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; @@ -653,29 +649,332 @@ Standard error: @fluentui/scripts: update-package-versions.js:47:12 - error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. @fluentui/scripts: 47 function updateDependencies(deps) { @fluentui/scripts: ~~~~~~~~~~~~~~~~~~ -@fluentui/scripts: Found 12 errors. +@fluentui/scripts: Found 13 errors. @fluentui/scripts: [XX:XX:XX XM] x ------------------------------------ @fluentui/scripts: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/scripts: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/scripts: error Command failed with exit code 1. +@fluentui/a11y-testing: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/a11y-testing: [XX:XX:XX XM] x ------------------------------------ +@fluentui/a11y-testing: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/a11y-testing/tsconfig.json" +@fluentui/a11y-testing: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/a11y-testing: at ChildProcess.emit (events.js:314:20) +@fluentui/a11y-testing: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/a11y-testing: at maybeClose (internal/child_process.js:1022:16) +@fluentui/a11y-testing: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/a11y-testing: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/a11y-testing: [XX:XX:XX XM] x stdout: +@fluentui/a11y-testing: [XX:XX:XX XM] x src/definitions/Button/toggleButtonBehaviorDefinition.ts:13:3 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/a11y-testing: 13 ...buttonBehaviorDefinition, +@fluentui/a11y-testing: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/a11y-testing: Found 1 error. +@fluentui/a11y-testing: [XX:XX:XX XM] x ------------------------------------ +@fluentui/a11y-testing: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/a11y-testing: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/a11y-testing: error Command failed with exit code 1. +@fluentui/codemods: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/codemods: [XX:XX:XX XM] x ------------------------------------ +@fluentui/codemods: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/codemods/tsconfig.json" +@fluentui/codemods: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/codemods: at ChildProcess.emit (events.js:314:20) +@fluentui/codemods: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/codemods: at maybeClose (internal/child_process.js:1022:16) +@fluentui/codemods: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/codemods: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/codemods: [XX:XX:XX XM] x stdout: +@fluentui/codemods: [XX:XX:XX XM] x src/codeMods/mods/configMod/configMod.mod.ts:52:5 - error TS2322: Type '(file: SourceFile) => CodeModResult | Err, { error: any; }>' is not assignable to type '(file: SourceFile) => CodeModResult'. +@fluentui/codemods: Type 'CodeModResult | Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 52 run: (file: SourceFile) => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: src/codeMods/mods/configMod/configMod.mod.ts:70:3 - error TS2322: Type '(mod: RenamePropModType) => (file: SourceFile) => Ok<{ logs: string[]; }, NoOp | ModError> | Err, { ...; }>' is not assignable to type '(mod: any) => (file: SourceFile) => CodeModResult'. +@fluentui/codemods: Call signature return types '(file: SourceFile) => Ok<{ logs: string[]; }, NoOp | ModError> | Err, { ...; }>' and '(file: SourceFile) => CodeModResult' are incompatible. +@fluentui/codemods: Type 'Ok<{ logs: string[]; }, NoOp | ModError> | Err, { logs: string[]; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 70 renameProp: (mod: RenamePropModType) => { +@fluentui/codemods: ~~~~~~~~~~ +@fluentui/codemods: src/codeMods/types.ts:85:3 +@fluentui/codemods: 85 [key: string]: (mod: any) => (file: SourceFile) => CodeModResult; +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: The expected type comes from this index signature. +@fluentui/codemods: src/codeMods/mods/configMod/configMod.mod.ts:109:41 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/codemods: 109 return Ok({ logs: v.logs.concat(...r.logs) }); +@fluentui/codemods: ~~~~~~~~~ +@fluentui/codemods: src/codeMods/mods/configMod/configMod.mod.ts:128:3 - error TS2322: Type '(file: SourceFile) => CodeModResult | Err, { logs: string[]; }>' is not assignable to type '(file: SourceFile) => CodeModResult'. +@fluentui/codemods: Type 'CodeModResult | Err, { logs: string[]; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 128 run: (file: SourceFile) => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: src/codeMods/mods/configMod/configMod.mod.ts:147:27 - error TS2345: Argument of type '(result: CodeModResult, result2: CodeModResult) => Result<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to parameter of type '(previousValue: CodeModResult, currentValue: CodeModResult, currentIndex: number, array: CodeModResult[]) => CodeModResult'. +@fluentui/codemods: Type 'Result<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'Err'. +@fluentui/codemods: Type '{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>' is not assignable to type 'ModResult'. +@fluentui/codemods: Property 'logs' is missing in type 'Ok<{ logs: string[]; }, NoOp | ModError>' but required in type 'ModResult'. +@fluentui/codemods: 147 return results.reduce(combineResults); +@fluentui/codemods: ~~~~~~~~~~~~~~ +@fluentui/codemods: src/codeMods/types.ts:5:3 +@fluentui/codemods: 5 logs: string[]; +@fluentui/codemods: ~~~~ +@fluentui/codemods: 'logs' is declared here. +@fluentui/codemods: src/codeMods/mods/officeToFluentImport/officeToFluentImport.mod.ts:26:3 - error TS2322: Type '(file: SourceFile) => Result, NoOp | ModError>' is not assignable to type '(file: SourceFile) => CodeModResult'. +@fluentui/codemods: Type 'Result, NoOp | ModError>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, NoOp | ModError>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, NoOp | ModError>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 26 run: (file: SourceFile) => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: src/codeMods/mods/officeToFluentImport/officeToFluentImport.mod.ts:37:27 - error TS2345: Argument of type '(result: CodeModResult, result2: CodeModResult) => Result<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to parameter of type '(previousValue: Result<{ logs: string[]; }, NoOp | ModError>, currentValue: Result<{ logs: string[]; }, NoOp | ModError>, currentIndex: number, array: Result<...>[]) => Result<...>'. +@fluentui/codemods: Type 'Result<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'Result<{ logs: string[]; }, NoOp | ModError>'. +@fluentui/codemods: Type 'Err<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'Result<{ logs: string[]; }, NoOp | ModError>'. +@fluentui/codemods: Type 'Err<{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>, NoOp | ModError>' is not assignable to type 'Err<{ logs: string[]; }, NoOp | ModError>'. +@fluentui/codemods: Type '{ logs: string[]; } | Result<{ logs: string[]; }, NoOp | ModError>' is not assignable to type '{ logs: string[]; }'. +@fluentui/codemods: Property 'logs' is missing in type 'Ok<{ logs: string[]; }, NoOp | ModError>' but required in type '{ logs: string[]; }'. +@fluentui/codemods: 37 return v.reduce(combineResults); +@fluentui/codemods: ~~~~~~~~~~~~~~ +@fluentui/codemods: src/codeMods/mods/officeToFluentImport/officeToFluentImport.mod.ts:31:13 +@fluentui/codemods: 31 logs: [i.getModuleSpecifierValue()], +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: 'logs' is declared here. +@fluentui/codemods: src/codeMods/mods/oldToNewButton/oldToNewButton.mod.ts:7:3 - error TS2322: Type '(file: SourceFile) => Result<{ logs: string[]; }, NoOp> | Err, { error: any; }>' is not assignable to type '(file: SourceFile) => CodeModResult'. +@fluentui/codemods: Type 'Result<{ logs: string[]; }, NoOp> | Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 7 run: (file: SourceFile) => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: src/codeMods/mods/personaToAvatar/personaToAvatar.mod.ts:165:3 - error TS2322: Type '(file: SourceFile) => Err, { error: any; }> | Ok<{ logs: string[]; }, NoOp | ModError>' is not assignable to type '(file: SourceFile) => CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }> | Ok<{ logs: string[]; }, NoOp | ModError>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 165 run: (file: SourceFile) => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: src/codeMods/utilities/imports.ts:12:5 - error TS2322: Type 'Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Property 'logs' is missing in type 'Err' but required in type 'ModResult'. +@fluentui/codemods: 12 return Err({ logs: ['No matching imports could be found.'] }); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: src/codeMods/types.ts:5:3 +@fluentui/codemods: 5 logs: string[]; +@fluentui/codemods: ~~~~ +@fluentui/codemods: 'logs' is declared here. +@fluentui/codemods: src/codeMods/utilities/imports.ts:73:3 - error TS2322: Type 'Err, { logs: string[]; }>' is not assignable to type 'ModFunctionResult'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ImportDeclaration | Result' is not assignable to type 'ImportDeclaration'. +@fluentui/codemods: Type 'Err' is missing the following properties from type 'ImportDeclaration': setModuleSpecifier, getModuleSpecifier, getModuleSpecifierValue, getModuleSpecifierSourceFileOrThrow, and 133 more. +@fluentui/codemods: 73 return Err({ logs: ['Named import is not present in module'] }); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: src/codeMods/utilities/transforms.ts:42:3 - error TS2322: Type '(element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, toRename: string, replacementName: string) => Ok | Err, { logs: string[]; }>' is not assignable to type 'PropTransform'. +@fluentui/codemods: Type 'Ok | Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'string | Result' is not assignable to type 'string'. +@fluentui/codemods: Type 'Err' is not assignable to type 'string'. +@fluentui/codemods: 42 return ( +@fluentui/codemods: ~~~~~~~~ +@fluentui/codemods: 43 element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: ... +@fluentui/codemods: 66 return Ok('No transform args applied, no changes made.'); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: 67 }; +@fluentui/codemods: ~~~~ +@fluentui/codemods: src/codeMods/utilities/transforms.ts:73:3 - error TS2322: Type '(element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, toRename: string, replacementName: string) => Ok | Err, { logs: string[]; }>' is not assignable to type 'PropTransform'. +@fluentui/codemods: Type 'Ok | Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'string | Result' is not assignable to type 'string'. +@fluentui/codemods: Type 'Err' is not assignable to type 'string'. +@fluentui/codemods: 73 return ( +@fluentui/codemods: ~~~~~~~~ +@fluentui/codemods: 74 element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: ... +@fluentui/codemods: 97 return Ok('No transform args applied, no changes made.'); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: 98 }; +@fluentui/codemods: ~~~~ +@fluentui/codemods: src/codeMods/utilities/transforms.ts:104:3 - error TS2322: Type '(element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, toRename: string, replacementName: string) => Ok | Err, { logs: string[]; }>' is not assignable to type 'PropTransform'. +@fluentui/codemods: Type 'Ok | Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'string | Result' is not assignable to type 'string'. +@fluentui/codemods: Type 'Err' is not assignable to type 'string'. +@fluentui/codemods: 104 return ( +@fluentui/codemods: ~~~~~~~~ +@fluentui/codemods: 105 element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: ... +@fluentui/codemods: 128 return Ok('No transform args applied, no changes made.'); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: 129 }; +@fluentui/codemods: ~~~~ +@fluentui/codemods: src/codeMods/utilities/transforms.ts:136:3 - error TS2322: Type '(element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, toRename: string, replacementName: string) => Ok | Err, { logs: string[]; }>' is not assignable to type 'PropTransform'. +@fluentui/codemods: Type 'Ok | Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { logs: string[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'string | Result' is not assignable to type 'string'. +@fluentui/codemods: Type 'Err' is not assignable to type 'string'. +@fluentui/codemods: 136 return ( +@fluentui/codemods: ~~~~~~~~ +@fluentui/codemods: 137 element: JsxExpression | JsxOpeningElement | JsxSelfClosingElement, +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: ... +@fluentui/codemods: 154 } +@fluentui/codemods: ~~~~~ +@fluentui/codemods: 155 }; +@fluentui/codemods: ~~~~ +@fluentui/codemods: src/command.ts:120:5 - error TS2322: Type 'Err, { error: Error; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { error: Error; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModRunnerConfigType | Result' is not assignable to type 'ModRunnerConfigType'. +@fluentui/codemods: Type 'Err' is missing the following properties from type 'ModRunnerConfigType': stringFilters, regexFilters, includeMods +@fluentui/codemods: 120 return Err({ error: new Error('Error, could not locate correct config file.') }); +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: src/helpers/tests/result.test.ts:23:24 - error TS2322: Type 'Err, number>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, number>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'number | Result' is not assignable to type 'number'. +@fluentui/codemods: Type 'Err' is not assignable to type 'number'. +@fluentui/codemods: 23 .errChain(v => Err(7)) +@fluentui/codemods: ~~~~~~ +@fluentui/codemods: src/helpers/result.ts:44:46 +@fluentui/codemods: 44 public errChain(this: Result, fn: (v: E) => Result): Result { +@fluentui/codemods: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/codemods: The expected type comes from the return type of this signature. +@fluentui/codemods: src/modRunner/runnerUtilities.ts:28:9 - error TS2345: Argument of type '(err: NoOp | ModError) => Err, { modName: string; error: string | Error; }> | Ok<...>' is not assignable to parameter of type '(v: NoOp | ModError) => Result'. +@fluentui/codemods: Type 'Err, { modName: string; error: string | Error; }> | Ok<{ logs: string[]; modName: string; }, ErrorResult>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { modName: string; error: string | Error; }>' is not assignable to type 'Result'. +@fluentui/codemods: Type 'Err, { modName: string; error: string | Error; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'RunResult | Result' is not assignable to type 'RunResult'. +@fluentui/codemods: Type 'Err' is missing the following properties from type 'RunResult': modName, logs +@fluentui/codemods: 28 err => { +@fluentui/codemods: ~~~~~~~~ +@fluentui/codemods: src/modRunner/runnerUtilities.ts:52:5 - error TS2322: Type 'Err, { error: any; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { error: any; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Property 'logs' is missing in type 'Err' but required in type 'ModResult'. +@fluentui/codemods: 52 result = Err({ error: e }); +@fluentui/codemods: ~~~~~~ +@fluentui/codemods: src/codeMods/types.ts:5:3 +@fluentui/codemods: 5 logs: string[]; +@fluentui/codemods: ~~~~ +@fluentui/codemods: 'logs' is declared here. +@fluentui/codemods: src/modRunner/tests/mocks/MockMods/CodeMod.mock.ts:4:3 - error TS2322: Type '() => Err, { reason: number; logs: never[]; }>' is not assignable to type '(file: string) => CodeModResult'. +@fluentui/codemods: Type 'Err, { reason: number; logs: never[]; }>' is not assignable to type 'CodeModResult'. +@fluentui/codemods: Type 'Err, { reason: number; logs: never[]; }>' is not assignable to type 'Err'. +@fluentui/codemods: Type 'ModResult | Result' is not assignable to type 'ModResult'. +@fluentui/codemods: Type 'Err' is not assignable to type 'ModResult'. +@fluentui/codemods: 4 run: () => { +@fluentui/codemods: ~~~ +@fluentui/codemods: src/codeMods/types.ts:34:3 +@fluentui/codemods: 34 run: (file: T) => CodeModResult; +@fluentui/codemods: ~~~ +@fluentui/codemods: The expected type comes from property 'run' which is declared here on type 'CodeMod' +@fluentui/codemods: Found 20 errors. +@fluentui/codemods: [XX:XX:XX XM] x ------------------------------------ +@fluentui/codemods: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/codemods: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/codemods: error Command failed with exit code 1. +@fluentui/example-data: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/example-data: [XX:XX:XX XM] x ------------------------------------ +@fluentui/example-data: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" +@fluentui/example-data: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/example-data: at ChildProcess.emit (events.js:314:20) +@fluentui/example-data: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/example-data: at maybeClose (internal/child_process.js:1022:16) +@fluentui/example-data: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/example-data: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/example-data: [XX:XX:XX XM] x stdout: +@fluentui/example-data: [XX:XX:XX XM] x src/lorem.ts:11:11 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/example-data: 11 return [...Array(wordCount)] +@fluentui/example-data: ~~~~~~~~~~~~~~~~~~~ +@fluentui/example-data: Found 1 error. +@fluentui/example-data: [XX:XX:XX XM] x ------------------------------------ +@fluentui/example-data: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/example-data: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/example-data: error Command failed with exit code 1. +@fluentui/react-conformance: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-conformance: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-conformance: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-conformance/tsconfig.json" +@fluentui/react-conformance: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-conformance: at ChildProcess.emit (events.js:314:20) +@fluentui/react-conformance: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-conformance: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-conformance: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-conformance: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-conformance: [XX:XX:XX XM] x stdout: +@fluentui/react-conformance: [XX:XX:XX XM] x src/utils/getComponent.ts:25:33 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-conformance: 25 const helperComponentNames = [...helperComponents, ...(wrapperComponent ? [wrapperComponent] : [])].map( +@fluentui/react-conformance: ~~~~~~~~~~~~~~~~~~~ +@fluentui/react-conformance: Found 1 error. +@fluentui/react-conformance: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-conformance: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-conformance: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-conformance: error Command failed with exit code 1. @fluentui/webpack-utilities: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/webpack-utilities: [XX:XX:XX XM] x ------------------------------------ @fluentui/webpack-utilities: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/webpack-utilities/tsconfig.json" @fluentui/webpack-utilities: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/webpack-utilities: at ChildProcess.emit (events.js:314:20) @fluentui/webpack-utilities: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/webpack-utilities: at maybeClose (internal/child_process.js:1021:16) -@fluentui/webpack-utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/webpack-utilities: at maybeClose (internal/child_process.js:1022:16) +@fluentui/webpack-utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/webpack-utilities: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/webpack-utilities: [XX:XX:XX XM] x stdout: -@fluentui/webpack-utilities: [XX:XX:XX XM] x src/fabricAsyncLoaderInclude.ts:7:1 - error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. +@fluentui/webpack-utilities: [XX:XX:XX XM] x src/fabricAsyncLoader.ts:19:13 - error TS2769: No overload matches this call. +@fluentui/webpack-utilities: Overload 1 of 2, '(predicate: (value: `/* ${string}: ${string} */` | null, index: number, array: (`/* ${string}: ${string} */` | null)[]) => value is `/* ${string}: ${string} */` | null, thisArg?: any): (`/* ${string}: ${string} */` | null)[]', gave the following error. +@fluentui/webpack-utilities: Argument of type '(s: string) => string' is not assignable to parameter of type '(value: `/* ${string}: ${string} */` | null, index: number, array: (`/* ${string}: ${string} */` | null)[]) => value is `/* ${string}: ${string} */` | null'. +@fluentui/webpack-utilities: Types of parameters 's' and 'value' are incompatible. +@fluentui/webpack-utilities: Type '`/* ${string}: ${string} */` | null' is not assignable to type 'string'. +@fluentui/webpack-utilities: Type 'null' is not assignable to type 'string'. +@fluentui/webpack-utilities: Overload 2 of 2, '(predicate: (value: `/* ${string}: ${string} */` | null, index: number, array: (`/* ${string}: ${string} */` | null)[]) => unknown, thisArg?: any): (`/* ${string}: ${string} */` | null)[]', gave the following error. +@fluentui/webpack-utilities: Argument of type '(s: string) => string' is not assignable to parameter of type '(value: `/* ${string}: ${string} */` | null, index: number, array: (`/* ${string}: ${string} */` | null)[]) => unknown'. +@fluentui/webpack-utilities: Types of parameters 's' and 'value' are incompatible. +@fluentui/webpack-utilities: Type '`/* ${string}: ${string} */` | null' is not assignable to type 'string'. +@fluentui/webpack-utilities: Type 'null' is not assignable to type 'string'. +@fluentui/webpack-utilities: 19 .filter((s: string) => s) +@fluentui/webpack-utilities: ~~~~~~~~~~~~~~~~ +@fluentui/webpack-utilities: src/fabricAsyncLoaderInclude.ts:7:1 - error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. @fluentui/webpack-utilities: 7 export = (input: string) => @fluentui/webpack-utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/webpack-utilities: 8 input.match(/@fluentui[\\/]react-internal[\\/]lib[\\/]components[\\/]ContextualMenu[\\/]ContextualMenu.js/) || @fluentui/webpack-utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/webpack-utilities: 9 input.match(/@fluentui[\\/]react-internal[\\/]lib[\\/]components[\\/]Callout[\\/]Callout.js/); @fluentui/webpack-utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/webpack-utilities: Found 1 error. +@fluentui/webpack-utilities: Found 2 errors. @fluentui/webpack-utilities: [XX:XX:XX XM] x ------------------------------------ @fluentui/webpack-utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/webpack-utilities: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @@ -698,26 +997,108 @@ Standard error: @fluentui/styles: [XX:XX:XX XM] x Command not defined: ts @fluentui/accessibility: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/accessibility: [XX:XX:XX XM] x Command not defined: ts -@fluentui/merge-styles: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/date-time-utilities: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/date-time-utilities: [XX:XX:XX XM] x ------------------------------------ +@fluentui/date-time-utilities: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/date-time-utilities/tsconfig.json" +@fluentui/date-time-utilities: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/date-time-utilities: at ChildProcess.emit (events.js:314:20) +@fluentui/date-time-utilities: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/date-time-utilities: at maybeClose (internal/child_process.js:1022:16) +@fluentui/date-time-utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/date-time-utilities: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/date-time-utilities: [XX:XX:XX XM] x stdout: +@fluentui/date-time-utilities: [XX:XX:XX XM] x src/dateGrid/getBoundedDateRange.ts:10:27 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/date-time-utilities: 10 let boundedDateRange = [...dateRange]; +@fluentui/date-time-utilities: ~~~~~~~~~~~~ +@fluentui/date-time-utilities: Found 1 error. +@fluentui/date-time-utilities: [XX:XX:XX XM] x ------------------------------------ +@fluentui/date-time-utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/date-time-utilities: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/date-time-utilities: error Command failed with exit code 1. +@fluentui/dom-utilities: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/dom-utilities: [XX:XX:XX XM] x ------------------------------------ +@fluentui/dom-utilities: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/dom-utilities/tsconfig.json" +@fluentui/dom-utilities: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/dom-utilities: at ChildProcess.emit (events.js:314:20) +@fluentui/dom-utilities: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/dom-utilities: at maybeClose (internal/child_process.js:1022:16) +@fluentui/dom-utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/dom-utilities: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/dom-utilities: [XX:XX:XX XM] x stdout: +@fluentui/dom-utilities: [XX:XX:XX XM] x src/getChildren.ts:16:21 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/dom-utilities: 16 children.push(...parent._virtual.children); +@fluentui/dom-utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/dom-utilities: Found 1 error. +@fluentui/dom-utilities: [XX:XX:XX XM] x ------------------------------------ +@fluentui/dom-utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/dom-utilities: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/dom-utilities: error Command failed with exit code 1. +@fluentui/make-styles: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/make-styles: [XX:XX:XX XM] x ------------------------------------ +@fluentui/make-styles: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/make-styles/tsconfig.json" +@fluentui/make-styles: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/make-styles: at ChildProcess.emit (events.js:314:20) +@fluentui/make-styles: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/make-styles: at maybeClose (internal/child_process.js:1022:16) +@fluentui/make-styles: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/make-styles: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/make-styles: [XX:XX:XX XM] x stdout: +@fluentui/make-styles: [XX:XX:XX XM] x src/runtime/compileCSS.ts:44:7 - error TS2322: Type '`@media ${string} { ${string}${string} { ${string}: ${string}; } }` | `@media ${string} { ${string}${string} { ${string}: ${number}; } }`' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type '`@media ${string} { ${string}${string} { ${string}: ${string}; } }`' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type 'string' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type '`@media ${string} { ${string}${string} { ${string}: ${string}; } }`' is not assignable to type '`${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: 44 cssRule = `@media ${media} { ${cssRule} }`; +@fluentui/make-styles: ~~~~~~~ +@fluentui/make-styles: src/runtime/compileCSS.ts:48:7 - error TS2322: Type '`@supports ${string} { ${string}${string} { ${string}: ${string}; } }` | `@supports ${string} { ${string}${string} { ${string}: ${number}; } }`' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type '`@supports ${string} { ${string}${string} { ${string}: ${string}; } }`' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type 'string' is not assignable to type '`${string}${string} { ${string}: ${string}; }` | `${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: Type '`@supports ${string} { ${string}${string} { ${string}: ${string}; } }`' is not assignable to type '`${string}${string} { ${string}: ${number}; }`'. +@fluentui/make-styles: 48 cssRule = `@supports ${support} { ${cssRule} }`; +@fluentui/make-styles: ~~~~~~~ +@fluentui/make-styles: Found 2 errors. +@fluentui/make-styles: [XX:XX:XX XM] x ------------------------------------ +@fluentui/make-styles: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/make-styles: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/make-styles: error Command failed with exit code 1. +@fluentui/merge-styles: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/merge-styles: [XX:XX:XX XM] x ------------------------------------ -@fluentui/merge-styles: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" +@fluentui/merge-styles: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" @fluentui/merge-styles: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/merge-styles: at ChildProcess.emit (events.js:314:20) @fluentui/merge-styles: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/merge-styles: at maybeClose (internal/child_process.js:1021:16) -@fluentui/merge-styles: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/merge-styles: at maybeClose (internal/child_process.js:1022:16) +@fluentui/merge-styles: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/merge-styles: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/merge-styles: [XX:XX:XX XM] x stdout: -@fluentui/merge-styles: [XX:XX:XX XM] x src/mergeStyleSets.test.ts:168:15 - error TS2310: Type 'ISubComponentStyles' recursively references itself as a base type. +@fluentui/merge-styles: [XX:XX:XX XM] x src/concatStyleSets.ts:167:9 - error TS2322: Type '(styleProps: any) => IConcatenatedStyleSet' is not assignable to type 'IStyleFunction'. +@fluentui/merge-styles: Type 'IConcatenatedStyleSet' is not assignable to type 'DeepPartial'. +@fluentui/merge-styles: Property 'subComponentStyles' is incompatible with index signature. +@fluentui/merge-styles: Type '{ [x: string]: IStyleFunction; }' is missing the following properties from type 'DeepPartial[]': length, pop, push, concat, and 16 more. +@fluentui/merge-styles: 167 mergedSubStyles[subCompProp] = (styleProps: any) => { +@fluentui/merge-styles: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/merge-styles: src/mergeStyleSets.test.ts:168:15 - error TS2310: Type 'ISubComponentStyles' recursively references itself as a base type. @fluentui/merge-styles: 168 interface ISubComponentStyles extends IStyleSet { @fluentui/merge-styles: ~~~~~~~~~~~~~~~~~~~ @fluentui/merge-styles: src/mergeStyleSets.test.ts:176:15 - error TS2310: Type 'IStyles' recursively references itself as a base type. @fluentui/merge-styles: 176 interface IStyles extends IStyleSet { @fluentui/merge-styles: ~~~~~~~ -@fluentui/merge-styles: Found 2 errors. +@fluentui/merge-styles: src/mergeStyleSets.test.ts:183:15 - error TS2430: Interface 'IStylesWithStyleObjectAsSubCommponent' incorrectly extends interface 'IStyleSet'. +@fluentui/merge-styles: Type 'IStylesWithStyleObjectAsSubCommponent' is not assignable to type '{ subComponentStyles?: { button: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/merge-styles: The types of 'subComponentStyles.button' are incompatible between these types. +@fluentui/merge-styles: Type 'Partial>' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/merge-styles: Type 'Partial>' is not assignable to type 'DeepPartial'. +@fluentui/merge-styles: Property 'root' is incompatible with index signature. +@fluentui/merge-styles: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/merge-styles: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/merge-styles: 183 interface IStylesWithStyleObjectAsSubCommponent extends IStyleSet { +@fluentui/merge-styles: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/merge-styles: src/styleToClassName.ts:302:53 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/merge-styles: 302 const registration = styleToRegistration(options, ...args); +@fluentui/merge-styles: ~~~~~~~ +@fluentui/merge-styles: Found 5 errors. @fluentui/merge-styles: [XX:XX:XX XM] x ------------------------------------ @fluentui/merge-styles: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/merge-styles: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/merge-styles: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/merge-styles: error Command failed with exit code 1. @fluentui/react-northstar-styles-renderer: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/react-northstar-styles-renderer: [XX:XX:XX XM] x Command not defined: ts @@ -725,6 +1106,24 @@ Standard error: @fluentui/react-northstar-emotion-renderer: [XX:XX:XX XM] x Command not defined: ts @fluentui/react-northstar-fela-renderer: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/react-northstar-fela-renderer: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-stylesheets: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-stylesheets: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-stylesheets: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-stylesheets/tsconfig.json" +@fluentui/react-stylesheets: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-stylesheets: at ChildProcess.emit (events.js:314:20) +@fluentui/react-stylesheets: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-stylesheets: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-stylesheets: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-stylesheets: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-stylesheets: [XX:XX:XX XM] x stdout: +@fluentui/react-stylesheets: [XX:XX:XX XM] x src/StylesheetProvider.test.tsx:43:21 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-stylesheets: 43 result.push(...sheets); +@fluentui/react-stylesheets: ~~~~~~~~~ +@fluentui/react-stylesheets: Found 1 error. +@fluentui/react-stylesheets: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-stylesheets: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-stylesheets: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-stylesheets: error Command failed with exit code 1. @fluentui/react-bindings: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/react-bindings: [XX:XX:XX XM] x Command not defined: ts @fluentui/utilities: [XX:XX:XX XM] x Error detected while running 'ts:esm' @@ -733,16 +1132,16 @@ Standard error: @fluentui/utilities: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/utilities: at ChildProcess.emit (events.js:314:20) @fluentui/utilities: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/utilities: at maybeClose (internal/child_process.js:1021:16) -@fluentui/utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/utilities: at maybeClose (internal/child_process.js:1022:16) +@fluentui/utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/utilities: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/utilities: [XX:XX:XX XM] x stdout: @fluentui/utilities: [XX:XX:XX XM] x src/AutoScroll.ts:143:14 - error TS2790: The operand of a 'delete' operator must be optional. @fluentui/utilities: 143 delete this._timeoutId; @fluentui/utilities: ~~~~~~~~~~~~~~~ -@fluentui/utilities: src/appendFunction.ts:13:42 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -@fluentui/utilities: 13 functions.forEach((f: () => void) => f && f.apply(parent, args)); -@fluentui/utilities: ~ +@fluentui/utilities: src/aria.test.ts:105:51 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/utilities: 105 const merged = mergeAriaAttributeValues(...testCase.args); +@fluentui/utilities: ~~~~~~~~~~~~~~~~ @fluentui/utilities: src/dom/getRect.ts:19:16 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? @fluentui/utilities: 19 } else if ((element as HTMLElement).getBoundingClientRect) { @fluentui/utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -773,32 +1172,50 @@ Standard error: @fluentui/react-icons-northstar: [XX:XX:XX XM] x Command not defined: ts @fluentui/react-telemetry: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/react-telemetry: [XX:XX:XX XM] x Command not defined: ts -@fluentui/react-focus: [XX:XX:XX XM] x Error detected while running 'ts:esm' -@fluentui/react-focus: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-focus: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" -@fluentui/react-focus: at ChildProcess.exithandler (child_process.js:308:12) -@fluentui/react-focus: at ChildProcess.emit (events.js:314:20) -@fluentui/react-focus: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-focus: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-focus: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) -@fluentui/react-focus: at Process.callbackTrampoline (internal/async_hooks.js:126:14) -@fluentui/react-focus: [XX:XX:XX XM] x stdout: -@fluentui/react-focus: [XX:XX:XX XM] x src/components/FocusZone/FocusZone.tsx:1255:13 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -@fluentui/react-focus: 1255 if (child.getAttribute && child.getAttribute(IS_FOCUSABLE_ATTRIBUTE) === 'false') { -@fluentui/react-focus: ~~~~~~~~~~~~~~~~~~ -@fluentui/react-focus: Found 1 error. -@fluentui/react-focus: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-focus: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-focus: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] -@fluentui/react-focus: error Command failed with exit code 1. +@fluentui/react-compose: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-compose: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-compose: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-compose/tsconfig.json" +@fluentui/react-compose: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-compose: at ChildProcess.emit (events.js:314:20) +@fluentui/react-compose: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-compose: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-compose: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-compose: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-compose: [XX:XX:XX XM] x stdout: +@fluentui/react-compose: [XX:XX:XX XM] x src/mergeComposeOptions.ts:11:8 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-compose: 11 ? [...parentOptions.slotProps, inputOptions.slotProps] +@fluentui/react-compose: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-compose: Found 1 error. +@fluentui/react-compose: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-compose: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-compose: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-compose: error Command failed with exit code 1. +@fluentui/react-hooks: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-hooks: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-hooks: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" +@fluentui/react-hooks: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-hooks: at ChildProcess.emit (events.js:314:20) +@fluentui/react-hooks: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-hooks: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-hooks: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-hooks: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-hooks: [XX:XX:XX XM] x stdout: +@fluentui/react-hooks: [XX:XX:XX XM] x src/useMergedRefs.ts:31:6 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-hooks: 31 [...refs], +@fluentui/react-hooks: ~~~~~~~ +@fluentui/react-hooks: Found 1 error. +@fluentui/react-hooks: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-hooks: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-hooks: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-hooks: error Command failed with exit code 1. @fluentui/react-icons-mdl2: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-icons-mdl2: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-icons-mdl2: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-icons-mdl2/tsconfig.json" @fluentui/react-icons-mdl2: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-icons-mdl2: at ChildProcess.emit (events.js:314:20) @fluentui/react-icons-mdl2: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-icons-mdl2: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-icons-mdl2: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-icons-mdl2: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-icons-mdl2: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-icons-mdl2: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-icons-mdl2: [XX:XX:XX XM] x stdout: @fluentui/react-icons-mdl2: [XX:XX:XX XM] x src/utils/createSvgIcon.ts:3:26 - error TS2307: Cannot find module './SvgIcon.scss' or its corresponding type declarations. @@ -825,8 +1242,8 @@ Standard error: @fluentui/foundation-legacy: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/foundation-legacy: at ChildProcess.emit (events.js:314:20) @fluentui/foundation-legacy: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/foundation-legacy: at maybeClose (internal/child_process.js:1021:16) -@fluentui/foundation-legacy: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/foundation-legacy: at maybeClose (internal/child_process.js:1022:16) +@fluentui/foundation-legacy: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/foundation-legacy: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/foundation-legacy: [XX:XX:XX XM] x stdout: @fluentui/foundation-legacy: [XX:XX:XX XM] x src/createComponent.tsx:81:23 - error TS2352: Conversion of type 'TComponentProps & { styles: IConcatenatedStyleSet; tokens: TTokens; _defaultStyles: IConcatenatedStyleSet; theme: ITheme; className?: string | undefined; }' to type 'TViewProps & IDefaultSlotProps' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. @@ -841,7 +1258,10 @@ Standard error: @fluentui/foundation-legacy: ~~~~~~~~~~~~ @fluentui/foundation-legacy: 87 } as TViewProps & IDefaultSlotProps; @fluentui/foundation-legacy: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/foundation-legacy: Found 1 error. +@fluentui/foundation-legacy: src/slots.tsx:66:45 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/foundation-legacy: 66 return React.createElement(type, props, ...children); +@fluentui/foundation-legacy: ~~~~~~~~~~~ +@fluentui/foundation-legacy: Found 2 errors. @fluentui/foundation-legacy: [XX:XX:XX XM] x ------------------------------------ @fluentui/foundation-legacy: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/foundation-legacy: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @@ -852,8 +1272,8 @@ codesandbox-react-northstar-template: [XX:XX:XX XM] x Error: Command failed: /us codesandbox-react-northstar-template: at ChildProcess.exithandler (child_process.js:308:12) codesandbox-react-northstar-template: at ChildProcess.emit (events.js:314:20) codesandbox-react-northstar-template: at ChildProcess.EventEmitter.emit (domain.js:506:15) -codesandbox-react-northstar-template: at maybeClose (internal/child_process.js:1021:16) -codesandbox-react-northstar-template: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +codesandbox-react-northstar-template: at maybeClose (internal/child_process.js:1022:16) +codesandbox-react-northstar-template: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) codesandbox-react-northstar-template: at Process.callbackTrampoline (internal/async_hooks.js:126:14) codesandbox-react-northstar-template: [XX:XX:XX XM] x stdout: codesandbox-react-northstar-template: [XX:XX:XX XM] x src/index.tsx:15:8 - error TS2307: Cannot find module '@fluentui/react-northstar' or its corresponding type declarations. @@ -869,80 +1289,87 @@ codesandbox-react-northstar-template: [XX:XX:XX XM] x Other tasks that did not c codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-builder: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/react-builder: [XX:XX:XX XM] x Command not defined: ts -@fluentui/react-avatar: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-northstar-prototypes: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-northstar-prototypes: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-avatar: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-avatar: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-avatar: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-avatar/tsconfig.json" +@fluentui/react-avatar: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-avatar/tsconfig.json" @fluentui/react-avatar: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-avatar: at ChildProcess.emit (events.js:314:20) @fluentui/react-avatar: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-avatar: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-avatar: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-avatar: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-avatar: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-avatar: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-avatar: [XX:XX:XX XM] x stdout: -@fluentui/react-avatar: [XX:XX:XX XM] x src/components/Avatar/Avatar.tsx:10:38 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. -@fluentui/react-avatar: 10 const useAvatarClasses = makeClasses(classes); +@fluentui/react-avatar: [XX:XX:XX XM] x src/components/Avatar/Avatar.tsx:11:38 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. +@fluentui/react-avatar: 11 const useAvatarClasses = makeClasses(classes); @fluentui/react-avatar: ~~~~~~~ -@fluentui/react-avatar: src/components/Badge/Badge.tsx:9:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-avatar: src/components/Badge/Badge.tsx:10:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. @fluentui/react-avatar: Property 'styles' is incompatible with index signature. @fluentui/react-avatar: Type '{ [className: string]: string; }' is not assignable to type 'string'. -@fluentui/react-avatar: 9 export const useBadgeClasses = makeClasses(classes); -@fluentui/react-avatar: ~~~~~~~ +@fluentui/react-avatar: 10 export const useBadgeClasses = makeClasses(classes); +@fluentui/react-avatar: ~~~~~~~ @fluentui/react-avatar: Found 2 errors. @fluentui/react-avatar: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-avatar: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-avatar: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-avatar: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-avatar: error Command failed with exit code 1. -@fluentui/react-flex: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-flex: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-flex: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-flex: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" +@fluentui/react-flex: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" @fluentui/react-flex: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-flex: at ChildProcess.emit (events.js:314:20) @fluentui/react-flex: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-flex: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-flex: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-flex: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-flex: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-flex: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-flex: [XX:XX:XX XM] x stdout: -@fluentui/react-flex: [XX:XX:XX XM] x src/components/Flex/Flex.tsx:22:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-flex: [XX:XX:XX XM] x src/components/Flex/Flex.tsx:22:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. @fluentui/react-flex: Property 'styles' is incompatible with index signature. @fluentui/react-flex: Type '{ [className: string]: string; }' is not assignable to type 'string'. @fluentui/react-flex: 22 classes: createClassResolver(classes), @fluentui/react-flex: ~~~~~~~ -@fluentui/react-flex: src/components/FlexItem/FlexItem.tsx:20:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-flex: src/components/FlexItem/FlexItem.tsx:20:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. @fluentui/react-flex: 20 classes: createClassResolver(classes), @fluentui/react-flex: ~~~~~~~ @fluentui/react-flex: Found 2 errors. @fluentui/react-flex: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-flex: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-flex: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-flex: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-flex: error Command failed with exit code 1. -@fluentui/react-image: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-image: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-image: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-image: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" +@fluentui/react-image: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" @fluentui/react-image: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-image: at ChildProcess.emit (events.js:314:20) @fluentui/react-image: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-image: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-image: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-image: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-image: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-image: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-image: [XX:XX:XX XM] x stdout: -@fluentui/react-image: [XX:XX:XX XM] x src/components/Image/Image.tsx:9:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-image: [XX:XX:XX XM] x src/components/Image/Image.tsx:9:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. @fluentui/react-image: Property 'styles' is incompatible with index signature. @fluentui/react-image: Type '{ [className: string]: string; }' is not assignable to type 'string'. @fluentui/react-image: 9 export const useImageClasses = makeClasses(classes); @fluentui/react-image: ~~~~~~~ -@fluentui/react-image: Found 1 error. +@fluentui/react-image: src/components/Image/useImage.tsx:23:46 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-image: 23 return ; +@fluentui/react-image: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-image: Found 2 errors. @fluentui/react-image: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-image: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-image: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-image: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-image: error Command failed with exit code 1. -@fluentui/react-internal: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/docs: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/docs: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-internal: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-internal: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-internal: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" +@fluentui/react-internal: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-internal/tsconfig.json" @fluentui/react-internal: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-internal: at ChildProcess.emit (events.js:314:20) @fluentui/react-internal: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-internal: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-internal: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-internal: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-internal: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-internal: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-internal: [XX:XX:XX XM] x stdout: @fluentui/react-internal: [XX:XX:XX XM] x src/components/ChoiceGroup/ChoiceGroup.base.tsx:129:17 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. @@ -952,6 +1379,10 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-internal: 131 {...option} @fluentui/react-internal: ~~~~~~~~~~~ @fluentui/react-internal: This spread always overwrites this property. +@fluentui/react-internal: src/components/ContextualMenu/ContextualMenu.styles.ts:79:11 - error TS2322: Type '{ boxShadow: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: Object literal may only specify known properties, and 'boxShadow' does not exist in type 'DeepPartial[]'. +@fluentui/react-internal: 79 boxShadow: effects.elevation8, +@fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/react-internal: src/components/FloatingPicker/BaseFloatingPicker.tsx:218:42 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? @fluentui/react-internal: 218 } else if (suggestionsPromiseLike && suggestionsPromiseLike.then) { @fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -970,37 +1401,85 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-internal: src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. @fluentui/react-internal: 89 delete this._scrollableSurface; @fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/react-internal: src/components/Persona/Persona.test.tsx:194:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, unknown, Component<{}, {}, any>>'. -@fluentui/react-internal: Type 'HTMLAttributes' is not assignable to type 'ImgHTMLAttributes'. -@fluentui/react-internal: Types of property 'crossOrigin' are incompatible. -@fluentui/react-internal: Type 'string | undefined' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. -@fluentui/react-internal: Type 'string' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. -@fluentui/react-internal: 194 const image: ReactWrapper, unknown> = wrapper.find('ImageBase'); -@fluentui/react-internal: ~~~~~ -@fluentui/react-internal: src/components/Persona/Persona.test.tsx:201:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, unknown, Component<{}, {}, any>>'. -@fluentui/react-internal: 201 const image: ReactWrapper, unknown> = wrapper.find('ImageBase'); -@fluentui/react-internal: ~~~~~ -@fluentui/react-internal: src/components/pickers/BasePicker.tsx:460:42 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -@fluentui/react-internal: 460 } else if (suggestionsPromiseLike && suggestionsPromiseLike.then) { +@fluentui/react-internal: src/components/Panel/Panel.base.tsx:25:60 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-internal: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-internal: The types of 'subComponentStyles.closeButton' are incompatible between these types. +@fluentui/react-internal: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-internal: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react-internal: Property 'root' is incompatible with index signature. +@fluentui/react-internal: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-internal: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-internal: 25 const getClassNames = classNamesFunction(); +@fluentui/react-internal: ~~~~~~~~~~~~ +@fluentui/react-internal: src/components/Panel/Panel.base.tsx:53:43 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-internal: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-internal: 53 private _classNames: IProcessedStyleSet; +@fluentui/react-internal: ~~~~~~~~~~~~ +@fluentui/react-internal: src/components/Panel/Panel.ts:10:98 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-internal: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-internal: 10 export const Panel: React.FunctionComponent = styled( +@fluentui/react-internal: ~~~~~~~~~~~~ +@fluentui/react-internal: src/components/Panel/Panel.types.ts:112:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-internal: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-internal: 112 styles?: IStyleFunctionOrObject; +@fluentui/react-internal: ~~~~~~~~~~~~ +@fluentui/react-internal: src/components/TeachingBubble/TeachingBubble.styles.ts:278:16 - error TS2322: Type 'IStyle' is not assignable to type 'DeepPartial'. +@fluentui/react-internal: Type 'undefined' is not assignable to type 'DeepPartial'. +@fluentui/react-internal: 278 root: [...rootStyle(isWide, calloutProps), fonts.medium], +@fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-internal: src/components/TeachingBubble/TeachingBubble.styles.ts:278:52 - error TS2322: Type 'IStyle' is not assignable to type 'DeepPartial'. +@fluentui/react-internal: 278 root: [...rootStyle(isWide, calloutProps), fonts.medium], +@fluentui/react-internal: ~~~~~~~~~~~~ +@fluentui/react-internal: src/components/TextField/TextField.test.tsx:110:11 - error TS2322: Type 'string' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-internal: 110 root: 'label-testClassName', +@fluentui/react-internal: ~~~~ +@fluentui/react-internal: src/components/pickers/BasePicker.tsx:468:42 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +@fluentui/react-internal: 468 } else if (suggestionsPromiseLike && suggestionsPromiseLike.then) { @fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/react-internal: Found 10 errors. +@fluentui/react-internal: src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.styles.ts:175:9 - error TS2322: Type 'IStyleBaseArray' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: The types returned by 'pop()' are incompatible between these types. +@fluentui/react-internal: Type 'IStyle' is not assignable to type 'DeepPartial | undefined'. +@fluentui/react-internal: Type 'null' is not assignable to type 'DeepPartial | undefined'. +@fluentui/react-internal: 175 primaryText: personaPrimaryTextStyles, +@fluentui/react-internal: ~~~~~~~~~~~ +@fluentui/react-internal: src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItem.styles.ts:178:9 - error TS2322: Type 'IStyleBaseArray' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: 178 initials: personaCoinInitialsStyles, +@fluentui/react-internal: ~~~~~~~~ +@fluentui/react-internal: src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItemSuggestion.styles.ts:49:9 - error TS2740: Type 'IRawStyle' is missing the following properties from type 'DeepPartial[]': length, pop, push, concat, and 24 more. +@fluentui/react-internal: 49 primaryText: textSelectorsStyles, +@fluentui/react-internal: ~~~~~~~~~~~ +@fluentui/react-internal: src/components/pickers/PeoplePicker/PeoplePickerItems/PeoplePickerItemSuggestion.styles.ts:50:9 - error TS2322: Type 'IRawStyle' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: 50 secondaryText: textSelectorsStyles, +@fluentui/react-internal: ~~~~~~~~~~~~~ +@fluentui/react-internal: src/components/pickers/Suggestions/Suggestions.styles.ts:119:11 - error TS2322: Type '{ display: string; verticalAlign: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: Object literal may only specify known properties, and 'display' does not exist in type 'DeepPartial[]'. +@fluentui/react-internal: 119 display: 'inline-block', +@fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-internal: src/components/pickers/Suggestions/Suggestions.styles.ts:123:11 - error TS2322: Type '{ display: string; verticalAlign: string; margin: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-internal: Object literal may only specify known properties, and 'display' does not exist in type 'DeepPartial[]'. +@fluentui/react-internal: 123 display: 'inline-block', +@fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-internal: src/utilities/keytips/KeytipUtils.ts:26:29 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-internal: 26 const overflowSequence = [...overflowKeySequences].pop(); +@fluentui/react-internal: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-internal: Found 23 errors. @fluentui/react-internal: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-internal: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-internal: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-internal: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-internal: error Command failed with exit code 1. -@fluentui/docs: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". -@fluentui/docs: [XX:XX:XX XM] x Command not defined: ts -@fluentui/react-checkbox: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/perf: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/perf: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-checkbox: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-checkbox: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-checkbox: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-checkbox/tsconfig.json" +@fluentui/react-checkbox: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-checkbox/tsconfig.json" @fluentui/react-checkbox: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-checkbox: at ChildProcess.emit (events.js:314:20) @fluentui/react-checkbox: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-checkbox: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-checkbox: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-checkbox: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-checkbox: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-checkbox: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-checkbox: [XX:XX:XX XM] x stdout: -@fluentui/react-checkbox: [XX:XX:XX XM] x src/next/useCheckboxClasses.tsx:14:50 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-checkbox: [XX:XX:XX XM] x src/next/useCheckboxClasses.tsx:14:50 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'ClassDictionary'. @fluentui/react-checkbox: Property 'styles' is incompatible with index signature. @fluentui/react-checkbox: Type '{ [className: string]: string; }' is not assignable to type 'string'. @fluentui/react-checkbox: 14 const defaultClassResolver = createClassResolver(classes); @@ -1008,16 +1487,34 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-checkbox: Found 1 error. @fluentui/react-checkbox: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-checkbox: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-checkbox: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-checkbox: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-checkbox: error Command failed with exit code 1. -@fluentui/react-link: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-date-time: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-date-time: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-date-time: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-date-time/tsconfig.json" +@fluentui/react-date-time: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-date-time: at ChildProcess.emit (events.js:314:20) +@fluentui/react-date-time: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-date-time: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-date-time: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-date-time: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-date-time: [XX:XX:XX XM] x stdout: +@fluentui/react-date-time: [XX:XX:XX XM] x src/components/CalendarDayGrid/CalendarGridDayCell.tsx:142:34 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-date-time: 142 dayRef.classList.add(...classNamesToAdd.split(' ')); +@fluentui/react-date-time: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-date-time: Found 1 error. +@fluentui/react-date-time: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-date-time: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-date-time: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-date-time: error Command failed with exit code 1. +@fluentui/react-link: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-link: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-link: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-link/tsconfig.json" +@fluentui/react-link: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-link/tsconfig.json" @fluentui/react-link: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-link: at ChildProcess.emit (events.js:314:20) @fluentui/react-link: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-link: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-link: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-link: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-link: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-link: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-link: [XX:XX:XX XM] x stdout: @fluentui/react-link: [XX:XX:XX XM] x src/next/Link.tsx:16:56 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. @@ -1029,22 +1526,28 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-link: src/next/Link.tsx:21:36 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. @fluentui/react-link: 21 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), @fluentui/react-link: ~~~~ -@fluentui/react-link: Found 3 errors. +@fluentui/react-link: src/next/Link.tsx:21:65 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-link: 21 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), +@fluentui/react-link: ~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-link: Found 4 errors. @fluentui/react-link: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-link: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-link: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-link: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-link: error Command failed with exit code 1. -@fluentui/react-slider: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-slider: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-slider: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-slider: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-slider/tsconfig.json" +@fluentui/react-slider: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-slider/tsconfig.json" @fluentui/react-slider: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-slider: at ChildProcess.emit (events.js:314:20) @fluentui/react-slider: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-slider: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-slider: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-slider: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-slider: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-slider: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-slider: [XX:XX:XX XM] x stdout: -@fluentui/react-slider: [XX:XX:XX XM] x src/next/Slider.tsx:38:27 - error TS2339: Property 'disabled' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: [XX:XX:XX XM] x src/components/Slider/Slider.styles.ts:105:7 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-slider: 105 ...[!disabled ? classNames.enabled : undefined], +@fluentui/react-slider: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:38:27 - error TS2339: Property 'disabled' does not exist on type 'typeof import("*.scss")'. @fluentui/react-slider: 38 disabled && classes.disabled, @fluentui/react-slider: ~~~~~~~~ @fluentui/react-slider: src/next/Slider.tsx:39:27 - error TS2339: Property 'vertical' does not exist on type 'typeof import("*.scss")'. @@ -1083,19 +1586,47 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-slider: src/next/Slider.tsx:57:29 - error TS2339: Property 'zeroTick' does not exist on type 'typeof import("*.scss")'. @fluentui/react-slider: 57 zeroTick: css(classes.zeroTick, globalClassNames.zeroTick, ...propClasses), @fluentui/react-slider: ~~~~~~~~ -@fluentui/react-slider: Found 13 errors. +@fluentui/react-slider: Found 14 errors. @fluentui/react-slider: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-slider: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-slider: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-slider: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-slider: error Command failed with exit code 1. -@fluentui/react-toggle: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-tabs: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-tabs: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-tabs: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" +@fluentui/react-tabs: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-tabs: at ChildProcess.emit (events.js:314:20) +@fluentui/react-tabs: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-tabs: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-tabs: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-tabs: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-tabs: [XX:XX:XX XM] x stdout: +@fluentui/react-tabs: [XX:XX:XX XM] x ../react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-tabs: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-tabs: The types of 'subComponentStyles.closeButton' are incompatible between these types. +@fluentui/react-tabs: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-tabs: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react-tabs: Property 'root' is incompatible with index signature. +@fluentui/react-tabs: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-tabs: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-tabs: 96 styles?: IStyleFunctionOrObject; +@fluentui/react-tabs: ~~~~~~~~~~~~ +@fluentui/react-tabs: src/components/Pivot/Pivot.styles.ts:197:7 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-tabs: 197 ...getLinkStyles(props, classNames), +@fluentui/react-tabs: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-tabs: Found 2 errors. +@fluentui/react-tabs: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-tabs: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-tabs: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-tabs: error Command failed with exit code 1. +@fluentui/react-toggle: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-toggle: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-toggle: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" +@fluentui/react-toggle: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" @fluentui/react-toggle: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-toggle: at ChildProcess.emit (events.js:314:20) @fluentui/react-toggle: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-toggle: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-toggle: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-toggle: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-toggle: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-toggle: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-toggle: [XX:XX:XX XM] x stdout: @fluentui/react-toggle: [XX:XX:XX XM] x src/next/Toggle.tsx:31:26 - error TS2339: Property 'checked' does not exist on type 'typeof import("*.scss")'. @@ -1113,6 +1644,9 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-toggle: src/next/Toggle.tsx:40:36 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. @fluentui/react-toggle: 40 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), @fluentui/react-toggle: ~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:40:65 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-toggle: 40 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), +@fluentui/react-toggle: ~~~~~~~~~~~~~~~~~~~~ @fluentui/react-toggle: src/next/Toggle.tsx:41:26 - error TS2339: Property 'label' does not exist on type 'typeof import("*.scss")'. @fluentui/react-toggle: 41 label: css(classes.label, globalClassNames.label, ...propControlledClasses), @fluentui/react-toggle: ~~~~~ @@ -1128,24 +1662,25 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-toggle: src/next/Toggle.tsx:45:25 - error TS2339: Property 'text' does not exist on type 'typeof import("*.scss")'. @fluentui/react-toggle: 45 text: css(classes.text, globalClassNames.text, ...propControlledClasses), @fluentui/react-toggle: ~~~~ -@fluentui/react-toggle: Found 10 errors. +@fluentui/react-toggle: Found 11 errors. @fluentui/react-toggle: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-toggle: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-toggle: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-toggle: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-toggle: error Command failed with exit code 1. -@fluentui/perf: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". -@fluentui/perf: [XX:XX:XX XM] x Command not defined: ts @fluentui/react: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react: [XX:XX:XX XM] x ------------------------------------ @fluentui/react: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react/tsconfig.json" @fluentui/react: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react: at ChildProcess.emit (events.js:314:20) @fluentui/react: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react: [XX:XX:XX XM] x stdout: -@fluentui/react: [XX:XX:XX XM] x src/components/ComboBox/ComboBox.tsx:451:13 - error TS2554: Expected 1 arguments, but got 2. +@fluentui/react: [XX:XX:XX XM] x src/components/Breadcrumb/Breadcrumb.base.tsx:92:28 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react: 92 const renderedItems = [...items]; +@fluentui/react: ~~~~~~~~ +@fluentui/react: src/components/ComboBox/ComboBox.tsx:451:13 - error TS2554: Expected 1 arguments, but got 2. @fluentui/react: 451 this._onRenderContainer, @fluentui/react: ~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/react: src/components/ComboBox/ComboBox.tsx:1097:32 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? @@ -1169,22 +1704,146 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react: src/components/DetailsList/DetailsRow.base.tsx:156:14 - error TS2790: The operand of a 'delete' operator must be optional. @fluentui/react: 156 delete this._dragDropSubscription; @fluentui/react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react: src/components/Dropdown/Dropdown.base.tsx:597:96 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react: 597 ? (this._classNames.subComponentStyles.panel as IStyleFunctionOrObject) +@fluentui/react: ~~~~~~~~~~~~ +@fluentui/react: src/components/Dropdown/Dropdown.types.ts:273:51 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react: The types of 'subComponentStyles.closeButton' are incompatible between these types. +@fluentui/react: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react: Property 'root' is incompatible with index signature. +@fluentui/react: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react: 273 panel: IStyleFunctionOrObject; +@fluentui/react: ~~~~~~~~~~~~ @fluentui/react: src/components/GroupedList/GroupedListSection.tsx:172:16 - error TS2790: The operand of a 'delete' operator must be optional. @fluentui/react: 172 delete this._dragDropSubscription; @fluentui/react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ -@fluentui/react: Found 9 errors. +@fluentui/react: Found 12 errors. @fluentui/react: [XX:XX:XX XM] x ------------------------------------ @fluentui/react: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/react: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react: error Command failed with exit code 1. -@fluentui/react-experiments: [XX:XX:XX XM] x Error detected while running 'ts:esm' +a11y-tests: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +a11y-tests: [XX:XX:XX XM] x ------------------------------------ +a11y-tests: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/a11y-tests/tsconfig.json" +a11y-tests: at ChildProcess.exithandler (child_process.js:308:12) +a11y-tests: at ChildProcess.emit (events.js:314:20) +a11y-tests: at ChildProcess.EventEmitter.emit (domain.js:506:15) +a11y-tests: at maybeClose (internal/child_process.js:1022:16) +a11y-tests: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +a11y-tests: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +a11y-tests: [XX:XX:XX XM] x stdout: +a11y-tests: [XX:XX:XX XM] x src/tests/ComponentExamples.test.tsx:75:14 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +a11y-tests: 75 files.push(...exampleFiles); +a11y-tests: ~~~~~~~~~~~~~~~ +a11y-tests: ../../packages/react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +a11y-tests: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +a11y-tests: The types of 'subComponentStyles.closeButton' are incompatible between these types. +a11y-tests: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +a11y-tests: Type 'Partial' is not assignable to type 'DeepPartial'. +a11y-tests: Property 'root' is incompatible with index signature. +a11y-tests: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +a11y-tests: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +a11y-tests: 96 styles?: IStyleFunctionOrObject; +a11y-tests: ~~~~~~~~~~~~ +a11y-tests: ../../packages/react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +a11y-tests: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +a11y-tests: 220 panel: IStyleFunctionOrObject; +a11y-tests: ~~~~~~~~~~~~ +a11y-tests: Found 3 errors. +a11y-tests: [XX:XX:XX XM] x ------------------------------------ +a11y-tests: [XX:XX:XX XM] x Error previously detected. See above for error messages. +a11y-tests: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +a11y-tests: error Command failed with exit code 1. +server-rendered-app: [XX:XX:XX XM] x Error detected while running 'ts:esm' +server-rendered-app: [XX:XX:XX XM] x ------------------------------------ +server-rendered-app: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/server-rendered-app/tsconfig.json" +server-rendered-app: at ChildProcess.exithandler (child_process.js:308:12) +server-rendered-app: at ChildProcess.emit (events.js:314:20) +server-rendered-app: at ChildProcess.EventEmitter.emit (domain.js:506:15) +server-rendered-app: at maybeClose (internal/child_process.js:1022:16) +server-rendered-app: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +server-rendered-app: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +server-rendered-app: [XX:XX:XX XM] x stdout: +server-rendered-app: [XX:XX:XX XM] x ../../packages/react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +server-rendered-app: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; }; }'. +server-rendered-app: The types of 'subComponentStyles.closeButton' are incompatible between these types. +server-rendered-app: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +server-rendered-app: Type 'Partial' is not assignable to type 'DeepPartial'. +server-rendered-app: Property 'root' is incompatible with index signature. +server-rendered-app: Type 'IStyle' is not assignable to type 'DeepPartial[]'. +server-rendered-app: Type 'string' is not assignable to type 'DeepPartial[]'. +server-rendered-app: 96 styles?: IStyleFunctionOrObject; +server-rendered-app: ~~~~~~~~~~~~ +server-rendered-app: ../../packages/react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +server-rendered-app: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; }; }'. +server-rendered-app: 220 panel: IStyleFunctionOrObject; +server-rendered-app: ~~~~~~~~~~~~ +server-rendered-app: Found 2 errors. +server-rendered-app: [XX:XX:XX XM] x ------------------------------------ +server-rendered-app: [XX:XX:XX XM] x Error previously detected. See above for error messages. +server-rendered-app: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +server-rendered-app: error Command failed with exit code 1. +@fluentui/azure-themes: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/azure-themes: [XX:XX:XX XM] x ------------------------------------ +@fluentui/azure-themes: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/azure-themes/tsconfig.json" +@fluentui/azure-themes: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/azure-themes: at ChildProcess.emit (events.js:314:20) +@fluentui/azure-themes: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/azure-themes: at maybeClose (internal/child_process.js:1022:16) +@fluentui/azure-themes: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/azure-themes: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/azure-themes: [XX:XX:XX XM] x stdout: +@fluentui/azure-themes: [XX:XX:XX XM] x src/azure/styles/ContextualMenu.styles.ts:20:11 - error TS2322: Type '{ backgroundColor: string; borderColor: string; borderStyle: string; borderWidth: string; boxShadow: string; selectors: { '.ms-Callout-beak': { backgroundColor: string; }; }; }' is not assignable to type 'DeepPartial[]'. +@fluentui/azure-themes: Object literal may only specify known properties, and 'backgroundColor' does not exist in type 'DeepPartial[]'. +@fluentui/azure-themes: 20 backgroundColor: semanticColors.inputBackground, +@fluentui/azure-themes: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/azure-themes: src/azure/styles/ContextualMenu.styles.ts:32:7 - error TS2322: Type '(itemStyleProps: IContextualMenuItemStyleProps) => Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/azure-themes: Type '(itemStyleProps: IContextualMenuItemStyleProps) => Partial' is not assignable to type 'IStyleFunction'. +@fluentui/azure-themes: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/azure-themes: Property 'root' is incompatible with index signature. +@fluentui/azure-themes: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/azure-themes: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/azure-themes: 32 menuItem: (itemStyleProps: IContextualMenuItemStyleProps): Partial => { +@fluentui/azure-themes: ~~~~~~~~ +@fluentui/azure-themes: src/azure/styles/TeachingBubble.styles.ts:54:11 - error TS2322: Type '{ borderColor: string; borderStyle: string; borderWidth: string; boxShadow: string; selectors: { '.ms-Callout-beak': { backgroundColor: string; }; }; }' is not assignable to type 'DeepPartial[]'. +@fluentui/azure-themes: Object literal may only specify known properties, and 'borderColor' does not exist in type 'DeepPartial[]'. +@fluentui/azure-themes: 54 borderColor: semanticColors.inputBorder, +@fluentui/azure-themes: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/azure-themes: Found 3 errors. +@fluentui/azure-themes: [XX:XX:XX XM] x ------------------------------------ +@fluentui/azure-themes: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/azure-themes: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/azure-themes: error Command failed with exit code 1. +@fluentui/react-charting: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-charting: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-charting: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-charting/tsconfig.json" +@fluentui/react-charting: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/react-charting: at ChildProcess.emit (events.js:314:20) +@fluentui/react-charting: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-charting: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-charting: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/react-charting: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/react-charting: [XX:XX:XX XM] x stdout: +@fluentui/react-charting: [XX:XX:XX XM] x src/utilities/utilities.ts:367:13 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-charting: 367 return [...array, value]; +@fluentui/react-charting: ~~~~~~~~ +@fluentui/react-charting: Found 1 error. +@fluentui/react-charting: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-charting: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-charting: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-charting: error Command failed with exit code 1. +@fluentui/react-experiments: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-experiments: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-experiments: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-experiments/tsconfig.json" +@fluentui/react-experiments: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-experiments/tsconfig.json" @fluentui/react-experiments: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-experiments: at ChildProcess.emit (events.js:314:20) @fluentui/react-experiments: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-experiments: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-experiments: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-experiments: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-experiments: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-experiments: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-experiments: [XX:XX:XX XM] x stdout: @fluentui/react-experiments: [XX:XX:XX XM] x src/components/FloatingSuggestions/FloatingPeopleSuggestions/defaults/DefaultPeopleSuggestionsItem.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. @@ -1199,30 +1858,67 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-experiments: src/components/FloatingSuggestions/FloatingSuggestions.tsx:202:27 - error TS2339: Property 'callout' does not exist on type 'typeof import("*.scss")'. @fluentui/react-experiments: 202 className={styles.callout} @fluentui/react-experiments: ~~~~~~~ -@fluentui/react-experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:75:102 - error TS2339: Property 'editingContainer' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-experiments: 75 -@fluentui/react-experiments: ~~~~~~~~~~~~~~~~ -@fluentui/react-experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:86:29 - error TS2339: Property 'editingInput' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-experiments: 86 className={styles.editingInput} -@fluentui/react-experiments: ~~~~~~~~~~~~ -@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.tsx:113:13 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -@fluentui/react-experiments: 113 if (onItemChange && getExpandedItems) { -@fluentui/react-experiments: ~~~~~~~~~~~~ -@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/SelectedPeopleList.test.tsx:94:9 - error TS2322: Type 'ComponentType>' is not assignable to type 'ComponentClass, any> | FunctionComponent> | undefined'. -@fluentui/react-experiments: Type 'ComponentClass, any>' is not assignable to type 'ComponentClass, any> | FunctionComponent> | undefined'. +@fluentui/react-experiments: src/components/Pagination/Pagination.base.tsx:210:7 - error TS2322: Type 'string' is not assignable to type '"" | `${string} ${number} undefined ${number}` | `${string} ${number} ${string} ${number}` | undefined'. +@fluentui/react-experiments: 210 ariaLabel = ariaLabel + ' ' + selectedAriaLabel; +@fluentui/react-experiments: ~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:241:100 - error TS2339: Property 'editingContainer' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-experiments: 241 +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:251:27 - error TS2339: Property 'editingInput' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-experiments: 251 className={styles.editingInput} +@fluentui/react-experiments: ~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedItemsList.tsx:27:36 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-experiments: 27 const updatedItems: TItem[] = [...items]; +@fluentui/react-experiments: ~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.styles.ts:103:11 - error TS2322: Type '{ color: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-experiments: Object literal may only specify known properties, and 'color' does not exist in type 'DeepPartial[]'. +@fluentui/react-experiments: 103 color: 'inherit', +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.styles.ts:134:11 - error TS2322: Type '{ padding: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-experiments: Object literal may only specify known properties, and 'padding' does not exist in type 'DeepPartial[]'. +@fluentui/react-experiments: 134 padding: '0 8px', +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.styles.ts:138:9 - error TS2322: Type '{} | { fontSize: number; }' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-experiments: Type '{}' is missing the following properties from type 'DeepPartial[]': length, pop, push, concat, and 26 more. +@fluentui/react-experiments: 138 initials: isValid +@fluentui/react-experiments: ~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.tsx:12:70 - error TS2344: Type 'ISelectedPersonaStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-experiments: Type 'ISelectedPersonaStyles' is not assignable to type '{ subComponentStyles?: { personaStyles: IStyleFunctionOrObject; personaCoinStyles: IStyleFunctionOrObject; actionButtonStyles: IStyleFunctionOrObject<...>; } | undefined; }'. +@fluentui/react-experiments: The types of 'subComponentStyles.actionButtonStyles' are incompatible between these types. +@fluentui/react-experiments: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-experiments: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react-experiments: Property 'root' is incompatible with index signature. +@fluentui/react-experiments: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-experiments: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-experiments: 12 const getClassNames = classNamesFunction(); +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.tsx:22:63 - error TS2344: Type 'ISelectedPersonaStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-experiments: Type 'ISelectedPersonaStyles' is not assignable to type '{ subComponentStyles?: { personaStyles: IStyleFunctionOrObject; personaCoinStyles: IStyleFunctionOrObject; actionButtonStyles: IStyleFunctionOrObject<...>; } | undefined; }'. +@fluentui/react-experiments: 22 styles?: IStyleFunctionOrObject; +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.tsx:135:42 - error TS2344: Type 'ISelectedPersonaStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-experiments: Type 'ISelectedPersonaStyles' is not assignable to type '{ subComponentStyles?: { personaStyles: IStyleFunctionOrObject; personaCoinStyles: IStyleFunctionOrObject; actionButtonStyles: IStyleFunctionOrObject<...>; } | undefined; }'. +@fluentui/react-experiments: 135 const classNames: IProcessedStyleSet = React.useMemo( +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/Items/SelectedPersona.tsx:203:95 - error TS2344: Type 'ISelectedPersonaStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-experiments: Type 'ISelectedPersonaStyles' is not assignable to type '{ subComponentStyles?: { personaStyles: IStyleFunctionOrObject; personaCoinStyles: IStyleFunctionOrObject; actionButtonStyles: IStyleFunctionOrObject<...>; } | undefined; }'. +@fluentui/react-experiments: 203 export const SelectedPersona = styled, ISelectedPersonaStyleProps, ISelectedPersonaStyles>( +@fluentui/react-experiments: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedPeopleList/SelectedPeopleList.test.tsx:94:9 - error TS2322: Type 'ItemCanDispatchTrigger' is not assignable to type 'ComponentType> | undefined'. +@fluentui/react-experiments: Type 'ComponentClass, any>' is not assignable to type 'ComponentType> | undefined'. @fluentui/react-experiments: Type 'ComponentClass, any>' is not assignable to type 'ComponentClass, any>'. @fluentui/react-experiments: Types of property 'propTypes' are incompatible. @fluentui/react-experiments: Type 'WeakValidationMap> | undefined' is not assignable to type 'WeakValidationMap> | undefined'. @fluentui/react-experiments: Type 'WeakValidationMap>' is not assignable to type 'WeakValidationMap>'. -@fluentui/react-experiments: Types of property 'item' are incompatible. -@fluentui/react-experiments: Type 'Validator | undefined' is not assignable to type 'Validator | undefined'. -@fluentui/react-experiments: Type 'Validator' is not assignable to type 'Validator'. -@fluentui/react-experiments: Type 'unknown' is not assignable to type 'IPersonaProps & BaseSelectedItem'. -@fluentui/react-experiments: Type 'unknown' is not assignable to type 'IPersonaProps'. +@fluentui/react-experiments: Types of property 'createGenericItem' are incompatible. +@fluentui/react-experiments: Type 'Validator<((input: string) => unknown) | null | undefined> | undefined' is not assignable to type 'Validator<((input: string) => IPersonaProps & BaseSelectedItem) | null | undefined> | undefined'. +@fluentui/react-experiments: Type 'Validator<((input: string) => unknown) | null | undefined>' is not assignable to type 'Validator<((input: string) => IPersonaProps & BaseSelectedItem) | null | undefined>'. +@fluentui/react-experiments: Type '((input: string) => unknown) | null | undefined' is not assignable to type '((input: string) => IPersonaProps & BaseSelectedItem) | null | undefined'. +@fluentui/react-experiments: Type '(input: string) => unknown' is not assignable to type '(input: string) => IPersonaProps & BaseSelectedItem'. @fluentui/react-experiments: 94 onRenderItem={SelectedItem} @fluentui/react-experiments: ~~~~~~~~~~~~ -@fluentui/react-experiments: src/components/SelectedItemsList/SelectedItemsList.types.ts:75:3 -@fluentui/react-experiments: 75 onRenderItem?: React.ComponentType>; +@fluentui/react-experiments: src/components/SelectedItemsList/SelectedItemsList.types.ts:80:3 +@fluentui/react-experiments: 80 onRenderItem?: React.ComponentType>; @fluentui/react-experiments: ~~~~~~~~~~~~ @fluentui/react-experiments: The expected type comes from property 'onRenderItem' which is declared here on type 'IntrinsicAttributes & Pick, "onChange" | ... 17 more ... | "itemsAreEqual"> & RefAttributes<...>' @fluentui/react-experiments: src/components/StaticList/StaticList.tsx:14:37 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. @@ -1345,24 +2041,34 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-experiments: src/utilities/scrolling/ScrollContainer.tsx:76:68 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. @fluentui/react-experiments: 76 className={css('ms-ScrollContainer', ScrollContainerStyles.root, className)} @fluentui/react-experiments: ~~~~ -@fluentui/react-experiments: Found 48 errors. +@fluentui/react-experiments: Found 56 errors. @fluentui/react-experiments: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-experiments: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-experiments: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-experiments: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-experiments: error Command failed with exit code 1. -@fluentui/react-monaco-editor: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-monaco-editor: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/react-monaco-editor: [XX:XX:XX XM] x ------------------------------------ -@fluentui/react-monaco-editor: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-monaco-editor/tsconfig.json" +@fluentui/react-monaco-editor: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-monaco-editor/tsconfig.json" @fluentui/react-monaco-editor: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-monaco-editor: at ChildProcess.emit (events.js:314:20) @fluentui/react-monaco-editor: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-monaco-editor: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-monaco-editor: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-monaco-editor: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-monaco-editor: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-monaco-editor: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-monaco-editor: [XX:XX:XX XM] x stdout: @fluentui/react-monaco-editor: [XX:XX:XX XM] x ../monaco-editor/monaco-typescript.d.ts:9:25 - error TS2307: Cannot find module '@fluentui/monaco-editor' or its corresponding type declarations. @fluentui/react-monaco-editor: 9 import * as monaco from '@fluentui/monaco-editor'; @fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-monaco-editor: ../react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-monaco-editor: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-monaco-editor: The types of 'subComponentStyles.closeButton' are incompatible between these types. +@fluentui/react-monaco-editor: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-monaco-editor: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react-monaco-editor: Property 'root' is incompatible with index signature. +@fluentui/react-monaco-editor: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-monaco-editor: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-monaco-editor: 96 styles?: IStyleFunctionOrObject; +@fluentui/react-monaco-editor: ~~~~~~~~~~~~ @fluentui/react-monaco-editor: src/components/Editor.tsx:1:25 - error TS2307: Cannot find module '@fluentui/monaco-editor' or its corresponding type declarations. @fluentui/react-monaco-editor: 1 import * as monaco from '@fluentui/monaco-editor'; @fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1372,6 +2078,20 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-monaco-editor: src/interfaces/monaco.ts:5:25 - error TS2307: Cannot find module '@fluentui/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. @fluentui/react-monaco-editor: 5 import * as monaco from '@fluentui/monaco-editor/esm/vs/editor/editor.api'; @fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-monaco-editor: src/transpiler/exampleTransform.ts:83:7 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-monaco-editor: 83 ...imprt.identifiers.map(item => (item.as ? `${item.name}: ${item.as}` : item.name)), +@fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-monaco-editor: src/transpiler/exampleTransform.ts:116:13 - error TS2769: No overload matches this call. +@fluentui/react-monaco-editor: Overload 1 of 2, '(...items: ConcatArray<`const { ${string} } = window.${string};`>[]): `const { ${string} } = window.${string};`[]', gave the following error. +@fluentui/react-monaco-editor: Argument of type 'string[]' is not assignable to parameter of type 'ConcatArray<`const { ${string} } = window.${string};`>'. +@fluentui/react-monaco-editor: The types returned by 'slice(...)' are incompatible between these types. +@fluentui/react-monaco-editor: Type 'string[]' is not assignable to type '`const { ${string} } = window.${string};`[]'. +@fluentui/react-monaco-editor: Type 'string' is not assignable to type '`const { ${string} } = window.${string};`'. +@fluentui/react-monaco-editor: Overload 2 of 2, '(...items: (`const { ${string} } = window.${string};` | ConcatArray<`const { ${string} } = window.${string};`>)[]): `const { ${string} } = window.${string};`[]', gave the following error. +@fluentui/react-monaco-editor: Argument of type 'string[]' is not assignable to parameter of type '`const { ${string} } = window.${string};` | ConcatArray<`const { ${string} } = window.${string};`>'. +@fluentui/react-monaco-editor: Type 'string[]' is not assignable to type '`const { ${string} } = window.${string};`'. +@fluentui/react-monaco-editor: 116 .concat(lines); +@fluentui/react-monaco-editor: ~~~~~ @fluentui/react-monaco-editor: src/transpiler/transpile.ts:2:25 - error TS2307: Cannot find module '@fluentui/monaco-editor' or its corresponding type declarations. @fluentui/react-monaco-editor: 2 import * as monaco from '@fluentui/monaco-editor'; @fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1390,31 +2110,80 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-monaco-editor: src/utilities/getQueryParam.test.ts:7:12 - error TS2790: The operand of a 'delete' operator must be optional. @fluentui/react-monaco-editor: 7 delete window.location; @fluentui/react-monaco-editor: ~~~~~~~~~~~~~~~ -@fluentui/react-monaco-editor: Found 10 errors. +@fluentui/react-monaco-editor: ../react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/react-monaco-editor: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/react-monaco-editor: 220 panel: IStyleFunctionOrObject; +@fluentui/react-monaco-editor: ~~~~~~~~~~~~ +@fluentui/react-monaco-editor: Found 14 errors. @fluentui/react-monaco-editor: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-monaco-editor: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/react-monaco-editor: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-monaco-editor: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/react-monaco-editor: error Command failed with exit code 1. +@fluentui/theme-samples: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/theme-samples: [XX:XX:XX XM] x ------------------------------------ +@fluentui/theme-samples: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/theme-samples/tsconfig.json" +@fluentui/theme-samples: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/theme-samples: at ChildProcess.emit (events.js:314:20) +@fluentui/theme-samples: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/theme-samples: at maybeClose (internal/child_process.js:1022:16) +@fluentui/theme-samples: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/theme-samples: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/theme-samples: [XX:XX:XX XM] x stdout: +@fluentui/theme-samples: [XX:XX:XX XM] x src/DarkCustomizations/DarkCustomizations.ts:207:1 - error TS2322: Type '{ Card: { styles: { root: { background: string; }; }; }; DatePicker: { styles: (props: IDatePickerStyleProps) => Partial; }; ... 12 more ...; SpinButton: { ...; }; }' is not assignable to type 'ComponentsStyles'. +@fluentui/theme-samples: Property 'Card' is incompatible with index signature. +@fluentui/theme-samples: Type '{ styles: { root: { background: string; }; }; }' is not assignable to type 'ComponentStyles'. +@fluentui/theme-samples: Types of property 'styles' are incompatible. +@fluentui/theme-samples: Type '{ root: { background: string; }; }' is not assignable to type 'IStyleFunctionOrObject | undefined'. +@fluentui/theme-samples: Type '{ root: { background: string; }; }' is not assignable to type 'DeepPartial'. +@fluentui/theme-samples: Property 'root' is incompatible with index signature. +@fluentui/theme-samples: Type '{ background: string; }' is missing the following properties from type 'DeepPartial[]': length, pop, push, concat, and 26 more. +@fluentui/theme-samples: 207 DarkTheme.components = componentStyles; +@fluentui/theme-samples: ~~~~~~~~~~~~~~~~~~~~ +@fluentui/theme-samples: src/DarkCustomizations/styles/PeoplePickerStyles.ts:57:11 - error TS2322: Type 'false | { color: string; selectors: { ':hover': { color: string; }; }; } | undefined' is not assignable to type 'DeepPartial'. +@fluentui/theme-samples: Type 'undefined' is not assignable to type 'DeepPartial'. +@fluentui/theme-samples: 57 selected && { +@fluentui/theme-samples: ~~~~~~~~~~~~~ +@fluentui/theme-samples: 58 color: DarkTheme.palette.black, +@fluentui/theme-samples: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/theme-samples: ... +@fluentui/theme-samples: 63 }, +@fluentui/theme-samples: ~~~~~~~~~~~~~~ +@fluentui/theme-samples: 64 }, +@fluentui/theme-samples: ~~~~~~~~~~~ +@fluentui/theme-samples: Found 2 errors. +@fluentui/theme-samples: [XX:XX:XX XM] x ------------------------------------ +@fluentui/theme-samples: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/theme-samples: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/theme-samples: error Command failed with exit code 1. @fluentui/e2e: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". @fluentui/e2e: [XX:XX:XX XM] x Command not defined: ts -@fluentui/api-docs: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/api-docs: [XX:XX:XX XM] x Error detected while running '_wrapFunction' @fluentui/api-docs: [XX:XX:XX XM] x ------------------------------------ -@fluentui/api-docs: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/api-docs/tsconfig.json" +@fluentui/api-docs: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/api-docs/tsconfig.json" @fluentui/api-docs: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/api-docs: at ChildProcess.emit (events.js:314:20) @fluentui/api-docs: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/api-docs: at maybeClose (internal/child_process.js:1021:16) -@fluentui/api-docs: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/api-docs: at maybeClose (internal/child_process.js:1022:16) +@fluentui/api-docs: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/api-docs: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/api-docs: [XX:XX:XX XM] x stdout: -@fluentui/api-docs: [XX:XX:XX XM] x src/tableJson.ts:52:9 - error TS2322: Type 'readonly HeritageType[] | undefined' is not assignable to type 'HeritageType[] | undefined'. -@fluentui/api-docs: The type 'readonly HeritageType[]' is 'readonly' and cannot be assigned to the mutable type 'HeritageType[]'. +@fluentui/api-docs: [XX:XX:XX XM] x src/tableJson.ts:52:9 - error TS2322: Type '((HeritageType | readonly HeritageType[]) & any[]) | (HeritageType | readonly HeritageType[])[] | undefined' is not assignable to type 'HeritageType[] | undefined'. +@fluentui/api-docs: Type '(HeritageType | readonly HeritageType[])[]' is not assignable to type 'HeritageType[]'. +@fluentui/api-docs: Type 'HeritageType | readonly HeritageType[]' is not assignable to type 'HeritageType'. +@fluentui/api-docs: Property 'excerpt' is missing in type 'readonly HeritageType[]' but required in type 'HeritageType'. @fluentui/api-docs: 52 const extendsArr: HeritageType[] | undefined = @fluentui/api-docs: ~~~~~~~~~~ -@fluentui/api-docs: Found 1 error. +@fluentui/api-docs: ../../node_modules/@microsoft/api-extractor-model/dist/rollup.d.ts:1629:14 +@fluentui/api-docs: 1629 readonly excerpt: Excerpt; +@fluentui/api-docs: ~~~~~~~ +@fluentui/api-docs: 'excerpt' is declared here. +@fluentui/api-docs: src/tableJson.ts:62:9 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/api-docs: 62 ...getTokenHyperlinks(collectedData, extendsType.excerpt.tokens, extendsType.excerpt.tokenRange), +@fluentui/api-docs: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/api-docs: Found 2 errors. @fluentui/api-docs: [XX:XX:XX XM] x ------------------------------------ @fluentui/api-docs: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@fluentui/api-docs: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/api-docs: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] @fluentui/api-docs: error Command failed with exit code 1. @fluentui/react-docsite-components: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-docsite-components: [XX:XX:XX XM] x ------------------------------------ @@ -1422,13 +2191,16 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-docsite-components: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-docsite-components: at ChildProcess.emit (events.js:314:20) @fluentui/react-docsite-components: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-docsite-components: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-docsite-components: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-docsite-components: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-docsite-components: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-docsite-components: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-docsite-components: [XX:XX:XX XM] x stdout: @fluentui/react-docsite-components: [XX:XX:XX XM] x src/components/Page/Page.tsx:21:25 - error TS2307: Cannot find module './Page.module.scss' or its corresponding type declarations. @fluentui/react-docsite-components: 21 import * as styles from './Page.module.scss'; @fluentui/react-docsite-components: ~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-docsite-components: src/components/Page/Page.tsx:288:26 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-docsite-components: 288 jumpLinks.push(...(section.jumpLinks || [])); +@fluentui/react-docsite-components: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @fluentui/react-docsite-components: src/components/Page/sections/BestPracticesSection.tsx:7:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. @fluentui/react-docsite-components: 7 import * as styles from '../Page.module.scss'; @fluentui/react-docsite-components: ~~~~~~~~~~~~~~~~~~~~~ @@ -1469,37 +2241,116 @@ codesandbox-react-northstar-template: error Command failed with exit code 1. @fluentui/react-docsite-components: 52 const App: React.FunctionComponent = props => ; @fluentui/react-docsite-components: ~~~~~~~~~~ @fluentui/react-docsite-components: This spread always overwrites this property. -@fluentui/react-docsite-components: Found 13 errors. +@fluentui/react-docsite-components: Found 14 errors. @fluentui/react-docsite-components: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-docsite-components: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/react-docsite-components: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-docsite-components: error Command failed with exit code 1. +@fluentui/storybook: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/storybook: [XX:XX:XX XM] x ------------------------------------ +@fluentui/storybook: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/storybook/tsconfig.json" +@fluentui/storybook: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/storybook: at ChildProcess.emit (events.js:314:20) +@fluentui/storybook: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/storybook: at maybeClose (internal/child_process.js:1022:16) +@fluentui/storybook: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/storybook: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/storybook: [XX:XX:XX XM] x stdout: +@fluentui/storybook: [XX:XX:XX XM] x ../react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/storybook: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/storybook: The types of 'subComponentStyles.closeButton' are incompatible between these types. +@fluentui/storybook: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/storybook: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/storybook: Property 'root' is incompatible with index signature. +@fluentui/storybook: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/storybook: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/storybook: 96 styles?: IStyleFunctionOrObject; +@fluentui/storybook: ~~~~~~~~~~~~ +@fluentui/storybook: ../react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +@fluentui/storybook: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +@fluentui/storybook: 220 panel: IStyleFunctionOrObject; +@fluentui/storybook: ~~~~~~~~~~~~ +@fluentui/storybook: src/knobs/useTheme.ts:21:43 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/storybook: 21 const themeOptions = [defaultThemeOption, ...v8ThemeOptions, ...v7ThemeOptions]; +@fluentui/storybook: ~~~~~~~~~~~~~~~~~ +@fluentui/storybook: Found 3 errors. +@fluentui/storybook: [XX:XX:XX XM] x ------------------------------------ +@fluentui/storybook: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/storybook: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/storybook: error Command failed with exit code 1. theming-designer: [XX:XX:XX XM] x Error detected while running 'ts:esm' theming-designer: [XX:XX:XX XM] x ------------------------------------ theming-designer: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/theming-designer/tsconfig.json" theming-designer: at ChildProcess.exithandler (child_process.js:308:12) theming-designer: at ChildProcess.emit (events.js:314:20) theming-designer: at ChildProcess.EventEmitter.emit (domain.js:506:15) -theming-designer: at maybeClose (internal/child_process.js:1021:16) -theming-designer: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +theming-designer: at maybeClose (internal/child_process.js:1022:16) +theming-designer: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) theming-designer: at Process.callbackTrampoline (internal/async_hooks.js:126:14) theming-designer: [XX:XX:XX XM] x stdout: -theming-designer: [XX:XX:XX XM] x ../../packages/react-monaco-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@fluentui/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +theming-designer: [XX:XX:XX XM] x ../../packages/react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +theming-designer: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; }; }'. +theming-designer: The types of 'subComponentStyles.closeButton' are incompatible between these types. +theming-designer: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +theming-designer: Type 'Partial' is not assignable to type 'DeepPartial'. +theming-designer: Property 'root' is incompatible with index signature. +theming-designer: Type 'IStyle' is not assignable to type 'DeepPartial[]'. +theming-designer: Type 'string' is not assignable to type 'DeepPartial[]'. +theming-designer: 96 styles?: IStyleFunctionOrObject; +theming-designer: ~~~~~~~~~~~~ +theming-designer: ../../packages/react-monaco-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@fluentui/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. theming-designer: 1 import * as monaco from '@fluentui/monaco-editor/esm/vs/editor/editor.api'; theming-designer: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -theming-designer: Found 1 error. +theming-designer: ../../packages/react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +theming-designer: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; }; }'. +theming-designer: 220 panel: IStyleFunctionOrObject; +theming-designer: ~~~~~~~~~~~~ +theming-designer: Found 3 errors. theming-designer: [XX:XX:XX XM] x ------------------------------------ theming-designer: [XX:XX:XX XM] x Error previously detected. See above for error messages. theming-designer: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] theming-designer: error Command failed with exit code 1. +vr-tests: [XX:XX:XX XM] x Error detected while running 'ts:esm' +vr-tests: [XX:XX:XX XM] x ------------------------------------ +vr-tests: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" +vr-tests: at ChildProcess.exithandler (child_process.js:308:12) +vr-tests: at ChildProcess.emit (events.js:314:20) +vr-tests: at ChildProcess.EventEmitter.emit (domain.js:506:15) +vr-tests: at maybeClose (internal/child_process.js:1022:16) +vr-tests: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +vr-tests: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +vr-tests: [XX:XX:XX XM] x stdout: +vr-tests: [XX:XX:XX XM] x src/stories/ThemeProvider.stories.tsx:54:65 - error TS2322: Type '{ background: string; }' is not assignable to type 'DeepPartial[]'. +vr-tests: Object literal may only specify known properties, and 'background' does not exist in type 'DeepPartial[]'. +vr-tests: 54 theme={{ components: { PrimaryButton: { styles: { root: { background: '#000' } } } } }} +vr-tests: ~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/react-internal/lib/components/Panel/Panel.types.d.ts:96:55 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +vr-tests: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +vr-tests: The types of 'subComponentStyles.closeButton' are incompatible between these types. +vr-tests: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +vr-tests: Type 'Partial' is not assignable to type 'DeepPartial'. +vr-tests: Property 'root' is incompatible with index signature. +vr-tests: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +vr-tests: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +vr-tests: 96 styles?: IStyleFunctionOrObject; +vr-tests: ~~~~~~~~~~~~ +vr-tests: ../../packages/react/lib/components/Dropdown/Dropdown.types.d.ts:220:53 - error TS2344: Type 'IPanelStyles' does not satisfy the constraint 'IStyleSet'. +vr-tests: Type 'IPanelStyles' is not assignable to type '{ subComponentStyles?: { closeButton: IStyleFunctionOrObject; } | undefined; }'. +vr-tests: 220 panel: IStyleFunctionOrObject; +vr-tests: ~~~~~~~~~~~~ +vr-tests: Found 3 errors. +vr-tests: [XX:XX:XX XM] x ------------------------------------ +vr-tests: [XX:XX:XX XM] x Error previously detected. See above for error messages. +vr-tests: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +vr-tests: error Command failed with exit code 1. @fluentui/react-examples: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-examples: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-examples: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-examples/tsconfig.json" @fluentui/react-examples: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/react-examples: at ChildProcess.emit (events.js:314:20) @fluentui/react-examples: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/react-examples: at maybeClose (internal/child_process.js:1021:16) -@fluentui/react-examples: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-examples: at maybeClose (internal/child_process.js:1022:16) +@fluentui/react-examples: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/react-examples: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/react-examples: [XX:XX:XX XM] x stdout: @fluentui/react-examples: [XX:XX:XX XM] x src/react-avatar/utils/StoryExample.tsx:5:27 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. @@ -1529,47 +2380,56 @@ theming-designer: error Command failed with exit code 1. @fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:21:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. @fluentui/react-examples: 21

@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:59:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 59
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:56:31 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 56
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:73:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 73
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:69:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 69
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:97:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 97
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:83:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 83
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:111:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 111
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:107:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 107
+@fluentui/react-examples: ~~~~~~ +@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:121:31 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 121
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:137:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 137
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:147:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 147
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:151:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 151
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:161:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 161
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:176:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 176
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:186:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 186
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:190:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 190
+@fluentui/react-examples: src/react-button/MenuButton/MenuButton.stories.tsx:200:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 200
@fluentui/react-examples: ~~~~~~ @fluentui/react-examples: src/react-button/SplitButton/SplitButton.stories.tsx:21:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. @fluentui/react-examples: 21
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/SplitButton/SplitButton.stories.tsx:70:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 70
+@fluentui/react-examples: src/react-button/SplitButton/SplitButton.stories.tsx:55:29 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 55
+@fluentui/react-examples: ~~~~~~ +@fluentui/react-examples: src/react-button/SplitButton/SplitButton.stories.tsx:80:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 80
@fluentui/react-examples: ~~~~~~ @fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:7:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. @fluentui/react-examples: 7
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:44:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 44
+@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:41:29 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 41
+@fluentui/react-examples: ~~~~~~ +@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:54:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 54
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:55:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 55
+@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:65:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 65
@fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:64:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. -@fluentui/react-examples: 64
+@fluentui/react-examples: src/react-button/ToggleButton/ToggleButton.stories.tsx:74:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-examples: 74
@fluentui/react-examples: ~~~~~~ @fluentui/react-examples: src/react-cards/next/Card/Card.stories.tsx:15:57 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. @fluentui/react-examples: 15 return
; @@ -1625,22 +2485,71 @@ theming-designer: error Command failed with exit code 1. @fluentui/react-examples: src/react-image/Image/Image.stories.tsx:11:74 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. @fluentui/react-examples: 11 return
; @fluentui/react-examples: ~~~~~~ -@fluentui/react-examples: Found 41 errors. +@fluentui/react-examples: src/react/Announced/Announced.QuickActions.Example.tsx:40:33 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/react-examples: 40 const renamedItems = [...prevItems]; +@fluentui/react-examples: ~~~~~~~~~~~~ +@fluentui/react-examples: src/react/CommandBar/CommandBar.ButtonAs.Example.tsx:24:25 - error TS2322: Type 'Partial' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-examples: Type 'Partial' is not assignable to type 'DeepPartial'. +@fluentui/react-examples: Property 'root' is incompatible with index signature. +@fluentui/react-examples: Type 'string | false | IRawStyle | IStyleBaseArray | null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-examples: Type 'null' is not assignable to type 'DeepPartial[] | undefined'. +@fluentui/react-examples: 24 subComponentStyles: { menuItem: itemStyles, callout: {} }, +@fluentui/react-examples: ~~~~~~~~ +@fluentui/react-examples: src/react/ContextualMenu/ContextualMenu.Submenu.Example.tsx:8:22 - error TS2322: Type '{ display: string; marginRight: string; }' is not assignable to type 'DeepPartial[]'. +@fluentui/react-examples: Object literal may only specify known properties, and 'display' does not exist in type 'DeepPartial[]'. +@fluentui/react-examples: 8 label: { root: { display: 'inline-block', marginRight: '10px' } }, +@fluentui/react-examples: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-examples: src/react/TextField/TextField.Styled.Example.tsx:33:7 - error TS2322: Type '(props: ILabelStyleProps) => ILabelStyles' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/react-examples: Type '(props: ILabelStyleProps) => ILabelStyles' is not assignable to type 'IStyleFunction'. +@fluentui/react-examples: Type 'ILabelStyles' is not assignable to type 'DeepPartial'. +@fluentui/react-examples: Index signature is missing in type 'ILabelStyles'. +@fluentui/react-examples: 33 label: getLabelStyles, +@fluentui/react-examples: ~~~~~ +@fluentui/react-examples: Found 48 errors. @fluentui/react-examples: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-examples: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/react-examples: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-examples: error Command failed with exit code 1. -@fluentui/public-docsite: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/public-docsite-resources: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/public-docsite-resources: [XX:XX:XX XM] x ------------------------------------ +@fluentui/public-docsite-resources: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/public-docsite-resources/tsconfig.json" +@fluentui/public-docsite-resources: at ChildProcess.exithandler (child_process.js:308:12) +@fluentui/public-docsite-resources: at ChildProcess.emit (events.js:314:20) +@fluentui/public-docsite-resources: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/public-docsite-resources: at maybeClose (internal/child_process.js:1022:16) +@fluentui/public-docsite-resources: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) +@fluentui/public-docsite-resources: at Process.callbackTrampoline (internal/async_hooks.js:126:14) +@fluentui/public-docsite-resources: [XX:XX:XX XM] x stdout: +@fluentui/public-docsite-resources: [XX:XX:XX XM] x src/components/pages/ThemePage.tsx:68:22 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/public-docsite-resources: 68 const palette = [...this.state.palette]; +@fluentui/public-docsite-resources: ~~~~~~~~~~~~~~~~~~~~~ +@fluentui/public-docsite-resources: Found 1 error. +@fluentui/public-docsite-resources: [XX:XX:XX XM] x ------------------------------------ +@fluentui/public-docsite-resources: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/public-docsite-resources: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/public-docsite-resources: error Command failed with exit code 1. +@fluentui/public-docsite: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/public-docsite: [XX:XX:XX XM] x ------------------------------------ -@fluentui/public-docsite: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/public-docsite/tsconfig.json" +@fluentui/public-docsite: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/public-docsite/tsconfig.json" @fluentui/public-docsite: at ChildProcess.exithandler (child_process.js:308:12) @fluentui/public-docsite: at ChildProcess.emit (events.js:314:20) @fluentui/public-docsite: at ChildProcess.EventEmitter.emit (domain.js:506:15) -@fluentui/public-docsite: at maybeClose (internal/child_process.js:1021:16) -@fluentui/public-docsite: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/public-docsite: at maybeClose (internal/child_process.js:1022:16) +@fluentui/public-docsite: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) @fluentui/public-docsite: at Process.callbackTrampoline (internal/async_hooks.js:126:14) @fluentui/public-docsite: [XX:XX:XX XM] x stdout: -@fluentui/public-docsite: [XX:XX:XX XM] x src/components/Nav/Nav.tsx:70:35 - error TS2339: Property 'navWrapper' does not exist on type 'typeof import("*.scss")'. +@fluentui/public-docsite: [XX:XX:XX XM] x src/components/ComponentPage/ComponentPage.tsx:33:22 - error TS2322: Type 'IStyleSet>' is not assignable to type 'IStyleFunctionOrObject'. +@fluentui/public-docsite: Type 'IStyleSet>' is not assignable to type 'DeepPartial'. +@fluentui/public-docsite: Property 'body' is incompatible with index signature. +@fluentui/public-docsite: Type 'IStyle' is not assignable to type 'DeepPartial[]'. +@fluentui/public-docsite: Type 'string' is not assignable to type 'DeepPartial[]'. +@fluentui/public-docsite: 33 ComponentPage: { styles: componentPageStyles }, +@fluentui/public-docsite: ~~~~~~ +@fluentui/public-docsite: ../../packages/theme/lib/types/Theme.d.ts:98:5 +@fluentui/public-docsite: 98 styles?: IStyleFunctionOrObject; +@fluentui/public-docsite: ~~~~~~ +@fluentui/public-docsite: The expected type comes from property 'styles' which is declared here on type 'ComponentStyles' +@fluentui/public-docsite: src/components/Nav/Nav.tsx:70:35 - error TS2339: Property 'navWrapper' does not exist on type 'typeof import("*.scss")'. @fluentui/public-docsite: 70 return
{this._renderPageNav(pages)}
; @fluentui/public-docsite: ~~~~~~~~~~ @fluentui/public-docsite: src/components/Nav/Nav.tsx:87:34 - error TS2339: Property 'nav' does not exist on type 'typeof import("*.scss")'. @@ -1697,6 +2606,9 @@ theming-designer: error Command failed with exit code 1. @fluentui/public-docsite: src/components/Site/Site.tsx:163:31 - error TS2339: Property 'siteContent' does not exist on type 'typeof import("*.scss")'. @fluentui/public-docsite: 163 className={styles.siteContent} @fluentui/public-docsite: ~~~~~~~~~~~ +@fluentui/public-docsite: src/components/Site/Site.tsx:224:30 - error TS2343: This syntax requires an imported helper named '__spreadArray' which does not exist in 'tslib'. Consider upgrading your version of 'tslib'. +@fluentui/public-docsite: 224 activePages.push(...platforms); +@fluentui/public-docsite: ~~~~~~~~~~~~ @fluentui/public-docsite: src/components/Site/Site.tsx:280:32 - error TS2339: Property 'siteNavScrollWrapper' does not exist on type 'typeof import("*.scss")'. @fluentui/public-docsite: 280
@fluentui/public-docsite: ~~~~~~~~~~~~~~~~~~~~ @@ -1838,11 +2750,11 @@ theming-designer: error Command failed with exit code 1. @fluentui/public-docsite: src/pages/Styles/ElevationPage/ElevationPage.tsx:123:41 - error TS2339: Property 'caption' does not exist on type 'typeof import("*.scss")'. @fluentui/public-docsite: 123 Depth {row.level} @fluentui/public-docsite: ~~~~~~~ -@fluentui/public-docsite: src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx:48:73 - error TS2339: Property 'iconGrid' does not exist on type 'typeof import("*.scss")'. -@fluentui/public-docsite: 48 -@fluentui/public-docsite: ~~~~~~~~ -@fluentui/public-docsite: src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx:51:69 - error TS2339: Property 'iconGrid' does not exist on type 'typeof import("*.scss")'. -@fluentui/public-docsite: 51 +@fluentui/public-docsite: src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx:49:86 - error TS2339: Property 'iconGrid' does not exist on type 'typeof import("*.scss")'. +@fluentui/public-docsite: 49 +@fluentui/public-docsite: ~~~~~~~~ +@fluentui/public-docsite: src/pages/Styles/FabricIconsPage/FabricIconsPage.tsx:52:69 - error TS2339: Property 'iconGrid' does not exist on type 'typeof import("*.scss")'. +@fluentui/public-docsite: 52 @fluentui/public-docsite: ~~~~~~~~ @fluentui/public-docsite: src/pages/Styles/FileTypeIconsPage/FileTypeIconsPage.tsx:60:43 - error TS2339: Property 'exampleIcons' does not exist on type 'typeof import("*.scss")'. @fluentui/public-docsite: 60