From 006a327320cd2118fc548c2d1464b0abccc5797e Mon Sep 17 00:00:00 2001 From: Justin Bay Date: Sat, 10 Aug 2019 13:50:14 -0400 Subject: [PATCH 1/3] Flag non-nullable values with call expressions in `if` statements as errors --- src/compiler/checker.ts | 20 +++- src/compiler/diagnosticMessages.json | 5 +- ...ruthinessCallExpressionCoercion.errors.txt | 69 ++++++++++++ .../truthinessCallExpressionCoercion.js | 94 ++++++++++++++++ .../truthinessCallExpressionCoercion.symbols | 97 ++++++++++++++++ .../truthinessCallExpressionCoercion.types | 105 ++++++++++++++++++ .../truthinessCallExpressionCoercion.ts | 52 +++++++++ 7 files changed, 440 insertions(+), 2 deletions(-) create mode 100644 tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt create mode 100644 tests/baselines/reference/truthinessCallExpressionCoercion.js create mode 100644 tests/baselines/reference/truthinessCallExpressionCoercion.symbols create mode 100644 tests/baselines/reference/truthinessCallExpressionCoercion.types create mode 100644 tests/cases/compiler/truthinessCallExpressionCoercion.ts diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index cfad47b65336f..f639db8b97177 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -27930,7 +27930,25 @@ namespace ts { // Grammar checking checkGrammarStatementInAmbientContext(node); - checkTruthinessExpression(node.expression); + const type = checkTruthinessExpression(node.expression); + + if (strictNullChecks && + (node.expression.kind === SyntaxKind.Identifier || + node.expression.kind === SyntaxKind.PropertyAccessExpression || + node.expression.kind === SyntaxKind.ElementAccessExpression)) { + const possiblyFalsy = !!getFalsyFlags(type); + if (!possiblyFalsy) { + // While it technically should be invalid for any known-truthy value + // to be tested, we de-scope to functions as a heuristic to identify + // the most common bugs. There are too many false positives for values + // sourced from type definitions without strictNullChecks otherwise. + const callSignatures = getSignaturesOfType(type, SignatureKind.Call); + if (callSignatures.length > 0) { + error(node.expression, Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + } + } + } + checkSourceElement(node.thenStatement); if (node.thenStatement.kind === SyntaxKind.EmptyStatement) { diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index b296c224d089d..4d3102254656b 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2689,7 +2689,10 @@ "category": "Error", "code": 2773 }, - + "This condition will always return true since the function is always defined. Did you mean to call it instead?": { + "category": "Error", + "code": 2774 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt b/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt new file mode 100644 index 0000000000000..0bd5a0cbb96ef --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt @@ -0,0 +1,69 @@ +tests/cases/compiler/truthinessCallExpressionCoercion.ts(3,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(7,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(24,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(27,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(44,13): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + + +==== tests/cases/compiler/truthinessCallExpressionCoercion.ts (5 errors) ==== + function func() { return Math.random() > 0.5; } + + if (func) { // error + ~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + } + + function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { + if (required) { // error + ~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + } + + if (required()) { // ok + } + + if (optional) { // ok + } + } + + function checksPropertyAndElementAccess() { + const x = { + foo: { + bar() { } + } + } + + if (x.foo.bar) { // error + ~~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + } + + if (x.foo['bar']) { // error + ~~~~~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + } + } + + function maybeBoolean(param: boolean | (() => boolean)) { + if (param) { // ok + } + } + + class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + if (this.isUser) { // error + ~~~~~~~~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + } + + if (this.maybeIsUser) { // ok + } + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.js b/tests/baselines/reference/truthinessCallExpressionCoercion.js new file mode 100644 index 0000000000000..87c010f3502d4 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.js @@ -0,0 +1,94 @@ +//// [truthinessCallExpressionCoercion.ts] +function func() { return Math.random() > 0.5; } + +if (func) { // error +} + +function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { + if (required) { // error + } + + if (required()) { // ok + } + + if (optional) { // ok + } +} + +function checksPropertyAndElementAccess() { + const x = { + foo: { + bar() { } + } + } + + if (x.foo.bar) { // error + } + + if (x.foo['bar']) { // error + } +} + +function maybeBoolean(param: boolean | (() => boolean)) { + if (param) { // ok + } +} + +class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + if (this.isUser) { // error + } + + if (this.maybeIsUser) { // ok + } + } +} + + +//// [truthinessCallExpressionCoercion.js] +function func() { return Math.random() > 0.5; } +if (func) { // error +} +function onlyErrorsWhenNonNullable(required, optional) { + if (required) { // error + } + if (required()) { // ok + } + if (optional) { // ok + } +} +function checksPropertyAndElementAccess() { + var x = { + foo: { + bar: function () { } + } + }; + if (x.foo.bar) { // error + } + if (x.foo['bar']) { // error + } +} +function maybeBoolean(param) { + if (param) { // ok + } +} +var Foo = /** @class */ (function () { + function Foo() { + } + Foo.prototype.isUser = function () { + return true; + }; + Foo.prototype.test = function () { + if (this.isUser) { // error + } + if (this.maybeIsUser) { // ok + } + }; + return Foo; +}()); diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.symbols b/tests/baselines/reference/truthinessCallExpressionCoercion.symbols new file mode 100644 index 0000000000000..d6141c4394148 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.symbols @@ -0,0 +1,97 @@ +=== tests/cases/compiler/truthinessCallExpressionCoercion.ts === +function func() { return Math.random() > 0.5; } +>func : Symbol(func, Decl(truthinessCallExpressionCoercion.ts, 0, 0)) +>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) + +if (func) { // error +>func : Symbol(func, Decl(truthinessCallExpressionCoercion.ts, 0, 0)) +} + +function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenNonNullable : Symbol(onlyErrorsWhenNonNullable, Decl(truthinessCallExpressionCoercion.ts, 3, 1)) +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 5, 59)) + + if (required) { // error +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) + } + + if (required()) { // ok +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) + } + + if (optional) { // ok +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 5, 59)) + } +} + +function checksPropertyAndElementAccess() { +>checksPropertyAndElementAccess : Symbol(checksPropertyAndElementAccess, Decl(truthinessCallExpressionCoercion.ts, 14, 1)) + + const x = { +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) + + foo: { +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) + + bar() { } +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) + } + } + + if (x.foo.bar) { // error +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) + } + + if (x.foo['bar']) { // error +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) +>'bar' : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) + } +} + +function maybeBoolean(param: boolean | (() => boolean)) { +>maybeBoolean : Symbol(maybeBoolean, Decl(truthinessCallExpressionCoercion.ts, 28, 1)) +>param : Symbol(param, Decl(truthinessCallExpressionCoercion.ts, 30, 22)) + + if (param) { // ok +>param : Symbol(param, Decl(truthinessCallExpressionCoercion.ts, 30, 22)) + } +} + +class Foo { +>Foo : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) + + maybeIsUser?: () => boolean; +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) + + isUser() { +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) + + return true; + } + + test() { +>test : Symbol(Foo.test, Decl(truthinessCallExpressionCoercion.ts, 40, 5)) + + if (this.isUser) { // error +>this.isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) + } + + if (this.maybeIsUser) { // ok +>this.maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) + } + } +} + diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.types b/tests/baselines/reference/truthinessCallExpressionCoercion.types new file mode 100644 index 0000000000000..478c398406607 --- /dev/null +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.types @@ -0,0 +1,105 @@ +=== tests/cases/compiler/truthinessCallExpressionCoercion.ts === +function func() { return Math.random() > 0.5; } +>func : () => boolean +>Math.random() > 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : 0.5 + +if (func) { // error +>func : () => boolean +} + +function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenNonNullable : (required: () => boolean, optional?: (() => boolean) | undefined) => void +>required : () => boolean +>optional : (() => boolean) | undefined + + if (required) { // error +>required : () => boolean + } + + if (required()) { // ok +>required() : boolean +>required : () => boolean + } + + if (optional) { // ok +>optional : (() => boolean) | undefined + } +} + +function checksPropertyAndElementAccess() { +>checksPropertyAndElementAccess : () => void + + const x = { +>x : { foo: { bar(): void; }; } +>{ foo: { bar() { } } } : { foo: { bar(): void; }; } + + foo: { +>foo : { bar(): void; } +>{ bar() { } } : { bar(): void; } + + bar() { } +>bar : () => void + } + } + + if (x.foo.bar) { // error +>x.foo.bar : () => void +>x.foo : { bar(): void; } +>x : { foo: { bar(): void; }; } +>foo : { bar(): void; } +>bar : () => void + } + + if (x.foo['bar']) { // error +>x.foo['bar'] : () => void +>x.foo : { bar(): void; } +>x : { foo: { bar(): void; }; } +>foo : { bar(): void; } +>'bar' : "bar" + } +} + +function maybeBoolean(param: boolean | (() => boolean)) { +>maybeBoolean : (param: boolean | (() => boolean)) => void +>param : boolean | (() => boolean) + + if (param) { // ok +>param : boolean | (() => boolean) + } +} + +class Foo { +>Foo : Foo + + maybeIsUser?: () => boolean; +>maybeIsUser : (() => boolean) | undefined + + isUser() { +>isUser : () => boolean + + return true; +>true : true + } + + test() { +>test : () => void + + if (this.isUser) { // error +>this.isUser : () => boolean +>this : this +>isUser : () => boolean + } + + if (this.maybeIsUser) { // ok +>this.maybeIsUser : (() => boolean) | undefined +>this : this +>maybeIsUser : (() => boolean) | undefined + } + } +} + diff --git a/tests/cases/compiler/truthinessCallExpressionCoercion.ts b/tests/cases/compiler/truthinessCallExpressionCoercion.ts new file mode 100644 index 0000000000000..1fa3105b9edbb --- /dev/null +++ b/tests/cases/compiler/truthinessCallExpressionCoercion.ts @@ -0,0 +1,52 @@ +// @strictNullChecks:true + +function func() { return Math.random() > 0.5; } + +if (func) { // error +} + +function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { + if (required) { // error + } + + if (required()) { // ok + } + + if (optional) { // ok + } +} + +function checksPropertyAndElementAccess() { + const x = { + foo: { + bar() { } + } + } + + if (x.foo.bar) { // error + } + + if (x.foo['bar']) { // error + } +} + +function maybeBoolean(param: boolean | (() => boolean)) { + if (param) { // ok + } +} + +class Foo { + maybeIsUser?: () => boolean; + + isUser() { + return true; + } + + test() { + if (this.isUser) { // error + } + + if (this.maybeIsUser) { // ok + } + } +} From 3c9e3383962255870450b02aa98c599743fa8cd5 Mon Sep 17 00:00:00 2001 From: Justin Bay Date: Sun, 18 Aug 2019 12:48:05 -0400 Subject: [PATCH 2/3] Only error when testing functions that are not used in the following block --- src/compiler/checker.ts | 70 ++++++-- src/compiler/core.ts | 2 +- src/compiler/program.ts | 22 ++- ...ruthinessCallExpressionCoercion.errors.txt | 70 +++++--- .../truthinessCallExpressionCoercion.js | 92 +++++++--- .../truthinessCallExpressionCoercion.symbols | 156 +++++++++++------ .../truthinessCallExpressionCoercion.types | 164 +++++++++++++----- .../truthinessCallExpressionCoercion.ts | 50 ++++-- 8 files changed, 436 insertions(+), 190 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f639db8b97177..32fa7e14c956b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -27931,24 +27931,7 @@ namespace ts { checkGrammarStatementInAmbientContext(node); const type = checkTruthinessExpression(node.expression); - - if (strictNullChecks && - (node.expression.kind === SyntaxKind.Identifier || - node.expression.kind === SyntaxKind.PropertyAccessExpression || - node.expression.kind === SyntaxKind.ElementAccessExpression)) { - const possiblyFalsy = !!getFalsyFlags(type); - if (!possiblyFalsy) { - // While it technically should be invalid for any known-truthy value - // to be tested, we de-scope to functions as a heuristic to identify - // the most common bugs. There are too many false positives for values - // sourced from type definitions without strictNullChecks otherwise. - const callSignatures = getSignaturesOfType(type, SignatureKind.Call); - if (callSignatures.length > 0) { - error(node.expression, Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); - } - } - } - + checkTestingKnownTruthyCallableType(node, type); checkSourceElement(node.thenStatement); if (node.thenStatement.kind === SyntaxKind.EmptyStatement) { @@ -27958,6 +27941,57 @@ namespace ts { checkSourceElement(node.elseStatement); } + function checkTestingKnownTruthyCallableType(ifStatement: IfStatement, type: Type) { + if (!strictNullChecks) { + return; + } + + const testedNode = isIdentifier(ifStatement.expression) + ? ifStatement.expression + : isPropertyAccessExpression(ifStatement.expression) + ? ifStatement.expression.name + : undefined; + + if (!testedNode) { + return; + } + + const possiblyFalsy = getFalsyFlags(type); + if (possiblyFalsy) { + return; + } + + // While it technically should be invalid for any known-truthy value + // to be tested, we de-scope to functions unrefenced in the block as a + // heuristic to identify the most common bugs. There are too many + // false positives for values sourced from type definitions without + // strictNullChecks otherwise. + const callSignatures = getSignaturesOfType(type, SignatureKind.Call); + if (callSignatures.length === 0) { + return; + } + + const testedFunctionSymbol = getSymbolAtLocation(testedNode); + if (!testedFunctionSymbol) { + return; + } + + const functionIsUsedInBody = forEachChild(ifStatement.thenStatement, function check(childNode): boolean | undefined { + if (isIdentifier(childNode)) { + const childSymbol = getSymbolAtLocation(childNode); + if (childSymbol && childSymbol.id === testedFunctionSymbol.id) { + return true; + } + } + + return forEachChild(childNode, check); + }); + + if (!functionIsUsedInBody) { + error(ifStatement.expression, Diagnostics.This_condition_will_always_return_true_since_the_function_is_always_defined_Did_you_mean_to_call_it_instead); + } + } + function checkDoStatement(node: DoStatement) { // Grammar checking checkGrammarStatementInAmbientContext(node); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 12fbd6fb4ffa6..96273122b992d 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1653,7 +1653,7 @@ namespace ts { */ export function compose(...args: ((t: T) => T)[]): (t: T) => T; export function compose(a: (t: T) => T, b: (t: T) => T, c: (t: T) => T, d: (t: T) => T, e: (t: T) => T): (t: T) => T { - if (e) { + if (!!e) { const args: ((t: T) => T)[] = []; for (let i = 0; i < arguments.length; i++) { args[i] = arguments[i]; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 76c92ad74bb91..0c3338ae31247 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -1362,18 +1362,16 @@ namespace ts { // try to verify results of module resolution for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { const newSourceFilePath = getNormalizedAbsolutePath(newSourceFile.originalFileName, currentDirectory); - if (resolveModuleNamesWorker) { - const moduleNames = getModuleNames(newSourceFile); - const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile); - // ensure that module resolution results are still correct - const resolutionsChanged = hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo); - if (resolutionsChanged) { - oldProgram.structureIsReused = StructureIsReused.SafeModules; - newSourceFile.resolvedModules = zipToMap(moduleNames, resolutions); - } - else { - newSourceFile.resolvedModules = oldSourceFile.resolvedModules; - } + const moduleNames = getModuleNames(newSourceFile); + const resolutions = resolveModuleNamesReusingOldState(moduleNames, newSourceFilePath, newSourceFile); + // ensure that module resolution results are still correct + const resolutionsChanged = hasChangesInResolutions(moduleNames, resolutions, oldSourceFile.resolvedModules, moduleResolutionIsEqualTo); + if (resolutionsChanged) { + oldProgram.structureIsReused = StructureIsReused.SafeModules; + newSourceFile.resolvedModules = zipToMap(moduleNames, resolutions); + } + else { + newSourceFile.resolvedModules = oldSourceFile.resolvedModules; } if (resolveTypeReferenceDirectiveNamesWorker) { // We lower-case all type references because npm automatically lowercases all packages. See GH#9824. diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt b/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt index 0bd5a0cbb96ef..1599a70db4eac 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.errors.txt @@ -1,35 +1,63 @@ -tests/cases/compiler/truthinessCallExpressionCoercion.ts(3,5): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -tests/cases/compiler/truthinessCallExpressionCoercion.ts(7,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -tests/cases/compiler/truthinessCallExpressionCoercion.ts(24,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -tests/cases/compiler/truthinessCallExpressionCoercion.ts(27,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? -tests/cases/compiler/truthinessCallExpressionCoercion.ts(44,13): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(2,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(18,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(36,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(50,9): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +tests/cases/compiler/truthinessCallExpressionCoercion.ts(66,13): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? ==== tests/cases/compiler/truthinessCallExpressionCoercion.ts (5 errors) ==== - function func() { return Math.random() > 0.5; } - - if (func) { // error - ~~~~ -!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? - } - - function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { + function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { if (required) { // error ~~~~~~~~ !!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? } + if (optional) { // ok + } + + if (!!required) { // ok + } + if (required()) { // ok } + } - if (optional) { // ok + function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + if (test) { // error + ~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + console.log('test'); + } + + if (test) { // ok + console.log(test); + } + + if (test) { // ok + test(); + } + + if (test) { // ok + [() => null].forEach(() => { + test(); + }); + } + + if (test) { // error + ~~~~ +!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? + [() => null].forEach(test => { + test(); + }); } } - function checksPropertyAndElementAccess() { + function checksPropertyAccess() { const x = { foo: { - bar() { } + bar() { return true; } } } @@ -37,15 +65,9 @@ tests/cases/compiler/truthinessCallExpressionCoercion.ts(44,13): error TS2774: T ~~~~~~~~~ !!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? } - - if (x.foo['bar']) { // error - ~~~~~~~~~~~~ -!!! error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? - } - } - function maybeBoolean(param: boolean | (() => boolean)) { - if (param) { // ok + if (x.foo.bar) { // ok + x.foo.bar; } } diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.js b/tests/baselines/reference/truthinessCallExpressionCoercion.js index 87c010f3502d4..19ab1722c81cd 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.js +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.js @@ -1,36 +1,58 @@ //// [truthinessCallExpressionCoercion.ts] -function func() { return Math.random() > 0.5; } +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { + if (required) { // error + } -if (func) { // error -} + if (optional) { // ok + } -function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { - if (required) { // error + if (!!required) { // ok } if (required()) { // ok } +} - if (optional) { // ok +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + if (test) { // error + console.log('test'); + } + + if (test) { // ok + console.log(test); + } + + if (test) { // ok + test(); + } + + if (test) { // ok + [() => null].forEach(() => { + test(); + }); + } + + if (test) { // error + [() => null].forEach(test => { + test(); + }); } } -function checksPropertyAndElementAccess() { +function checksPropertyAccess() { const x = { foo: { - bar() { } + bar() { return true; } } } if (x.foo.bar) { // error } - - if (x.foo['bar']) { // error - } -} -function maybeBoolean(param: boolean | (() => boolean)) { - if (param) { // ok + if (x.foo.bar) { // ok + x.foo.bar; } } @@ -52,30 +74,48 @@ class Foo { //// [truthinessCallExpressionCoercion.js] -function func() { return Math.random() > 0.5; } -if (func) { // error -} -function onlyErrorsWhenNonNullable(required, optional) { +function onlyErrorsWhenTestingNonNullableFunctionType(required, optional) { if (required) { // error } + if (optional) { // ok + } + if (!!required) { // ok + } if (required()) { // ok } - if (optional) { // ok +} +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + if (test) { // error + console.log('test'); + } + if (test) { // ok + console.log(test); + } + if (test) { // ok + test(); + } + if (test) { // ok + [function () { return null; }].forEach(function () { + test(); + }); + } + if (test) { // error + [function () { return null; }].forEach(function (test) { + test(); + }); } } -function checksPropertyAndElementAccess() { +function checksPropertyAccess() { var x = { foo: { - bar: function () { } + bar: function () { return true; } } }; if (x.foo.bar) { // error } - if (x.foo['bar']) { // error - } -} -function maybeBoolean(param) { - if (param) { // ok + if (x.foo.bar) { // ok + x.foo.bar; } } var Foo = /** @class */ (function () { diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.symbols b/tests/baselines/reference/truthinessCallExpressionCoercion.symbols index d6141c4394148..cbfe456a82ce2 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.symbols +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.symbols @@ -1,96 +1,152 @@ === tests/cases/compiler/truthinessCallExpressionCoercion.ts === -function func() { return Math.random() > 0.5; } ->func : Symbol(func, Decl(truthinessCallExpressionCoercion.ts, 0, 0)) +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenTestingNonNullableFunctionType : Symbol(onlyErrorsWhenTestingNonNullableFunctionType, Decl(truthinessCallExpressionCoercion.ts, 0, 0)) +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 0, 54)) +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 0, 78)) + + if (required) { // error +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 0, 54)) + } + + if (optional) { // ok +>optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 0, 78)) + } + + if (!!required) { // ok +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 0, 54)) + } + + if (required()) { // ok +>required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 0, 54)) + } +} + +function onlyErrorsWhenUnusedInBody() { +>onlyErrorsWhenUnusedInBody : Symbol(onlyErrorsWhenUnusedInBody, Decl(truthinessCallExpressionCoercion.ts, 12, 1)) + + function test() { return Math.random() > 0.5; } +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) >Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) >Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --)) -if (func) { // error ->func : Symbol(func, Decl(truthinessCallExpressionCoercion.ts, 0, 0)) -} + if (test) { // error +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) + + console.log('test'); +>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, --, --)) + } + + if (test) { // ok +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) + + console.log(test); +>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, --, --)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) + } -function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { ->onlyErrorsWhenNonNullable : Symbol(onlyErrorsWhenNonNullable, Decl(truthinessCallExpressionCoercion.ts, 3, 1)) ->required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) ->optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 5, 59)) + if (test) { // ok +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) - if (required) { // error ->required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) + test(); +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) } + + if (test) { // ok +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) - if (required()) { // ok ->required : Symbol(required, Decl(truthinessCallExpressionCoercion.ts, 5, 35)) + [() => null].forEach(() => { +>[() => null].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) + + test(); +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) + + }); } + + if (test) { // error +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 14, 39)) - if (optional) { // ok ->optional : Symbol(optional, Decl(truthinessCallExpressionCoercion.ts, 5, 59)) + [() => null].forEach(test => { +>[() => null].forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 36, 29)) + + test(); +>test : Symbol(test, Decl(truthinessCallExpressionCoercion.ts, 36, 29)) + + }); } } -function checksPropertyAndElementAccess() { ->checksPropertyAndElementAccess : Symbol(checksPropertyAndElementAccess, Decl(truthinessCallExpressionCoercion.ts, 14, 1)) +function checksPropertyAccess() { +>checksPropertyAccess : Symbol(checksPropertyAccess, Decl(truthinessCallExpressionCoercion.ts, 40, 1)) const x = { ->x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 43, 9)) foo: { ->foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) - bar() { } ->bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) + bar() { return true; } +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) } } if (x.foo.bar) { // error ->x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) ->x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) ->x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) ->foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) ->bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 43, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) } - - if (x.foo['bar']) { // error ->x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) ->x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 17, 9)) ->foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 17, 15)) ->'bar' : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 18, 14)) - } -} - -function maybeBoolean(param: boolean | (() => boolean)) { ->maybeBoolean : Symbol(maybeBoolean, Decl(truthinessCallExpressionCoercion.ts, 28, 1)) ->param : Symbol(param, Decl(truthinessCallExpressionCoercion.ts, 30, 22)) - if (param) { // ok ->param : Symbol(param, Decl(truthinessCallExpressionCoercion.ts, 30, 22)) + if (x.foo.bar) { // ok +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 43, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) + + x.foo.bar; +>x.foo.bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) +>x.foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>x : Symbol(x, Decl(truthinessCallExpressionCoercion.ts, 43, 9)) +>foo : Symbol(foo, Decl(truthinessCallExpressionCoercion.ts, 43, 15)) +>bar : Symbol(bar, Decl(truthinessCallExpressionCoercion.ts, 44, 14)) } } class Foo { ->Foo : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) +>Foo : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 55, 1)) maybeIsUser?: () => boolean; ->maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 57, 11)) isUser() { ->isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 58, 32)) return true; } test() { ->test : Symbol(Foo.test, Decl(truthinessCallExpressionCoercion.ts, 40, 5)) +>test : Symbol(Foo.test, Decl(truthinessCallExpressionCoercion.ts, 62, 5)) if (this.isUser) { // error ->this.isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) ->this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) ->isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 36, 32)) +>this.isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 58, 32)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 55, 1)) +>isUser : Symbol(Foo.isUser, Decl(truthinessCallExpressionCoercion.ts, 58, 32)) } if (this.maybeIsUser) { // ok ->this.maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) ->this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 33, 1)) ->maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 35, 11)) +>this.maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 57, 11)) +>this : Symbol(Foo, Decl(truthinessCallExpressionCoercion.ts, 55, 1)) +>maybeIsUser : Symbol(Foo.maybeIsUser, Decl(truthinessCallExpressionCoercion.ts, 57, 11)) } } } diff --git a/tests/baselines/reference/truthinessCallExpressionCoercion.types b/tests/baselines/reference/truthinessCallExpressionCoercion.types index 478c398406607..1cbb89c14a3af 100644 --- a/tests/baselines/reference/truthinessCallExpressionCoercion.types +++ b/tests/baselines/reference/truthinessCallExpressionCoercion.types @@ -1,19 +1,6 @@ === tests/cases/compiler/truthinessCallExpressionCoercion.ts === -function func() { return Math.random() > 0.5; } ->func : () => boolean ->Math.random() > 0.5 : boolean ->Math.random() : number ->Math.random : () => number ->Math : Math ->random : () => number ->0.5 : 0.5 - -if (func) { // error ->func : () => boolean -} - -function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { ->onlyErrorsWhenNonNullable : (required: () => boolean, optional?: (() => boolean) | undefined) => void +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { +>onlyErrorsWhenTestingNonNullableFunctionType : (required: () => boolean, optional?: (() => boolean) | undefined) => void >required : () => boolean >optional : (() => boolean) | undefined @@ -21,55 +8,142 @@ function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boo >required : () => boolean } + if (optional) { // ok +>optional : (() => boolean) | undefined + } + + if (!!required) { // ok +>!!required : true +>!required : false +>required : () => boolean + } + if (required()) { // ok >required() : boolean >required : () => boolean } +} - if (optional) { // ok ->optional : (() => boolean) | undefined +function onlyErrorsWhenUnusedInBody() { +>onlyErrorsWhenUnusedInBody : () => void + + function test() { return Math.random() > 0.5; } +>test : () => boolean +>Math.random() > 0.5 : boolean +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number +>0.5 : 0.5 + + if (test) { // error +>test : () => boolean + + console.log('test'); +>console.log('test') : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>'test' : "test" + } + + if (test) { // ok +>test : () => boolean + + console.log(test); +>console.log(test) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>test : () => boolean + } + + if (test) { // ok +>test : () => boolean + + test(); +>test() : boolean +>test : () => boolean + } + + if (test) { // ok +>test : () => boolean + + [() => null].forEach(() => { +>[() => null].forEach(() => { test(); }) : void +>[() => null].forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>[() => null] : (() => null)[] +>() => null : () => null +>null : null +>forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>() => { test(); } : () => void + + test(); +>test() : boolean +>test : () => boolean + + }); + } + + if (test) { // error +>test : () => boolean + + [() => null].forEach(test => { +>[() => null].forEach(test => { test(); }) : void +>[() => null].forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>[() => null] : (() => null)[] +>() => null : () => null +>null : null +>forEach : (callbackfn: (value: () => null, index: number, array: (() => null)[]) => void, thisArg?: any) => void +>test => { test(); } : (test: () => null) => void +>test : () => null + + test(); +>test() : null +>test : () => null + + }); } } -function checksPropertyAndElementAccess() { ->checksPropertyAndElementAccess : () => void +function checksPropertyAccess() { +>checksPropertyAccess : () => void const x = { ->x : { foo: { bar(): void; }; } ->{ foo: { bar() { } } } : { foo: { bar(): void; }; } +>x : { foo: { bar(): boolean; }; } +>{ foo: { bar() { return true; } } } : { foo: { bar(): boolean; }; } foo: { ->foo : { bar(): void; } ->{ bar() { } } : { bar(): void; } +>foo : { bar(): boolean; } +>{ bar() { return true; } } : { bar(): boolean; } - bar() { } ->bar : () => void + bar() { return true; } +>bar : () => boolean +>true : true } } if (x.foo.bar) { // error ->x.foo.bar : () => void ->x.foo : { bar(): void; } ->x : { foo: { bar(): void; }; } ->foo : { bar(): void; } ->bar : () => void - } - - if (x.foo['bar']) { // error ->x.foo['bar'] : () => void ->x.foo : { bar(): void; } ->x : { foo: { bar(): void; }; } ->foo : { bar(): void; } ->'bar' : "bar" +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean } -} - -function maybeBoolean(param: boolean | (() => boolean)) { ->maybeBoolean : (param: boolean | (() => boolean)) => void ->param : boolean | (() => boolean) - if (param) { // ok ->param : boolean | (() => boolean) + if (x.foo.bar) { // ok +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean + + x.foo.bar; +>x.foo.bar : () => boolean +>x.foo : { bar(): boolean; } +>x : { foo: { bar(): boolean; }; } +>foo : { bar(): boolean; } +>bar : () => boolean } } diff --git a/tests/cases/compiler/truthinessCallExpressionCoercion.ts b/tests/cases/compiler/truthinessCallExpressionCoercion.ts index 1fa3105b9edbb..431a0b0463c17 100644 --- a/tests/cases/compiler/truthinessCallExpressionCoercion.ts +++ b/tests/cases/compiler/truthinessCallExpressionCoercion.ts @@ -1,37 +1,59 @@ // @strictNullChecks:true -function func() { return Math.random() > 0.5; } +function onlyErrorsWhenTestingNonNullableFunctionType(required: () => boolean, optional?: () => boolean) { + if (required) { // error + } -if (func) { // error -} + if (optional) { // ok + } -function onlyErrorsWhenNonNullable(required: () => boolean, optional?: () => boolean) { - if (required) { // error + if (!!required) { // ok } if (required()) { // ok } +} - if (optional) { // ok +function onlyErrorsWhenUnusedInBody() { + function test() { return Math.random() > 0.5; } + + if (test) { // error + console.log('test'); + } + + if (test) { // ok + console.log(test); + } + + if (test) { // ok + test(); + } + + if (test) { // ok + [() => null].forEach(() => { + test(); + }); + } + + if (test) { // error + [() => null].forEach(test => { + test(); + }); } } -function checksPropertyAndElementAccess() { +function checksPropertyAccess() { const x = { foo: { - bar() { } + bar() { return true; } } } if (x.foo.bar) { // error } - - if (x.foo['bar']) { // error - } -} -function maybeBoolean(param: boolean | (() => boolean)) { - if (param) { // ok + if (x.foo.bar) { // ok + x.foo.bar; } } From 04638a15774293202bd2cae2473d8787377fa205 Mon Sep 17 00:00:00 2001 From: typescript-bot Date: Mon, 23 Sep 2019 20:45:24 +0000 Subject: [PATCH 3/3] Update user baselines --- .../baselines/reference/docker/azure-sdk.log | 50 +++--- .../reference/docker/office-ui-fabric.log | 40 ++++- tests/baselines/reference/docker/vscode.log | 10 +- tests/baselines/reference/user/axios-src.log | 36 ++-- tests/baselines/reference/user/npm.log | 2 + tests/baselines/reference/user/prettier.log | 164 ++++++++++-------- tests/baselines/reference/user/puppeteer.log | 38 ++-- 7 files changed, 198 insertions(+), 142 deletions(-) diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index fa91089f9d8b9..986ee8506ee31 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,32 +2,36 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 12.9.1 (pre-LTS) +Node.js version is 12.10.0 (pre-LTS) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... XX of XX: [@azure/abort-controller] completed successfully in ? seconds XX of XX: [@azure/core-auth] completed successfully in ? seconds +XX of XX: [@azure/core-tracing] completed successfully in ? seconds XX of XX: [@azure/core-http] completed successfully in ? seconds XX of XX: [@azure/identity] completed successfully in ? seconds XX of XX: [@azure/core-amqp] completed successfully in ? seconds XX of XX: [@azure/core-arm] completed successfully in ? seconds XX of XX: [@azure/core-paging] completed successfully in ? seconds -XX of XX: [@azure/event-processor-host] completed successfully in ? seconds XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds -XX of XX: [@azure/app-configuration] completed successfully in ? seconds +XX of XX: [@azure/event-hubs] completed successfully in ? seconds +XX of XX: [@azure/event-processor-host] completed successfully in ? seconds +XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds +XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds +Warning: You have changed the public API signature for this project. Updating review/app-configuration.api.md XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds -XX of XX: [@azure/core-tracing] completed successfully in ? seconds Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md dist-esm/index.js → dist/index.js... (!) Unresolved dependencies https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js, dist-esm/retry/defaultRetryPolicy.js) +tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Databases.js, dist-esm/client/Database/Database.js, dist-esm/client/Item/Item.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Item/Items.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js) @azure/cosmos-sign (imported by dist-esm/auth.js) universal-user-agent (imported by dist-esm/common/platform.js) -uuid/v4 (imported by dist-esm/client/Item/Items.js) +uuid/v4 (imported by dist-esm/ClientContext.js, dist-esm/client/Item/Items.js) binary-search-bounds (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/routing/inMemoryCollectionRoutingMap.js) priorityqueuejs (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js) semaphore (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js) +debug (imported by dist-esm/common/logger.js) node-abort-controller (imported by dist-esm/request/RequestHandler.js) node-fetch (imported by dist-esm/request/RequestHandler.js) atob (imported by dist-esm/session/sessionContainer.js) @@ -35,9 +39,10 @@ crypto-hash (imported by dist-esm/queryExecutionContext/EndpointComponent/Ordere fast-json-stable-stringify (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js) (!) Missing global variable names Use output.globals to specify browser global variable names corresponding to external modules -universal-user-agent (guessing 'userAgent') +universal-user-agent (guessing 'universalUserAgent') tslib (guessing 'tslib') @azure/cosmos-sign (guessing 'cosmosSign') +debug (guessing 'debugLib') binary-search-bounds (guessing 'bs') priorityqueuejs (guessing 'PriorityQueue') semaphore (guessing 'semaphore') @@ -51,33 +56,32 @@ atob (guessing 'atob') (!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js (!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js created dist/index.js in ?s -Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md +XX of XX: [@azure/eventhubs-checkpointstore-blob] completed successfully in ? seconds XX of XX: [@azure/keyvault-certificates] completed successfully in ? seconds -XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds -XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md XX of XX: [@azure/storage-blob] completed successfully in ? seconds XX of XX: [@azure/storage-file] completed successfully in ? seconds XX of XX: [@azure/storage-queue] completed successfully in ? seconds XX of XX: [@azure/template] completed successfully in ? seconds XX of XX: [testhub] completed successfully in ? seconds -SUCCESS (20) +SUCCESS (21) ================================ @azure/abort-controller (? seconds) @azure/core-auth (? seconds) +@azure/core-tracing (? seconds) @azure/core-http (? seconds) @azure/identity (? seconds) @azure/core-amqp (? seconds) @azure/core-arm (? seconds) @azure/core-paging (? seconds) -@azure/event-processor-host (? seconds) @azure/test-utils-recorder (? seconds) -@azure/app-configuration (? seconds) -@azure/core-asynciterator-polyfill (? seconds) -@azure/core-tracing (? seconds) -@azure/keyvault-certificates (? seconds) +@azure/event-hubs (? seconds) +@azure/event-processor-host (? seconds) @azure/keyvault-keys (? seconds) @azure/keyvault-secrets (? seconds) +@azure/core-asynciterator-polyfill (? seconds) +@azure/eventhubs-checkpointstore-blob (? seconds) +@azure/keyvault-certificates (? seconds) @azure/storage-blob (? seconds) @azure/storage-file (? seconds) @azure/storage-queue (? seconds) @@ -86,18 +90,21 @@ testhub (? seconds) ================================ SUCCESS WITH WARNINGS (3) ================================ +@azure/app-configuration (? seconds) +Warning: You have changed the public API signature for this project. Updating review/app-configuration.api.md @azure/cosmos (? seconds) Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md dist-esm/index.js → dist/index.js... (!) Unresolved dependencies https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js, dist-esm/retry/defaultRetryPolicy.js) +tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Databases.js, dist-esm/client/Database/Database.js, dist-esm/client/Item/Item.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/Item/Items.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js) @azure/cosmos-sign (imported by dist-esm/auth.js) universal-user-agent (imported by dist-esm/common/platform.js) -uuid/v4 (imported by dist-esm/client/Item/Items.js) +uuid/v4 (imported by dist-esm/ClientContext.js, dist-esm/client/Item/Items.js) binary-search-bounds (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/routing/inMemoryCollectionRoutingMap.js) priorityqueuejs (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js) semaphore (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js) +debug (imported by dist-esm/common/logger.js) node-abort-controller (imported by dist-esm/request/RequestHandler.js) node-fetch (imported by dist-esm/request/RequestHandler.js) atob (imported by dist-esm/session/sessionContainer.js) @@ -105,9 +112,10 @@ crypto-hash (imported by dist-esm/queryExecutionContext/EndpointComponent/Ordere fast-json-stable-stringify (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js) (!) Missing global variable names Use output.globals to specify browser global variable names corresponding to external modules -universal-user-agent (guessing 'userAgent') +universal-user-agent (guessing 'universalUserAgent') tslib (guessing 'tslib') @azure/cosmos-sign (guessing 'cosmosSign') +debug (guessing 'debugLib') binary-search-bounds (guessing 'bs') priorityqueuejs (guessing 'PriorityQueue') semaphore (guessing 'semaphore') @@ -121,8 +129,6 @@ atob (guessing 'atob') (!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js (!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js created dist/index.js in ?s -@azure/event-hubs (? seconds) -Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md @azure/service-bus (? seconds) Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md ================================ @@ -131,7 +137,7 @@ rush rebuild ( ? seconds) Standard error: +XX of XX: [@azure/app-configuration] completed with warnings in ? seconds XX of XX: [@azure/cosmos] completed with warnings in ? seconds -XX of XX: [@azure/event-hubs] completed with warnings in ? seconds XX of XX: [@azure/service-bus] completed with warnings in ? seconds Project(s) succeeded with warnings diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 96605f33b9d0e..c631249fdd6af 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -34,6 +34,12 @@ Standard output: @uifabric/migration: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/migration/tsconfig.json @uifabric/migration: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib --module commonjs --project "/office-ui-fabric-react/packages/migration/tsconfig.json" @uifabric/migration: Done in ?s. +@uifabric/monaco-editor: yarn run vX.X.X +@uifabric/monaco-editor: $ just-scripts build --production --lint +@uifabric/monaco-editor: [XX:XX:XX XM] ■ Removing [esm, lib] +@uifabric/monaco-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/monaco-editor/tsconfig.json +@uifabric/monaco-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib --module esnext --project "/office-ui-fabric-react/packages/monaco-editor/tsconfig.json" +@uifabric/monaco-editor: Done in ?s. @uifabric/set-version: yarn run vX.X.X @uifabric/set-version: $ just-scripts build --production --lint @uifabric/set-version: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] @@ -84,6 +90,7 @@ Standard output: @uifabric/merge-styles: PASS src/Stylesheet.test.ts @uifabric/merge-styles: PASS src/extractStyleParts.test.ts @uifabric/merge-styles: PASS src/server.test.ts +@uifabric/merge-styles: PASS src/concatStyleSetsWithProps.test.ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' @uifabric/merge-styles: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X @@ -127,9 +134,9 @@ Standard output: @uifabric/utilities: PASS src/warn/warnControlledUsage.test.ts @uifabric/utilities: PASS src/focus.test.tsx @uifabric/utilities: PASS src/styled.test.tsx +@uifabric/utilities: PASS src/customizations/Customizer.test.tsx @uifabric/utilities: PASS src/EventGroup.test.ts @uifabric/utilities: PASS src/array.test.ts -@uifabric/utilities: PASS src/customizations/Customizer.test.tsx @uifabric/utilities: PASS src/math.test.ts @uifabric/utilities: PASS src/warn/warn.test.ts @uifabric/utilities: PASS src/dom/dom.test.ts @@ -160,6 +167,26 @@ Standard output: @uifabric/utilities: PASS src/keyboard.test.ts @uifabric/utilities: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/utilities/lib/index.d.ts' @uifabric/utilities: Done in ?s. +@uifabric/react-hooks: yarn run vX.X.X +@uifabric/react-hooks: $ just-scripts build --production --lint +@uifabric/react-hooks: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/react-hooks: [XX:XX:XX XM] ■ Running tslint +@uifabric/react-hooks: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/tslint/lib/tslintCli.js" --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" -t stylish -r /office-ui-fabric-react/node_modules/tslint-microsoft-contrib +@uifabric/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 +@uifabric/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" +@uifabric/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 +@uifabric/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" +@uifabric/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 +@uifabric/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --inlineSources --sourceRoot "../src" --outDir lib-amd --module amd --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" +@uifabric/react-hooks: [XX:XX:XX XM] ■ Running Jest +@uifabric/react-hooks: [XX:XX:XX XM] ■ /usr/local/bin/node "/office-ui-fabric-react/node_modules/jest/bin/jest.js" --config "/office-ui-fabric-react/packages/react-hooks/jest.config.js" --passWithNoTests --colors --forceExit +@uifabric/react-hooks: [XX:XX:XX XM] ■ Running Webpack +@uifabric/react-hooks: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/react-hooks/webpack.config.js +@uifabric/react-hooks: Webpack version: 4.29.5 +@uifabric/react-hooks: PASS src/useConst.test.tsx +@uifabric/react-hooks: PASS src/useId.test.tsx +@uifabric/react-hooks: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/react-hooks/lib/index.d.ts' +@uifabric/react-hooks: Done in ?s. @uifabric/styling: yarn run vX.X.X @uifabric/styling: $ just-scripts build --production --lint @uifabric/styling: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] @@ -214,6 +241,7 @@ Standard output: @uifabric/foundation: [XX:XX:XX XM] ■ Webpack Config Path: /office-ui-fabric-react/packages/foundation/webpack.config.js @uifabric/foundation: Webpack version: 4.29.5 @uifabric/foundation: FAIL src/slots.test.tsx +@uifabric/foundation: PASS src/next/composed.test.tsx @uifabric/foundation: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @@ -221,7 +249,7 @@ Standard output: Standard error: info cli using local version of lerna lerna notice cli vX.X.X -lerna info Executing command in 41 packages: "yarn run build --production --lint" +lerna info Executing command in 43 packages: "yarn run build --production --lint" @uifabric/codepen-loader: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. @uifabric/codepen-loader: Force exiting Jest @uifabric/codepen-loader: @@ -242,6 +270,11 @@ lerna info Executing command in 41 packages: "yarn run build --production --lint @uifabric/utilities: Force exiting Jest @uifabric/utilities: @uifabric/utilities: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? +@uifabric/react-hooks: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect +@uifabric/react-hooks: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. +@uifabric/react-hooks: Force exiting Jest +@uifabric/react-hooks: +@uifabric/react-hooks: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished? @uifabric/styling: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect @uifabric/styling: ts-jest[versions] (WARN) Version X.X.X-insiders.xxxxxxxx of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=2.7.0 <4.0.0). Please do not report issues in ts-jest if you are using unsupported versions. @uifabric/styling: Force exiting Jest @@ -453,13 +486,12 @@ lerna info Executing command in 41 packages: "yarn run build --production --lint @uifabric/foundation: [XX:XX:XX XM] x Error detected while running 'jest' @uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ @uifabric/foundation: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node /office-ui-fabric-react/node_modules/jest/bin/jest.js --config /office-ui-fabric-react/packages/foundation/jest.config.js --passWithNoTests --colors --forceExit -@uifabric/foundation: at ChildProcess. (/office-ui-fabric-react/node_modules/just-scripts/node_modules/just-scripts-utils/lib/exec.js:70:31) +@uifabric/foundation: at ChildProcess. (/office-ui-fabric-react/node_modules/just-scripts-utils/lib/exec.js:70:31) @uifabric/foundation: at ChildProcess.emit (events.js:209:13) @uifabric/foundation: at ChildProcess.EventEmitter.emit (domain.js:499:23) @uifabric/foundation: at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) @uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ @uifabric/foundation: [XX:XX:XX XM] x Error previously detected. See above for error messages. -@uifabric/foundation: [XX:XX:XX XM] x Other tasks that did not complete: [webpack] @uifabric/foundation: error Command failed with exit code 1. lerna ERR! yarn run build --production --lint exited 1 in '@uifabric/foundation' lerna WARN complete Waiting for 1 child process to exit. CTRL-C to exit immediately. diff --git a/tests/baselines/reference/docker/vscode.log b/tests/baselines/reference/docker/vscode.log index 4775203f50ee8..bd9219cecdcd1 100644 --- a/tests/baselines/reference/docker/vscode.log +++ b/tests/baselines/reference/docker/vscode.log @@ -4,17 +4,17 @@ yarn run vX.X.X $ gulp compile --max_old_space_size=4095 [XX:XX:XX] Node flags detected: --max_old_space_size=4095 [XX:XX:XX] Using gulpfile /vscode/gulpfile.js -[XX:XX:XX] Error: /vscode/node_modules/@types/node/index.d.ts(179,11): Duplicate identifier 'IteratorResult'. +[XX:XX:XX] Error: /vscode/src/vs/editor/browser/controller/mouseTarget.ts(975,7): This condition will always return true since the function is always defined. Did you mean to call it instead? +[XX:XX:XX] Error: /vscode/extensions/css-language-features/server/src/cssServerMain.ts(78,16): This condition will always return true since the function is always defined. Did you mean to call it instead? +[XX:XX:XX] Error: /vscode/extensions/css-language-features/server/src/cssServerMain.ts(80,16): This condition will always return true since the function is always defined. Did you mean to call it instead? +[XX:XX:XX] Error: /vscode/extensions/git/src/util.ts(163,9): This condition will always return true since the function is always defined. Did you mean to call it instead? info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Standard error: -{"type":"warning","data":"package.json: No license field"} -{"type":"warning","data":"../package.json: No license field"} -{"type":"warning","data":"vscode-web@X.X.X: No license field"} [XX:XX:XX] 'compile' errored after ?s -[XX:XX:XX] Error: Found 1 errors +[XX:XX:XX] Error: Found 2 errors at Stream. (/vscode/build/lib/reporter.js:74:29) at _end (/vscode/node_modules/through/index.js:65:9) at Stream.stream.end (/vscode/node_modules/through/index.js:74:5) diff --git a/tests/baselines/reference/user/axios-src.log b/tests/baselines/reference/user/axios-src.log index 6d90ef3ca83b0..d24af763712cc 100644 --- a/tests/baselines/reference/user/axios-src.log +++ b/tests/baselines/reference/user/axios-src.log @@ -1,24 +1,24 @@ Exit Code: 1 Standard output: -lib/adapters/http.js(12,19): error TS2732: Cannot find module './../../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension -lib/adapters/http.js(85,22): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. +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 | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. -lib/adapters/http.js(121,17): error TS2532: Object is possibly 'undefined'. -lib/adapters/http.js(121,40): error TS2532: Object is possibly 'undefined'. -lib/adapters/http.js(122,17): error TS2531: Object is possibly 'null'. -lib/adapters/http.js(122,54): error TS2531: Object is possibly 'null'. -lib/adapters/http.js(122,54): error TS2532: Object is possibly 'undefined'. -lib/adapters/http.js(221,23): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(227,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(233,13): error TS2322: Type 'string' is not assignable to type 'Buffer'. -lib/adapters/http.js(245,40): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/http.js(269,42): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/xhr.js(62,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. -lib/adapters/xhr.js(74,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. -lib/adapters/xhr.js(81,51): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. -lib/adapters/xhr.js(84,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. -lib/adapters/xhr.js(93,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. -lib/adapters/xhr.js(163,9): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. +lib/adapters/http.js(120,17): error TS2532: Object is possibly 'undefined'. +lib/adapters/http.js(120,40): error TS2532: Object is possibly 'undefined'. +lib/adapters/http.js(121,17): error TS2531: Object is possibly 'null'. +lib/adapters/http.js(121,54): error TS2531: Object is possibly 'null'. +lib/adapters/http.js(121,54): error TS2532: Object is possibly 'undefined'. +lib/adapters/http.js(220,23): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(226,44): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(232,13): error TS2322: Type 'string' is not assignable to type 'Buffer'. +lib/adapters/http.js(244,40): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/http.js(273,42): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/xhr.js(64,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. +lib/adapters/xhr.js(76,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. +lib/adapters/xhr.js(83,51): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'. +lib/adapters/xhr.js(86,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. +lib/adapters/xhr.js(95,7): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. +lib/adapters/xhr.js(165,9): error TS2322: Type 'null' is not assignable to type 'XMLHttpRequest'. lib/axios.js(23,9): error TS2554: Expected 3 arguments, but got 2. lib/axios.js(25,3): error TS2739: Type '(...args: any[]) => any' is missing the following properties from type 'Axios': defaults, interceptors, request, getUri lib/axios.js(32,7): error TS2339: Property 'Axios' does not exist on type 'Axios'. diff --git a/tests/baselines/reference/user/npm.log b/tests/baselines/reference/user/npm.log index 915f6640ff982..6af4d36f857e2 100644 --- a/tests/baselines/reference/user/npm.log +++ b/tests/baselines/reference/user/npm.log @@ -1153,6 +1153,8 @@ node_modules/npm/test/tap/check-engine-reqs.js(4,20): error TS2307: Cannot find node_modules/npm/test/tap/check-install-self.js(4,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/check-os-reqs.js(4,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/check-permissions.js(4,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/check-permissions.js(26,7): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +node_modules/npm/test/tap/check-permissions.js(42,7): error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? node_modules/npm/test/tap/ci-header.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/ci-header.js(4,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/ci-header.js(5,21): error TS2307: Cannot find module 'tacks'. diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log index 65a671bd378e9..b823a2065c120 100644 --- a/tests/baselines/reference/user/prettier.log +++ b/tests/baselines/reference/user/prettier.log @@ -55,16 +55,18 @@ src/doc/doc-printer.js(501,37): error TS2345: Argument of type 'any[][]' is not src/index.js(3,25): error TS2732: Cannot find module '../package.json'. Consider using '--resolveJsonModule' to import module with '.json' extension src/index.js(30,17): error TS2339: Property 'sync' does not exist on type '(...args: any[]) => any'. src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'. -src/language-css/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/css'. -src/language-css/index.js(8,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-css/index.js(15,26): error TS2307: Cannot find module 'linguist-languages/data/postcss'. -src/language-css/index.js(25,26): error TS2307: Cannot find module 'linguist-languages/data/less'. -src/language-css/index.js(25,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-css/index.js(32,26): error TS2307: Cannot find module 'linguist-languages/data/scss'. -src/language-css/index.js(32,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-css/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/CSS'. +src/language-css/index.js(8,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-css/index.js(15,26): error TS2307: Cannot find module 'linguist-languages/data/PostCSS'. +src/language-css/index.js(15,62): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { extensions: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Property 'exclude' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { extensions: string[]; }; }' but required in type '{ extend: any; override: any; exclude: any; }'. +src/language-css/index.js(25,26): error TS2307: Cannot find module 'linguist-languages/data/Less'. +src/language-css/index.js(25,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-css/index.js(32,26): error TS2307: Cannot find module 'linguist-languages/data/SCSS'. +src/language-css/index.js(32,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-css/parser-postcss.js(64,32): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(74,30): error TS2345: Argument of type '{ open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(79,30): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. @@ -72,12 +74,12 @@ src/language-css/parser-postcss.js(86,30): error TS2345: Argument of type 'any' src/language-css/parser-postcss.js(90,28): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(449,32): error TS2531: Object is possibly 'null'. src/language-css/utils.js(3,30): error TS2307: Cannot find module 'html-tag-names'. -src/language-graphql/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/graphql'. -src/language-graphql/index.js(8,62): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-handlebars/index.js(7,26): error TS2307: Cannot find module 'linguist-languages/data/handlebars'. -src/language-handlebars/index.js(7,65): error TS2345: Argument of type '{ override: { since: null; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: null; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-graphql/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/GraphQL'. +src/language-graphql/index.js(8,62): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-handlebars/index.js(7,26): error TS2307: Cannot find module 'linguist-languages/data/Handlebars'. +src/language-handlebars/index.js(7,65): error TS2345: Argument of type '{ override: { since: null; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: null; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-html/ast.js(53,11): error TS2536: Type 'Extract' cannot be used to index type 'Node'. src/language-html/ast.js(56,15): error TS2339: Property 'index' does not exist on type 'Node'. src/language-html/ast.js(56,22): error TS2339: Property 'siblings' does not exist on type 'Node'. @@ -100,16 +102,18 @@ src/language-html/ast.js(90,69): error TS2339: Property 'name' does not exist on src/language-html/conditional-comment.js(23,16): error TS2349: This expression is not callable. Not all constituents of type 'RegExp | ((node: any) => { type: string; sourceSpan: any; })' are callable. Type 'RegExp' has no call signatures. -src/language-html/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/html'. -src/language-html/index.js(8,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-html/index.js(19,26): error TS2307: Cannot find module 'linguist-languages/data/html'. -src/language-html/index.js(31,26): error TS2307: Cannot find module 'linguist-languages/data/html'. -src/language-html/index.js(31,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: never[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: never[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-html/index.js(42,26): error TS2307: Cannot find module 'linguist-languages/data/vue'. -src/language-html/index.js(42,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-html/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. +src/language-html/index.js(8,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: string[]; filenames: never[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-html/index.js(19,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. +src/language-html/index.js(19,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { extensions: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Property 'exclude' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { extensions: string[]; }; }' but required in type '{ extend: any; override: any; exclude: any; }'. +src/language-html/index.js(31,26): error TS2307: Cannot find module 'linguist-languages/data/HTML'. +src/language-html/index.js(31,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: never[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: never[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-html/index.js(42,26): error TS2307: Cannot find module 'linguist-languages/data/Vue'. +src/language-html/index.js(42,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-html/parser-html.js(52,12): error TS2339: Property 'type' does not exist on type 'Attribute'. src/language-html/parser-html.js(54,12): error TS2339: Property 'type' does not exist on type 'CDATA'. src/language-html/parser-html.js(56,12): error TS2339: Property 'type' does not exist on type 'Comment'. @@ -165,25 +169,34 @@ src/language-html/syntax-vue.js(14,27): error TS2339: Property 'right' does not src/language-html/utils.js(10,30): error TS2307: Cannot find module 'html-tag-names'. src/language-html/utils.js(11,39): error TS2307: Cannot find module 'html-element-attributes'. src/language-html/utils.js(444,17): error TS2554: Expected 0 arguments, but got 1. -src/language-js/comments.js(864,64): error TS2554: Expected 0 arguments, but got 1. -src/language-js/index.js(9,26): error TS2307: Cannot find module 'linguist-languages/data/javascript'. -src/language-js/index.js(19,26): error TS2307: Cannot find module 'linguist-languages/data/javascript'. -src/language-js/index.js(19,65): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; aliases: never[]; filenames: never[]; extensions: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; aliases: never[]; filenames: never[]; extensions: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-js/index.js(31,26): error TS2307: Cannot find module 'linguist-languages/data/jsx'. -src/language-js/index.js(31,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-js/index.js(38,26): error TS2307: Cannot find module 'linguist-languages/data/typescript'. -src/language-js/index.js(38,65): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-js/index.js(45,26): error TS2307: Cannot find module 'linguist-languages/data/json'. -src/language-js/index.js(45,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: string[]; }; }' but required in type '{ extend: any; override: any; }'. -src/language-js/index.js(56,26): error TS2307: Cannot find module 'linguist-languages/data/json'. -src/language-js/index.js(66,26): error TS2307: Cannot find module 'linguist-languages/data/json-with-comments'. -src/language-js/index.js(76,26): error TS2307: Cannot find module 'linguist-languages/data/json5'. -src/language-js/index.js(76,60): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-js/comments.js(865,64): error TS2554: Expected 0 arguments, but got 1. +src/language-js/index.js(9,26): error TS2307: Cannot find module 'linguist-languages/data/JavaScript'. +src/language-js/index.js(9,65): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { interpreters: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Property 'exclude' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { interpreters: string[]; }; }' but required in type '{ extend: any; override: any; exclude: any; }'. +src/language-js/index.js(19,26): error TS2307: Cannot find module 'linguist-languages/data/JavaScript'. +src/language-js/index.js(19,65): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; aliases: never[]; filenames: never[]; extensions: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; aliases: never[]; filenames: never[]; extensions: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-js/index.js(30,26): error TS2307: Cannot find module 'linguist-languages/data/JSX'. +src/language-js/index.js(30,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-js/index.js(37,26): error TS2307: Cannot find module 'linguist-languages/data/TypeScript'. +src/language-js/index.js(37,65): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-js/index.js(44,26): error TS2307: Cannot find module 'linguist-languages/data/TSX'. +src/language-js/index.js(44,58): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-js/index.js(51,26): error TS2307: Cannot find module 'linguist-languages/data/JSON'. +src/language-js/index.js(51,59): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; extensions: never[]; filenames: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude +src/language-js/index.js(61,26): error TS2307: Cannot find module 'linguist-languages/data/JSON'. +src/language-js/index.js(61,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { filenames: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Property 'exclude' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { filenames: string[]; }; }' but required in type '{ extend: any; override: any; exclude: any; }'. +src/language-js/index.js(71,26): error TS2307: Cannot find module 'linguist-languages/data/JSON with Comments'. +src/language-js/index.js(71,73): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { filenames: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Property 'exclude' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; extend: { filenames: string[]; }; }' but required in type '{ extend: any; override: any; exclude: any; }'. +src/language-js/index.js(81,26): error TS2307: Cannot find module 'linguist-languages/data/JSON5'. +src/language-js/index.js(81,60): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-js/needs-parens.js(871,14): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. @@ -206,47 +219,49 @@ src/language-js/printer-estree.js(400,9): error TS2769: No overload matches this Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type '{ type: string; parts: any; } | { type: string; contents: any; n: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(1473,28): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(1481,28): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): (string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; })[]', gave the following error. Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is missing the following properties from type 'ConcatArray': length, join, slice Overload 2 of 2, '(...items: (string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; } | ConcatArray)[]): (string | { ...; })[]', gave the following error. Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string | { type: string; id: any; contents: any; break: boolean; expandedStates: any; } | ConcatArray'. Type '{ type: string; parts: any; }' is missing the following properties from type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }': id, contents, break, expandedStates -src/language-js/printer-estree.js(1906,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1908,20): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1910,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(1919,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. -src/language-js/printer-estree.js(3465,11): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(1914,20): error TS2345: Argument of type '" "' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1916,20): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1918,18): error TS2345: Argument of type '"while ("' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(1927,9): error TS2345: Argument of type '")"' is not assignable to parameter of type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }'. +src/language-js/printer-estree.js(3473,11): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. Overload 2 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type 'never[] | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. Type '{ type: string; parts: any; }' is not assignable to type 'ConcatArray'. -src/language-js/printer-estree.js(3894,22): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. -src/language-js/printer-estree.js(3961,14): error TS2339: Property 'comments' does not exist on type 'Expression'. +src/language-js/printer-estree.js(3902,22): error TS2345: Argument of type 'any' is not assignable to parameter of type 'never'. +src/language-js/printer-estree.js(3969,14): error TS2339: Property 'comments' does not exist on type 'Expression'. Property 'comments' does not exist on type 'Identifier'. -src/language-js/printer-estree.js(3973,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/printer-estree.js(3974,13): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3981,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. +src/language-js/printer-estree.js(3982,13): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3974,52): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3982,52): error TS2339: Property 'property' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'property' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3979,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. -src/language-js/printer-estree.js(3981,29): error TS2339: Property 'object' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3987,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"OptionalMemberExpression"' have no overlap. +src/language-js/printer-estree.js(3989,29): error TS2339: Property 'object' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'object' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3982,22): error TS2339: Property 'comments' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. +src/language-js/printer-estree.js(3990,22): error TS2339: Property 'comments' does not exist on type 'SimpleLiteral | RegExpLiteral | FunctionExpression | ArrowFunctionExpression | ArrayExpression | ObjectExpression | YieldExpression | UnaryExpression | UpdateExpression | ... 12 more ... | AwaitExpression'. Property 'comments' does not exist on type 'SimpleLiteral'. -src/language-js/printer-estree.js(3988,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"Identifier"' have no overlap. -src/language-js/printer-estree.js(3989,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"ThisExpression"' have no overlap. -src/language-js/printer-estree.js(4193,23): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4194,24): error TS2532: Object is possibly 'undefined'. -src/language-js/printer-estree.js(4550,5): error TS2345: Argument of type '"" | { type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(3996,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"Identifier"' have no overlap. +src/language-js/printer-estree.js(3997,9): error TS2367: This condition will always return 'false' since the types '"FunctionExpression" | "ClassExpression" | "ObjectExpression" | "TaggedTemplateExpression" | "CallExpression" | "ConditionalExpression" | "UpdateExpression" | "SequenceExpression" | ... 11 more ... | "MetaProperty"' and '"ThisExpression"' have no overlap. +src/language-js/printer-estree.js(4201,23): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(4202,24): error TS2532: Object is possibly 'undefined'. +src/language-js/printer-estree.js(4558,5): error TS2345: Argument of type '"" | { type: string; parts: any; } | { type: string; contents: any; }' is not assignable to parameter of type 'string'. Type '{ type: string; parts: any; }' is not assignable to type 'string'. -src/language-js/printer-estree.js(4554,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4596,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. -src/language-js/printer-estree.js(4898,9): error TS2554: Expected 0-2 arguments, but got 3. -src/language-js/printer-estree.js(6105,7): error TS2769: No overload matches this call. +src/language-js/printer-estree.js(4562,16): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(4610,11): error TS2322: Type '{ type: string; id: any; contents: any; break: boolean; expandedStates: any; }' is not assignable to type 'string'. +src/language-js/printer-estree.js(4625,11): error TS2322: Type '{ type: string; parts: any; }' is not assignable to type 'string'. +src/language-js/printer-estree.js(4637,9): error TS2345: Argument of type '{ type: string; parts: any; }' is not assignable to parameter of type 'string'. +src/language-js/printer-estree.js(4924,9): error TS2554: Expected 0-2 arguments, but got 3. +src/language-js/printer-estree.js(6131,7): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray<(childPath: any) => any>[]): ((childPath: any) => any)[]', gave the following error. Argument of type '(string | number)[]' is not assignable to parameter of type 'ConcatArray<(childPath: any) => any>'. Types of property 'slice' are incompatible. @@ -258,17 +273,18 @@ src/language-js/printer-estree.js(6105,7): error TS2769: No overload matches thi Argument of type '(string | number)[]' is not assignable to parameter of type '((childPath: any) => any) | ConcatArray<(childPath: any) => any>'. Type '(string | number)[]' is not assignable to type 'ConcatArray<(childPath: any) => any>'. src/language-js/utils.js(107,55): error TS2554: Expected 0-1 arguments, but got 2. -src/language-markdown/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/markdown'. -src/language-markdown/index.js(20,5): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-markdown/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/Markdown'. +src/language-markdown/index.js(21,26): error TS2307: Cannot find module 'linguist-languages/data/Markdown'. +src/language-markdown/index.js(21,63): error TS2345: Argument of type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; filenames: never[]; extensions: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { name: string; since: string; parsers: string[]; vscodeLanguageIds: string[]; filenames: never[]; extensions: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-markdown/printer-markdown.js(278,18): error TS2532: Object is possibly 'undefined'. src/language-markdown/printer-markdown.js(279,17): error TS2532: Object is possibly 'undefined'. src/language-markdown/printer-markdown.js(300,14): error TS2532: Object is possibly 'undefined'. src/language-markdown/utils.js(203,5): error TS2322: Type 'never[]' is not assignable to type 'null'. src/language-markdown/utils.js(213,47): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'null'. -src/language-yaml/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/yaml'. -src/language-yaml/index.js(8,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; }'. - Property 'extend' is missing in type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' but required in type '{ extend: any; override: any; }'. +src/language-yaml/index.js(8,26): error TS2307: Cannot find module 'linguist-languages/data/YAML'. +src/language-yaml/index.js(8,59): error TS2345: Argument of type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is not assignable to parameter of type '{ extend: any; override: any; exclude: any; }'. + Type '{ override: { since: string; parsers: string[]; vscodeLanguageIds: string[]; }; }' is missing the following properties from type '{ extend: any; override: any; exclude: any; }': extend, exclude src/language-yaml/printer-yaml.js(226,41): error TS2769: No overload matches this call. Overload 1 of 2, '(...items: ConcatArray[]): never[]', gave the following error. Argument of type '"" | { type: string; parts: any; }' is not assignable to parameter of type 'ConcatArray'. diff --git a/tests/baselines/reference/user/puppeteer.log b/tests/baselines/reference/user/puppeteer.log index 2600112696fd1..e4b86a40d0e87 100644 --- a/tests/baselines/reference/user/puppeteer.log +++ b/tests/baselines/reference/user/puppeteer.log @@ -22,26 +22,26 @@ lib/Coverage.js(208,15): error TS2503: Cannot find namespace 'Protocol'. lib/EmulationManager.js(36,16): error TS2503: Cannot find namespace 'Protocol'. lib/ExecutionContext.js(26,15): error TS2503: Cannot find namespace 'Protocol'. lib/ExecutionContext.js(158,18): error TS2503: Cannot find namespace 'Protocol'. -lib/FrameManager.js(152,15): error TS2503: Cannot find namespace 'Protocol'. -lib/FrameManager.js(174,15): error TS2503: Cannot find namespace 'Protocol'. -lib/FrameManager.js(231,15): error TS2503: Cannot find namespace 'Protocol'. -lib/FrameManager.js(669,15): error TS2503: Cannot find namespace 'Protocol'. +lib/FrameManager.js(151,15): error TS2503: Cannot find namespace 'Protocol'. +lib/FrameManager.js(173,15): error TS2503: Cannot find namespace 'Protocol'. +lib/FrameManager.js(230,15): error TS2503: Cannot find namespace 'Protocol'. +lib/FrameManager.js(668,15): error TS2503: Cannot find namespace 'Protocol'. lib/JSHandle.js(33,15): error TS2503: Cannot find namespace 'Protocol'. -lib/JSHandle.js(129,15): error TS2503: Cannot find namespace 'Protocol'. -lib/JSHandle.js(220,29): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(31,30): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(165,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(184,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(203,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(224,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(245,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(255,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(269,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(282,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(301,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(325,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(535,15): error TS2503: Cannot find namespace 'Protocol'. -lib/NetworkManager.js(674,15): error TS2503: Cannot find namespace 'Protocol'. +lib/JSHandle.js(147,15): error TS2503: Cannot find namespace 'Protocol'. +lib/JSHandle.js(238,29): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(32,30): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(159,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(178,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(197,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(218,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(239,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(249,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(263,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(276,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(295,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(319,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(529,15): error TS2503: Cannot find namespace 'Protocol'. +lib/NetworkManager.js(668,15): error TS2503: Cannot find namespace 'Protocol'. lib/Page.js(93,33): error TS2345: Argument of type 'CDPSession' is not assignable to parameter of type 'Puppeteer.CDPSession'. Types of property 'on' are incompatible. Type '(event: string | symbol, listener: (...args: any[]) => void) => CDPSession' is not assignable to type '(event: T, listener: (arg: any) => void) => CDPSession'.