diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md index fe94434490c..6add1cccb58 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.md +++ b/.github/ISSUE_TEMPLATE/Bug_report.md @@ -16,7 +16,7 @@ Please fill in the *entire* template below. --> -**TypeScript Version:** 3.1.0-dev.201xxxxx +**TypeScript Version:** 3.2.0-dev.201xxxxx **Search Terms:** diff --git a/.travis.yml b/.travis.yml index 9479fffe763..6d000dd7165 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,6 +20,7 @@ branches: - release-2.8 - release-2.9 - release-3.0 + - release-3.1 install: - npm uninstall typescript --no-save diff --git a/package.json b/package.json index 159788e697f..5a8ad595806 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "http://typescriptlang.org/", - "version": "3.1.0", + "version": "3.2.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 38d6f558242..b7d0d6f0f0e 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -640,6 +640,7 @@ namespace ts { function bindChildrenWorker(node: Node): void { if (checkUnreachable(node)) { bindEachChild(node); + bindJSDoc(node); return; } switch (node.kind) { diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index 6a7c54d6186..f5f2538a60b 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -88,7 +88,7 @@ namespace ts.BuilderState { function getReferencedFileFromImportedModuleSymbol(symbol: Symbol) { if (symbol.declarations && symbol.declarations[0]) { const declarationSourceFile = getSourceFileOfNode(symbol.declarations[0]); - return declarationSourceFile && (declarationSourceFile.resolvedPath || declarationSourceFile.path); + return declarationSourceFile && declarationSourceFile.resolvedPath; } } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f4bc6325092..611b6c4d4b0 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -77,6 +77,7 @@ namespace ts { const allowSyntheticDefaultImports = getAllowSyntheticDefaultImports(compilerOptions); const strictNullChecks = getStrictOptionValue(compilerOptions, "strictNullChecks"); const strictFunctionTypes = getStrictOptionValue(compilerOptions, "strictFunctionTypes"); + const strictBindCallApply = getStrictOptionValue(compilerOptions, "strictBindCallApply"); const strictPropertyInitialization = getStrictOptionValue(compilerOptions, "strictPropertyInitialization"); const noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny"); const noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis"); @@ -476,6 +477,8 @@ namespace ts { let globalObjectType: ObjectType; let globalFunctionType: ObjectType; + let globalCallableFunctionType: ObjectType; + let globalNewableFunctionType: ObjectType; let globalArrayType: GenericType; let globalReadonlyArrayType: GenericType; let globalStringType: ObjectType; @@ -495,6 +498,7 @@ namespace ts { let deferredGlobalESSymbolType: ObjectType; let deferredGlobalTypedPropertyDescriptorType: GenericType; let deferredGlobalPromiseType: GenericType; + let deferredGlobalPromiseLikeType: GenericType; let deferredGlobalPromiseConstructorSymbol: Symbol | undefined; let deferredGlobalPromiseConstructorLikeType: ObjectType; let deferredGlobalIterableType: GenericType; @@ -1707,7 +1711,9 @@ namespace ts { function checkResolvedBlockScopedVariable(result: Symbol, errorLocation: Node): void { Debug.assert(!!(result.flags & SymbolFlags.BlockScopedVariable || result.flags & SymbolFlags.Class || result.flags & SymbolFlags.Enum)); // Block-scoped variables cannot be used before their definition - const declaration = forEach(result.declarations, d => isBlockOrCatchScoped(d) || isClassLike(d) || (d.kind === SyntaxKind.EnumDeclaration) ? d : undefined); + const declaration = find( + result.declarations, + d => isBlockOrCatchScoped(d) || isClassLike(d) || (d.kind === SyntaxKind.EnumDeclaration) || isInJSFile(d) && !!getJSDocEnumTag(d)); if (declaration === undefined) return Debug.fail("Declaration to checkResolvedBlockScopedVariable is undefined"); @@ -2338,7 +2344,7 @@ namespace ts { } function getCommonJsExportEquals(exported: Symbol | undefined, moduleSymbol: Symbol): Symbol | undefined { - if (!exported || moduleSymbol.exports!.size === 1) { + if (!exported || exported === unknownSymbol || moduleSymbol.exports!.size === 1) { return exported; } const merged = cloneSymbol(exported); @@ -7390,8 +7396,12 @@ namespace ts { if (symbol && symbolIsValue(symbol)) { return symbol; } - if (resolved === anyFunctionType || resolved.callSignatures.length || resolved.constructSignatures.length) { - const symbol = getPropertyOfObjectType(globalFunctionType, name); + const functionType = resolved === anyFunctionType ? globalFunctionType : + resolved.callSignatures.length ? globalCallableFunctionType : + resolved.constructSignatures.length ? globalNewableFunctionType : + undefined; + if (functionType) { + const symbol = getPropertyOfObjectType(functionType, name); if (symbol) { return symbol; } @@ -8158,7 +8168,7 @@ namespace ts { const isJs = isInJSFile(node); const isJsImplicitAny = !noImplicitAny && isJs; if (!isJsImplicitAny && (numTypeArguments < minTypeArgumentCount || numTypeArguments > typeParameters.length)) { - const missingAugmentsTag = isJs && node.parent.kind !== SyntaxKind.JSDocAugmentsTag; + const missingAugmentsTag = isJs && isExpressionWithTypeArguments(node) && !isJSDocAugmentsTag(node.parent); const diag = minTypeArgumentCount === typeParameters.length ? missingAugmentsTag ? Diagnostics.Expected_0_type_arguments_provide_these_with_an_extends_tag @@ -8538,6 +8548,10 @@ namespace ts { return deferredGlobalPromiseType || (deferredGlobalPromiseType = getGlobalType("Promise" as __String, /*arity*/ 1, reportErrors)) || emptyGenericType; } + function getGlobalPromiseLikeType(reportErrors: boolean) { + return deferredGlobalPromiseLikeType || (deferredGlobalPromiseLikeType = getGlobalType("PromiseLike" as __String, /*arity*/ 1, reportErrors)) || emptyGenericType; + } + function getGlobalPromiseConstructorSymbol(reportErrors: boolean): Symbol | undefined { return deferredGlobalPromiseConstructorSymbol || (deferredGlobalPromiseConstructorSymbol = getGlobalValueSymbol("Promise" as __String, reportErrors)); } @@ -8868,7 +8882,7 @@ namespace ts { } switch (unionReduction) { case UnionReduction.Literal: - if (includes & TypeFlags.StringOrNumberLiteralOrUnique) { + if (includes & TypeFlags.StringOrNumberLiteralOrUnique | TypeFlags.BooleanLiteral) { removeRedundantLiteralTypes(typeSet, includes); } break; @@ -9369,12 +9383,24 @@ namespace ts { // '{ [P in T]: { [Q in U]: number } }[T][U]' we want to first simplify the inner indexed access type. const objectType = getSimplifiedType(type.objectType); const indexType = getSimplifiedType(type.indexType); - if (objectType.flags & TypeFlags.Union) { - return type.simplified = mapType(objectType, t => getSimplifiedType(getIndexedAccessType(t, indexType))); + // T[A | B] -> T[A] | T[B] + if (indexType.flags & TypeFlags.Union) { + return type.simplified = mapType(indexType, t => getSimplifiedType(getIndexedAccessType(objectType, t))); } - if (objectType.flags & TypeFlags.Intersection) { - return type.simplified = getIntersectionType(map((objectType as IntersectionType).types, t => getSimplifiedType(getIndexedAccessType(t, indexType)))); + // Only do the inner distributions if the index can no longer be instantiated to cause index distribution again + if (!(indexType.flags & TypeFlags.Instantiable)) { + // (T | U)[K] -> T[K] | U[K] + if (objectType.flags & TypeFlags.Union) { + return type.simplified = mapType(objectType, t => getSimplifiedType(getIndexedAccessType(t, indexType))); + } + // (T & U)[K] -> T[K] & U[K] + if (objectType.flags & TypeFlags.Intersection) { + return type.simplified = getIntersectionType(map((objectType as IntersectionType).types, t => getSimplifiedType(getIndexedAccessType(t, indexType)))); + } } + // So ultimately: + // ((A & B) | C)[K1 | K2] -> ((A & B) | C)[K1] | ((A & B) | C)[K2] -> (A & B)[K1] | C[K1] | (A & B)[K2] | C[K2] -> (A[K1] & B[K1]) | C[K1] | (A[K2] & B[K2]) | C[K2] + // If the object type is a mapped type { [P in K]: E }, where K is generic, instantiate E using a mapper // that substitutes the index type for P. For example, for an index access { [P in K]: Box }[X], we // construct the type Box. We do not further simplify the result because mapped types can be recursive @@ -10569,6 +10595,7 @@ namespace ts { function isTypeDerivedFrom(source: Type, target: Type): boolean { return source.flags & TypeFlags.Union ? every((source).types, t => isTypeDerivedFrom(t, target)) : target.flags & TypeFlags.Union ? some((target).types, t => isTypeDerivedFrom(source, t)) : + source.flags & TypeFlags.Primitive && !(target.flags & TypeFlags.Primitive) ? false : source.flags & TypeFlags.InstantiableNonPrimitive ? isTypeDerivedFrom(getBaseConstraintOfType(source) || emptyObjectType, target) : target === globalObjectType || target === globalFunctionType ? isTypeSubtypeOf(source, target) : hasBaseType(source, getTargetType(target)); @@ -12921,8 +12948,8 @@ namespace ts { function getDefinitelyFalsyPartOfType(type: Type): Type { return type.flags & TypeFlags.String ? emptyStringType : type.flags & TypeFlags.Number ? zeroType : - type.flags & TypeFlags.Boolean || type === regularFalseType ? regularFalseType : - type === falseType ? falseType : + type === regularFalseType || + type === falseType || type.flags & (TypeFlags.Void | TypeFlags.Undefined | TypeFlags.Null) || type.flags & TypeFlags.StringLiteral && (type).value === "" || type.flags & TypeFlags.NumberLiteral && (type).value === 0 ? type : @@ -13233,10 +13260,8 @@ namespace ts { const targetCount = getParameterCount(target); const sourceRestType = getEffectiveRestType(source); const targetRestType = getEffectiveRestType(target); - const paramCount = targetRestType ? Math.min(targetCount - 1, sourceCount) : - sourceRestType ? targetCount : - Math.min(sourceCount, targetCount); - + const targetNonRestCount = targetRestType ? targetCount - 1 : targetCount; + const paramCount = sourceRestType ? targetNonRestCount : Math.min(sourceCount, targetNonRestCount); const sourceThisType = getThisTypeOfSignature(source); if (sourceThisType) { const targetThisType = getThisTypeOfSignature(target); @@ -13438,7 +13463,9 @@ namespace ts { let symbolStack: Symbol[]; let visited: Map; let contravariant = false; + let bivariant = false; let propagationType: Type; + let allowComplexConstraintInference = true; inferFromTypes(originalSource, originalTarget); function inferFromTypes(source: Type, target: Type): void { @@ -13523,11 +13550,13 @@ namespace ts { } if (priority === inference.priority) { const candidate = propagationType || source; - if (contravariant) { - inference.contraCandidates = append(inference.contraCandidates, candidate); + // We make contravariant inferences only if we are in a pure contravariant position, + // i.e. only if we have not descended into a bivariant position. + if (contravariant && !bivariant) { + inference.contraCandidates = appendIfUnique(inference.contraCandidates, candidate); } else { - inference.candidates = append(inference.candidates, candidate); + inference.candidates = appendIfUnique(inference.candidates, candidate); } } if (!(priority & InferencePriority.ReturnType) && target.flags & TypeFlags.TypeParameter && !isTypeParameterAtTopLevel(originalTarget, target)) { @@ -13616,7 +13645,15 @@ namespace ts { // getApparentType can return _any_ type, since an indexed access or conditional may simplify to any other type. // If that occurs and it doesn't simplify to an object or intersection, we'll need to restart `inferFromTypes` // with the simplified source. - if (apparentSource !== source && !(apparentSource.flags & (TypeFlags.Object | TypeFlags.Intersection))) { + if (apparentSource !== source && allowComplexConstraintInference && !(apparentSource.flags & (TypeFlags.Object | TypeFlags.Intersection))) { + // TODO: The `allowComplexConstraintInference` flag is a hack! This forbids inference from complex constraints within constraints! + // This isn't required algorithmically, but rather is used to lower the memory burden caused by performing inference + // that is _too good_ in projects with complicated constraints (eg, fp-ts). In such cases, if we did not limit ourselves + // here, we might produce more valid inferences for types, causing us to do more checks and perform more instantiations + // (in addition to the extra stack depth here) which, in turn, can push the already close process over its limit. + // TL;DR: If we ever become generally more memory efficienct (or our resource budget ever increases), we should just + // remove this `allowComplexConstraintInference` flag. + allowComplexConstraintInference = false; return inferFromTypes(apparentSource, target); } source = apparentSource; @@ -13767,7 +13804,12 @@ namespace ts { function inferFromSignature(source: Signature, target: Signature, skipParameters: boolean) { if (!skipParameters) { + const saveBivariant = bivariant; + const kind = target.declaration ? target.declaration.kind : SyntaxKind.Unknown; + // Once we descend into a bivariant signature we remain bivariant for all nested inferences + bivariant = bivariant || kind === SyntaxKind.MethodDeclaration || kind === SyntaxKind.MethodSignature || kind === SyntaxKind.Constructor; forEachMatchingParameterType(source, target, inferFromContravariantTypes); + bivariant = saveBivariant; } const sourceTypePredicate = getTypePredicateOfSignature(source); const targetTypePredicate = getTypePredicateOfSignature(target); @@ -13874,15 +13916,17 @@ namespace ts { if (!inferredType) { const signature = context.signature; if (signature) { - if (inference.contraCandidates && (!inference.candidates || inference.candidates.length === 1 && inference.candidates[0].flags & TypeFlags.Never)) { - // If we have contravariant inferences, but no covariant inferences or a single - // covariant inference of 'never', we find the best common subtype and treat that - // as a single covariant candidate. - inference.candidates = [getContravariantInference(inference)]; - inference.contraCandidates = undefined; + const inferredCovariantType = inference.candidates ? getCovariantInference(inference, signature) : undefined; + if (inference.contraCandidates) { + const inferredContravariantType = getContravariantInference(inference); + // If we have both co- and contra-variant inferences, we prefer the contra-variant inference + // unless the co-variant inference is a subtype and not 'never'. + inferredType = inferredCovariantType && !(inferredCovariantType.flags & TypeFlags.Never) && + isTypeSubtypeOf(inferredCovariantType, inferredContravariantType) ? + inferredCovariantType : inferredContravariantType; } - if (inference.candidates) { - inferredType = getCovariantInference(inference, signature); + else if (inferredCovariantType) { + inferredType = inferredCovariantType; } else if (context.flags & InferenceFlags.NoDefault) { // We use silentNeverType as the wildcard that signals no inferences. @@ -14188,7 +14232,7 @@ namespace ts { return assignedType; } let reducedType = filterType(declaredType, t => typeMaybeAssignableTo(assignedType, t)); - if (assignedType.flags & (TypeFlags.FreshLiteral | TypeFlags.Literal)) { + if (assignedType.flags & TypeFlags.FreshLiteral && assignedType.flags & TypeFlags.BooleanLiteral) { reducedType = mapType(reducedType, getFreshTypeOfLiteralType); // Ensure that if the assignment is a fresh type, that we narrow to fresh types } // Our crude heuristic produces an invalid result in some cases: see GH#26130. @@ -15709,6 +15753,10 @@ namespace ts { return !!findAncestor(node, n => n === threshold ? "quit" : isFunctionLike(n)); } + function getPartOfForStatementContainingNode(node: Node, container: ForStatement) { + return findAncestor(node, n => n === container ? "quit" : n === container.initializer || n === container.condition || n === container.incrementor || n === container.statement); + } + function checkNestedBlockScopedBinding(node: Identifier, symbol: Symbol): void { if (languageVersion >= ScriptTarget.ES2015 || (symbol.flags & (SymbolFlags.BlockScopedVariable | SymbolFlags.Class)) === 0 || @@ -15737,7 +15785,25 @@ namespace ts { if (containedInIterationStatement) { if (usedInFunction) { // mark iteration statement as containing block-scoped binding captured in some function - getNodeLinks(current).flags |= NodeCheckFlags.LoopWithCapturedBlockScopedBinding; + let capturesBlockScopeBindingInLoopBody = true; + if (isForStatement(container) && + getAncestor(symbol.valueDeclaration, SyntaxKind.VariableDeclarationList)!.parent === container) { + const part = getPartOfForStatementContainingNode(node.parent, container); + if (part) { + const links = getNodeLinks(part); + links.flags |= NodeCheckFlags.ContainsCapturedBlockScopeBinding; + + const capturedBindings = links.capturedBlockScopeBindings || (links.capturedBlockScopeBindings = []); + pushIfUnique(capturedBindings, symbol); + + if (part === container.initializer) { + capturesBlockScopeBindingInLoopBody = false; // Initializer is outside of loop body + } + } + } + if (capturesBlockScopeBindingInLoopBody) { + getNodeLinks(current).flags |= NodeCheckFlags.LoopWithCapturedBlockScopedBinding; + } } // mark variables that are declared in loop initializer and reassigned inside the body of ForStatement. @@ -15757,6 +15823,11 @@ namespace ts { } } + function isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement) { + const links = getNodeLinks(node); + return !!links && contains(links.capturedBlockScopeBindings, getSymbolOfNode(decl)); + } + function isAssignedInBodyOfForStatement(node: Identifier, container: ForStatement): boolean { // skip parenthesized nodes let current: Node = node; @@ -16372,9 +16443,22 @@ namespace ts { } const contextualReturnType = getContextualReturnType(func); - return functionFlags & FunctionFlags.Async - ? contextualReturnType && getAwaitedTypeOfPromise(contextualReturnType) // Async function - : contextualReturnType; // Regular function + if (contextualReturnType) { + if (functionFlags & FunctionFlags.Async) { // Async function + const contextualAwaitedType = getAwaitedTypeOfPromise(contextualReturnType); + return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]); + } + return contextualReturnType; // Regular function + } + } + return undefined; + } + + function getContextualTypeForAwaitOperand(node: AwaitExpression): Type | undefined { + const contextualType = getContextualType(node); + if (contextualType) { + const contextualAwaitedType = getAwaitedType(contextualType); + return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]); } return undefined; } @@ -16740,7 +16824,9 @@ namespace ts { return getContextualTypeForReturnExpression(node); case SyntaxKind.YieldExpression: return getContextualTypeForYieldOperand(parent); - case SyntaxKind.CallExpression: + case SyntaxKind.AwaitExpression: + return getContextualTypeForAwaitOperand(parent); + case SyntaxKind.CallExpression: case SyntaxKind.NewExpression: return getContextualTypeForArgument(parent, node); case SyntaxKind.TypeAssertionExpression: @@ -16786,6 +16872,12 @@ namespace ts { } function getContextualJsxElementAttributesType(node: JsxOpeningLikeElement) { + if (isJsxOpeningElement(node) && node.parent.contextualType) { + // Contextually applied type is moved from attributes up to the outer jsx attributes so when walking up from the children they get hit + // _However_ to hit them from the _attributes_ we must look for them here; otherwise we'll used the declared type + // (as below) instead! + return node.parent.contextualType; + } if (isJsxIntrinsicIdentifier(node.tagName)) { return getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node); } @@ -18487,7 +18579,10 @@ namespace ts { } } } - else if (strictNullChecks && prop && prop.valueDeclaration && isPropertyAccessExpression(prop.valueDeclaration) && getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration)) { + else if (strictNullChecks && prop && prop.valueDeclaration && + isPropertyAccessExpression(prop.valueDeclaration) && + getAssignmentDeclarationPropertyAccessKind(prop.valueDeclaration) && + getControlFlowContainer(node) === getControlFlowContainer(prop.valueDeclaration)) { assumeUninitialized = true; } const flowType = getFlowTypeOfReference(node, propType, assumeUninitialized ? getOptionalType(propType) : propType); @@ -19645,7 +19740,10 @@ namespace ts { checkCandidate = candidate; } if (!checkApplicableSignature(node, args, checkCandidate, relation, excludeArgument, /*reportErrors*/ false)) { - candidateForArgumentError = checkCandidate; + // Give preference to error candidates that have no rest parameters (as they are more specific) + if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) { + candidateForArgumentError = checkCandidate; + } continue; } if (excludeArgument) { @@ -19658,7 +19756,10 @@ namespace ts { checkCandidate = getSignatureInstantiation(candidate, typeArgumentTypes, isInJSFile(candidate.declaration)); } if (!checkApplicableSignature(node, args, checkCandidate, relation, excludeArgument, /*reportErrors*/ false)) { - candidateForArgumentError = checkCandidate; + // Give preference to error candidates that have no rest parameters (as they are more specific) + if (!candidateForArgumentError || getEffectiveRestType(candidateForArgumentError) || !getEffectiveRestType(checkCandidate)) { + candidateForArgumentError = checkCandidate; + } continue; } } @@ -20772,6 +20873,18 @@ namespace ts { return emptyObjectType; } + function createPromiseLikeType(promisedType: Type): Type { + // creates a `PromiseLike` type where `T` is the promisedType argument + const globalPromiseLikeType = getGlobalPromiseLikeType(/*reportErrors*/ true); + if (globalPromiseLikeType !== emptyGenericType) { + // if the promised type is itself a promise, get the underlying type; otherwise, fallback to the promised type + promisedType = getAwaitedType(promisedType) || emptyObjectType; + return createTypeReference(globalPromiseLikeType, [promisedType]); + } + + return emptyObjectType; + } + function createPromiseReturnType(func: FunctionLikeDeclaration | ImportCall, promisedType: Type) { const promiseType = createPromiseType(promisedType); if (promiseType === emptyObjectType) { @@ -25257,14 +25370,18 @@ namespace ts { if (allowSyncIterables) { if (typeAsIterable.iteratedTypeOfIterable) { - return typeAsIterable.iteratedTypeOfIterable; + return allowAsyncIterables + ? typeAsIterable.iteratedTypeOfAsyncIterable = getAwaitedType(typeAsIterable.iteratedTypeOfIterable) + : typeAsIterable.iteratedTypeOfIterable; } // As an optimization, if the type is an instantiation of the global `Iterable` or // `IterableIterator` then just grab its type argument. if (isReferenceToType(type, getGlobalIterableType(/*reportErrors*/ false)) || isReferenceToType(type, getGlobalIterableIteratorType(/*reportErrors*/ false))) { - return typeAsIterable.iteratedTypeOfIterable = (type).typeArguments![0]; + return allowAsyncIterables + ? typeAsIterable.iteratedTypeOfAsyncIterable = getAwaitedType((type).typeArguments![0]) + : typeAsIterable.iteratedTypeOfIterable = (type).typeArguments![0]; } } @@ -25295,9 +25412,11 @@ namespace ts { : createIterableType(iteratedType), errorNode); } - return asyncMethodType - ? typeAsIterable.iteratedTypeOfAsyncIterable = iteratedType - : typeAsIterable.iteratedTypeOfIterable = iteratedType; + if (iteratedType) { + return allowAsyncIterables + ? typeAsIterable.iteratedTypeOfAsyncIterable = asyncMethodType ? iteratedType : getAwaitedType(iteratedType) + : typeAsIterable.iteratedTypeOfIterable = iteratedType; + } } } @@ -26173,6 +26292,8 @@ namespace ts { function isPropertyInitializedInConstructor(propName: Identifier, propType: Type, constructor: ConstructorDeclaration) { const reference = createPropertyAccess(createThis(), propName); + reference.expression.parent = reference; + reference.parent = constructor; reference.flowNode = constructor.returnFlowNode; const flowType = getFlowTypeOfReference(reference, propType, getOptionalType(propType)); return !(getFalsyFlags(flowType) & TypeFlags.Undefined); @@ -27819,24 +27940,20 @@ namespace ts { return errorType; } + const classDecl = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); + const classType = classDecl && getDeclaredTypeOfClassOrInterface(getSymbolOfNode(classDecl.class)); if (isPartOfTypeNode(node)) { const typeFromTypeNode = getTypeFromTypeNode(node); - - if (isExpressionWithTypeArgumentsInClassImplementsClause(node)) { - return getTypeWithThisArgument(typeFromTypeNode, getTypeOfClassContainingHeritageClause(node).thisType); - } - - return typeFromTypeNode; + return classType ? getTypeWithThisArgument(typeFromTypeNode, classType.thisType) : typeFromTypeNode; } if (isExpressionNode(node)) { return getRegularTypeOfExpression(node); } - if (isExpressionWithTypeArgumentsInClassExtendsClause(node)) { + if (classType && !classDecl!.isImplements) { // A SyntaxKind.ExpressionWithTypeArguments is considered a type node, except when it occurs in the // extends clause of a class. We handle that case here. - const classType = getTypeOfClassContainingHeritageClause(node); const baseType = firstOrUndefined(getBaseTypes(classType)); return baseType ? getTypeWithThisArgument(baseType, classType.thisType) : errorType; } @@ -27878,10 +27995,6 @@ namespace ts { return errorType; } - function getTypeOfClassContainingHeritageClause(node: ExpressionWithTypeArguments): InterfaceType { - return getDeclaredTypeOfClassOrInterface(getSymbolOfNode(node.parent.parent)); - } - // Gets the type of object literal or array literal of destructuring assignment. // { a } from // for ( { a } of elems) { @@ -27970,8 +28083,11 @@ namespace ts { function getAugmentedPropertiesOfType(type: Type): Symbol[] { type = getApparentType(type); const propsByName = createSymbolTable(getPropertiesOfType(type)); - if (typeHasCallOrConstructSignatures(type)) { - forEach(getPropertiesOfType(globalFunctionType), p => { + const functionType = getSignaturesOfType(type, SignatureKind.Call).length ? globalCallableFunctionType : + getSignaturesOfType(type, SignatureKind.Construct).length ? globalNewableFunctionType : + undefined; + if (functionType) { + forEach(getPropertiesOfType(functionType), p => { if (!propsByName.has(p.escapedName)) { propsByName.set(p.escapedName, p); } @@ -28590,7 +28706,12 @@ namespace ts { getAccessor }; }, - getSymbolOfExternalModuleSpecifier: moduleName => resolveExternalModuleNameWorker(moduleName, moduleName, /*moduleNotFoundError*/ undefined) + getSymbolOfExternalModuleSpecifier: moduleName => resolveExternalModuleNameWorker(moduleName, moduleName, /*moduleNotFoundError*/ undefined), + isBindingCapturedByNode: (node, decl) => { + const parseNode = getParseTreeNode(node); + const parseDecl = getParseTreeNode(decl); + return !!parseNode && !!parseDecl && (isVariableDeclaration(parseDecl) || isBindingElement(parseDecl)) && isBindingCapturedByNode(parseNode, parseDecl); + } }; function isInHeritageClause(node: PropertyAccessEntityNameExpression) { @@ -28751,6 +28872,8 @@ namespace ts { globalArrayType = getGlobalType("Array" as __String, /*arity*/ 1, /*reportErrors*/ true); globalObjectType = getGlobalType("Object" as __String, /*arity*/ 0, /*reportErrors*/ true); globalFunctionType = getGlobalType("Function" as __String, /*arity*/ 0, /*reportErrors*/ true); + globalCallableFunctionType = strictBindCallApply && getGlobalType("CallableFunction" as __String, /*arity*/ 0, /*reportErrors*/ true) || globalFunctionType; + globalNewableFunctionType = strictBindCallApply && getGlobalType("NewableFunction" as __String, /*arity*/ 0, /*reportErrors*/ true) || globalFunctionType; globalStringType = getGlobalType("String" as __String, /*arity*/ 0, /*reportErrors*/ true); globalNumberType = getGlobalType("Number" as __String, /*arity*/ 0, /*reportErrors*/ true); globalBooleanType = getGlobalType("Boolean" as __String, /*arity*/ 0, /*reportErrors*/ true); diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index f7b0bd8dcc1..10d32a2c187 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -77,6 +77,14 @@ namespace ts { shortName: "?", type: "boolean" }, + { + name: "watch", + shortName: "w", + type: "boolean", + showInSimplifiedHelpView: true, + category: Diagnostics.Command_line_Options, + description: Diagnostics.Watch_input_files, + }, { name: "preserveWatchOutput", type: "boolean", @@ -96,13 +104,12 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Print_names_of_generated_files_part_of_the_compilation }, + { - name: "watch", - shortName: "w", + name: "traceResolution", type: "boolean", - showInSimplifiedHelpView: true, - category: Diagnostics.Command_line_Options, - description: Diagnostics.Watch_input_files, + category: Diagnostics.Advanced_Options, + description: Diagnostics.Enable_tracing_of_the_name_resolution_process }, ]; @@ -366,6 +373,14 @@ namespace ts { category: Diagnostics.Strict_Type_Checking_Options, description: Diagnostics.Enable_strict_checking_of_function_types }, + { + name: "strictBindCallApply", + type: "boolean", + strictFlag: true, + showInSimplifiedHelpView: true, + category: Diagnostics.Strict_Type_Checking_Options, + description: Diagnostics.Enable_strict_bind_call_and_apply_methods_on_functions + }, { name: "strictPropertyInitialization", type: "boolean", @@ -581,12 +596,6 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Show_verbose_diagnostic_information }, - { - name: "traceResolution", - type: "boolean", - category: Diagnostics.Advanced_Options, - description: Diagnostics.Enable_tracing_of_the_name_resolution_process - }, { name: "resolveJsonModule", type: "boolean", @@ -1520,7 +1529,12 @@ namespace ts { elements: NodeArray, elementOption: CommandLineOption | undefined ): any[] | void { - return (returnValue ? elements.map : elements.forEach).call(elements, (element: Expression) => convertPropertyValueToJson(element, elementOption)); + if (!returnValue) { + return elements.forEach(element => convertPropertyValueToJson(element, elementOption)); + } + + // Filter out invalid values + return filter(elements.map(element => convertPropertyValueToJson(element, elementOption)), v => v !== undefined); } function convertPropertyValueToJson(valueExpression: Expression, option: CommandLineOption | undefined): any { @@ -1886,7 +1900,8 @@ namespace ts { filesSpecs = >raw.files; const hasReferences = hasProperty(raw, "references") && !isNullOrUndefined(raw.references); const hasZeroOrNoReferences = !hasReferences || raw.references.length === 0; - if (filesSpecs.length === 0 && hasZeroOrNoReferences) { + const hasExtends = hasProperty(raw, "extends"); + if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) { if (sourceFile) { const fileName = configFileName || "tsconfig.json"; const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 22fc19bcc8a..db18d8c9551 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1,7 +1,7 @@ namespace ts { // WARNING: The script `configureNightly.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configureNightly` too. - export const versionMajorMinor = "3.1"; + export const versionMajorMinor = "3.2"; /** The version of the TypeScript compiler release */ export const version = `${versionMajorMinor}.0-dev`; } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index a125c470ee6..ce2a0d76197 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1,4690 +1,4694 @@ -{ - "Unterminated string literal.": { - "category": "Error", - "code": 1002 - }, - "Identifier expected.": { - "category": "Error", - "code": 1003 - }, - "'{0}' expected.": { - "category": "Error", - "code": 1005 - }, - "A file cannot have a reference to itself.": { - "category": "Error", - "code": 1006 - }, - "Trailing comma not allowed.": { - "category": "Error", - "code": 1009 - }, - "'*/' expected.": { - "category": "Error", - "code": 1010 - }, - "An element access expression should take an argument.": { - "category": "Error", - "code": 1011 - }, - "Unexpected token.": { - "category": "Error", - "code": 1012 - }, - "A rest parameter or binding pattern may not have a trailing comma.": { - "category": "Error", - "code": 1013 - }, - "A rest parameter must be last in a parameter list.": { - "category": "Error", - "code": 1014 - }, - "Parameter cannot have question mark and initializer.": { - "category": "Error", - "code": 1015 - }, - "A required parameter cannot follow an optional parameter.": { - "category": "Error", - "code": 1016 - }, - "An index signature cannot have a rest parameter.": { - "category": "Error", - "code": 1017 - }, - "An index signature parameter cannot have an accessibility modifier.": { - "category": "Error", - "code": 1018 - }, - "An index signature parameter cannot have a question mark.": { - "category": "Error", - "code": 1019 - }, - "An index signature parameter cannot have an initializer.": { - "category": "Error", - "code": 1020 - }, - "An index signature must have a type annotation.": { - "category": "Error", - "code": 1021 - }, - "An index signature parameter must have a type annotation.": { - "category": "Error", - "code": 1022 - }, - "An index signature parameter type must be 'string' or 'number'.": { - "category": "Error", - "code": 1023 - }, - "'readonly' modifier can only appear on a property declaration or index signature.": { - "category": "Error", - "code": 1024 - }, - "Accessibility modifier already seen.": { - "category": "Error", - "code": 1028 - }, - "'{0}' modifier must precede '{1}' modifier.": { - "category": "Error", - "code": 1029 - }, - "'{0}' modifier already seen.": { - "category": "Error", - "code": 1030 - }, - "'{0}' modifier cannot appear on a class element.": { - "category": "Error", - "code": 1031 - }, - "'super' must be followed by an argument list or member access.": { - "category": "Error", - "code": 1034 - }, - "Only ambient modules can use quoted names.": { - "category": "Error", - "code": 1035 - }, - "Statements are not allowed in ambient contexts.": { - "category": "Error", - "code": 1036 - }, - "A 'declare' modifier cannot be used in an already ambient context.": { - "category": "Error", - "code": 1038 - }, - "Initializers are not allowed in ambient contexts.": { - "category": "Error", - "code": 1039 - }, - "'{0}' modifier cannot be used in an ambient context.": { - "category": "Error", - "code": 1040 - }, - "'{0}' modifier cannot be used with a class declaration.": { - "category": "Error", - "code": 1041 - }, - "'{0}' modifier cannot be used here.": { - "category": "Error", - "code": 1042 - }, - "'{0}' modifier cannot appear on a data property.": { - "category": "Error", - "code": 1043 - }, - "'{0}' modifier cannot appear on a module or namespace element.": { - "category": "Error", - "code": 1044 - }, - "A '{0}' modifier cannot be used with an interface declaration.": { - "category": "Error", - "code": 1045 - }, - "A 'declare' modifier is required for a top level declaration in a .d.ts file.": { - "category": "Error", - "code": 1046 - }, - "A rest parameter cannot be optional.": { - "category": "Error", - "code": 1047 - }, - "A rest parameter cannot have an initializer.": { - "category": "Error", - "code": 1048 - }, - "A 'set' accessor must have exactly one parameter.": { - "category": "Error", - "code": 1049 - }, - "A 'set' accessor cannot have an optional parameter.": { - "category": "Error", - "code": 1051 - }, - "A 'set' accessor parameter cannot have an initializer.": { - "category": "Error", - "code": 1052 - }, - "A 'set' accessor cannot have rest parameter.": { - "category": "Error", - "code": 1053 - }, - "A 'get' accessor cannot have parameters.": { - "category": "Error", - "code": 1054 - }, - "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.": { - "category": "Error", - "code": 1055 - }, - "Accessors are only available when targeting ECMAScript 5 and higher.": { - "category": "Error", - "code": 1056 - }, - "An async function or method must have a valid awaitable return type.": { - "category": "Error", - "code": 1057 - }, - "The return type of an async function must either be a valid promise or must not contain a callable 'then' member.": { - "category": "Error", - "code": 1058 - }, - "A promise must have a 'then' method.": { - "category": "Error", - "code": 1059 - }, - "The first parameter of the 'then' method of a promise must be a callback.": { - "category": "Error", - "code": 1060 - }, - "Enum member must have initializer.": { - "category": "Error", - "code": 1061 - }, - "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method.": { - "category": "Error", - "code": 1062 - }, - "An export assignment cannot be used in a namespace.": { - "category": "Error", - "code": 1063 - }, - "The return type of an async function or method must be the global Promise type.": { - "category": "Error", - "code": 1064 - }, - "In ambient enum declarations member initializer must be constant expression.": { - "category": "Error", - "code": 1066 - }, - "Unexpected token. A constructor, method, accessor, or property was expected.": { - "category": "Error", - "code": 1068 - }, - "Unexpected token. A type parameter name was expected without curly braces.": { - "category": "Error", - "code": 1069 - }, - "'{0}' modifier cannot appear on a type member.": { - "category": "Error", - "code": 1070 - }, - "'{0}' modifier cannot appear on an index signature.": { - "category": "Error", - "code": 1071 - }, - "A '{0}' modifier cannot be used with an import declaration.": { - "category": "Error", - "code": 1079 - }, - "Invalid 'reference' directive syntax.": { - "category": "Error", - "code": 1084 - }, - "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'.": { - "category": "Error", - "code": 1085 - }, - "An accessor cannot be declared in an ambient context.": { - "category": "Error", - "code": 1086 - }, - "'{0}' modifier cannot appear on a constructor declaration.": { - "category": "Error", - "code": 1089 - }, - "'{0}' modifier cannot appear on a parameter.": { - "category": "Error", - "code": 1090 - }, - "Only a single variable declaration is allowed in a 'for...in' statement.": { - "category": "Error", - "code": 1091 - }, - "Type parameters cannot appear on a constructor declaration.": { - "category": "Error", - "code": 1092 - }, - "Type annotation cannot appear on a constructor declaration.": { - "category": "Error", - "code": 1093 - }, - "An accessor cannot have type parameters.": { - "category": "Error", - "code": 1094 - }, - "A 'set' accessor cannot have a return type annotation.": { - "category": "Error", - "code": 1095 - }, - "An index signature must have exactly one parameter.": { - "category": "Error", - "code": 1096 - }, - "'{0}' list cannot be empty.": { - "category": "Error", - "code": 1097 - }, - "Type parameter list cannot be empty.": { - "category": "Error", - "code": 1098 - }, - "Type argument list cannot be empty.": { - "category": "Error", - "code": 1099 - }, - "Invalid use of '{0}' in strict mode.": { - "category": "Error", - "code": 1100 - }, - "'with' statements are not allowed in strict mode.": { - "category": "Error", - "code": 1101 - }, - "'delete' cannot be called on an identifier in strict mode.": { - "category": "Error", - "code": 1102 - }, - "A 'for-await-of' statement is only allowed within an async function or async generator.": { - "category": "Error", - "code": 1103 - }, - "A 'continue' statement can only be used within an enclosing iteration statement.": { - "category": "Error", - "code": 1104 - }, - "A 'break' statement can only be used within an enclosing iteration or switch statement.": { - "category": "Error", - "code": 1105 - }, - "Jump target cannot cross function boundary.": { - "category": "Error", - "code": 1107 - }, - "A 'return' statement can only be used within a function body.": { - "category": "Error", - "code": 1108 - }, - "Expression expected.": { - "category": "Error", - "code": 1109 - }, - "Type expected.": { - "category": "Error", - "code": 1110 - }, - "A 'default' clause cannot appear more than once in a 'switch' statement.": { - "category": "Error", - "code": 1113 - }, - "Duplicate label '{0}'.": { - "category": "Error", - "code": 1114 - }, - "A 'continue' statement can only jump to a label of an enclosing iteration statement.": { - "category": "Error", - "code": 1115 - }, - "A 'break' statement can only jump to a label of an enclosing statement.": { - "category": "Error", - "code": 1116 - }, - "An object literal cannot have multiple properties with the same name in strict mode.": { - "category": "Error", - "code": 1117 - }, - "An object literal cannot have multiple get/set accessors with the same name.": { - "category": "Error", - "code": 1118 - }, - "An object literal cannot have property and accessor with the same name.": { - "category": "Error", - "code": 1119 - }, - "An export assignment cannot have modifiers.": { - "category": "Error", - "code": 1120 - }, - "Octal literals are not allowed in strict mode.": { - "category": "Error", - "code": 1121 - }, - "Variable declaration list cannot be empty.": { - "category": "Error", - "code": 1123 - }, - "Digit expected.": { - "category": "Error", - "code": 1124 - }, - "Hexadecimal digit expected.": { - "category": "Error", - "code": 1125 - }, - "Unexpected end of text.": { - "category": "Error", - "code": 1126 - }, - "Invalid character.": { - "category": "Error", - "code": 1127 - }, - "Declaration or statement expected.": { - "category": "Error", - "code": 1128 - }, - "Statement expected.": { - "category": "Error", - "code": 1129 - }, - "'case' or 'default' expected.": { - "category": "Error", - "code": 1130 - }, - "Property or signature expected.": { - "category": "Error", - "code": 1131 - }, - "Enum member expected.": { - "category": "Error", - "code": 1132 - }, - "Variable declaration expected.": { - "category": "Error", - "code": 1134 - }, - "Argument expression expected.": { - "category": "Error", - "code": 1135 - }, - "Property assignment expected.": { - "category": "Error", - "code": 1136 - }, - "Expression or comma expected.": { - "category": "Error", - "code": 1137 - }, - "Parameter declaration expected.": { - "category": "Error", - "code": 1138 - }, - "Type parameter declaration expected.": { - "category": "Error", - "code": 1139 - }, - "Type argument expected.": { - "category": "Error", - "code": 1140 - }, - "String literal expected.": { - "category": "Error", - "code": 1141 - }, - "Line break not permitted here.": { - "category": "Error", - "code": 1142 - }, - "'{' or ';' expected.": { - "category": "Error", - "code": 1144 - }, - "Declaration expected.": { - "category": "Error", - "code": 1146 - }, - "Import declarations in a namespace cannot reference a module.": { - "category": "Error", - "code": 1147 - }, - "Cannot use imports, exports, or module augmentations when '--module' is 'none'.": { - "category": "Error", - "code": 1148 - }, - "File name '{0}' differs from already included file name '{1}' only in casing.": { - "category": "Error", - "code": 1149 - }, - "'new T[]' cannot be used to create an array. Use 'new Array()' instead.": { - "category": "Error", - "code": 1150 - }, - "'const' declarations must be initialized.": { - "category": "Error", - "code": 1155 - }, - "'const' declarations can only be declared inside a block.": { - "category": "Error", - "code": 1156 - }, - "'let' declarations can only be declared inside a block.": { - "category": "Error", - "code": 1157 - }, - "Unterminated template literal.": { - "category": "Error", - "code": 1160 - }, - "Unterminated regular expression literal.": { - "category": "Error", - "code": 1161 - }, - "An object member cannot be declared optional.": { - "category": "Error", - "code": 1162 - }, - "A 'yield' expression is only allowed in a generator body.": { - "category": "Error", - "code": 1163 - }, - "Computed property names are not allowed in enums.": { - "category": "Error", - "code": 1164 - }, - "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.": { - "category": "Error", - "code": 1165 - }, - "A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.": { - "category": "Error", - "code": 1166 - }, - "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.": { - "category": "Error", - "code": 1168 - }, - "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.": { - "category": "Error", - "code": 1169 - }, - "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.": { - "category": "Error", - "code": 1170 - }, - "A comma expression is not allowed in a computed property name.": { - "category": "Error", - "code": 1171 - }, - "'extends' clause already seen.": { - "category": "Error", - "code": 1172 - }, - "'extends' clause must precede 'implements' clause.": { - "category": "Error", - "code": 1173 - }, - "Classes can only extend a single class.": { - "category": "Error", - "code": 1174 - }, - "'implements' clause already seen.": { - "category": "Error", - "code": 1175 - }, - "Interface declaration cannot have 'implements' clause.": { - "category": "Error", - "code": 1176 - }, - "Binary digit expected.": { - "category": "Error", - "code": 1177 - }, - "Octal digit expected.": { - "category": "Error", - "code": 1178 - }, - "Unexpected token. '{' expected.": { - "category": "Error", - "code": 1179 - }, - "Property destructuring pattern expected.": { - "category": "Error", - "code": 1180 - }, - "Array element destructuring pattern expected.": { - "category": "Error", - "code": 1181 - }, - "A destructuring declaration must have an initializer.": { - "category": "Error", - "code": 1182 - }, - "An implementation cannot be declared in ambient contexts.": { - "category": "Error", - "code": 1183 - }, - "Modifiers cannot appear here.": { - "category": "Error", - "code": 1184 - }, - "Merge conflict marker encountered.": { - "category": "Error", - "code": 1185 - }, - "A rest element cannot have an initializer.": { - "category": "Error", - "code": 1186 - }, - "A parameter property may not be declared using a binding pattern.": { - "category": "Error", - "code": 1187 - }, - "Only a single variable declaration is allowed in a 'for...of' statement.": { - "category": "Error", - "code": 1188 - }, - "The variable declaration of a 'for...in' statement cannot have an initializer.": { - "category": "Error", - "code": 1189 - }, - "The variable declaration of a 'for...of' statement cannot have an initializer.": { - "category": "Error", - "code": 1190 - }, - "An import declaration cannot have modifiers.": { - "category": "Error", - "code": 1191 - }, - "Module '{0}' has no default export.": { - "category": "Error", - "code": 1192 - }, - "An export declaration cannot have modifiers.": { - "category": "Error", - "code": 1193 - }, - "Export declarations are not permitted in a namespace.": { - "category": "Error", - "code": 1194 - }, - "Catch clause variable cannot have a type annotation.": { - "category": "Error", - "code": 1196 - }, - "Catch clause variable cannot have an initializer.": { - "category": "Error", - "code": 1197 - }, - "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.": { - "category": "Error", - "code": 1198 - }, - "Unterminated Unicode escape sequence.": { - "category": "Error", - "code": 1199 - }, - "Line terminator not permitted before arrow.": { - "category": "Error", - "code": 1200 - }, - "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead.": { - "category": "Error", - "code": 1202 - }, - "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.": { - "category": "Error", - "code": 1203 - }, - "Cannot re-export a type when the '--isolatedModules' flag is provided.": { - "category": "Error", - "code": 1205 - }, - "Decorators are not valid here.": { - "category": "Error", - "code": 1206 - }, - "Decorators cannot be applied to multiple get/set accessors of the same name.": { - "category": "Error", - "code": 1207 - }, - "Cannot compile namespaces when the '--isolatedModules' flag is provided.": { - "category": "Error", - "code": 1208 - }, - "Ambient const enums are not allowed when the '--isolatedModules' flag is provided.": { - "category": "Error", - "code": 1209 - }, - "Invalid use of '{0}'. Class definitions are automatically in strict mode.": { - "category": "Error", - "code": 1210 - }, - "A class declaration without the 'default' modifier must have a name.": { - "category": "Error", - "code": 1211 - }, - "Identifier expected. '{0}' is a reserved word in strict mode.": { - "category": "Error", - "code": 1212 - }, - "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.": { - "category": "Error", - "code": 1213 - }, - "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.": { - "category": "Error", - "code": 1214 - }, - "Invalid use of '{0}'. Modules are automatically in strict mode.": { - "category": "Error", - "code": 1215 - }, - "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules.": { - "category": "Error", - "code": 1216 - }, - "Export assignment is not supported when '--module' flag is 'system'.": { - "category": "Error", - "code": 1218 - }, - "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.": { - "category": "Error", - "code": 1219 - }, - "Generators are only available when targeting ECMAScript 2015 or higher.": { - "category": "Error", - "code": 1220 - }, - "Generators are not allowed in an ambient context.": { - "category": "Error", - "code": 1221 - }, - "An overload signature cannot be declared as a generator.": { - "category": "Error", - "code": 1222 - }, - "'{0}' tag already specified.": { - "category": "Error", - "code": 1223 - }, - "Signature '{0}' must be a type predicate.": { - "category": "Error", - "code": 1224 - }, - "Cannot find parameter '{0}'.": { - "category": "Error", - "code": 1225 - }, - "Type predicate '{0}' is not assignable to '{1}'.": { - "category": "Error", - "code": 1226 - }, - "Parameter '{0}' is not in the same position as parameter '{1}'.": { - "category": "Error", - "code": 1227 - }, - "A type predicate is only allowed in return type position for functions and methods.": { - "category": "Error", - "code": 1228 - }, - "A type predicate cannot reference a rest parameter.": { - "category": "Error", - "code": 1229 - }, - "A type predicate cannot reference element '{0}' in a binding pattern.": { - "category": "Error", - "code": 1230 - }, - "An export assignment can only be used in a module.": { - "category": "Error", - "code": 1231 - }, - "An import declaration can only be used in a namespace or module.": { - "category": "Error", - "code": 1232 - }, - "An export declaration can only be used in a module.": { - "category": "Error", - "code": 1233 - }, - "An ambient module declaration is only allowed at the top level in a file.": { - "category": "Error", - "code": 1234 - }, - "A namespace declaration is only allowed in a namespace or module.": { - "category": "Error", - "code": 1235 - }, - "The return type of a property decorator function must be either 'void' or 'any'.": { - "category": "Error", - "code": 1236 - }, - "The return type of a parameter decorator function must be either 'void' or 'any'.": { - "category": "Error", - "code": 1237 - }, - "Unable to resolve signature of class decorator when called as an expression.": { - "category": "Error", - "code": 1238 - }, - "Unable to resolve signature of parameter decorator when called as an expression.": { - "category": "Error", - "code": 1239 - }, - "Unable to resolve signature of property decorator when called as an expression.": { - "category": "Error", - "code": 1240 - }, - "Unable to resolve signature of method decorator when called as an expression.": { - "category": "Error", - "code": 1241 - }, - "'abstract' modifier can only appear on a class, method, or property declaration.": { - "category": "Error", - "code": 1242 - }, - "'{0}' modifier cannot be used with '{1}' modifier.": { - "category": "Error", - "code": 1243 - }, - "Abstract methods can only appear within an abstract class.": { - "category": "Error", - "code": 1244 - }, - "Method '{0}' cannot have an implementation because it is marked abstract.": { - "category": "Error", - "code": 1245 - }, - "An interface property cannot have an initializer.": { - "category": "Error", - "code": 1246 - }, - "A type literal property cannot have an initializer.": { - "category": "Error", - "code": 1247 - }, - "A class member cannot have the '{0}' keyword.": { - "category": "Error", - "code": 1248 - }, - "A decorator can only decorate a method implementation, not an overload.": { - "category": "Error", - "code": 1249 - }, - "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'.": { - "category": "Error", - "code": 1250 - }, - "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode.": { - "category": "Error", - "code": 1251 - }, - "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode.": { - "category": "Error", - "code": 1252 - }, - "'{0}' tag cannot be used independently as a top level JSDoc tag.": { - "category": "Error", - "code": 1253 - }, - "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.": { - "category": "Error", - "code": 1254 - }, - "A definite assignment assertion '!' is not permitted in this context.": { - "category": "Error", - "code": 1255 - }, - "A rest element must be last in a tuple type.": { - "category": "Error", - "code": 1256 - }, - "A required element cannot follow an optional element.": { - "category": "Error", - "code": 1257 - }, - "'with' statements are not allowed in an async function block.": { - "category": "Error", - "code": 1300 - }, - "'await' expression is only allowed within an async function.": { - "category": "Error", - "code": 1308 - }, - "'=' can only be used in an object literal property inside a destructuring assignment.": { - "category": "Error", - "code": 1312 - }, - "The body of an 'if' statement cannot be the empty statement.": { - "category": "Error", - "code": 1313 - }, - "Global module exports may only appear in module files.": { - "category": "Error", - "code": 1314 - }, - "Global module exports may only appear in declaration files.": { - "category": "Error", - "code": 1315 - }, - "Global module exports may only appear at top level.": { - "category": "Error", - "code": 1316 - }, - "A parameter property cannot be declared using a rest parameter.": { - "category": "Error", - "code": 1317 - }, - "An abstract accessor cannot have an implementation.": { - "category": "Error", - "code": 1318 - }, - "A default export can only be used in an ECMAScript-style module.": { - "category": "Error", - "code": 1319 - }, - "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.": { - "category": "Error", - "code": 1320 - }, - "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member.": { - "category": "Error", - "code": 1321 - }, - "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member.": { - "category": "Error", - "code": 1322 - }, - "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.": { - "category": "Error", - "code": 1323 - }, - "Dynamic import must have one specifier as an argument.": { - "category": "Error", - "code": 1324 - }, - "Specifier of dynamic import cannot be spread element.": { - "category": "Error", - "code": 1325 - }, - "Dynamic import cannot have type arguments": { - "category": "Error", - "code": 1326 - }, - "String literal with double quotes expected.": { - "category": "Error", - "code": 1327 - }, - "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.": { - "category": "Error", - "code": 1328 - }, - "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?": { - "category": "Error", - "code": 1329 - }, - "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.": { - "category": "Error", - "code": 1330 - }, - "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.": { - "category": "Error", - "code": 1331 - }, - "A variable whose type is a 'unique symbol' type must be 'const'.": { - "category": "Error", - "code": 1332 - }, - "'unique symbol' types may not be used on a variable declaration with a binding name.": { - "category": "Error", - "code": 1333 - }, - "'unique symbol' types are only allowed on variables in a variable statement.": { - "category": "Error", - "code": 1334 - }, - "'unique symbol' types are not allowed here.": { - "category": "Error", - "code": 1335 - }, - "An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead.": { - "category": "Error", - "code": 1336 - }, - "An index signature parameter type cannot be a union type. Consider using a mapped object type instead.": { - "category": "Error", - "code": 1337 - }, - "'infer' declarations are only permitted in the 'extends' clause of a conditional type.": { - "category": "Error", - "code": 1338 - }, - "Module '{0}' does not refer to a value, but is used as a value here.": { - "category": "Error", - "code": 1339 - }, - "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?": { - "category": "Error", - "code": 1340 - }, - "Type arguments cannot be used here.": { - "category": "Error", - "code": 1342 - }, - "The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.": { - "category": "Error", - "code": 1343 - }, - "'A label is not allowed here.": { - "category": "Error", - "code": 1344 - }, - "An expression of type 'void' cannot be tested for truthiness": { - "category": "Error", - "code": 1345 - }, - "This parameter is not allowed with 'use strict' directive.": { - "category": "Error", - "code": 1346 - }, - "'use strict' directive cannot be used with non-simple parameter list.": { - "category": "Error", - "code": 1347 - }, - "Non-simple parameter declared here.": { - "category": "Error", - "code": 1348 - }, - "'use strict' directive used here.": { - "category": "Error", - "code": 1349 - }, - - "Duplicate identifier '{0}'.": { - "category": "Error", - "code": 2300 - }, - "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.": { - "category": "Error", - "code": 2301 - }, - "Static members cannot reference class type parameters.": { - "category": "Error", - "code": 2302 - }, - "Circular definition of import alias '{0}'.": { - "category": "Error", - "code": 2303 - }, - "Cannot find name '{0}'.": { - "category": "Error", - "code": 2304 - }, - "Module '{0}' has no exported member '{1}'.": { - "category": "Error", - "code": 2305 - }, - "File '{0}' is not a module.": { - "category": "Error", - "code": 2306 - }, - "Cannot find module '{0}'.": { - "category": "Error", - "code": 2307 - }, - "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity.": { - "category": "Error", - "code": 2308 - }, - "An export assignment cannot be used in a module with other exported elements.": { - "category": "Error", - "code": 2309 - }, - "Type '{0}' recursively references itself as a base type.": { - "category": "Error", - "code": 2310 - }, - "A class may only extend another class.": { - "category": "Error", - "code": 2311 - }, - "An interface may only extend a class or another interface.": { - "category": "Error", - "code": 2312 - }, - "Type parameter '{0}' has a circular constraint.": { - "category": "Error", - "code": 2313 - }, - "Generic type '{0}' requires {1} type argument(s).": { - "category": "Error", - "code": 2314 - }, - "Type '{0}' is not generic.": { - "category": "Error", - "code": 2315 - }, - "Global type '{0}' must be a class or interface type.": { - "category": "Error", - "code": 2316 - }, - "Global type '{0}' must have {1} type parameter(s).": { - "category": "Error", - "code": 2317 - }, - "Cannot find global type '{0}'.": { - "category": "Error", - "code": 2318 - }, - "Named property '{0}' of types '{1}' and '{2}' are not identical.": { - "category": "Error", - "code": 2319 - }, - "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.": { - "category": "Error", - "code": 2320 - }, - "Excessive stack depth comparing types '{0}' and '{1}'.": { - "category": "Error", - "code": 2321 - }, - "Type '{0}' is not assignable to type '{1}'.": { - "category": "Error", - "code": 2322 - }, - "Cannot redeclare exported variable '{0}'.": { - "category": "Error", - "code": 2323 - }, - "Property '{0}' is missing in type '{1}'.": { - "category": "Error", - "code": 2324 - }, - "Property '{0}' is private in type '{1}' but not in type '{2}'.": { - "category": "Error", - "code": 2325 - }, - "Types of property '{0}' are incompatible.": { - "category": "Error", - "code": 2326 - }, - "Property '{0}' is optional in type '{1}' but required in type '{2}'.": { - "category": "Error", - "code": 2327 - }, - "Types of parameters '{0}' and '{1}' are incompatible.": { - "category": "Error", - "code": 2328 - }, - "Index signature is missing in type '{0}'.": { - "category": "Error", - "code": 2329 - }, - "Index signatures are incompatible.": { - "category": "Error", - "code": 2330 - }, - "'this' cannot be referenced in a module or namespace body.": { - "category": "Error", - "code": 2331 - }, - "'this' cannot be referenced in current location.": { - "category": "Error", - "code": 2332 - }, - "'this' cannot be referenced in constructor arguments.": { - "category": "Error", - "code": 2333 - }, - "'this' cannot be referenced in a static property initializer.": { - "category": "Error", - "code": 2334 - }, - "'super' can only be referenced in a derived class.": { - "category": "Error", - "code": 2335 - }, - "'super' cannot be referenced in constructor arguments.": { - "category": "Error", - "code": 2336 - }, - "Super calls are not permitted outside constructors or in nested functions inside constructors.": { - "category": "Error", - "code": 2337 - }, - "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.": { - "category": "Error", - "code": 2338 - }, - "Property '{0}' does not exist on type '{1}'.": { - "category": "Error", - "code": 2339 - }, - "Only public and protected methods of the base class are accessible via the 'super' keyword.": { - "category": "Error", - "code": 2340 - }, - "Property '{0}' is private and only accessible within class '{1}'.": { - "category": "Error", - "code": 2341 - }, - "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'.": { - "category": "Error", - "code": 2342 - }, - "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'.": { - "category": "Error", - "code": 2343 - }, - "Type '{0}' does not satisfy the constraint '{1}'.": { - "category": "Error", - "code": 2344 - }, - "Argument of type '{0}' is not assignable to parameter of type '{1}'.": { - "category": "Error", - "code": 2345 - }, - "Call target does not contain any signatures.": { - "category": "Error", - "code": 2346 - }, - "Untyped function calls may not accept type arguments.": { - "category": "Error", - "code": 2347 - }, - "Value of type '{0}' is not callable. Did you mean to include 'new'?": { - "category": "Error", - "code": 2348 - }, - "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures.": { - "category": "Error", - "code": 2349 - }, - "Only a void function can be called with the 'new' keyword.": { - "category": "Error", - "code": 2350 - }, - "Cannot use 'new' with an expression whose type lacks a call or construct signature.": { - "category": "Error", - "code": 2351 - }, - "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.": { - "category": "Error", - "code": 2352 - }, - "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'.": { - "category": "Error", - "code": 2353 - }, - "This syntax requires an imported helper but module '{0}' cannot be found.": { - "category": "Error", - "code": 2354 - }, - "A function whose declared type is neither 'void' nor 'any' must return a value.": { - "category": "Error", - "code": 2355 - }, - "An arithmetic operand must be of type 'any', 'number' or an enum type.": { - "category": "Error", - "code": 2356 - }, - "The operand of an increment or decrement operator must be a variable or a property access.": { - "category": "Error", - "code": 2357 - }, - "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.": { - "category": "Error", - "code": 2358 - }, - "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.": { - "category": "Error", - "code": 2359 - }, - "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'.": { - "category": "Error", - "code": 2360 - }, - "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.": { - "category": "Error", - "code": 2361 - }, - "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { - "category": "Error", - "code": 2362 - }, - "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { - "category": "Error", - "code": 2363 - }, - "The left-hand side of an assignment expression must be a variable or a property access.": { - "category": "Error", - "code": 2364 - }, - "Operator '{0}' cannot be applied to types '{1}' and '{2}'.": { - "category": "Error", - "code": 2365 - }, - "Function lacks ending return statement and return type does not include 'undefined'.": { - "category": "Error", - "code": 2366 - }, - "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.": { - "category": "Error", - "code": 2367 - }, - "Type parameter name cannot be '{0}'.": { - "category": "Error", - "code": 2368 - }, - "A parameter property is only allowed in a constructor implementation.": { - "category": "Error", - "code": 2369 - }, - "A rest parameter must be of an array type.": { - "category": "Error", - "code": 2370 - }, - "A parameter initializer is only allowed in a function or constructor implementation.": { - "category": "Error", - "code": 2371 - }, - "Parameter '{0}' cannot be referenced in its initializer.": { - "category": "Error", - "code": 2372 - }, - "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.": { - "category": "Error", - "code": 2373 - }, - "Duplicate string index signature.": { - "category": "Error", - "code": 2374 - }, - "Duplicate number index signature.": { - "category": "Error", - "code": 2375 - }, - "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.": { - "category": "Error", - "code": 2376 - }, - "Constructors for derived classes must contain a 'super' call.": { - "category": "Error", - "code": 2377 - }, - "A 'get' accessor must return a value.": { - "category": "Error", - "code": 2378 - }, - "Getter and setter accessors do not agree in visibility.": { - "category": "Error", - "code": 2379 - }, - "'get' and 'set' accessor must have the same type.": { - "category": "Error", - "code": 2380 - }, - "A signature with an implementation cannot use a string literal type.": { - "category": "Error", - "code": 2381 - }, - "Specialized overload signature is not assignable to any non-specialized signature.": { - "category": "Error", - "code": 2382 - }, - "Overload signatures must all be exported or non-exported.": { - "category": "Error", - "code": 2383 - }, - "Overload signatures must all be ambient or non-ambient.": { - "category": "Error", - "code": 2384 - }, - "Overload signatures must all be public, private or protected.": { - "category": "Error", - "code": 2385 - }, - "Overload signatures must all be optional or required.": { - "category": "Error", - "code": 2386 - }, - "Function overload must be static.": { - "category": "Error", - "code": 2387 - }, - "Function overload must not be static.": { - "category": "Error", - "code": 2388 - }, - "Function implementation name must be '{0}'.": { - "category": "Error", - "code": 2389 - }, - "Constructor implementation is missing.": { - "category": "Error", - "code": 2390 - }, - "Function implementation is missing or not immediately following the declaration.": { - "category": "Error", - "code": 2391 - }, - "Multiple constructor implementations are not allowed.": { - "category": "Error", - "code": 2392 - }, - "Duplicate function implementation.": { - "category": "Error", - "code": 2393 - }, - "Overload signature is not compatible with function implementation.": { - "category": "Error", - "code": 2394 - }, - "Individual declarations in merged declaration '{0}' must be all exported or all local.": { - "category": "Error", - "code": 2395 - }, - "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.": { - "category": "Error", - "code": 2396 - }, - "Declaration name conflicts with built-in global identifier '{0}'.": { - "category": "Error", - "code": 2397 - }, - "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.": { - "category": "Error", - "code": 2399 - }, - "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.": { - "category": "Error", - "code": 2400 - }, - "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.": { - "category": "Error", - "code": 2401 - }, - "Expression resolves to '_super' that compiler uses to capture base class reference.": { - "category": "Error", - "code": 2402 - }, - "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.": { - "category": "Error", - "code": 2403 - }, - "The left-hand side of a 'for...in' statement cannot use a type annotation.": { - "category": "Error", - "code": 2404 - }, - "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.": { - "category": "Error", - "code": 2405 - }, - "The left-hand side of a 'for...in' statement must be a variable or a property access.": { - "category": "Error", - "code": 2406 - }, - "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'.": { - "category": "Error", - "code": 2407 - }, - "Setters cannot return a value.": { - "category": "Error", - "code": 2408 - }, - "Return type of constructor signature must be assignable to the instance type of the class.": { - "category": "Error", - "code": 2409 - }, - "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.": { - "category": "Error", - "code": 2410 - }, - "Property '{0}' of type '{1}' is not assignable to string index type '{2}'.": { - "category": "Error", - "code": 2411 - }, - "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'.": { - "category": "Error", - "code": 2412 - }, - "Numeric index type '{0}' is not assignable to string index type '{1}'.": { - "category": "Error", - "code": 2413 - }, - "Class name cannot be '{0}'.": { - "category": "Error", - "code": 2414 - }, - "Class '{0}' incorrectly extends base class '{1}'.": { - "category": "Error", - "code": 2415 - }, - "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.": { - "category": "Error", - "code": 2416 - }, - "Class static side '{0}' incorrectly extends base class static side '{1}'.": { - "category": "Error", - "code": 2417 - }, - "Type of computed property's value is '{0}', which is not assignable to type '{1}'.": { - "category": "Error", - "code": 2418 - }, - "Class '{0}' incorrectly implements interface '{1}'.": { - "category": "Error", - "code": 2420 - }, - "A class may only implement another class or interface.": { - "category": "Error", - "code": 2422 - }, - "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.": { - "category": "Error", - "code": 2423 - }, - "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.": { - "category": "Error", - "code": 2424 - }, - "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.": { - "category": "Error", - "code": 2425 - }, - "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.": { - "category": "Error", - "code": 2426 - }, - "Interface name cannot be '{0}'.": { - "category": "Error", - "code": 2427 - }, - "All declarations of '{0}' must have identical type parameters.": { - "category": "Error", - "code": 2428 - }, - "Interface '{0}' incorrectly extends interface '{1}'.": { - "category": "Error", - "code": 2430 - }, - "Enum name cannot be '{0}'.": { - "category": "Error", - "code": 2431 - }, - "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.": { - "category": "Error", - "code": 2432 - }, - "A namespace declaration cannot be in a different file from a class or function with which it is merged.": { - "category": "Error", - "code": 2433 - }, - "A namespace declaration cannot be located prior to a class or function with which it is merged.": { - "category": "Error", - "code": 2434 - }, - "Ambient modules cannot be nested in other modules or namespaces.": { - "category": "Error", - "code": 2435 - }, - "Ambient module declaration cannot specify relative module name.": { - "category": "Error", - "code": 2436 - }, - "Module '{0}' is hidden by a local declaration with the same name.": { - "category": "Error", - "code": 2437 - }, - "Import name cannot be '{0}'.": { - "category": "Error", - "code": 2438 - }, - "Import or export declaration in an ambient module declaration cannot reference module through relative module name.": { - "category": "Error", - "code": 2439 - }, - "Import declaration conflicts with local declaration of '{0}'.": { - "category": "Error", - "code": 2440 - }, - "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.": { - "category": "Error", - "code": 2441 - }, - "Types have separate declarations of a private property '{0}'.": { - "category": "Error", - "code": 2442 - }, - "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.": { - "category": "Error", - "code": 2443 - }, - "Property '{0}' is protected in type '{1}' but public in type '{2}'.": { - "category": "Error", - "code": 2444 - }, - "Property '{0}' is protected and only accessible within class '{1}' and its subclasses.": { - "category": "Error", - "code": 2445 - }, - "Property '{0}' is protected and only accessible through an instance of class '{1}'.": { - "category": "Error", - "code": 2446 - }, - "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead.": { - "category": "Error", - "code": 2447 - }, - "Block-scoped variable '{0}' used before its declaration.": { - "category": "Error", - "code": 2448 - }, - "Class '{0}' used before its declaration.": { - "category": "Error", - "code": 2449 - }, - "Enum '{0}' used before its declaration.": { - "category": "Error", - "code": 2450 - }, - "Cannot redeclare block-scoped variable '{0}'.": { - "category": "Error", - "code": 2451 - }, - "An enum member cannot have a numeric name.": { - "category": "Error", - "code": 2452 - }, - "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.": { - "category": "Error", - "code": 2453 - }, - "Variable '{0}' is used before being assigned.": { - "category": "Error", - "code": 2454 - }, - "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.": { - "category": "Error", - "code": 2455 - }, - "Type alias '{0}' circularly references itself.": { - "category": "Error", - "code": 2456 - }, - "Type alias name cannot be '{0}'.": { - "category": "Error", - "code": 2457 - }, - "An AMD module cannot have multiple name assignments.": { - "category": "Error", - "code": 2458 - }, - "Type '{0}' has no property '{1}' and no string index signature.": { - "category": "Error", - "code": 2459 - }, - "Type '{0}' has no property '{1}'.": { - "category": "Error", - "code": 2460 - }, - "Type '{0}' is not an array type.": { - "category": "Error", - "code": 2461 - }, - "A rest element must be last in a destructuring pattern.": { - "category": "Error", - "code": 2462 - }, - "A binding pattern parameter cannot be optional in an implementation signature.": { - "category": "Error", - "code": 2463 - }, - "A computed property name must be of type 'string', 'number', 'symbol', or 'any'.": { - "category": "Error", - "code": 2464 - }, - "'this' cannot be referenced in a computed property name.": { - "category": "Error", - "code": 2465 - }, - "'super' cannot be referenced in a computed property name.": { - "category": "Error", - "code": 2466 - }, - "A computed property name cannot reference a type parameter from its containing type.": { - "category": "Error", - "code": 2467 - }, - "Cannot find global value '{0}'.": { - "category": "Error", - "code": 2468 - }, - "The '{0}' operator cannot be applied to type 'symbol'.": { - "category": "Error", - "code": 2469 - }, - "'Symbol' reference does not refer to the global Symbol constructor object.": { - "category": "Error", - "code": 2470 - }, - "A computed property name of the form '{0}' must be of type 'symbol'.": { - "category": "Error", - "code": 2471 - }, - "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher.": { - "category": "Error", - "code": 2472 - }, - "Enum declarations must all be const or non-const.": { - "category": "Error", - "code": 2473 - }, - "In 'const' enum declarations member initializer must be constant expression.": { - "category": "Error", - "code": 2474 - }, - "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.": { - "category": "Error", - "code": 2475 - }, - "A const enum member can only be accessed using a string literal.": { - "category": "Error", - "code": 2476 - }, - "'const' enum member initializer was evaluated to a non-finite value.": { - "category": "Error", - "code": 2477 - }, - "'const' enum member initializer was evaluated to disallowed value 'NaN'.": { - "category": "Error", - "code": 2478 - }, - "Property '{0}' does not exist on 'const' enum '{1}'.": { - "category": "Error", - "code": 2479 - }, - "'let' is not allowed to be used as a name in 'let' or 'const' declarations.": { - "category": "Error", - "code": 2480 - }, - "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'.": { - "category": "Error", - "code": 2481 - }, - "The left-hand side of a 'for...of' statement cannot use a type annotation.": { - "category": "Error", - "code": 2483 - }, - "Export declaration conflicts with exported declaration of '{0}'.": { - "category": "Error", - "code": 2484 - }, - "The left-hand side of a 'for...of' statement must be a variable or a property access.": { - "category": "Error", - "code": 2487 - }, - "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator.": { - "category": "Error", - "code": 2488 - }, - "An iterator must have a 'next()' method.": { - "category": "Error", - "code": 2489 - }, - "The type returned by the 'next()' method of an iterator must have a 'value' property.": { - "category": "Error", - "code": 2490 - }, - "The left-hand side of a 'for...in' statement cannot be a destructuring pattern.": { - "category": "Error", - "code": 2491 - }, - "Cannot redeclare identifier '{0}' in catch clause.": { - "category": "Error", - "code": 2492 - }, - "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'.": { - "category": "Error", - "code": 2493 - }, - "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.": { - "category": "Error", - "code": 2494 - }, - "Type '{0}' is not an array type or a string type.": { - "category": "Error", - "code": 2495 - }, - "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression.": { - "category": "Error", - "code": 2496 - }, - "Module '{0}' resolves to a non-module entity and cannot be imported using this construct.": { - "category": "Error", - "code": 2497 - }, - "Module '{0}' uses 'export =' and cannot be used with 'export *'.": { - "category": "Error", - "code": 2498 - }, - "An interface can only extend an identifier/qualified-name with optional type arguments.": { - "category": "Error", - "code": 2499 - }, - "A class can only implement an identifier/qualified-name with optional type arguments.": { - "category": "Error", - "code": 2500 - }, - "A rest element cannot contain a binding pattern.": { - "category": "Error", - "code": 2501 - }, - "'{0}' is referenced directly or indirectly in its own type annotation.": { - "category": "Error", - "code": 2502 - }, - "Cannot find namespace '{0}'.": { - "category": "Error", - "code": 2503 - }, - "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.": { - "category": "Error", - "code": 2504 - }, - "A generator cannot have a 'void' type annotation.": { - "category": "Error", - "code": 2505 - }, - "'{0}' is referenced directly or indirectly in its own base expression.": { - "category": "Error", - "code": 2506 - }, - "Type '{0}' is not a constructor function type.": { - "category": "Error", - "code": 2507 - }, - "No base constructor has the specified number of type arguments.": { - "category": "Error", - "code": 2508 - }, - "Base constructor return type '{0}' is not a class or interface type.": { - "category": "Error", - "code": 2509 - }, - "Base constructors must all have the same return type.": { - "category": "Error", - "code": 2510 - }, - "Cannot create an instance of an abstract class.": { - "category": "Error", - "code": 2511 - }, - "Overload signatures must all be abstract or non-abstract.": { - "category": "Error", - "code": 2512 - }, - "Abstract method '{0}' in class '{1}' cannot be accessed via super expression.": { - "category": "Error", - "code": 2513 - }, - "Classes containing abstract methods must be marked abstract.": { - "category": "Error", - "code": 2514 - }, - "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'.": { - "category": "Error", - "code": 2515 - }, - "All declarations of an abstract method must be consecutive.": { - "category": "Error", - "code": 2516 - }, - "Cannot assign an abstract constructor type to a non-abstract constructor type.": { - "category": "Error", - "code": 2517 - }, - "A 'this'-based type guard is not compatible with a parameter-based type guard.": { - "category": "Error", - "code": 2518 - }, - "An async iterator must have a 'next()' method.": { - "category": "Error", - "code": 2519 - }, - "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { - "category": "Error", - "code": 2520 - }, - "Expression resolves to variable declaration '{0}' that compiler uses to support async functions.": { - "category": "Error", - "code": 2521 - }, - "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method.": { - "category": "Error", - "code": 2522 - }, - "'yield' expressions cannot be used in a parameter initializer.": { - "category": "Error", - "code": 2523 - }, - "'await' expressions cannot be used in a parameter initializer.": { - "category": "Error", - "code": 2524 - }, - "Initializer provides no value for this binding element and the binding element has no default value.": { - "category": "Error", - "code": 2525 - }, - "A 'this' type is available only in a non-static member of a class or interface.": { - "category": "Error", - "code": 2526 - }, - "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.": { - "category": "Error", - "code": 2527 - }, - "A module cannot have multiple default exports.": { - "category": "Error", - "code": 2528 - }, - "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.": { - "category": "Error", - "code": 2529 - }, - "Property '{0}' is incompatible with index signature.": { - "category": "Error", - "code": 2530 - }, - "Object is possibly 'null'.": { - "category": "Error", - "code": 2531 - }, - "Object is possibly 'undefined'.": { - "category": "Error", - "code": 2532 - }, - "Object is possibly 'null' or 'undefined'.": { - "category": "Error", - "code": 2533 - }, - "A function returning 'never' cannot have a reachable end point.": { - "category": "Error", - "code": 2534 - }, - "Enum type '{0}' has members with initializers that are not literals.": { - "category": "Error", - "code": 2535 - }, - "Type '{0}' cannot be used to index type '{1}'.": { - "category": "Error", - "code": 2536 - }, - "Type '{0}' has no matching index signature for type '{1}'.": { - "category": "Error", - "code": 2537 - }, - "Type '{0}' cannot be used as an index type.": { - "category": "Error", - "code": 2538 - }, - "Cannot assign to '{0}' because it is not a variable.": { - "category": "Error", - "code": 2539 - }, - "Cannot assign to '{0}' because it is a constant or a read-only property.": { - "category": "Error", - "code": 2540 - }, - "The target of an assignment must be a variable or a property access.": { - "category": "Error", - "code": 2541 - }, - "Index signature in type '{0}' only permits reading.": { - "category": "Error", - "code": 2542 - }, - "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference.": { - "category": "Error", - "code": 2543 - }, - "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.": { - "category": "Error", - "code": 2544 - }, - "A mixin class must have a constructor with a single rest parameter of type 'any[]'.": { - "category": "Error", - "code": 2545 - }, - "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.": { - "category": "Error", - "code": 2546 - }, - "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property.": { - "category": "Error", - "code": 2547 - }, - "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.": { - "category": "Error", - "code": 2548 - }, - "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator.": { - "category": "Error", - "code": 2549 - }, - "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?": { - "category": "Error", - "code": 2551 - }, - "Cannot find name '{0}'. Did you mean '{1}'?": { - "category": "Error", - "code": 2552 - }, - "Computed values are not permitted in an enum with string valued members.": { - "category": "Error", - "code": 2553 - }, - "Expected {0} arguments, but got {1}.": { - "category": "Error", - "code": 2554 - }, - "Expected at least {0} arguments, but got {1}.": { - "category": "Error", - "code": 2555 - }, - "Expected {0} arguments, but got {1} or more.": { - "category": "Error", - "code": 2556 - }, - "Expected at least {0} arguments, but got {1} or more.": { - "category": "Error", - "code": 2557 - }, - "Expected {0} type arguments, but got {1}.": { - "category": "Error", - "code": 2558 - }, - "Type '{0}' has no properties in common with type '{1}'.": { - "category": "Error", - "code": 2559 - }, - "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?": { - "category": "Error", - "code": 2560 - }, - "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?": { - "category": "Error", - "code": 2561 - }, - "Base class expressions cannot reference class type parameters.": { - "category": "Error", - "code": 2562 - }, - "The containing function or module body is too large for control flow analysis.": { - "category": "Error", - "code": 2563 - }, - "Property '{0}' has no initializer and is not definitely assigned in the constructor.": { - "category": "Error", - "code": 2564 - }, - "Property '{0}' is used before being assigned.": { - "category": "Error", - "code": 2565 - }, - "A rest element cannot have a property name.": { - "category": "Error", - "code": 2566 - }, - "Enum declarations can only merge with namespace or other enum declarations.": { - "category": "Error", - "code": 2567 - }, - "Type '{0}' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.": { - "category": "Error", - "code": 2568 - }, - "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.": { - "category": "Error", - "code": 2569 - }, - "Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?": { - "category": "Error", - "code": 2570 - }, - "Object is of type 'unknown'.": { - "category": "Error", - "code": 2571 - }, - "Rest signatures are incompatible.": { - "category": "Error", - "code": 2572 - }, - "Property '{0}' is incompatible with rest element type.": { - "category": "Error", - "code": 2573 - }, - "A rest element type must be an array type.": { - "category": "Error", - "code": 2574 - }, - "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.": { - "category": "Error", - "code": 2575 - }, - "Property '{0}' is a static member of type '{1}'": { - "category": "Error", - "code": 2576 - }, - "Return type annotation circularly references itself.": { - "category": "Error", - "code": 2577 - }, - "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.": { - "category": "Error", - "code": 2580 - }, - "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.": { - "category": "Error", - "code": 2581 - }, - "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.": { - "category": "Error", - "code": 2582 - }, - "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": { - "category": "Error", - "code": 2583 - }, - "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.": { - "category": "Error", - "code": 2584 - }, - "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": { - "category": "Error", - "code": 2585 - }, - "Enum type '{0}' circularly references itself.": { - "category": "Error", - "code": 2586 - }, - "JSX element attributes type '{0}' may not be a union type.": { - "category": "Error", - "code": 2600 - }, - "The return type of a JSX element constructor must return an object type.": { - "category": "Error", - "code": 2601 - }, - "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.": { - "category": "Error", - "code": 2602 - }, - "Property '{0}' in type '{1}' is not assignable to type '{2}'.": { - "category": "Error", - "code": 2603 - }, - "JSX element type '{0}' does not have any construct or call signatures.": { - "category": "Error", - "code": 2604 - }, - "JSX element type '{0}' is not a constructor function for JSX elements.": { - "category": "Error", - "code": 2605 - }, - "Property '{0}' of JSX spread attribute is not assignable to target property.": { - "category": "Error", - "code": 2606 - }, - "JSX element class does not support attributes because it does not have a '{0}' property.": { - "category": "Error", - "code": 2607 - }, - "The global type 'JSX.{0}' may not have more than one property.": { - "category": "Error", - "code": 2608 - }, - "JSX spread child must be an array type.": { - "category": "Error", - "code": 2609 - }, - "Cannot augment module '{0}' with value exports because it resolves to a non-module entity.": { - "category": "Error", - "code": 2649 - }, - "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.": { - "category": "Error", - "code": 2651 - }, - "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.": { - "category": "Error", - "code": 2652 - }, - "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.": { - "category": "Error", - "code": 2653 - }, - "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.": { - "category": "Error", - "code": 2654 - }, - "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.": { - "category": "Error", - "code": 2656 - }, - "JSX expressions must have one parent element.": { - "category": "Error", - "code": 2657 - }, - "Type '{0}' provides no match for the signature '{1}'.": { - "category": "Error", - "code": 2658 - }, - "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher.": { - "category": "Error", - "code": 2659 - }, - "'super' can only be referenced in members of derived classes or object literal expressions.": { - "category": "Error", - "code": 2660 - }, - "Cannot export '{0}'. Only local declarations can be exported from a module.": { - "category": "Error", - "code": 2661 - }, - "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?": { - "category": "Error", - "code": 2662 - }, - "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?": { - "category": "Error", - "code": 2663 - }, - "Invalid module name in augmentation, module '{0}' cannot be found.": { - "category": "Error", - "code": 2664 - }, - "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented.": { - "category": "Error", - "code": 2665 - }, - "Exports and export assignments are not permitted in module augmentations.": { - "category": "Error", - "code": 2666 - }, - "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.": { - "category": "Error", - "code": 2667 - }, - "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.": { - "category": "Error", - "code": 2668 - }, - "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.": { - "category": "Error", - "code": 2669 - }, - "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.": { - "category": "Error", - "code": 2670 - }, - "Cannot augment module '{0}' because it resolves to a non-module entity.": { - "category": "Error", - "code": 2671 - }, - "Cannot assign a '{0}' constructor type to a '{1}' constructor type.": { - "category": "Error", - "code": 2672 - }, - "Constructor of class '{0}' is private and only accessible within the class declaration.": { - "category": "Error", - "code": 2673 - }, - "Constructor of class '{0}' is protected and only accessible within the class declaration.": { - "category": "Error", - "code": 2674 - }, - "Cannot extend a class '{0}'. Class constructor is marked as private.": { - "category": "Error", - "code": 2675 - }, - "Accessors must both be abstract or non-abstract.": { - "category": "Error", - "code": 2676 - }, - "A type predicate's type must be assignable to its parameter's type.": { - "category": "Error", - "code": 2677 - }, - "Type '{0}' is not comparable to type '{1}'.": { - "category": "Error", - "code": 2678 - }, - "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'.": { - "category": "Error", - "code": 2679 - }, - "A '{0}' parameter must be the first parameter.": { - "category": "Error", - "code": 2680 - }, - "A constructor cannot have a 'this' parameter.": { - "category": "Error", - "code": 2681 - }, - "'get' and 'set' accessor must have the same 'this' type.": { - "category": "Error", - "code": 2682 - }, - "'this' implicitly has type 'any' because it does not have a type annotation.": { - "category": "Error", - "code": 2683 - }, - "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'.": { - "category": "Error", - "code": 2684 - }, - "The 'this' types of each signature are incompatible.": { - "category": "Error", - "code": 2685 - }, - "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead.": { - "category": "Error", - "code": 2686 - }, - "All declarations of '{0}' must have identical modifiers.": { - "category": "Error", - "code": 2687 - }, - "Cannot find type definition file for '{0}'.": { - "category": "Error", - "code": 2688 - }, - "Cannot extend an interface '{0}'. Did you mean 'implements'?": { - "category": "Error", - "code": 2689 - }, - "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead.": { - "category": "Error", - "code": 2691 - }, - "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible.": { - "category": "Error", - "code": 2692 - }, - "'{0}' only refers to a type, but is being used as a value here.": { - "category": "Error", - "code": 2693 - }, - "Namespace '{0}' has no exported member '{1}'.": { - "category": "Error", - "code": 2694 - }, - "Left side of comma operator is unused and has no side effects.": { - "category": "Error", - "code": 2695, - "reportsUnnecessary": true - }, - "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?": { - "category": "Error", - "code": 2696 - }, - "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2697 - }, - "Spread types may only be created from object types.": { - "category": "Error", - "code": 2698 - }, - "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.": { - "category": "Error", - "code": 2699 - }, - "Rest types may only be created from object types.": { - "category": "Error", - "code": 2700 - }, - "The target of an object rest assignment must be a variable or a property access.": { - "category": "Error", - "code": 2701 - }, - "'{0}' only refers to a type, but is being used as a namespace here.": { - "category": "Error", - "code": 2702 - }, - "The operand of a delete operator must be a property reference.": { - "category": "Error", - "code": 2703 - }, - "The operand of a delete operator cannot be a read-only property.": { - "category": "Error", - "code": 2704 - }, - "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2705 - }, - "Required type parameters may not follow optional type parameters.": { - "category": "Error", - "code": 2706 - }, - "Generic type '{0}' requires between {1} and {2} type arguments.": { - "category": "Error", - "code": 2707 - }, - "Cannot use namespace '{0}' as a value.": { - "category": "Error", - "code": 2708 - }, - "Cannot use namespace '{0}' as a type.": { - "category": "Error", - "code": 2709 - }, - "'{0}' are specified twice. The attribute named '{0}' will be overwritten.": { - "category": "Error", - "code": 2710 - }, - "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2711 - }, - "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { - "category": "Error", - "code": 2712 - }, - "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?": { - "category": "Error", - "code": 2713 - }, - "The expression of an export assignment must be an identifier or qualified name in an ambient context.": { - "category": "Error", - "code": 2714 - }, - "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor.": { - "category": "Error", - "code": 2715 - }, - "Type parameter '{0}' has a circular default.": { - "category": "Error", - "code": 2716 - }, - "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.": { - "category": "Error", - "code": 2717 - }, - "Duplicate declaration '{0}'.": { - "category": "Error", - "code": 2718 - }, - "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.": { - "category": "Error", - "code": 2719 - }, - "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?": { - "category": "Error", - "code": 2720 - }, - "Cannot invoke an object which is possibly 'null'.": { - "category": "Error", - "code": 2721 - }, - "Cannot invoke an object which is possibly 'undefined'.": { - "category": "Error", - "code": 2722 - }, - "Cannot invoke an object which is possibly 'null' or 'undefined'.": { - "category": "Error", - "code": 2723 - }, - "Module '{0}' has no exported member '{1}'. Did you mean '{2}'?": { - "category": "Error", - "code": 2724 - }, - "Class name cannot be 'Object' when targeting ES5 with module {0}.": { - "category": "Error", - "code": 2725 - }, - "Cannot find lib definition for '{0}'.": { - "category": "Error", - "code": 2726 - }, - "Cannot find lib definition for '{0}'. Did you mean '{1}'?": { - "category": "Error", - "code": 2727 - }, - "'{0}' is declared here.": { - "category": "Message", - "code": 2728 - }, - "Property '{0}' is used before its initialization.": { - "category": "Error", - "code": 2729 - }, - "An arrow function cannot have a 'this' parameter.": { - "category": "Error", - "code": 2730 - }, - "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.": { - "category": "Error", - "code": 2731 - }, - "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": { - "category": "Error", - "code": 2732 - }, - "Index '{0}' is out-of-bounds in tuple of length {1}.": { - "category": "Error", - "code": 2733 - }, - "It is highly likely that you are missing a semicolon.": { - "category": "Error", - "code": 2734 - }, - - "Import declaration '{0}' is using private name '{1}'.": { - "category": "Error", - "code": 4000 - }, - "Type parameter '{0}' of exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4002 - }, - "Type parameter '{0}' of exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4004 - }, - "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4006 - }, - "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4008 - }, - "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4010 - }, - "Type parameter '{0}' of public method from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4012 - }, - "Type parameter '{0}' of method from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4014 - }, - "Type parameter '{0}' of exported function has or is using private name '{1}'.": { - "category": "Error", - "code": 4016 - }, - "Implements clause of exported class '{0}' has or is using private name '{1}'.": { - "category": "Error", - "code": 4019 - }, - "'extends' clause of exported class '{0}' has or is using private name '{1}'.": { - "category": "Error", - "code": 4020 - }, - "'extends' clause of exported interface '{0}' has or is using private name '{1}'.": { - "category": "Error", - "code": 4022 - }, - "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4023 - }, - "Exported variable '{0}' has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4024 - }, - "Exported variable '{0}' has or is using private name '{1}'.": { - "category": "Error", - "code": 4025 - }, - "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4026 - }, - "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4027 - }, - "Public static property '{0}' of exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4028 - }, - "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4029 - }, - "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4030 - }, - "Public property '{0}' of exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4031 - }, - "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4032 - }, - "Property '{0}' of exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4033 - }, - "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4034 - }, - "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4035 - }, - "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4036 - }, - "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4037 - }, - "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4038 - }, - "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4039 - }, - "Return type of public static getter '{0}' from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4040 - }, - "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4041 - }, - "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4042 - }, - "Return type of public getter '{0}' from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4043 - }, - "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4044 - }, - "Return type of constructor signature from exported interface has or is using private name '{0}'.": { - "category": "Error", - "code": 4045 - }, - "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4046 - }, - "Return type of call signature from exported interface has or is using private name '{0}'.": { - "category": "Error", - "code": 4047 - }, - "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4048 - }, - "Return type of index signature from exported interface has or is using private name '{0}'.": { - "category": "Error", - "code": 4049 - }, - "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.": { - "category": "Error", - "code": 4050 - }, - "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4051 - }, - "Return type of public static method from exported class has or is using private name '{0}'.": { - "category": "Error", - "code": 4052 - }, - "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.": { - "category": "Error", - "code": 4053 - }, - "Return type of public method from exported class has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4054 - }, - "Return type of public method from exported class has or is using private name '{0}'.": { - "category": "Error", - "code": 4055 - }, - "Return type of method from exported interface has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4056 - }, - "Return type of method from exported interface has or is using private name '{0}'.": { - "category": "Error", - "code": 4057 - }, - "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.": { - "category": "Error", - "code": 4058 - }, - "Return type of exported function has or is using name '{0}' from private module '{1}'.": { - "category": "Error", - "code": 4059 - }, - "Return type of exported function has or is using private name '{0}'.": { - "category": "Error", - "code": 4060 - }, - "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4061 - }, - "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4062 - }, - "Parameter '{0}' of constructor from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4063 - }, - "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4064 - }, - "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4065 - }, - "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4066 - }, - "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4067 - }, - "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4068 - }, - "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4069 - }, - "Parameter '{0}' of public static method from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4070 - }, - "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4071 - }, - "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4072 - }, - "Parameter '{0}' of public method from exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4073 - }, - "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4074 - }, - "Parameter '{0}' of method from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4075 - }, - "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4076 - }, - "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4077 - }, - "Parameter '{0}' of exported function has or is using private name '{1}'.": { - "category": "Error", - "code": 4078 - }, - "Exported type alias '{0}' has or is using private name '{1}'.": { - "category": "Error", - "code": 4081 - }, - "Default export of the module has or is using private name '{0}'.": { - "category": "Error", - "code": 4082 - }, - "Type parameter '{0}' of exported type alias has or is using private name '{1}'.": { - "category": "Error", - "code": 4083 - }, - "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict.": { - "category": "Error", - "code": 4090 - }, - "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4091 - }, - "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4092 - }, - "Property '{0}' of exported class expression may not be private or protected.": { - "category": "Error", - "code": 4094 - }, - - "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4095 - }, - "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4096 - }, - "Public static method '{0}' of exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4097 - }, - "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { - "category": "Error", - "code": 4098 - }, - "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4099 - }, - "Public method '{0}' of exported class has or is using private name '{1}'.": { - "category": "Error", - "code": 4100 - }, - "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": { - "category": "Error", - "code": 4101 - }, - "Method '{0}' of exported interface has or is using private name '{1}'.": { - "category": "Error", - "code": 4102 - }, - - "The current host does not support the '{0}' option.": { - "category": "Error", - "code": 5001 - }, - "Cannot find the common subdirectory path for the input files.": { - "category": "Error", - "code": 5009 - }, - "File specification cannot end in a recursive directory wildcard ('**'): '{0}'.": { - "category": "Error", - "code": 5010 - }, - "Cannot read file '{0}': {1}.": { - "category": "Error", - "code": 5012 - }, - "Failed to parse file '{0}': {1}.": { - "category": "Error", - "code": 5014 - }, - "Unknown compiler option '{0}'.": { - "category": "Error", - "code": 5023 - }, - "Compiler option '{0}' requires a value of type {1}.": { - "category": "Error", - "code": 5024 - }, - "Could not write file '{0}': {1}.": { - "category": "Error", - "code": 5033 - }, - "Option 'project' cannot be mixed with source files on a command line.": { - "category": "Error", - "code": 5042 - }, - "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.": { - "category": "Error", - "code": 5047 - }, - "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.": { - "category": "Error", - "code": 5051 - }, - "Option '{0}' cannot be specified without specifying option '{1}'.": { - "category": "Error", - "code": 5052 - }, - "Option '{0}' cannot be specified with option '{1}'.": { - "category": "Error", - "code": 5053 - }, - "A 'tsconfig.json' file is already defined at: '{0}'.": { - "category": "Error", - "code": 5054 - }, - "Cannot write file '{0}' because it would overwrite input file.": { - "category": "Error", - "code": 5055 - }, - "Cannot write file '{0}' because it would be overwritten by multiple input files.": { - "category": "Error", - "code": 5056 - }, - "Cannot find a tsconfig.json file at the specified directory: '{0}'.": { - "category": "Error", - "code": 5057 - }, - "The specified path does not exist: '{0}'.": { - "category": "Error", - "code": 5058 - }, - "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier.": { - "category": "Error", - "code": 5059 - }, - "Option 'paths' cannot be used without specifying '--baseUrl' option.": { - "category": "Error", - "code": 5060 - }, - "Pattern '{0}' can have at most one '*' character.": { - "category": "Error", - "code": 5061 - }, - "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": { - "category": "Error", - "code": 5062 - }, - "Substitutions for pattern '{0}' should be an array.": { - "category": "Error", - "code": 5063 - }, - "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'.": { - "category": "Error", - "code": 5064 - }, - "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'.": { - "category": "Error", - "code": 5065 - }, - "Substitutions for pattern '{0}' shouldn't be an empty array.": { - "category": "Error", - "code": 5066 - }, - "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name.": { - "category": "Error", - "code": 5067 - }, - "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.": { - "category": "Error", - "code": 5068 - }, - "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'.": { - "category": "Error", - "code": 5069 - }, - "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.": { - "category": "Error", - "code": 5070 - }, - "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.": { - "category": "Error", - "code": 5071 - }, - "Unknown build option '{0}'.": { - "category": "Error", - "code": 5072 - }, - "Build option '{0}' requires a value of type {1}.": { - "category": "Error", - "code": 5073 - }, - - "Generates a sourcemap for each corresponding '.d.ts' file.": { - "category": "Message", - "code": 6000 - }, - "Concatenate and emit output to single file.": { - "category": "Message", - "code": 6001 - }, - "Generates corresponding '.d.ts' file.": { - "category": "Message", - "code": 6002 - }, - "Specify the location where debugger should locate map files instead of generated locations.": { - "category": "Message", - "code": 6003 - }, - "Specify the location where debugger should locate TypeScript files instead of source locations.": { - "category": "Message", - "code": 6004 - }, - "Watch input files.": { - "category": "Message", - "code": 6005 - }, - "Redirect output structure to the directory.": { - "category": "Message", - "code": 6006 - }, - "Do not erase const enum declarations in generated code.": { - "category": "Message", - "code": 6007 - }, - "Do not emit outputs if any errors were reported.": { - "category": "Message", - "code": 6008 - }, - "Do not emit comments to output.": { - "category": "Message", - "code": 6009 - }, - "Do not emit outputs.": { - "category": "Message", - "code": 6010 - }, - "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.": { - "category": "Message", - "code": 6011 - }, - "Skip type checking of declaration files.": { - "category": "Message", - "code": 6012 - }, - "Do not resolve the real path of symlinks.": { - "category": "Message", - "code": 6013 - }, - "Only emit '.d.ts' declaration files.": { - "category": "Message", - "code": 6014 - }, - "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.": { - "category": "Message", - "code": 6015 - }, - "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.": { - "category": "Message", - "code": 6016 - }, - "Print this message.": { - "category": "Message", - "code": 6017 - }, - "Print the compiler's version.": { - "category": "Message", - "code": 6019 - }, - "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.": { - "category": "Message", - "code": 6020 - }, - "Syntax: {0}": { - "category": "Message", - "code": 6023 - }, - "options": { - "category": "Message", - "code": 6024 - }, - "file": { - "category": "Message", - "code": 6025 - }, - "Examples: {0}": { - "category": "Message", - "code": 6026 - }, - "Options:": { - "category": "Message", - "code": 6027 - }, - "Version {0}": { - "category": "Message", - "code": 6029 - }, - "Insert command line options and files from a file.": { - "category": "Message", - "code": 6030 - }, - "Starting compilation in watch mode...": { - "category": "Message", - "code": 6031 - }, - "File change detected. Starting incremental compilation...": { - "category": "Message", - "code": 6032 - }, - "KIND": { - "category": "Message", - "code": 6034 - }, - "FILE": { - "category": "Message", - "code": 6035 - }, - "VERSION": { - "category": "Message", - "code": 6036 - }, - "LOCATION": { - "category": "Message", - "code": 6037 - }, - "DIRECTORY": { - "category": "Message", - "code": 6038 - }, - "STRATEGY": { - "category": "Message", - "code": 6039 - }, - "FILE OR DIRECTORY": { - "category": "Message", - "code": 6040 - }, - "Generates corresponding '.map' file.": { - "category": "Message", - "code": 6043 - }, - "Compiler option '{0}' expects an argument.": { - "category": "Error", - "code": 6044 - }, - "Unterminated quoted string in response file '{0}'.": { - "category": "Error", - "code": 6045 - }, - "Argument for '{0}' option must be: {1}.": { - "category": "Error", - "code": 6046 - }, - "Locale must be of the form or -. For example '{0}' or '{1}'.": { - "category": "Error", - "code": 6048 - }, - "Unsupported locale '{0}'.": { - "category": "Error", - "code": 6049 - }, - "Unable to open file '{0}'.": { - "category": "Error", - "code": 6050 - }, - "Corrupted locale file {0}.": { - "category": "Error", - "code": 6051 - }, - "Raise error on expressions and declarations with an implied 'any' type.": { - "category": "Message", - "code": 6052 - }, - "File '{0}' not found.": { - "category": "Error", - "code": 6053 - }, - "File '{0}' has unsupported extension. The only supported extensions are {1}.": { - "category": "Error", - "code": 6054 - }, - "Suppress noImplicitAny errors for indexing objects lacking index signatures.": { - "category": "Message", - "code": 6055 - }, - "Do not emit declarations for code that has an '@internal' annotation.": { - "category": "Message", - "code": 6056 - }, - "Specify the root directory of input files. Use to control the output directory structure with --outDir.": { - "category": "Message", - "code": 6058 - }, - "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.": { - "category": "Error", - "code": 6059 - }, - "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).": { - "category": "Message", - "code": 6060 - }, - "NEWLINE": { - "category": "Message", - "code": 6061 - }, - "Option '{0}' can only be specified in 'tsconfig.json' file.": { - "category": "Error", - "code": 6064 - }, - "Enables experimental support for ES7 decorators.": { - "category": "Message", - "code": 6065 - }, - "Enables experimental support for emitting type metadata for decorators.": { - "category": "Message", - "code": 6066 - }, - "Enables experimental support for ES7 async functions.": { - "category": "Message", - "code": 6068 - }, - "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).": { - "category": "Message", - "code": 6069 - }, - "Initializes a TypeScript project and creates a tsconfig.json file.": { - "category": "Message", - "code": 6070 - }, - "Successfully created a tsconfig.json file.": { - "category": "Message", - "code": 6071 - }, - "Suppress excess property checks for object literals.": { - "category": "Message", - "code": 6072 - }, - "Stylize errors and messages using color and context (experimental).": { - "category": "Message", - "code": 6073 - }, - "Do not report errors on unused labels.": { - "category": "Message", - "code": 6074 - }, - "Report error when not all code paths in function return a value.": { - "category": "Message", - "code": 6075 - }, - "Report errors for fallthrough cases in switch statement.": { - "category": "Message", - "code": 6076 - }, - "Do not report errors on unreachable code.": { - "category": "Message", - "code": 6077 - }, - "Disallow inconsistently-cased references to the same file.": { - "category": "Message", - "code": 6078 - }, - "Specify library files to be included in the compilation.": { - "category": "Message", - "code": 6079 - }, - "Specify JSX code generation: 'preserve', 'react-native', or 'react'.": { - "category": "Message", - "code": 6080 - }, - "File '{0}' has an unsupported extension, so skipping it.": { - "category": "Message", - "code": 6081 - }, - "Only 'amd' and 'system' modules are supported alongside --{0}.": { - "category": "Error", - "code": 6082 - }, - "Base directory to resolve non-absolute module names.": { - "category": "Message", - "code": 6083 - }, - "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit": { - "category": "Message", - "code": 6084 - }, - "Enable tracing of the name resolution process.": { - "category": "Message", - "code": 6085 - }, - "======== Resolving module '{0}' from '{1}'. ========": { - "category": "Message", - "code": 6086 - }, - "Explicitly specified module resolution kind: '{0}'.": { - "category": "Message", - "code": 6087 - }, - "Module resolution kind is not specified, using '{0}'.": { - "category": "Message", - "code": 6088 - }, - "======== Module name '{0}' was successfully resolved to '{1}'. ========": { - "category": "Message", - "code": 6089 - }, - "======== Module name '{0}' was not resolved. ========": { - "category": "Message", - "code": 6090 - }, - "'paths' option is specified, looking for a pattern to match module name '{0}'.": { - "category": "Message", - "code": 6091 - }, - "Module name '{0}', matched pattern '{1}'.": { - "category": "Message", - "code": 6092 - }, - "Trying substitution '{0}', candidate module location: '{1}'.": { - "category": "Message", - "code": 6093 - }, - "Resolving module name '{0}' relative to base url '{1}' - '{2}'.": { - "category": "Message", - "code": 6094 - }, - "Loading module as file / folder, candidate module location '{0}', target file type '{1}'.": { - "category": "Message", - "code": 6095 - }, - "File '{0}' does not exist.": { - "category": "Message", - "code": 6096 - }, - "File '{0}' exist - use it as a name resolution result.": { - "category": "Message", - "code": 6097 - }, - "Loading module '{0}' from 'node_modules' folder, target file type '{1}'.": { - "category": "Message", - "code": 6098 - }, - "Found 'package.json' at '{0}'.": { - "category": "Message", - "code": 6099 - }, - "'package.json' does not have a '{0}' field.": { - "category": "Message", - "code": 6100 - }, - "'package.json' has '{0}' field '{1}' that references '{2}'.": { - "category": "Message", - "code": 6101 - }, - "Allow javascript files to be compiled.": { - "category": "Message", - "code": 6102 - }, - "Option '{0}' should have array of strings as a value.": { - "category": "Error", - "code": 6103 - }, - "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.": { - "category": "Message", - "code": 6104 - }, - "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.": { - "category": "Message", - "code": 6105 - }, - "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.": { - "category": "Message", - "code": 6106 - }, - "'rootDirs' option is set, using it to resolve relative module name '{0}'.": { - "category": "Message", - "code": 6107 - }, - "Longest matching prefix for '{0}' is '{1}'.": { - "category": "Message", - "code": 6108 - }, - "Loading '{0}' from the root dir '{1}', candidate location '{2}'.": { - "category": "Message", - "code": 6109 - }, - "Trying other entries in 'rootDirs'.": { - "category": "Message", - "code": 6110 - }, - "Module resolution using 'rootDirs' has failed.": { - "category": "Message", - "code": 6111 - }, - "Do not emit 'use strict' directives in module output.": { - "category": "Message", - "code": 6112 - }, - "Enable strict null checks.": { - "category": "Message", - "code": 6113 - }, - "Unknown option 'excludes'. Did you mean 'exclude'?": { - "category": "Error", - "code": 6114 - }, - "Raise error on 'this' expressions with an implied 'any' type.": { - "category": "Message", - "code": 6115 - }, - "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========": { - "category": "Message", - "code": 6116 - }, - "Resolving using primary search paths...": { - "category": "Message", - "code": 6117 - }, - "Resolving from node_modules folder...": { - "category": "Message", - "code": 6118 - }, - "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========": { - "category": "Message", - "code": 6119 - }, - "======== Type reference directive '{0}' was not resolved. ========": { - "category": "Message", - "code": 6120 - }, - "Resolving with primary search path '{0}'.": { - "category": "Message", - "code": 6121 - }, - "Root directory cannot be determined, skipping primary search paths.": { - "category": "Message", - "code": 6122 - }, - "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========": { - "category": "Message", - "code": 6123 - }, - "Type declaration files to be included in compilation.": { - "category": "Message", - "code": 6124 - }, - "Looking up in 'node_modules' folder, initial location '{0}'.": { - "category": "Message", - "code": 6125 - }, - "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder.": { - "category": "Message", - "code": 6126 - }, - "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========": { - "category": "Message", - "code": 6127 - }, - "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========": { - "category": "Message", - "code": 6128 - }, - "Resolving real path for '{0}', result '{1}'.": { - "category": "Message", - "code": 6130 - }, - "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'.": { - "category": "Error", - "code": 6131 - }, - "File name '{0}' has a '{1}' extension - stripping it.": { - "category": "Message", - "code": 6132 - }, - "'{0}' is declared but its value is never read.": { - "category": "Error", - "code": 6133, - "reportsUnnecessary": true - }, - "Report errors on unused locals.": { - "category": "Message", - "code": 6134 - }, - "Report errors on unused parameters.": { - "category": "Message", - "code": 6135 - }, - "The maximum dependency depth to search under node_modules and load JavaScript files.": { - "category": "Message", - "code": 6136 - }, - "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'.": { - "category": "Error", - "code": 6137 - }, - "Property '{0}' is declared but its value is never read.": { - "category": "Error", - "code": 6138, - "reportsUnnecessary": true - }, - "Import emit helpers from 'tslib'.": { - "category": "Message", - "code": 6139 - }, - "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'.": { - "category": "Error", - "code": 6140 - }, - "Parse in strict mode and emit \"use strict\" for each source file.": { - "category": "Message", - "code": 6141 - }, - "Module '{0}' was resolved to '{1}', but '--jsx' is not set.": { - "category": "Error", - "code": 6142 - }, - "Module '{0}' was resolved as locally declared ambient module in file '{1}'.": { - "category": "Message", - "code": 6144 - }, - "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified.": { - "category": "Message", - "code": 6145 - }, - "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'.": { - "category": "Message", - "code": 6146 - }, - "Resolution for module '{0}' was found in cache from location '{1}'.": { - "category": "Message", - "code": 6147 - }, - "Directory '{0}' does not exist, skipping all lookups in it.": { - "category": "Message", - "code": 6148 - }, - "Show diagnostic information.": { - "category": "Message", - "code": 6149 - }, - "Show verbose diagnostic information.": { - "category": "Message", - "code": 6150 - }, - "Emit a single file with source maps instead of having a separate file.": { - "category": "Message", - "code": 6151 - }, - "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.": { - "category": "Message", - "code": 6152 - }, - "Transpile each file as a separate module (similar to 'ts.transpileModule').": { - "category": "Message", - "code": 6153 - }, - "Print names of generated files part of the compilation.": { - "category": "Message", - "code": 6154 - }, - "Print names of files part of the compilation.": { - "category": "Message", - "code": 6155 - }, - "The locale used when displaying messages to the user (e.g. 'en-us')": { - "category": "Message", - "code": 6156 - }, - "Do not generate custom helper functions like '__extends' in compiled output.": { - "category": "Message", - "code": 6157 - }, - "Do not include the default library file (lib.d.ts).": { - "category": "Message", - "code": 6158 - }, - "Do not add triple-slash references or imported modules to the list of compiled files.": { - "category": "Message", - "code": 6159 - }, - "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files.": { - "category": "Message", - "code": 6160 - }, - "List of folders to include type definitions from.": { - "category": "Message", - "code": 6161 - }, - "Disable size limitations on JavaScript projects.": { - "category": "Message", - "code": 6162 - }, - "The character set of the input files.": { - "category": "Message", - "code": 6163 - }, - "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.": { - "category": "Message", - "code": 6164 - }, - "Do not truncate error messages.": { - "category": "Message", - "code": 6165 - }, - "Output directory for generated declaration files.": { - "category": "Message", - "code": 6166 - }, - "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.": { - "category": "Message", - "code": 6167 - }, - "List of root folders whose combined content represents the structure of the project at runtime.": { - "category": "Message", - "code": 6168 - }, - "Show all compiler options.": { - "category": "Message", - "code": 6169 - }, - "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file": { - "category": "Message", - "code": 6170 - }, - "Command-line Options": { - "category": "Message", - "code": 6171 - }, - "Basic Options": { - "category": "Message", - "code": 6172 - }, - "Strict Type-Checking Options": { - "category": "Message", - "code": 6173 - }, - "Module Resolution Options": { - "category": "Message", - "code": 6174 - }, - "Source Map Options": { - "category": "Message", - "code": 6175 - }, - "Additional Checks": { - "category": "Message", - "code": 6176 - }, - "Experimental Options": { - "category": "Message", - "code": 6177 - }, - "Advanced Options": { - "category": "Message", - "code": 6178 - }, - "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.": { - "category": "Message", - "code": 6179 - }, - "Enable all strict type-checking options.": { - "category": "Message", - "code": 6180 - }, - "List of language service plugins.": { - "category": "Message", - "code": 6181 - }, - "Scoped package detected, looking in '{0}'": { - "category": "Message", - "code": 6182 - }, - "Reusing resolution of module '{0}' to file '{1}' from old program.": { - "category": "Message", - "code": 6183 - }, - "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program.": { - "category": "Message", - "code": 6184 - }, - "Disable strict checking of generic signatures in function types.": { - "category": "Message", - "code": 6185 - }, - "Enable strict checking of function types.": { - "category": "Message", - "code": 6186 - }, - "Enable strict checking of property initialization in classes.": { - "category": "Message", - "code": 6187 - }, - "Numeric separators are not allowed here.": { - "category": "Error", - "code": 6188 - }, - "Multiple consecutive numeric separators are not permitted.": { - "category": "Error", - "code": 6189 - }, - "Found 'package.json' at '{0}'. Package ID is '{1}'.": { - "category": "Message", - "code": 6190 - }, - "Whether to keep outdated console output in watch mode instead of clearing the screen.": { - "category": "Message", - "code": 6191 - }, - "All imports in import declaration are unused.": { - "category": "Error", - "code": 6192, - "reportsUnnecessary": true - }, - "Found 1 error. Watching for file changes.": { - "category": "Message", - "code": 6193 - }, - "Found {0} errors. Watching for file changes.": { - "category": "Message", - "code": 6194 - }, - "Resolve 'keyof' to string valued property names only (no numbers or symbols).": { - "category": "Message", - "code": 6195 - }, - "'{0}' is declared but never used.": { - "category": "Error", - "code": 6196, - "reportsUnnecessary": true - }, - "Include modules imported with '.json' extension": { - "category": "Message", - "code": 6197 - }, - "All destructured elements are unused.": { - "category": "Error", - "code": 6198, - "reportsUnnecessary": true - }, - "All variables are unused.": { - "category": "Error", - "code": 6199, - "reportsUnnecessary": true - }, - "Definitions of the following identifiers conflict with those in another file: {0}": { - "category": "Error", - "code": 6200 - }, - "Conflicts are in this file.": { - "category": "Message", - "code": 6201 - }, - "'{0}' was also declared here.": { - "category": "Message", - "code": 6203 - }, - "and here.": { - "category": "Message", - "code": 6204 - }, - "All type parameters are unused": { - "category": "Error", - "code": 6205 - }, - "'package.json' has a 'typesVersions' field with version-specific path mappings.": { - "category": "Message", - "code": 6206 - }, - "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.": { - "category": "Message", - "code": 6207 - }, - "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.": { - "category": "Message", - "code": 6208 - }, - "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.": { - "category": "Message", - "code": 6209 - }, - "An argument for '{0}' was not provided.": { - "category": "Message", - "code": 6210 - }, - "An argument matching this binding pattern was not provided.": { - "category": "Message", - "code": 6211 - }, - "Did you mean to call this expression?": { - "category": "Message", - "code": 6212 - }, - "Did you mean to use 'new' with this expression?": { - "category": "Message", - "code": 6213 - }, - - "Projects to reference": { - "category": "Message", - "code": 6300 - }, - "Enable project compilation": { - "category": "Message", - "code": 6302 - }, - "Project references may not form a circular graph. Cycle detected: {0}": { - "category": "Error", - "code": 6202 - }, - "Composite projects may not disable declaration emit.": { - "category": "Error", - "code": 6304 - }, - "Output file '{0}' has not been built from source file '{1}'.": { - "category": "Error", - "code": 6305 - }, - "Referenced project '{0}' must have setting \"composite\": true.": { - "category": "Error", - "code": 6306 - }, - "File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern.": { - "category": "Error", - "code": 6307 - }, - "Cannot prepend project '{0}' because it does not have 'outFile' set": { - "category": "Error", - "code": 6308 - }, - "Output file '{0}' from project '{1}' does not exist": { - "category": "Error", - "code": 6309 - }, - "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'": { - "category": "Message", - "code": 6350 - }, - "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'": { - "category": "Message", - "code": 6351 - }, - "Project '{0}' is out of date because output file '{1}' does not exist": { - "category": "Message", - "code": 6352 - }, - "Project '{0}' is out of date because its dependency '{1}' is out of date": { - "category": "Message", - "code": 6353 - }, - - "Project '{0}' is up to date with .d.ts files from its dependencies": { - "category": "Message", - "code": 6354 - }, - "Projects in this build: {0}": { - "category": "Message", - "code": 6355 - }, - "A non-dry build would delete the following files: {0}": { - "category": "Message", - "code": 6356 - }, - "A non-dry build would build project '{0}'": { - "category": "Message", - "code": 6357 - }, - "Building project '{0}'...": { - "category": "Message", - "code": 6358 - }, - "Updating output timestamps of project '{0}'...": { - "category": "Message", - "code": 6359 - }, - "delete this - Project '{0}' is up to date because it was previously built": { - "category": "Message", - "code": 6360 - }, - "Project '{0}' is up to date": { - "category": "Message", - "code": 6361 - }, - "Skipping build of project '{0}' because its dependency '{1}' has errors": { - "category": "Message", - "code": 6362 - }, - "Project '{0}' can't be built because its dependency '{1}' has errors": { - "category": "Message", - "code": 6363 - }, - "Build one or more projects and their dependencies, if out of date": { - "category": "Message", - "code": 6364 - }, - "Delete the outputs of all projects": { - "category": "Message", - "code": 6365 - }, - "Enable verbose logging": { - "category": "Message", - "code": 6366 - }, - "Show what would be built (or deleted, if specified with '--clean')": { - "category": "Message", - "code": 6367 - }, - "Build all projects, including those that appear to be up to date": { - "category": "Message", - "code": 6368 - }, - "Option '--build' must be the first command line argument.": { - "category": "Error", - "code": 6369 - }, - "Options '{0}' and '{1}' cannot be combined.": { - "category": "Error", - "code": 6370 - }, - - "The expected type comes from property '{0}' which is declared here on type '{1}'": { - "category": "Message", - "code": 6500 - }, - "The expected type comes from this index signature.": { - "category": "Message", - "code": 6501 - }, - "The expected type comes from the return type of this signature.": { - "category": "Message", - "code": 6502 - }, - - "Variable '{0}' implicitly has an '{1}' type.": { - "category": "Error", - "code": 7005 - }, - "Parameter '{0}' implicitly has an '{1}' type.": { - "category": "Error", - "code": 7006 - }, - "Member '{0}' implicitly has an '{1}' type.": { - "category": "Error", - "code": 7008 - }, - "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.": { - "category": "Error", - "code": 7009 - }, - "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type.": { - "category": "Error", - "code": 7010 - }, - "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type.": { - "category": "Error", - "code": 7011 - }, - "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.": { - "category": "Error", - "code": 7013 - }, - "Element implicitly has an 'any' type because index expression is not of type 'number'.": { - "category": "Error", - "code": 7015 - }, - "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.": { - "category": "Error", - "code": 7016 - }, - "Element implicitly has an 'any' type because type '{0}' has no index signature.": { - "category": "Error", - "code": 7017 - }, - "Object literal's property '{0}' implicitly has an '{1}' type.": { - "category": "Error", - "code": 7018 - }, - "Rest parameter '{0}' implicitly has an 'any[]' type.": { - "category": "Error", - "code": 7019 - }, - "Call signature, which lacks return-type annotation, implicitly has an 'any' return type.": { - "category": "Error", - "code": 7020 - }, - "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.": { - "category": "Error", - "code": 7022 - }, - "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": { - "category": "Error", - "code": 7023 - }, - "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": { - "category": "Error", - "code": 7024 - }, - "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type.": { - "category": "Error", - "code": 7025 - }, - "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.": { - "category": "Error", - "code": 7026 - }, - "Unreachable code detected.": { - "category": "Error", - "code": 7027, - "reportsUnnecessary": true - }, - "Unused label.": { - "category": "Error", - "code": 7028, - "reportsUnnecessary": true - }, - "Fallthrough case in switch.": { - "category": "Error", - "code": 7029 - }, - "Not all code paths return a value.": { - "category": "Error", - "code": 7030 - }, - "Binding element '{0}' implicitly has an '{1}' type.": { - "category": "Error", - "code": 7031 - }, - "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.": { - "category": "Error", - "code": 7032 - }, - "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.": { - "category": "Error", - "code": 7033 - }, - "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined.": { - "category": "Error", - "code": 7034 - }, - "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": { - "category": "Error", - "code": 7035 - }, - "Dynamic import's specifier must be of type 'string', but here has type '{0}'.": { - "category": "Error", - "code": 7036 - }, - "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.": { - "category": "Message", - "code": 7037 - }, - "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.": { - "category": "Message", - "code": 7038 - }, - "Mapped object type implicitly has an 'any' template type.": { - "category": "Error", - "code": 7039 - }, - "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`": { - "category": "Error", - "code": 7040 - }, - "The containing arrow function captures the global value of 'this' which implicitly has type 'any'.": { - "category": "Error", - "code": 7041 - }, - "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.": { - "category": "Error", - "code": 7042 - }, - "You cannot rename this element.": { - "category": "Error", - "code": 8000 - }, - "You cannot rename elements that are defined in the standard TypeScript library.": { - "category": "Error", - "code": 8001 - }, - "'import ... =' can only be used in a .ts file.": { - "category": "Error", - "code": 8002 - }, - "'export=' can only be used in a .ts file.": { - "category": "Error", - "code": 8003 - }, - "'type parameter declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8004 - }, - "'implements clauses' can only be used in a .ts file.": { - "category": "Error", - "code": 8005 - }, - "'interface declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8006 - }, - "'module declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8007 - }, - "'type aliases' can only be used in a .ts file.": { - "category": "Error", - "code": 8008 - }, - "'{0}' can only be used in a .ts file.": { - "category": "Error", - "code": 8009 - }, - "'types' can only be used in a .ts file.": { - "category": "Error", - "code": 8010 - }, - "'type arguments' can only be used in a .ts file.": { - "category": "Error", - "code": 8011 - }, - "'parameter modifiers' can only be used in a .ts file.": { - "category": "Error", - "code": 8012 - }, - "'non-null assertions' can only be used in a .ts file.": { - "category": "Error", - "code": 8013 - }, - "'enum declarations' can only be used in a .ts file.": { - "category": "Error", - "code": 8015 - }, - "'type assertion expressions' can only be used in a .ts file.": { - "category": "Error", - "code": 8016 - }, - "Octal literal types must use ES2015 syntax. Use the syntax '{0}'.": { - "category": "Error", - "code": 8017 - }, - "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'.": { - "category": "Error", - "code": 8018 - }, - "Report errors in .js files.": { - "category": "Message", - "code": 8019 - }, - "JSDoc types can only be used inside documentation comments.": { - "category": "Error", - "code": 8020 - }, - "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.": { - "category": "Error", - "code": 8021 - }, - "JSDoc '@{0}' is not attached to a class.": { - "category": "Error", - "code": 8022 - }, - "JSDoc '@{0} {1}' does not match the 'extends {2}' clause.": { - "category": "Error", - "code": 8023 - }, - "JSDoc '@param' tag has name '{0}', but there is no parameter with that name.": { - "category": "Error", - "code": 8024 - }, - "Class declarations cannot have more than one `@augments` or `@extends` tag.": { - "category": "Error", - "code": 8025 - }, - "Expected {0} type arguments; provide these with an '@extends' tag.": { - "category": "Error", - "code": 8026 - }, - "Expected {0}-{1} type arguments; provide these with an '@extends' tag.": { - "category": "Error", - "code": 8027 - }, - "JSDoc '...' may only appear in the last parameter of a signature.": { - "category": "Error", - "code": 8028 - }, - "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type.": { - "category": "Error", - "code": 8029 - }, - "The type of a function declaration must match the function's signature.": { - "category": "Error", - "code": 8030 - }, - "You cannot rename a module via a global import.": { - "category": "Error", - "code": 8031 - }, - "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause.": { - "category": "Error", - "code": 9002 - }, - "'class' expressions are not currently supported.": { - "category": "Error", - "code": 9003 - }, - "Language service is disabled.": { - "category": "Error", - "code": 9004 - }, - "JSX attributes must only be assigned a non-empty 'expression'.": { - "category": "Error", - "code": 17000 - }, - "JSX elements cannot have multiple attributes with the same name.": { - "category": "Error", - "code": 17001 - }, - "Expected corresponding JSX closing tag for '{0}'.": { - "category": "Error", - "code": 17002 - }, - "JSX attribute expected.": { - "category": "Error", - "code": 17003 - }, - "Cannot use JSX unless the '--jsx' flag is provided.": { - "category": "Error", - "code": 17004 - }, - "A constructor cannot contain a 'super' call when its class extends 'null'.": { - "category": "Error", - "code": 17005 - }, - "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { - "category": "Error", - "code": 17006 - }, - "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { - "category": "Error", - "code": 17007 - }, - "JSX element '{0}' has no corresponding closing tag.": { - "category": "Error", - "code": 17008 - }, - "'super' must be called before accessing 'this' in the constructor of a derived class.": { - "category": "Error", - "code": 17009 - }, - "Unknown type acquisition option '{0}'.": { - "category": "Error", - "code": 17010 - }, - "'super' must be called before accessing a property of 'super' in the constructor of a derived class.": { - "category": "Error", - "code": 17011 - }, - "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?": { - "category": "Error", - "code": 17012 - }, - "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor.": { - "category": "Error", - "code": 17013 - }, - "JSX fragment has no corresponding closing tag.": { - "category": "Error", - "code": 17014 - }, - "Expected corresponding closing tag for JSX fragment.": { - "category": "Error", - "code": 17015 - }, - "JSX fragment is not supported when using --jsxFactory": { - "category": "Error", - "code": 17016 - }, - "JSX fragment is not supported when using an inline JSX factory pragma": { - "category": "Error", - "code": 17017 - }, - - "Circularity detected while resolving configuration: {0}": { - "category": "Error", - "code": 18000 - }, - "A path in an 'extends' option must be relative or rooted, but '{0}' is not.": { - "category": "Error", - "code": 18001 - }, - "The 'files' list in config file '{0}' is empty.": { - "category": "Error", - "code": 18002 - }, - "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'.": { - "category": "Error", - "code": 18003 - }, - - "File is a CommonJS module; it may be converted to an ES6 module.": { - "category": "Suggestion", - "code": 80001 - }, - "This constructor function may be converted to a class declaration.": { - "category": "Suggestion", - "code": 80002 - }, - "Import may be converted to a default import.": { - "category": "Suggestion", - "code": 80003 - }, - "JSDoc types may be moved to TypeScript types.": { - "category": "Suggestion", - "code": 80004 - }, - "'require' call may be converted to an import.": { - "category": "Suggestion", - "code": 80005 - }, - "This may be converted to an async function.": { - "category": "Suggestion", - "code": 80006 - }, - "Add missing 'super()' call": { - "category": "Message", - "code": 90001 - }, - "Make 'super()' call the first statement in the constructor": { - "category": "Message", - "code": 90002 - }, - "Change 'extends' to 'implements'": { - "category": "Message", - "code": 90003 - }, - "Remove declaration for: '{0}'": { - "category": "Message", - "code": 90004 - }, - "Remove import from '{0}'": { - "category": "Message", - "code": 90005 - }, - "Implement interface '{0}'": { - "category": "Message", - "code": 90006 - }, - "Implement inherited abstract class": { - "category": "Message", - "code": 90007 - }, - "Add '{0}.' to unresolved variable": { - "category": "Message", - "code": 90008 - }, - "Remove destructuring": { - "category": "Message", - "code": 90009 - }, - "Remove variable statement": { - "category": "Message", - "code": 90010 - }, - "Remove template tag": { - "category": "Message", - "code": 90011 - }, - "Remove type parameters": { - "category": "Message", - "code": 90012 - }, - "Import '{0}' from module \"{1}\"": { - "category": "Message", - "code": 90013 - }, - "Change '{0}' to '{1}'": { - "category": "Message", - "code": 90014 - }, - "Add '{0}' to existing import declaration from \"{1}\"": { - "category": "Message", - "code": 90015 - }, - "Declare property '{0}'": { - "category": "Message", - "code": 90016 - }, - "Add index signature for property '{0}'": { - "category": "Message", - "code": 90017 - }, - "Disable checking for this file": { - "category": "Message", - "code": 90018 - }, - "Ignore this error message": { - "category": "Message", - "code": 90019 - }, - "Initialize property '{0}' in the constructor": { - "category": "Message", - "code": 90020 - }, - "Initialize static property '{0}'": { - "category": "Message", - "code": 90021 - }, - "Change spelling to '{0}'": { - "category": "Message", - "code": 90022 - }, - "Declare method '{0}'": { - "category": "Message", - "code": 90023 - }, - "Declare static method '{0}'": { - "category": "Message", - "code": 90024 - }, - "Prefix '{0}' with an underscore": { - "category": "Message", - "code": 90025 - }, - "Rewrite as the indexed access type '{0}'": { - "category": "Message", - "code": 90026 - }, - "Declare static property '{0}'": { - "category": "Message", - "code": 90027 - }, - "Call decorator expression": { - "category": "Message", - "code": 90028 - }, - "Add async modifier to containing function": { - "category": "Message", - "code": 90029 - }, - "Replace 'infer {0}' with 'unknown'": { - "category": "Message", - "code": 90030 - }, - "Replace all unused 'infer' with 'unknown'": { - "category": "Message", - "code": 90031 - }, - "Import default '{0}' from module \"{1}\"": { - "category": "Message", - "code": 90032 - }, - "Add default import '{0}' to existing import declaration from \"{1}\"": { - "category": "Message", - "code": 90033 - }, - "Convert function to an ES2015 class": { - "category": "Message", - "code": 95001 - }, - "Convert function '{0}' to class": { - "category": "Message", - "code": 95002 - }, - "Extract to {0} in {1}": { - "category": "Message", - "code": 95004 - }, - "Extract function": { - "category": "Message", - "code": 95005 - }, - "Extract constant": { - "category": "Message", - "code": 95006 - }, - "Extract to {0} in enclosing scope": { - "category": "Message", - "code": 95007 - }, - "Extract to {0} in {1} scope": { - "category": "Message", - "code": 95008 - }, - "Annotate with type from JSDoc": { - "category": "Message", - "code": 95009 - }, - "Annotate with types from JSDoc": { - "category": "Message", - "code": 95010 - }, - "Infer type of '{0}' from usage": { - "category": "Message", - "code": 95011 - }, - "Infer parameter types from usage": { - "category": "Message", - "code": 95012 - }, - "Convert to default import": { - "category": "Message", - "code": 95013 - }, - "Install '{0}'": { - "category": "Message", - "code": 95014 - }, - "Replace import with '{0}'.": { - "category": "Message", - "code": 95015 - }, - "Use synthetic 'default' member.": { - "category": "Message", - "code": 95016 - }, - "Convert to ES6 module": { - "category": "Message", - "code": 95017 - }, - "Add 'undefined' type to property '{0}'": { - "category": "Message", - "code": 95018 - }, - "Add initializer to property '{0}'": { - "category": "Message", - "code": 95019 - }, - "Add definite assignment assertion to property '{0}'": { - "category": "Message", - "code": 95020 - }, - "Add all missing members": { - "category": "Message", - "code": 95022 - }, - "Infer all types from usage": { - "category": "Message", - "code": 95023 - }, - "Delete all unused declarations": { - "category": "Message", - "code": 95024 - }, - "Prefix all unused declarations with '_' where possible": { - "category": "Message", - "code": 95025 - }, - "Fix all detected spelling errors": { - "category": "Message", - "code": 95026 - }, - "Add initializers to all uninitialized properties": { - "category": "Message", - "code": 95027 - }, - "Add definite assignment assertions to all uninitialized properties": { - "category": "Message", - "code": 95028 - }, - "Add undefined type to all uninitialized properties": { - "category": "Message", - "code": 95029 - }, - "Change all jsdoc-style types to TypeScript": { - "category": "Message", - "code": 95030 - }, - "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)": { - "category": "Message", - "code": 95031 - }, - "Implement all unimplemented interfaces": { - "category": "Message", - "code": 95032 - }, - "Install all missing types packages": { - "category": "Message", - "code": 95033 - }, - "Rewrite all as indexed access types": { - "category": "Message", - "code": 95034 - }, - "Convert all to default imports": { - "category": "Message", - "code": 95035 - }, - "Make all 'super()' calls the first statement in their constructor": { - "category": "Message", - "code": 95036 - }, - "Add qualifier to all unresolved variables matching a member name": { - "category": "Message", - "code": 95037 - }, - "Change all extended interfaces to 'implements'": { - "category": "Message", - "code": 95038 - }, - "Add all missing super calls": { - "category": "Message", - "code": 95039 - }, - "Implement all inherited abstract classes": { - "category": "Message", - "code": 95040 - }, - "Add all missing 'async' modifiers": { - "category": "Message", - "code": 95041 - }, - "Add '@ts-ignore' to all error messages": { - "category": "Message", - "code": 95042 - }, - "Annotate everything with types from JSDoc": { - "category": "Message", - "code": 95043 - }, - "Add '()' to all uncalled decorators": { - "category": "Message", - "code": 95044 - }, - "Convert all constructor functions to classes": { - "category": "Message", - "code": 95045 - }, - "Generate 'get' and 'set' accessors": { - "category": "Message", - "code": 95046 - }, - "Convert 'require' to 'import'": { - "category": "Message", - "code": 95047 - }, - "Convert all 'require' to 'import'": { - "category": "Message", - "code": 95048 - }, - "Move to a new file": { - "category": "Message", - "code": 95049 - }, - "Remove unreachable code": { - "category": "Message", - "code": 95050 - }, - "Remove all unreachable code": { - "category": "Message", - "code": 95051 - }, - "Add missing 'typeof'": { - "category": "Message", - "code": 95052 - }, - "Remove unused label": { - "category": "Message", - "code": 95053 - }, - "Remove all unused labels": { - "category": "Message", - "code": 95054 - }, - "Convert '{0}' to mapped object type": { - "category": "Message", - "code": 95055 - }, - "Convert namespace import to named imports": { - "category": "Message", - "code": 95056 - }, - "Convert named imports to namespace import": { - "category": "Message", - "code": 95057 - }, - "Add or remove braces in an arrow function": { - "category": "Message", - "code": 95058 - }, - "Add braces to arrow function": { - "category": "Message", - "code": 95059 - }, - "Remove braces from arrow function": { - "category": "Message", - "code": 95060 - }, - "Convert default export to named export": { - "category": "Message", - "code": 95061 - }, - "Convert named export to default export": { - "category": "Message", - "code": 95062 - }, - "Add missing enum member '{0}'": { - "category": "Message", - "code": 95063 - }, - "Add all missing imports": { - "category": "Message", - "code": 95064 - }, - "Convert to async function": { - "category": "Message", - "code": 95065 - }, - "Convert all to async functions": { - "category": "Message", - "code": 95066 - }, - "Generate types for '{0}'": { - "category": "Message", - "code": 95067 - }, - "Generate types for all packages without types": { - "category": "Message", - "code": 95068 - }, - "Add missing 'new' operator to call": { - "category": "Message", - "code": 95069 - }, - "Add missing 'new' operator to all calls": { - "category": "Message", - "code": 95070 - } +{ + "Unterminated string literal.": { + "category": "Error", + "code": 1002 + }, + "Identifier expected.": { + "category": "Error", + "code": 1003 + }, + "'{0}' expected.": { + "category": "Error", + "code": 1005 + }, + "A file cannot have a reference to itself.": { + "category": "Error", + "code": 1006 + }, + "Trailing comma not allowed.": { + "category": "Error", + "code": 1009 + }, + "'*/' expected.": { + "category": "Error", + "code": 1010 + }, + "An element access expression should take an argument.": { + "category": "Error", + "code": 1011 + }, + "Unexpected token.": { + "category": "Error", + "code": 1012 + }, + "A rest parameter or binding pattern may not have a trailing comma.": { + "category": "Error", + "code": 1013 + }, + "A rest parameter must be last in a parameter list.": { + "category": "Error", + "code": 1014 + }, + "Parameter cannot have question mark and initializer.": { + "category": "Error", + "code": 1015 + }, + "A required parameter cannot follow an optional parameter.": { + "category": "Error", + "code": 1016 + }, + "An index signature cannot have a rest parameter.": { + "category": "Error", + "code": 1017 + }, + "An index signature parameter cannot have an accessibility modifier.": { + "category": "Error", + "code": 1018 + }, + "An index signature parameter cannot have a question mark.": { + "category": "Error", + "code": 1019 + }, + "An index signature parameter cannot have an initializer.": { + "category": "Error", + "code": 1020 + }, + "An index signature must have a type annotation.": { + "category": "Error", + "code": 1021 + }, + "An index signature parameter must have a type annotation.": { + "category": "Error", + "code": 1022 + }, + "An index signature parameter type must be 'string' or 'number'.": { + "category": "Error", + "code": 1023 + }, + "'readonly' modifier can only appear on a property declaration or index signature.": { + "category": "Error", + "code": 1024 + }, + "Accessibility modifier already seen.": { + "category": "Error", + "code": 1028 + }, + "'{0}' modifier must precede '{1}' modifier.": { + "category": "Error", + "code": 1029 + }, + "'{0}' modifier already seen.": { + "category": "Error", + "code": 1030 + }, + "'{0}' modifier cannot appear on a class element.": { + "category": "Error", + "code": 1031 + }, + "'super' must be followed by an argument list or member access.": { + "category": "Error", + "code": 1034 + }, + "Only ambient modules can use quoted names.": { + "category": "Error", + "code": 1035 + }, + "Statements are not allowed in ambient contexts.": { + "category": "Error", + "code": 1036 + }, + "A 'declare' modifier cannot be used in an already ambient context.": { + "category": "Error", + "code": 1038 + }, + "Initializers are not allowed in ambient contexts.": { + "category": "Error", + "code": 1039 + }, + "'{0}' modifier cannot be used in an ambient context.": { + "category": "Error", + "code": 1040 + }, + "'{0}' modifier cannot be used with a class declaration.": { + "category": "Error", + "code": 1041 + }, + "'{0}' modifier cannot be used here.": { + "category": "Error", + "code": 1042 + }, + "'{0}' modifier cannot appear on a data property.": { + "category": "Error", + "code": 1043 + }, + "'{0}' modifier cannot appear on a module or namespace element.": { + "category": "Error", + "code": 1044 + }, + "A '{0}' modifier cannot be used with an interface declaration.": { + "category": "Error", + "code": 1045 + }, + "A 'declare' modifier is required for a top level declaration in a .d.ts file.": { + "category": "Error", + "code": 1046 + }, + "A rest parameter cannot be optional.": { + "category": "Error", + "code": 1047 + }, + "A rest parameter cannot have an initializer.": { + "category": "Error", + "code": 1048 + }, + "A 'set' accessor must have exactly one parameter.": { + "category": "Error", + "code": 1049 + }, + "A 'set' accessor cannot have an optional parameter.": { + "category": "Error", + "code": 1051 + }, + "A 'set' accessor parameter cannot have an initializer.": { + "category": "Error", + "code": 1052 + }, + "A 'set' accessor cannot have rest parameter.": { + "category": "Error", + "code": 1053 + }, + "A 'get' accessor cannot have parameters.": { + "category": "Error", + "code": 1054 + }, + "Type '{0}' is not a valid async function return type in ES5/ES3 because it does not refer to a Promise-compatible constructor value.": { + "category": "Error", + "code": 1055 + }, + "Accessors are only available when targeting ECMAScript 5 and higher.": { + "category": "Error", + "code": 1056 + }, + "An async function or method must have a valid awaitable return type.": { + "category": "Error", + "code": 1057 + }, + "The return type of an async function must either be a valid promise or must not contain a callable 'then' member.": { + "category": "Error", + "code": 1058 + }, + "A promise must have a 'then' method.": { + "category": "Error", + "code": 1059 + }, + "The first parameter of the 'then' method of a promise must be a callback.": { + "category": "Error", + "code": 1060 + }, + "Enum member must have initializer.": { + "category": "Error", + "code": 1061 + }, + "Type is referenced directly or indirectly in the fulfillment callback of its own 'then' method.": { + "category": "Error", + "code": 1062 + }, + "An export assignment cannot be used in a namespace.": { + "category": "Error", + "code": 1063 + }, + "The return type of an async function or method must be the global Promise type.": { + "category": "Error", + "code": 1064 + }, + "In ambient enum declarations member initializer must be constant expression.": { + "category": "Error", + "code": 1066 + }, + "Unexpected token. A constructor, method, accessor, or property was expected.": { + "category": "Error", + "code": 1068 + }, + "Unexpected token. A type parameter name was expected without curly braces.": { + "category": "Error", + "code": 1069 + }, + "'{0}' modifier cannot appear on a type member.": { + "category": "Error", + "code": 1070 + }, + "'{0}' modifier cannot appear on an index signature.": { + "category": "Error", + "code": 1071 + }, + "A '{0}' modifier cannot be used with an import declaration.": { + "category": "Error", + "code": 1079 + }, + "Invalid 'reference' directive syntax.": { + "category": "Error", + "code": 1084 + }, + "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'.": { + "category": "Error", + "code": 1085 + }, + "An accessor cannot be declared in an ambient context.": { + "category": "Error", + "code": 1086 + }, + "'{0}' modifier cannot appear on a constructor declaration.": { + "category": "Error", + "code": 1089 + }, + "'{0}' modifier cannot appear on a parameter.": { + "category": "Error", + "code": 1090 + }, + "Only a single variable declaration is allowed in a 'for...in' statement.": { + "category": "Error", + "code": 1091 + }, + "Type parameters cannot appear on a constructor declaration.": { + "category": "Error", + "code": 1092 + }, + "Type annotation cannot appear on a constructor declaration.": { + "category": "Error", + "code": 1093 + }, + "An accessor cannot have type parameters.": { + "category": "Error", + "code": 1094 + }, + "A 'set' accessor cannot have a return type annotation.": { + "category": "Error", + "code": 1095 + }, + "An index signature must have exactly one parameter.": { + "category": "Error", + "code": 1096 + }, + "'{0}' list cannot be empty.": { + "category": "Error", + "code": 1097 + }, + "Type parameter list cannot be empty.": { + "category": "Error", + "code": 1098 + }, + "Type argument list cannot be empty.": { + "category": "Error", + "code": 1099 + }, + "Invalid use of '{0}' in strict mode.": { + "category": "Error", + "code": 1100 + }, + "'with' statements are not allowed in strict mode.": { + "category": "Error", + "code": 1101 + }, + "'delete' cannot be called on an identifier in strict mode.": { + "category": "Error", + "code": 1102 + }, + "A 'for-await-of' statement is only allowed within an async function or async generator.": { + "category": "Error", + "code": 1103 + }, + "A 'continue' statement can only be used within an enclosing iteration statement.": { + "category": "Error", + "code": 1104 + }, + "A 'break' statement can only be used within an enclosing iteration or switch statement.": { + "category": "Error", + "code": 1105 + }, + "Jump target cannot cross function boundary.": { + "category": "Error", + "code": 1107 + }, + "A 'return' statement can only be used within a function body.": { + "category": "Error", + "code": 1108 + }, + "Expression expected.": { + "category": "Error", + "code": 1109 + }, + "Type expected.": { + "category": "Error", + "code": 1110 + }, + "A 'default' clause cannot appear more than once in a 'switch' statement.": { + "category": "Error", + "code": 1113 + }, + "Duplicate label '{0}'.": { + "category": "Error", + "code": 1114 + }, + "A 'continue' statement can only jump to a label of an enclosing iteration statement.": { + "category": "Error", + "code": 1115 + }, + "A 'break' statement can only jump to a label of an enclosing statement.": { + "category": "Error", + "code": 1116 + }, + "An object literal cannot have multiple properties with the same name in strict mode.": { + "category": "Error", + "code": 1117 + }, + "An object literal cannot have multiple get/set accessors with the same name.": { + "category": "Error", + "code": 1118 + }, + "An object literal cannot have property and accessor with the same name.": { + "category": "Error", + "code": 1119 + }, + "An export assignment cannot have modifiers.": { + "category": "Error", + "code": 1120 + }, + "Octal literals are not allowed in strict mode.": { + "category": "Error", + "code": 1121 + }, + "Variable declaration list cannot be empty.": { + "category": "Error", + "code": 1123 + }, + "Digit expected.": { + "category": "Error", + "code": 1124 + }, + "Hexadecimal digit expected.": { + "category": "Error", + "code": 1125 + }, + "Unexpected end of text.": { + "category": "Error", + "code": 1126 + }, + "Invalid character.": { + "category": "Error", + "code": 1127 + }, + "Declaration or statement expected.": { + "category": "Error", + "code": 1128 + }, + "Statement expected.": { + "category": "Error", + "code": 1129 + }, + "'case' or 'default' expected.": { + "category": "Error", + "code": 1130 + }, + "Property or signature expected.": { + "category": "Error", + "code": 1131 + }, + "Enum member expected.": { + "category": "Error", + "code": 1132 + }, + "Variable declaration expected.": { + "category": "Error", + "code": 1134 + }, + "Argument expression expected.": { + "category": "Error", + "code": 1135 + }, + "Property assignment expected.": { + "category": "Error", + "code": 1136 + }, + "Expression or comma expected.": { + "category": "Error", + "code": 1137 + }, + "Parameter declaration expected.": { + "category": "Error", + "code": 1138 + }, + "Type parameter declaration expected.": { + "category": "Error", + "code": 1139 + }, + "Type argument expected.": { + "category": "Error", + "code": 1140 + }, + "String literal expected.": { + "category": "Error", + "code": 1141 + }, + "Line break not permitted here.": { + "category": "Error", + "code": 1142 + }, + "'{' or ';' expected.": { + "category": "Error", + "code": 1144 + }, + "Declaration expected.": { + "category": "Error", + "code": 1146 + }, + "Import declarations in a namespace cannot reference a module.": { + "category": "Error", + "code": 1147 + }, + "Cannot use imports, exports, or module augmentations when '--module' is 'none'.": { + "category": "Error", + "code": 1148 + }, + "File name '{0}' differs from already included file name '{1}' only in casing.": { + "category": "Error", + "code": 1149 + }, + "'new T[]' cannot be used to create an array. Use 'new Array()' instead.": { + "category": "Error", + "code": 1150 + }, + "'const' declarations must be initialized.": { + "category": "Error", + "code": 1155 + }, + "'const' declarations can only be declared inside a block.": { + "category": "Error", + "code": 1156 + }, + "'let' declarations can only be declared inside a block.": { + "category": "Error", + "code": 1157 + }, + "Unterminated template literal.": { + "category": "Error", + "code": 1160 + }, + "Unterminated regular expression literal.": { + "category": "Error", + "code": 1161 + }, + "An object member cannot be declared optional.": { + "category": "Error", + "code": 1162 + }, + "A 'yield' expression is only allowed in a generator body.": { + "category": "Error", + "code": 1163 + }, + "Computed property names are not allowed in enums.": { + "category": "Error", + "code": 1164 + }, + "A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.": { + "category": "Error", + "code": 1165 + }, + "A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.": { + "category": "Error", + "code": 1166 + }, + "A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.": { + "category": "Error", + "code": 1168 + }, + "A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.": { + "category": "Error", + "code": 1169 + }, + "A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.": { + "category": "Error", + "code": 1170 + }, + "A comma expression is not allowed in a computed property name.": { + "category": "Error", + "code": 1171 + }, + "'extends' clause already seen.": { + "category": "Error", + "code": 1172 + }, + "'extends' clause must precede 'implements' clause.": { + "category": "Error", + "code": 1173 + }, + "Classes can only extend a single class.": { + "category": "Error", + "code": 1174 + }, + "'implements' clause already seen.": { + "category": "Error", + "code": 1175 + }, + "Interface declaration cannot have 'implements' clause.": { + "category": "Error", + "code": 1176 + }, + "Binary digit expected.": { + "category": "Error", + "code": 1177 + }, + "Octal digit expected.": { + "category": "Error", + "code": 1178 + }, + "Unexpected token. '{' expected.": { + "category": "Error", + "code": 1179 + }, + "Property destructuring pattern expected.": { + "category": "Error", + "code": 1180 + }, + "Array element destructuring pattern expected.": { + "category": "Error", + "code": 1181 + }, + "A destructuring declaration must have an initializer.": { + "category": "Error", + "code": 1182 + }, + "An implementation cannot be declared in ambient contexts.": { + "category": "Error", + "code": 1183 + }, + "Modifiers cannot appear here.": { + "category": "Error", + "code": 1184 + }, + "Merge conflict marker encountered.": { + "category": "Error", + "code": 1185 + }, + "A rest element cannot have an initializer.": { + "category": "Error", + "code": 1186 + }, + "A parameter property may not be declared using a binding pattern.": { + "category": "Error", + "code": 1187 + }, + "Only a single variable declaration is allowed in a 'for...of' statement.": { + "category": "Error", + "code": 1188 + }, + "The variable declaration of a 'for...in' statement cannot have an initializer.": { + "category": "Error", + "code": 1189 + }, + "The variable declaration of a 'for...of' statement cannot have an initializer.": { + "category": "Error", + "code": 1190 + }, + "An import declaration cannot have modifiers.": { + "category": "Error", + "code": 1191 + }, + "Module '{0}' has no default export.": { + "category": "Error", + "code": 1192 + }, + "An export declaration cannot have modifiers.": { + "category": "Error", + "code": 1193 + }, + "Export declarations are not permitted in a namespace.": { + "category": "Error", + "code": 1194 + }, + "Catch clause variable cannot have a type annotation.": { + "category": "Error", + "code": 1196 + }, + "Catch clause variable cannot have an initializer.": { + "category": "Error", + "code": 1197 + }, + "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.": { + "category": "Error", + "code": 1198 + }, + "Unterminated Unicode escape sequence.": { + "category": "Error", + "code": 1199 + }, + "Line terminator not permitted before arrow.": { + "category": "Error", + "code": 1200 + }, + "Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from \"mod\"', 'import {a} from \"mod\"', 'import d from \"mod\"', or another module format instead.": { + "category": "Error", + "code": 1202 + }, + "Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.": { + "category": "Error", + "code": 1203 + }, + "Cannot re-export a type when the '--isolatedModules' flag is provided.": { + "category": "Error", + "code": 1205 + }, + "Decorators are not valid here.": { + "category": "Error", + "code": 1206 + }, + "Decorators cannot be applied to multiple get/set accessors of the same name.": { + "category": "Error", + "code": 1207 + }, + "Cannot compile namespaces when the '--isolatedModules' flag is provided.": { + "category": "Error", + "code": 1208 + }, + "Ambient const enums are not allowed when the '--isolatedModules' flag is provided.": { + "category": "Error", + "code": 1209 + }, + "Invalid use of '{0}'. Class definitions are automatically in strict mode.": { + "category": "Error", + "code": 1210 + }, + "A class declaration without the 'default' modifier must have a name.": { + "category": "Error", + "code": 1211 + }, + "Identifier expected. '{0}' is a reserved word in strict mode.": { + "category": "Error", + "code": 1212 + }, + "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.": { + "category": "Error", + "code": 1213 + }, + "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.": { + "category": "Error", + "code": 1214 + }, + "Invalid use of '{0}'. Modules are automatically in strict mode.": { + "category": "Error", + "code": 1215 + }, + "Identifier expected. '__esModule' is reserved as an exported marker when transforming ECMAScript modules.": { + "category": "Error", + "code": 1216 + }, + "Export assignment is not supported when '--module' flag is 'system'.": { + "category": "Error", + "code": 1218 + }, + "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.": { + "category": "Error", + "code": 1219 + }, + "Generators are only available when targeting ECMAScript 2015 or higher.": { + "category": "Error", + "code": 1220 + }, + "Generators are not allowed in an ambient context.": { + "category": "Error", + "code": 1221 + }, + "An overload signature cannot be declared as a generator.": { + "category": "Error", + "code": 1222 + }, + "'{0}' tag already specified.": { + "category": "Error", + "code": 1223 + }, + "Signature '{0}' must be a type predicate.": { + "category": "Error", + "code": 1224 + }, + "Cannot find parameter '{0}'.": { + "category": "Error", + "code": 1225 + }, + "Type predicate '{0}' is not assignable to '{1}'.": { + "category": "Error", + "code": 1226 + }, + "Parameter '{0}' is not in the same position as parameter '{1}'.": { + "category": "Error", + "code": 1227 + }, + "A type predicate is only allowed in return type position for functions and methods.": { + "category": "Error", + "code": 1228 + }, + "A type predicate cannot reference a rest parameter.": { + "category": "Error", + "code": 1229 + }, + "A type predicate cannot reference element '{0}' in a binding pattern.": { + "category": "Error", + "code": 1230 + }, + "An export assignment can only be used in a module.": { + "category": "Error", + "code": 1231 + }, + "An import declaration can only be used in a namespace or module.": { + "category": "Error", + "code": 1232 + }, + "An export declaration can only be used in a module.": { + "category": "Error", + "code": 1233 + }, + "An ambient module declaration is only allowed at the top level in a file.": { + "category": "Error", + "code": 1234 + }, + "A namespace declaration is only allowed in a namespace or module.": { + "category": "Error", + "code": 1235 + }, + "The return type of a property decorator function must be either 'void' or 'any'.": { + "category": "Error", + "code": 1236 + }, + "The return type of a parameter decorator function must be either 'void' or 'any'.": { + "category": "Error", + "code": 1237 + }, + "Unable to resolve signature of class decorator when called as an expression.": { + "category": "Error", + "code": 1238 + }, + "Unable to resolve signature of parameter decorator when called as an expression.": { + "category": "Error", + "code": 1239 + }, + "Unable to resolve signature of property decorator when called as an expression.": { + "category": "Error", + "code": 1240 + }, + "Unable to resolve signature of method decorator when called as an expression.": { + "category": "Error", + "code": 1241 + }, + "'abstract' modifier can only appear on a class, method, or property declaration.": { + "category": "Error", + "code": 1242 + }, + "'{0}' modifier cannot be used with '{1}' modifier.": { + "category": "Error", + "code": 1243 + }, + "Abstract methods can only appear within an abstract class.": { + "category": "Error", + "code": 1244 + }, + "Method '{0}' cannot have an implementation because it is marked abstract.": { + "category": "Error", + "code": 1245 + }, + "An interface property cannot have an initializer.": { + "category": "Error", + "code": 1246 + }, + "A type literal property cannot have an initializer.": { + "category": "Error", + "code": 1247 + }, + "A class member cannot have the '{0}' keyword.": { + "category": "Error", + "code": 1248 + }, + "A decorator can only decorate a method implementation, not an overload.": { + "category": "Error", + "code": 1249 + }, + "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'.": { + "category": "Error", + "code": 1250 + }, + "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Class definitions are automatically in strict mode.": { + "category": "Error", + "code": 1251 + }, + "Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. Modules are automatically in strict mode.": { + "category": "Error", + "code": 1252 + }, + "'{0}' tag cannot be used independently as a top level JSDoc tag.": { + "category": "Error", + "code": 1253 + }, + "A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.": { + "category": "Error", + "code": 1254 + }, + "A definite assignment assertion '!' is not permitted in this context.": { + "category": "Error", + "code": 1255 + }, + "A rest element must be last in a tuple type.": { + "category": "Error", + "code": 1256 + }, + "A required element cannot follow an optional element.": { + "category": "Error", + "code": 1257 + }, + "'with' statements are not allowed in an async function block.": { + "category": "Error", + "code": 1300 + }, + "'await' expression is only allowed within an async function.": { + "category": "Error", + "code": 1308 + }, + "'=' can only be used in an object literal property inside a destructuring assignment.": { + "category": "Error", + "code": 1312 + }, + "The body of an 'if' statement cannot be the empty statement.": { + "category": "Error", + "code": 1313 + }, + "Global module exports may only appear in module files.": { + "category": "Error", + "code": 1314 + }, + "Global module exports may only appear in declaration files.": { + "category": "Error", + "code": 1315 + }, + "Global module exports may only appear at top level.": { + "category": "Error", + "code": 1316 + }, + "A parameter property cannot be declared using a rest parameter.": { + "category": "Error", + "code": 1317 + }, + "An abstract accessor cannot have an implementation.": { + "category": "Error", + "code": 1318 + }, + "A default export can only be used in an ECMAScript-style module.": { + "category": "Error", + "code": 1319 + }, + "Type of 'await' operand must either be a valid promise or must not contain a callable 'then' member.": { + "category": "Error", + "code": 1320 + }, + "Type of 'yield' operand in an async generator must either be a valid promise or must not contain a callable 'then' member.": { + "category": "Error", + "code": 1321 + }, + "Type of iterated elements of a 'yield*' operand must either be a valid promise or must not contain a callable 'then' member.": { + "category": "Error", + "code": 1322 + }, + "Dynamic import is only supported when '--module' flag is 'commonjs' or 'esNext'.": { + "category": "Error", + "code": 1323 + }, + "Dynamic import must have one specifier as an argument.": { + "category": "Error", + "code": 1324 + }, + "Specifier of dynamic import cannot be spread element.": { + "category": "Error", + "code": 1325 + }, + "Dynamic import cannot have type arguments": { + "category": "Error", + "code": 1326 + }, + "String literal with double quotes expected.": { + "category": "Error", + "code": 1327 + }, + "Property value can only be string literal, numeric literal, 'true', 'false', 'null', object literal or array literal.": { + "category": "Error", + "code": 1328 + }, + "'{0}' accepts too few arguments to be used as a decorator here. Did you mean to call it first and write '@{0}()'?": { + "category": "Error", + "code": 1329 + }, + "A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.": { + "category": "Error", + "code": 1330 + }, + "A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.": { + "category": "Error", + "code": 1331 + }, + "A variable whose type is a 'unique symbol' type must be 'const'.": { + "category": "Error", + "code": 1332 + }, + "'unique symbol' types may not be used on a variable declaration with a binding name.": { + "category": "Error", + "code": 1333 + }, + "'unique symbol' types are only allowed on variables in a variable statement.": { + "category": "Error", + "code": 1334 + }, + "'unique symbol' types are not allowed here.": { + "category": "Error", + "code": 1335 + }, + "An index signature parameter type cannot be a type alias. Consider writing '[{0}: {1}]: {2}' instead.": { + "category": "Error", + "code": 1336 + }, + "An index signature parameter type cannot be a union type. Consider using a mapped object type instead.": { + "category": "Error", + "code": 1337 + }, + "'infer' declarations are only permitted in the 'extends' clause of a conditional type.": { + "category": "Error", + "code": 1338 + }, + "Module '{0}' does not refer to a value, but is used as a value here.": { + "category": "Error", + "code": 1339 + }, + "Module '{0}' does not refer to a type, but is used as a type here. Did you mean 'typeof import('{0}')'?": { + "category": "Error", + "code": 1340 + }, + "Type arguments cannot be used here.": { + "category": "Error", + "code": 1342 + }, + "The 'import.meta' meta-property is only allowed using 'ESNext' for the 'target' and 'module' compiler options.": { + "category": "Error", + "code": 1343 + }, + "'A label is not allowed here.": { + "category": "Error", + "code": 1344 + }, + "An expression of type 'void' cannot be tested for truthiness": { + "category": "Error", + "code": 1345 + }, + "This parameter is not allowed with 'use strict' directive.": { + "category": "Error", + "code": 1346 + }, + "'use strict' directive cannot be used with non-simple parameter list.": { + "category": "Error", + "code": 1347 + }, + "Non-simple parameter declared here.": { + "category": "Error", + "code": 1348 + }, + "'use strict' directive used here.": { + "category": "Error", + "code": 1349 + }, + + "Duplicate identifier '{0}'.": { + "category": "Error", + "code": 2300 + }, + "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.": { + "category": "Error", + "code": 2301 + }, + "Static members cannot reference class type parameters.": { + "category": "Error", + "code": 2302 + }, + "Circular definition of import alias '{0}'.": { + "category": "Error", + "code": 2303 + }, + "Cannot find name '{0}'.": { + "category": "Error", + "code": 2304 + }, + "Module '{0}' has no exported member '{1}'.": { + "category": "Error", + "code": 2305 + }, + "File '{0}' is not a module.": { + "category": "Error", + "code": 2306 + }, + "Cannot find module '{0}'.": { + "category": "Error", + "code": 2307 + }, + "Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity.": { + "category": "Error", + "code": 2308 + }, + "An export assignment cannot be used in a module with other exported elements.": { + "category": "Error", + "code": 2309 + }, + "Type '{0}' recursively references itself as a base type.": { + "category": "Error", + "code": 2310 + }, + "A class may only extend another class.": { + "category": "Error", + "code": 2311 + }, + "An interface may only extend a class or another interface.": { + "category": "Error", + "code": 2312 + }, + "Type parameter '{0}' has a circular constraint.": { + "category": "Error", + "code": 2313 + }, + "Generic type '{0}' requires {1} type argument(s).": { + "category": "Error", + "code": 2314 + }, + "Type '{0}' is not generic.": { + "category": "Error", + "code": 2315 + }, + "Global type '{0}' must be a class or interface type.": { + "category": "Error", + "code": 2316 + }, + "Global type '{0}' must have {1} type parameter(s).": { + "category": "Error", + "code": 2317 + }, + "Cannot find global type '{0}'.": { + "category": "Error", + "code": 2318 + }, + "Named property '{0}' of types '{1}' and '{2}' are not identical.": { + "category": "Error", + "code": 2319 + }, + "Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.": { + "category": "Error", + "code": 2320 + }, + "Excessive stack depth comparing types '{0}' and '{1}'.": { + "category": "Error", + "code": 2321 + }, + "Type '{0}' is not assignable to type '{1}'.": { + "category": "Error", + "code": 2322 + }, + "Cannot redeclare exported variable '{0}'.": { + "category": "Error", + "code": 2323 + }, + "Property '{0}' is missing in type '{1}'.": { + "category": "Error", + "code": 2324 + }, + "Property '{0}' is private in type '{1}' but not in type '{2}'.": { + "category": "Error", + "code": 2325 + }, + "Types of property '{0}' are incompatible.": { + "category": "Error", + "code": 2326 + }, + "Property '{0}' is optional in type '{1}' but required in type '{2}'.": { + "category": "Error", + "code": 2327 + }, + "Types of parameters '{0}' and '{1}' are incompatible.": { + "category": "Error", + "code": 2328 + }, + "Index signature is missing in type '{0}'.": { + "category": "Error", + "code": 2329 + }, + "Index signatures are incompatible.": { + "category": "Error", + "code": 2330 + }, + "'this' cannot be referenced in a module or namespace body.": { + "category": "Error", + "code": 2331 + }, + "'this' cannot be referenced in current location.": { + "category": "Error", + "code": 2332 + }, + "'this' cannot be referenced in constructor arguments.": { + "category": "Error", + "code": 2333 + }, + "'this' cannot be referenced in a static property initializer.": { + "category": "Error", + "code": 2334 + }, + "'super' can only be referenced in a derived class.": { + "category": "Error", + "code": 2335 + }, + "'super' cannot be referenced in constructor arguments.": { + "category": "Error", + "code": 2336 + }, + "Super calls are not permitted outside constructors or in nested functions inside constructors.": { + "category": "Error", + "code": 2337 + }, + "'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.": { + "category": "Error", + "code": 2338 + }, + "Property '{0}' does not exist on type '{1}'.": { + "category": "Error", + "code": 2339 + }, + "Only public and protected methods of the base class are accessible via the 'super' keyword.": { + "category": "Error", + "code": 2340 + }, + "Property '{0}' is private and only accessible within class '{1}'.": { + "category": "Error", + "code": 2341 + }, + "An index expression argument must be of type 'string', 'number', 'symbol', or 'any'.": { + "category": "Error", + "code": 2342 + }, + "This syntax requires an imported helper named '{1}', but module '{0}' has no exported member '{1}'.": { + "category": "Error", + "code": 2343 + }, + "Type '{0}' does not satisfy the constraint '{1}'.": { + "category": "Error", + "code": 2344 + }, + "Argument of type '{0}' is not assignable to parameter of type '{1}'.": { + "category": "Error", + "code": 2345 + }, + "Call target does not contain any signatures.": { + "category": "Error", + "code": 2346 + }, + "Untyped function calls may not accept type arguments.": { + "category": "Error", + "code": 2347 + }, + "Value of type '{0}' is not callable. Did you mean to include 'new'?": { + "category": "Error", + "code": 2348 + }, + "Cannot invoke an expression whose type lacks a call signature. Type '{0}' has no compatible call signatures.": { + "category": "Error", + "code": 2349 + }, + "Only a void function can be called with the 'new' keyword.": { + "category": "Error", + "code": 2350 + }, + "Cannot use 'new' with an expression whose type lacks a call or construct signature.": { + "category": "Error", + "code": 2351 + }, + "Conversion of type '{0}' to type '{1}' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.": { + "category": "Error", + "code": 2352 + }, + "Object literal may only specify known properties, and '{0}' does not exist in type '{1}'.": { + "category": "Error", + "code": 2353 + }, + "This syntax requires an imported helper but module '{0}' cannot be found.": { + "category": "Error", + "code": 2354 + }, + "A function whose declared type is neither 'void' nor 'any' must return a value.": { + "category": "Error", + "code": 2355 + }, + "An arithmetic operand must be of type 'any', 'number' or an enum type.": { + "category": "Error", + "code": 2356 + }, + "The operand of an increment or decrement operator must be a variable or a property access.": { + "category": "Error", + "code": 2357 + }, + "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.": { + "category": "Error", + "code": 2358 + }, + "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.": { + "category": "Error", + "code": 2359 + }, + "The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'.": { + "category": "Error", + "code": 2360 + }, + "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.": { + "category": "Error", + "code": 2361 + }, + "The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { + "category": "Error", + "code": 2362 + }, + "The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.": { + "category": "Error", + "code": 2363 + }, + "The left-hand side of an assignment expression must be a variable or a property access.": { + "category": "Error", + "code": 2364 + }, + "Operator '{0}' cannot be applied to types '{1}' and '{2}'.": { + "category": "Error", + "code": 2365 + }, + "Function lacks ending return statement and return type does not include 'undefined'.": { + "category": "Error", + "code": 2366 + }, + "This condition will always return '{0}' since the types '{1}' and '{2}' have no overlap.": { + "category": "Error", + "code": 2367 + }, + "Type parameter name cannot be '{0}'.": { + "category": "Error", + "code": 2368 + }, + "A parameter property is only allowed in a constructor implementation.": { + "category": "Error", + "code": 2369 + }, + "A rest parameter must be of an array type.": { + "category": "Error", + "code": 2370 + }, + "A parameter initializer is only allowed in a function or constructor implementation.": { + "category": "Error", + "code": 2371 + }, + "Parameter '{0}' cannot be referenced in its initializer.": { + "category": "Error", + "code": 2372 + }, + "Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.": { + "category": "Error", + "code": 2373 + }, + "Duplicate string index signature.": { + "category": "Error", + "code": 2374 + }, + "Duplicate number index signature.": { + "category": "Error", + "code": 2375 + }, + "A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.": { + "category": "Error", + "code": 2376 + }, + "Constructors for derived classes must contain a 'super' call.": { + "category": "Error", + "code": 2377 + }, + "A 'get' accessor must return a value.": { + "category": "Error", + "code": 2378 + }, + "Getter and setter accessors do not agree in visibility.": { + "category": "Error", + "code": 2379 + }, + "'get' and 'set' accessor must have the same type.": { + "category": "Error", + "code": 2380 + }, + "A signature with an implementation cannot use a string literal type.": { + "category": "Error", + "code": 2381 + }, + "Specialized overload signature is not assignable to any non-specialized signature.": { + "category": "Error", + "code": 2382 + }, + "Overload signatures must all be exported or non-exported.": { + "category": "Error", + "code": 2383 + }, + "Overload signatures must all be ambient or non-ambient.": { + "category": "Error", + "code": 2384 + }, + "Overload signatures must all be public, private or protected.": { + "category": "Error", + "code": 2385 + }, + "Overload signatures must all be optional or required.": { + "category": "Error", + "code": 2386 + }, + "Function overload must be static.": { + "category": "Error", + "code": 2387 + }, + "Function overload must not be static.": { + "category": "Error", + "code": 2388 + }, + "Function implementation name must be '{0}'.": { + "category": "Error", + "code": 2389 + }, + "Constructor implementation is missing.": { + "category": "Error", + "code": 2390 + }, + "Function implementation is missing or not immediately following the declaration.": { + "category": "Error", + "code": 2391 + }, + "Multiple constructor implementations are not allowed.": { + "category": "Error", + "code": 2392 + }, + "Duplicate function implementation.": { + "category": "Error", + "code": 2393 + }, + "Overload signature is not compatible with function implementation.": { + "category": "Error", + "code": 2394 + }, + "Individual declarations in merged declaration '{0}' must be all exported or all local.": { + "category": "Error", + "code": 2395 + }, + "Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.": { + "category": "Error", + "code": 2396 + }, + "Declaration name conflicts with built-in global identifier '{0}'.": { + "category": "Error", + "code": 2397 + }, + "Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.": { + "category": "Error", + "code": 2399 + }, + "Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.": { + "category": "Error", + "code": 2400 + }, + "Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.": { + "category": "Error", + "code": 2401 + }, + "Expression resolves to '_super' that compiler uses to capture base class reference.": { + "category": "Error", + "code": 2402 + }, + "Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.": { + "category": "Error", + "code": 2403 + }, + "The left-hand side of a 'for...in' statement cannot use a type annotation.": { + "category": "Error", + "code": 2404 + }, + "The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.": { + "category": "Error", + "code": 2405 + }, + "The left-hand side of a 'for...in' statement must be a variable or a property access.": { + "category": "Error", + "code": 2406 + }, + "The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '{0}'.": { + "category": "Error", + "code": 2407 + }, + "Setters cannot return a value.": { + "category": "Error", + "code": 2408 + }, + "Return type of constructor signature must be assignable to the instance type of the class.": { + "category": "Error", + "code": 2409 + }, + "The 'with' statement is not supported. All symbols in a 'with' block will have type 'any'.": { + "category": "Error", + "code": 2410 + }, + "Property '{0}' of type '{1}' is not assignable to string index type '{2}'.": { + "category": "Error", + "code": 2411 + }, + "Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'.": { + "category": "Error", + "code": 2412 + }, + "Numeric index type '{0}' is not assignable to string index type '{1}'.": { + "category": "Error", + "code": 2413 + }, + "Class name cannot be '{0}'.": { + "category": "Error", + "code": 2414 + }, + "Class '{0}' incorrectly extends base class '{1}'.": { + "category": "Error", + "code": 2415 + }, + "Property '{0}' in type '{1}' is not assignable to the same property in base type '{2}'.": { + "category": "Error", + "code": 2416 + }, + "Class static side '{0}' incorrectly extends base class static side '{1}'.": { + "category": "Error", + "code": 2417 + }, + "Type of computed property's value is '{0}', which is not assignable to type '{1}'.": { + "category": "Error", + "code": 2418 + }, + "Class '{0}' incorrectly implements interface '{1}'.": { + "category": "Error", + "code": 2420 + }, + "A class may only implement another class or interface.": { + "category": "Error", + "code": 2422 + }, + "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.": { + "category": "Error", + "code": 2423 + }, + "Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.": { + "category": "Error", + "code": 2424 + }, + "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.": { + "category": "Error", + "code": 2425 + }, + "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.": { + "category": "Error", + "code": 2426 + }, + "Interface name cannot be '{0}'.": { + "category": "Error", + "code": 2427 + }, + "All declarations of '{0}' must have identical type parameters.": { + "category": "Error", + "code": 2428 + }, + "Interface '{0}' incorrectly extends interface '{1}'.": { + "category": "Error", + "code": 2430 + }, + "Enum name cannot be '{0}'.": { + "category": "Error", + "code": 2431 + }, + "In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.": { + "category": "Error", + "code": 2432 + }, + "A namespace declaration cannot be in a different file from a class or function with which it is merged.": { + "category": "Error", + "code": 2433 + }, + "A namespace declaration cannot be located prior to a class or function with which it is merged.": { + "category": "Error", + "code": 2434 + }, + "Ambient modules cannot be nested in other modules or namespaces.": { + "category": "Error", + "code": 2435 + }, + "Ambient module declaration cannot specify relative module name.": { + "category": "Error", + "code": 2436 + }, + "Module '{0}' is hidden by a local declaration with the same name.": { + "category": "Error", + "code": 2437 + }, + "Import name cannot be '{0}'.": { + "category": "Error", + "code": 2438 + }, + "Import or export declaration in an ambient module declaration cannot reference module through relative module name.": { + "category": "Error", + "code": 2439 + }, + "Import declaration conflicts with local declaration of '{0}'.": { + "category": "Error", + "code": 2440 + }, + "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.": { + "category": "Error", + "code": 2441 + }, + "Types have separate declarations of a private property '{0}'.": { + "category": "Error", + "code": 2442 + }, + "Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.": { + "category": "Error", + "code": 2443 + }, + "Property '{0}' is protected in type '{1}' but public in type '{2}'.": { + "category": "Error", + "code": 2444 + }, + "Property '{0}' is protected and only accessible within class '{1}' and its subclasses.": { + "category": "Error", + "code": 2445 + }, + "Property '{0}' is protected and only accessible through an instance of class '{1}'.": { + "category": "Error", + "code": 2446 + }, + "The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead.": { + "category": "Error", + "code": 2447 + }, + "Block-scoped variable '{0}' used before its declaration.": { + "category": "Error", + "code": 2448 + }, + "Class '{0}' used before its declaration.": { + "category": "Error", + "code": 2449 + }, + "Enum '{0}' used before its declaration.": { + "category": "Error", + "code": 2450 + }, + "Cannot redeclare block-scoped variable '{0}'.": { + "category": "Error", + "code": 2451 + }, + "An enum member cannot have a numeric name.": { + "category": "Error", + "code": 2452 + }, + "The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.": { + "category": "Error", + "code": 2453 + }, + "Variable '{0}' is used before being assigned.": { + "category": "Error", + "code": 2454 + }, + "Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.": { + "category": "Error", + "code": 2455 + }, + "Type alias '{0}' circularly references itself.": { + "category": "Error", + "code": 2456 + }, + "Type alias name cannot be '{0}'.": { + "category": "Error", + "code": 2457 + }, + "An AMD module cannot have multiple name assignments.": { + "category": "Error", + "code": 2458 + }, + "Type '{0}' has no property '{1}' and no string index signature.": { + "category": "Error", + "code": 2459 + }, + "Type '{0}' has no property '{1}'.": { + "category": "Error", + "code": 2460 + }, + "Type '{0}' is not an array type.": { + "category": "Error", + "code": 2461 + }, + "A rest element must be last in a destructuring pattern.": { + "category": "Error", + "code": 2462 + }, + "A binding pattern parameter cannot be optional in an implementation signature.": { + "category": "Error", + "code": 2463 + }, + "A computed property name must be of type 'string', 'number', 'symbol', or 'any'.": { + "category": "Error", + "code": 2464 + }, + "'this' cannot be referenced in a computed property name.": { + "category": "Error", + "code": 2465 + }, + "'super' cannot be referenced in a computed property name.": { + "category": "Error", + "code": 2466 + }, + "A computed property name cannot reference a type parameter from its containing type.": { + "category": "Error", + "code": 2467 + }, + "Cannot find global value '{0}'.": { + "category": "Error", + "code": 2468 + }, + "The '{0}' operator cannot be applied to type 'symbol'.": { + "category": "Error", + "code": 2469 + }, + "'Symbol' reference does not refer to the global Symbol constructor object.": { + "category": "Error", + "code": 2470 + }, + "A computed property name of the form '{0}' must be of type 'symbol'.": { + "category": "Error", + "code": 2471 + }, + "Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher.": { + "category": "Error", + "code": 2472 + }, + "Enum declarations must all be const or non-const.": { + "category": "Error", + "code": 2473 + }, + "In 'const' enum declarations member initializer must be constant expression.": { + "category": "Error", + "code": 2474 + }, + "'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.": { + "category": "Error", + "code": 2475 + }, + "A const enum member can only be accessed using a string literal.": { + "category": "Error", + "code": 2476 + }, + "'const' enum member initializer was evaluated to a non-finite value.": { + "category": "Error", + "code": 2477 + }, + "'const' enum member initializer was evaluated to disallowed value 'NaN'.": { + "category": "Error", + "code": 2478 + }, + "Property '{0}' does not exist on 'const' enum '{1}'.": { + "category": "Error", + "code": 2479 + }, + "'let' is not allowed to be used as a name in 'let' or 'const' declarations.": { + "category": "Error", + "code": 2480 + }, + "Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'.": { + "category": "Error", + "code": 2481 + }, + "The left-hand side of a 'for...of' statement cannot use a type annotation.": { + "category": "Error", + "code": 2483 + }, + "Export declaration conflicts with exported declaration of '{0}'.": { + "category": "Error", + "code": 2484 + }, + "The left-hand side of a 'for...of' statement must be a variable or a property access.": { + "category": "Error", + "code": 2487 + }, + "Type '{0}' must have a '[Symbol.iterator]()' method that returns an iterator.": { + "category": "Error", + "code": 2488 + }, + "An iterator must have a 'next()' method.": { + "category": "Error", + "code": 2489 + }, + "The type returned by the 'next()' method of an iterator must have a 'value' property.": { + "category": "Error", + "code": 2490 + }, + "The left-hand side of a 'for...in' statement cannot be a destructuring pattern.": { + "category": "Error", + "code": 2491 + }, + "Cannot redeclare identifier '{0}' in catch clause.": { + "category": "Error", + "code": 2492 + }, + "Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'.": { + "category": "Error", + "code": 2493 + }, + "Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.": { + "category": "Error", + "code": 2494 + }, + "Type '{0}' is not an array type or a string type.": { + "category": "Error", + "code": 2495 + }, + "The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression.": { + "category": "Error", + "code": 2496 + }, + "Module '{0}' resolves to a non-module entity and cannot be imported using this construct.": { + "category": "Error", + "code": 2497 + }, + "Module '{0}' uses 'export =' and cannot be used with 'export *'.": { + "category": "Error", + "code": 2498 + }, + "An interface can only extend an identifier/qualified-name with optional type arguments.": { + "category": "Error", + "code": 2499 + }, + "A class can only implement an identifier/qualified-name with optional type arguments.": { + "category": "Error", + "code": 2500 + }, + "A rest element cannot contain a binding pattern.": { + "category": "Error", + "code": 2501 + }, + "'{0}' is referenced directly or indirectly in its own type annotation.": { + "category": "Error", + "code": 2502 + }, + "Cannot find namespace '{0}'.": { + "category": "Error", + "code": 2503 + }, + "Type '{0}' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.": { + "category": "Error", + "code": 2504 + }, + "A generator cannot have a 'void' type annotation.": { + "category": "Error", + "code": 2505 + }, + "'{0}' is referenced directly or indirectly in its own base expression.": { + "category": "Error", + "code": 2506 + }, + "Type '{0}' is not a constructor function type.": { + "category": "Error", + "code": 2507 + }, + "No base constructor has the specified number of type arguments.": { + "category": "Error", + "code": 2508 + }, + "Base constructor return type '{0}' is not a class or interface type.": { + "category": "Error", + "code": 2509 + }, + "Base constructors must all have the same return type.": { + "category": "Error", + "code": 2510 + }, + "Cannot create an instance of an abstract class.": { + "category": "Error", + "code": 2511 + }, + "Overload signatures must all be abstract or non-abstract.": { + "category": "Error", + "code": 2512 + }, + "Abstract method '{0}' in class '{1}' cannot be accessed via super expression.": { + "category": "Error", + "code": 2513 + }, + "Classes containing abstract methods must be marked abstract.": { + "category": "Error", + "code": 2514 + }, + "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'.": { + "category": "Error", + "code": 2515 + }, + "All declarations of an abstract method must be consecutive.": { + "category": "Error", + "code": 2516 + }, + "Cannot assign an abstract constructor type to a non-abstract constructor type.": { + "category": "Error", + "code": 2517 + }, + "A 'this'-based type guard is not compatible with a parameter-based type guard.": { + "category": "Error", + "code": 2518 + }, + "An async iterator must have a 'next()' method.": { + "category": "Error", + "code": 2519 + }, + "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": { + "category": "Error", + "code": 2520 + }, + "Expression resolves to variable declaration '{0}' that compiler uses to support async functions.": { + "category": "Error", + "code": 2521 + }, + "The 'arguments' object cannot be referenced in an async function or method in ES3 and ES5. Consider using a standard function or method.": { + "category": "Error", + "code": 2522 + }, + "'yield' expressions cannot be used in a parameter initializer.": { + "category": "Error", + "code": 2523 + }, + "'await' expressions cannot be used in a parameter initializer.": { + "category": "Error", + "code": 2524 + }, + "Initializer provides no value for this binding element and the binding element has no default value.": { + "category": "Error", + "code": 2525 + }, + "A 'this' type is available only in a non-static member of a class or interface.": { + "category": "Error", + "code": 2526 + }, + "The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.": { + "category": "Error", + "code": 2527 + }, + "A module cannot have multiple default exports.": { + "category": "Error", + "code": 2528 + }, + "Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.": { + "category": "Error", + "code": 2529 + }, + "Property '{0}' is incompatible with index signature.": { + "category": "Error", + "code": 2530 + }, + "Object is possibly 'null'.": { + "category": "Error", + "code": 2531 + }, + "Object is possibly 'undefined'.": { + "category": "Error", + "code": 2532 + }, + "Object is possibly 'null' or 'undefined'.": { + "category": "Error", + "code": 2533 + }, + "A function returning 'never' cannot have a reachable end point.": { + "category": "Error", + "code": 2534 + }, + "Enum type '{0}' has members with initializers that are not literals.": { + "category": "Error", + "code": 2535 + }, + "Type '{0}' cannot be used to index type '{1}'.": { + "category": "Error", + "code": 2536 + }, + "Type '{0}' has no matching index signature for type '{1}'.": { + "category": "Error", + "code": 2537 + }, + "Type '{0}' cannot be used as an index type.": { + "category": "Error", + "code": 2538 + }, + "Cannot assign to '{0}' because it is not a variable.": { + "category": "Error", + "code": 2539 + }, + "Cannot assign to '{0}' because it is a constant or a read-only property.": { + "category": "Error", + "code": 2540 + }, + "The target of an assignment must be a variable or a property access.": { + "category": "Error", + "code": 2541 + }, + "Index signature in type '{0}' only permits reading.": { + "category": "Error", + "code": 2542 + }, + "Duplicate identifier '_newTarget'. Compiler uses variable declaration '_newTarget' to capture 'new.target' meta-property reference.": { + "category": "Error", + "code": 2543 + }, + "Expression resolves to variable declaration '_newTarget' that compiler uses to capture 'new.target' meta-property reference.": { + "category": "Error", + "code": 2544 + }, + "A mixin class must have a constructor with a single rest parameter of type 'any[]'.": { + "category": "Error", + "code": 2545 + }, + "Property '{0}' has conflicting declarations and is inaccessible in type '{1}'.": { + "category": "Error", + "code": 2546 + }, + "The type returned by the 'next()' method of an async iterator must be a promise for a type with a 'value' property.": { + "category": "Error", + "code": 2547 + }, + "Type '{0}' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator.": { + "category": "Error", + "code": 2548 + }, + "Type '{0}' is not an array type or a string type or does not have a '[Symbol.iterator]()' method that returns an iterator.": { + "category": "Error", + "code": 2549 + }, + "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?": { + "category": "Error", + "code": 2551 + }, + "Cannot find name '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 2552 + }, + "Computed values are not permitted in an enum with string valued members.": { + "category": "Error", + "code": 2553 + }, + "Expected {0} arguments, but got {1}.": { + "category": "Error", + "code": 2554 + }, + "Expected at least {0} arguments, but got {1}.": { + "category": "Error", + "code": 2555 + }, + "Expected {0} arguments, but got {1} or more.": { + "category": "Error", + "code": 2556 + }, + "Expected at least {0} arguments, but got {1} or more.": { + "category": "Error", + "code": 2557 + }, + "Expected {0} type arguments, but got {1}.": { + "category": "Error", + "code": 2558 + }, + "Type '{0}' has no properties in common with type '{1}'.": { + "category": "Error", + "code": 2559 + }, + "Value of type '{0}' has no properties in common with type '{1}'. Did you mean to call it?": { + "category": "Error", + "code": 2560 + }, + "Object literal may only specify known properties, but '{0}' does not exist in type '{1}'. Did you mean to write '{2}'?": { + "category": "Error", + "code": 2561 + }, + "Base class expressions cannot reference class type parameters.": { + "category": "Error", + "code": 2562 + }, + "The containing function or module body is too large for control flow analysis.": { + "category": "Error", + "code": 2563 + }, + "Property '{0}' has no initializer and is not definitely assigned in the constructor.": { + "category": "Error", + "code": 2564 + }, + "Property '{0}' is used before being assigned.": { + "category": "Error", + "code": 2565 + }, + "A rest element cannot have a property name.": { + "category": "Error", + "code": 2566 + }, + "Enum declarations can only merge with namespace or other enum declarations.": { + "category": "Error", + "code": 2567 + }, + "Type '{0}' is not an array type. Use compiler option '--downlevelIteration' to allow iterating of iterators.": { + "category": "Error", + "code": 2568 + }, + "Type '{0}' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.": { + "category": "Error", + "code": 2569 + }, + "Property '{0}' does not exist on type '{1}'. Did you forget to use 'await'?": { + "category": "Error", + "code": 2570 + }, + "Object is of type 'unknown'.": { + "category": "Error", + "code": 2571 + }, + "Rest signatures are incompatible.": { + "category": "Error", + "code": 2572 + }, + "Property '{0}' is incompatible with rest element type.": { + "category": "Error", + "code": 2573 + }, + "A rest element type must be an array type.": { + "category": "Error", + "code": 2574 + }, + "No overload expects {0} arguments, but overloads do exist that expect either {1} or {2} arguments.": { + "category": "Error", + "code": 2575 + }, + "Property '{0}' is a static member of type '{1}'": { + "category": "Error", + "code": 2576 + }, + "Return type annotation circularly references itself.": { + "category": "Error", + "code": 2577 + }, + "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.": { + "category": "Error", + "code": 2580 + }, + "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.": { + "category": "Error", + "code": 2581 + }, + "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.": { + "category": "Error", + "code": 2582 + }, + "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": { + "category": "Error", + "code": 2583 + }, + "Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.": { + "category": "Error", + "code": 2584 + }, + "'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": { + "category": "Error", + "code": 2585 + }, + "Enum type '{0}' circularly references itself.": { + "category": "Error", + "code": 2586 + }, + "JSX element attributes type '{0}' may not be a union type.": { + "category": "Error", + "code": 2600 + }, + "The return type of a JSX element constructor must return an object type.": { + "category": "Error", + "code": 2601 + }, + "JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.": { + "category": "Error", + "code": 2602 + }, + "Property '{0}' in type '{1}' is not assignable to type '{2}'.": { + "category": "Error", + "code": 2603 + }, + "JSX element type '{0}' does not have any construct or call signatures.": { + "category": "Error", + "code": 2604 + }, + "JSX element type '{0}' is not a constructor function for JSX elements.": { + "category": "Error", + "code": 2605 + }, + "Property '{0}' of JSX spread attribute is not assignable to target property.": { + "category": "Error", + "code": 2606 + }, + "JSX element class does not support attributes because it does not have a '{0}' property.": { + "category": "Error", + "code": 2607 + }, + "The global type 'JSX.{0}' may not have more than one property.": { + "category": "Error", + "code": 2608 + }, + "JSX spread child must be an array type.": { + "category": "Error", + "code": 2609 + }, + "Cannot augment module '{0}' with value exports because it resolves to a non-module entity.": { + "category": "Error", + "code": 2649 + }, + "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.": { + "category": "Error", + "code": 2651 + }, + "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.": { + "category": "Error", + "code": 2652 + }, + "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.": { + "category": "Error", + "code": 2653 + }, + "Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.": { + "category": "Error", + "code": 2654 + }, + "Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.": { + "category": "Error", + "code": 2656 + }, + "JSX expressions must have one parent element.": { + "category": "Error", + "code": 2657 + }, + "Type '{0}' provides no match for the signature '{1}'.": { + "category": "Error", + "code": 2658 + }, + "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher.": { + "category": "Error", + "code": 2659 + }, + "'super' can only be referenced in members of derived classes or object literal expressions.": { + "category": "Error", + "code": 2660 + }, + "Cannot export '{0}'. Only local declarations can be exported from a module.": { + "category": "Error", + "code": 2661 + }, + "Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?": { + "category": "Error", + "code": 2662 + }, + "Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?": { + "category": "Error", + "code": 2663 + }, + "Invalid module name in augmentation, module '{0}' cannot be found.": { + "category": "Error", + "code": 2664 + }, + "Invalid module name in augmentation. Module '{0}' resolves to an untyped module at '{1}', which cannot be augmented.": { + "category": "Error", + "code": 2665 + }, + "Exports and export assignments are not permitted in module augmentations.": { + "category": "Error", + "code": 2666 + }, + "Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.": { + "category": "Error", + "code": 2667 + }, + "'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.": { + "category": "Error", + "code": 2668 + }, + "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.": { + "category": "Error", + "code": 2669 + }, + "Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.": { + "category": "Error", + "code": 2670 + }, + "Cannot augment module '{0}' because it resolves to a non-module entity.": { + "category": "Error", + "code": 2671 + }, + "Cannot assign a '{0}' constructor type to a '{1}' constructor type.": { + "category": "Error", + "code": 2672 + }, + "Constructor of class '{0}' is private and only accessible within the class declaration.": { + "category": "Error", + "code": 2673 + }, + "Constructor of class '{0}' is protected and only accessible within the class declaration.": { + "category": "Error", + "code": 2674 + }, + "Cannot extend a class '{0}'. Class constructor is marked as private.": { + "category": "Error", + "code": 2675 + }, + "Accessors must both be abstract or non-abstract.": { + "category": "Error", + "code": 2676 + }, + "A type predicate's type must be assignable to its parameter's type.": { + "category": "Error", + "code": 2677 + }, + "Type '{0}' is not comparable to type '{1}'.": { + "category": "Error", + "code": 2678 + }, + "A function that is called with the 'new' keyword cannot have a 'this' type that is 'void'.": { + "category": "Error", + "code": 2679 + }, + "A '{0}' parameter must be the first parameter.": { + "category": "Error", + "code": 2680 + }, + "A constructor cannot have a 'this' parameter.": { + "category": "Error", + "code": 2681 + }, + "'get' and 'set' accessor must have the same 'this' type.": { + "category": "Error", + "code": 2682 + }, + "'this' implicitly has type 'any' because it does not have a type annotation.": { + "category": "Error", + "code": 2683 + }, + "The 'this' context of type '{0}' is not assignable to method's 'this' of type '{1}'.": { + "category": "Error", + "code": 2684 + }, + "The 'this' types of each signature are incompatible.": { + "category": "Error", + "code": 2685 + }, + "'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead.": { + "category": "Error", + "code": 2686 + }, + "All declarations of '{0}' must have identical modifiers.": { + "category": "Error", + "code": 2687 + }, + "Cannot find type definition file for '{0}'.": { + "category": "Error", + "code": 2688 + }, + "Cannot extend an interface '{0}'. Did you mean 'implements'?": { + "category": "Error", + "code": 2689 + }, + "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead.": { + "category": "Error", + "code": 2691 + }, + "'{0}' is a primitive, but '{1}' is a wrapper object. Prefer using '{0}' when possible.": { + "category": "Error", + "code": 2692 + }, + "'{0}' only refers to a type, but is being used as a value here.": { + "category": "Error", + "code": 2693 + }, + "Namespace '{0}' has no exported member '{1}'.": { + "category": "Error", + "code": 2694 + }, + "Left side of comma operator is unused and has no side effects.": { + "category": "Error", + "code": 2695, + "reportsUnnecessary": true + }, + "The 'Object' type is assignable to very few other types. Did you mean to use the 'any' type instead?": { + "category": "Error", + "code": 2696 + }, + "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2697 + }, + "Spread types may only be created from object types.": { + "category": "Error", + "code": 2698 + }, + "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.": { + "category": "Error", + "code": 2699 + }, + "Rest types may only be created from object types.": { + "category": "Error", + "code": 2700 + }, + "The target of an object rest assignment must be a variable or a property access.": { + "category": "Error", + "code": 2701 + }, + "'{0}' only refers to a type, but is being used as a namespace here.": { + "category": "Error", + "code": 2702 + }, + "The operand of a delete operator must be a property reference.": { + "category": "Error", + "code": 2703 + }, + "The operand of a delete operator cannot be a read-only property.": { + "category": "Error", + "code": 2704 + }, + "An async function or method in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2705 + }, + "Required type parameters may not follow optional type parameters.": { + "category": "Error", + "code": 2706 + }, + "Generic type '{0}' requires between {1} and {2} type arguments.": { + "category": "Error", + "code": 2707 + }, + "Cannot use namespace '{0}' as a value.": { + "category": "Error", + "code": 2708 + }, + "Cannot use namespace '{0}' as a type.": { + "category": "Error", + "code": 2709 + }, + "'{0}' are specified twice. The attribute named '{0}' will be overwritten.": { + "category": "Error", + "code": 2710 + }, + "A dynamic import call returns a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2711 + }, + "A dynamic import call in ES5/ES3 requires the 'Promise' constructor. Make sure you have a declaration for the 'Promise' constructor or include 'ES2015' in your `--lib` option.": { + "category": "Error", + "code": 2712 + }, + "Cannot access '{0}.{1}' because '{0}' is a type, but not a namespace. Did you mean to retrieve the type of the property '{1}' in '{0}' with '{0}[\"{1}\"]'?": { + "category": "Error", + "code": 2713 + }, + "The expression of an export assignment must be an identifier or qualified name in an ambient context.": { + "category": "Error", + "code": 2714 + }, + "Abstract property '{0}' in class '{1}' cannot be accessed in the constructor.": { + "category": "Error", + "code": 2715 + }, + "Type parameter '{0}' has a circular default.": { + "category": "Error", + "code": 2716 + }, + "Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.": { + "category": "Error", + "code": 2717 + }, + "Duplicate declaration '{0}'.": { + "category": "Error", + "code": 2718 + }, + "Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.": { + "category": "Error", + "code": 2719 + }, + "Class '{0}' incorrectly implements class '{1}'. Did you mean to extend '{1}' and inherit its members as a subclass?": { + "category": "Error", + "code": 2720 + }, + "Cannot invoke an object which is possibly 'null'.": { + "category": "Error", + "code": 2721 + }, + "Cannot invoke an object which is possibly 'undefined'.": { + "category": "Error", + "code": 2722 + }, + "Cannot invoke an object which is possibly 'null' or 'undefined'.": { + "category": "Error", + "code": 2723 + }, + "Module '{0}' has no exported member '{1}'. Did you mean '{2}'?": { + "category": "Error", + "code": 2724 + }, + "Class name cannot be 'Object' when targeting ES5 with module {0}.": { + "category": "Error", + "code": 2725 + }, + "Cannot find lib definition for '{0}'.": { + "category": "Error", + "code": 2726 + }, + "Cannot find lib definition for '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 2727 + }, + "'{0}' is declared here.": { + "category": "Message", + "code": 2728 + }, + "Property '{0}' is used before its initialization.": { + "category": "Error", + "code": 2729 + }, + "An arrow function cannot have a 'this' parameter.": { + "category": "Error", + "code": 2730 + }, + "Implicit conversion of a 'symbol' to a 'string' will fail at runtime. Consider wrapping this expression in 'String(...)'.": { + "category": "Error", + "code": 2731 + }, + "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": { + "category": "Error", + "code": 2732 + }, + "Index '{0}' is out-of-bounds in tuple of length {1}.": { + "category": "Error", + "code": 2733 + }, + "It is highly likely that you are missing a semicolon.": { + "category": "Error", + "code": 2734 + }, + + "Import declaration '{0}' is using private name '{1}'.": { + "category": "Error", + "code": 4000 + }, + "Type parameter '{0}' of exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4002 + }, + "Type parameter '{0}' of exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4004 + }, + "Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4006 + }, + "Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4008 + }, + "Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4010 + }, + "Type parameter '{0}' of public method from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4012 + }, + "Type parameter '{0}' of method from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4014 + }, + "Type parameter '{0}' of exported function has or is using private name '{1}'.": { + "category": "Error", + "code": 4016 + }, + "Implements clause of exported class '{0}' has or is using private name '{1}'.": { + "category": "Error", + "code": 4019 + }, + "'extends' clause of exported class '{0}' has or is using private name '{1}'.": { + "category": "Error", + "code": 4020 + }, + "'extends' clause of exported interface '{0}' has or is using private name '{1}'.": { + "category": "Error", + "code": 4022 + }, + "Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4023 + }, + "Exported variable '{0}' has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4024 + }, + "Exported variable '{0}' has or is using private name '{1}'.": { + "category": "Error", + "code": 4025 + }, + "Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4026 + }, + "Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4027 + }, + "Public static property '{0}' of exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4028 + }, + "Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4029 + }, + "Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4030 + }, + "Public property '{0}' of exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4031 + }, + "Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4032 + }, + "Property '{0}' of exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4033 + }, + "Parameter type of public static setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4034 + }, + "Parameter type of public static setter '{0}' from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4035 + }, + "Parameter type of public setter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4036 + }, + "Parameter type of public setter '{0}' from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4037 + }, + "Return type of public static getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4038 + }, + "Return type of public static getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4039 + }, + "Return type of public static getter '{0}' from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4040 + }, + "Return type of public getter '{0}' from exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4041 + }, + "Return type of public getter '{0}' from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4042 + }, + "Return type of public getter '{0}' from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4043 + }, + "Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4044 + }, + "Return type of constructor signature from exported interface has or is using private name '{0}'.": { + "category": "Error", + "code": 4045 + }, + "Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4046 + }, + "Return type of call signature from exported interface has or is using private name '{0}'.": { + "category": "Error", + "code": 4047 + }, + "Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4048 + }, + "Return type of index signature from exported interface has or is using private name '{0}'.": { + "category": "Error", + "code": 4049 + }, + "Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.": { + "category": "Error", + "code": 4050 + }, + "Return type of public static method from exported class has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4051 + }, + "Return type of public static method from exported class has or is using private name '{0}'.": { + "category": "Error", + "code": 4052 + }, + "Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.": { + "category": "Error", + "code": 4053 + }, + "Return type of public method from exported class has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4054 + }, + "Return type of public method from exported class has or is using private name '{0}'.": { + "category": "Error", + "code": 4055 + }, + "Return type of method from exported interface has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4056 + }, + "Return type of method from exported interface has or is using private name '{0}'.": { + "category": "Error", + "code": 4057 + }, + "Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.": { + "category": "Error", + "code": 4058 + }, + "Return type of exported function has or is using name '{0}' from private module '{1}'.": { + "category": "Error", + "code": 4059 + }, + "Return type of exported function has or is using private name '{0}'.": { + "category": "Error", + "code": 4060 + }, + "Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4061 + }, + "Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4062 + }, + "Parameter '{0}' of constructor from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4063 + }, + "Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4064 + }, + "Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4065 + }, + "Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4066 + }, + "Parameter '{0}' of call signature from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4067 + }, + "Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4068 + }, + "Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4069 + }, + "Parameter '{0}' of public static method from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4070 + }, + "Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4071 + }, + "Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4072 + }, + "Parameter '{0}' of public method from exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4073 + }, + "Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4074 + }, + "Parameter '{0}' of method from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4075 + }, + "Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4076 + }, + "Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4077 + }, + "Parameter '{0}' of exported function has or is using private name '{1}'.": { + "category": "Error", + "code": 4078 + }, + "Exported type alias '{0}' has or is using private name '{1}'.": { + "category": "Error", + "code": 4081 + }, + "Default export of the module has or is using private name '{0}'.": { + "category": "Error", + "code": 4082 + }, + "Type parameter '{0}' of exported type alias has or is using private name '{1}'.": { + "category": "Error", + "code": 4083 + }, + "Conflicting definitions for '{0}' found at '{1}' and '{2}'. Consider installing a specific version of this library to resolve the conflict.": { + "category": "Error", + "code": 4090 + }, + "Parameter '{0}' of index signature from exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4091 + }, + "Parameter '{0}' of index signature from exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4092 + }, + "Property '{0}' of exported class expression may not be private or protected.": { + "category": "Error", + "code": 4094 + }, + + "Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4095 + }, + "Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4096 + }, + "Public static method '{0}' of exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4097 + }, + "Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": { + "category": "Error", + "code": 4098 + }, + "Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4099 + }, + "Public method '{0}' of exported class has or is using private name '{1}'.": { + "category": "Error", + "code": 4100 + }, + "Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": { + "category": "Error", + "code": 4101 + }, + "Method '{0}' of exported interface has or is using private name '{1}'.": { + "category": "Error", + "code": 4102 + }, + + "The current host does not support the '{0}' option.": { + "category": "Error", + "code": 5001 + }, + "Cannot find the common subdirectory path for the input files.": { + "category": "Error", + "code": 5009 + }, + "File specification cannot end in a recursive directory wildcard ('**'): '{0}'.": { + "category": "Error", + "code": 5010 + }, + "Cannot read file '{0}': {1}.": { + "category": "Error", + "code": 5012 + }, + "Failed to parse file '{0}': {1}.": { + "category": "Error", + "code": 5014 + }, + "Unknown compiler option '{0}'.": { + "category": "Error", + "code": 5023 + }, + "Compiler option '{0}' requires a value of type {1}.": { + "category": "Error", + "code": 5024 + }, + "Could not write file '{0}': {1}.": { + "category": "Error", + "code": 5033 + }, + "Option 'project' cannot be mixed with source files on a command line.": { + "category": "Error", + "code": 5042 + }, + "Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.": { + "category": "Error", + "code": 5047 + }, + "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.": { + "category": "Error", + "code": 5051 + }, + "Option '{0}' cannot be specified without specifying option '{1}'.": { + "category": "Error", + "code": 5052 + }, + "Option '{0}' cannot be specified with option '{1}'.": { + "category": "Error", + "code": 5053 + }, + "A 'tsconfig.json' file is already defined at: '{0}'.": { + "category": "Error", + "code": 5054 + }, + "Cannot write file '{0}' because it would overwrite input file.": { + "category": "Error", + "code": 5055 + }, + "Cannot write file '{0}' because it would be overwritten by multiple input files.": { + "category": "Error", + "code": 5056 + }, + "Cannot find a tsconfig.json file at the specified directory: '{0}'.": { + "category": "Error", + "code": 5057 + }, + "The specified path does not exist: '{0}'.": { + "category": "Error", + "code": 5058 + }, + "Invalid value for '--reactNamespace'. '{0}' is not a valid identifier.": { + "category": "Error", + "code": 5059 + }, + "Option 'paths' cannot be used without specifying '--baseUrl' option.": { + "category": "Error", + "code": 5060 + }, + "Pattern '{0}' can have at most one '*' character.": { + "category": "Error", + "code": 5061 + }, + "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": { + "category": "Error", + "code": 5062 + }, + "Substitutions for pattern '{0}' should be an array.": { + "category": "Error", + "code": 5063 + }, + "Substitution '{0}' for pattern '{1}' has incorrect type, expected 'string', got '{2}'.": { + "category": "Error", + "code": 5064 + }, + "File specification cannot contain a parent directory ('..') that appears after a recursive directory wildcard ('**'): '{0}'.": { + "category": "Error", + "code": 5065 + }, + "Substitutions for pattern '{0}' shouldn't be an empty array.": { + "category": "Error", + "code": 5066 + }, + "Invalid value for 'jsxFactory'. '{0}' is not a valid identifier or qualified-name.": { + "category": "Error", + "code": 5067 + }, + "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.": { + "category": "Error", + "code": 5068 + }, + "Option '{0}' cannot be specified without specifying option '{1}' or option '{2}'.": { + "category": "Error", + "code": 5069 + }, + "Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.": { + "category": "Error", + "code": 5070 + }, + "Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'.": { + "category": "Error", + "code": 5071 + }, + "Unknown build option '{0}'.": { + "category": "Error", + "code": 5072 + }, + "Build option '{0}' requires a value of type {1}.": { + "category": "Error", + "code": 5073 + }, + + "Generates a sourcemap for each corresponding '.d.ts' file.": { + "category": "Message", + "code": 6000 + }, + "Concatenate and emit output to single file.": { + "category": "Message", + "code": 6001 + }, + "Generates corresponding '.d.ts' file.": { + "category": "Message", + "code": 6002 + }, + "Specify the location where debugger should locate map files instead of generated locations.": { + "category": "Message", + "code": 6003 + }, + "Specify the location where debugger should locate TypeScript files instead of source locations.": { + "category": "Message", + "code": 6004 + }, + "Watch input files.": { + "category": "Message", + "code": 6005 + }, + "Redirect output structure to the directory.": { + "category": "Message", + "code": 6006 + }, + "Do not erase const enum declarations in generated code.": { + "category": "Message", + "code": 6007 + }, + "Do not emit outputs if any errors were reported.": { + "category": "Message", + "code": 6008 + }, + "Do not emit comments to output.": { + "category": "Message", + "code": 6009 + }, + "Do not emit outputs.": { + "category": "Message", + "code": 6010 + }, + "Allow default imports from modules with no default export. This does not affect code emit, just typechecking.": { + "category": "Message", + "code": 6011 + }, + "Skip type checking of declaration files.": { + "category": "Message", + "code": 6012 + }, + "Do not resolve the real path of symlinks.": { + "category": "Message", + "code": 6013 + }, + "Only emit '.d.ts' declaration files.": { + "category": "Message", + "code": 6014 + }, + "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'.": { + "category": "Message", + "code": 6015 + }, + "Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'.": { + "category": "Message", + "code": 6016 + }, + "Print this message.": { + "category": "Message", + "code": 6017 + }, + "Print the compiler's version.": { + "category": "Message", + "code": 6019 + }, + "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.": { + "category": "Message", + "code": 6020 + }, + "Syntax: {0}": { + "category": "Message", + "code": 6023 + }, + "options": { + "category": "Message", + "code": 6024 + }, + "file": { + "category": "Message", + "code": 6025 + }, + "Examples: {0}": { + "category": "Message", + "code": 6026 + }, + "Options:": { + "category": "Message", + "code": 6027 + }, + "Version {0}": { + "category": "Message", + "code": 6029 + }, + "Insert command line options and files from a file.": { + "category": "Message", + "code": 6030 + }, + "Starting compilation in watch mode...": { + "category": "Message", + "code": 6031 + }, + "File change detected. Starting incremental compilation...": { + "category": "Message", + "code": 6032 + }, + "KIND": { + "category": "Message", + "code": 6034 + }, + "FILE": { + "category": "Message", + "code": 6035 + }, + "VERSION": { + "category": "Message", + "code": 6036 + }, + "LOCATION": { + "category": "Message", + "code": 6037 + }, + "DIRECTORY": { + "category": "Message", + "code": 6038 + }, + "STRATEGY": { + "category": "Message", + "code": 6039 + }, + "FILE OR DIRECTORY": { + "category": "Message", + "code": 6040 + }, + "Generates corresponding '.map' file.": { + "category": "Message", + "code": 6043 + }, + "Compiler option '{0}' expects an argument.": { + "category": "Error", + "code": 6044 + }, + "Unterminated quoted string in response file '{0}'.": { + "category": "Error", + "code": 6045 + }, + "Argument for '{0}' option must be: {1}.": { + "category": "Error", + "code": 6046 + }, + "Locale must be of the form or -. For example '{0}' or '{1}'.": { + "category": "Error", + "code": 6048 + }, + "Unsupported locale '{0}'.": { + "category": "Error", + "code": 6049 + }, + "Unable to open file '{0}'.": { + "category": "Error", + "code": 6050 + }, + "Corrupted locale file {0}.": { + "category": "Error", + "code": 6051 + }, + "Raise error on expressions and declarations with an implied 'any' type.": { + "category": "Message", + "code": 6052 + }, + "File '{0}' not found.": { + "category": "Error", + "code": 6053 + }, + "File '{0}' has unsupported extension. The only supported extensions are {1}.": { + "category": "Error", + "code": 6054 + }, + "Suppress noImplicitAny errors for indexing objects lacking index signatures.": { + "category": "Message", + "code": 6055 + }, + "Do not emit declarations for code that has an '@internal' annotation.": { + "category": "Message", + "code": 6056 + }, + "Specify the root directory of input files. Use to control the output directory structure with --outDir.": { + "category": "Message", + "code": 6058 + }, + "File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.": { + "category": "Error", + "code": 6059 + }, + "Specify the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).": { + "category": "Message", + "code": 6060 + }, + "NEWLINE": { + "category": "Message", + "code": 6061 + }, + "Option '{0}' can only be specified in 'tsconfig.json' file.": { + "category": "Error", + "code": 6064 + }, + "Enables experimental support for ES7 decorators.": { + "category": "Message", + "code": 6065 + }, + "Enables experimental support for emitting type metadata for decorators.": { + "category": "Message", + "code": 6066 + }, + "Enables experimental support for ES7 async functions.": { + "category": "Message", + "code": 6068 + }, + "Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).": { + "category": "Message", + "code": 6069 + }, + "Initializes a TypeScript project and creates a tsconfig.json file.": { + "category": "Message", + "code": 6070 + }, + "Successfully created a tsconfig.json file.": { + "category": "Message", + "code": 6071 + }, + "Suppress excess property checks for object literals.": { + "category": "Message", + "code": 6072 + }, + "Stylize errors and messages using color and context (experimental).": { + "category": "Message", + "code": 6073 + }, + "Do not report errors on unused labels.": { + "category": "Message", + "code": 6074 + }, + "Report error when not all code paths in function return a value.": { + "category": "Message", + "code": 6075 + }, + "Report errors for fallthrough cases in switch statement.": { + "category": "Message", + "code": 6076 + }, + "Do not report errors on unreachable code.": { + "category": "Message", + "code": 6077 + }, + "Disallow inconsistently-cased references to the same file.": { + "category": "Message", + "code": 6078 + }, + "Specify library files to be included in the compilation.": { + "category": "Message", + "code": 6079 + }, + "Specify JSX code generation: 'preserve', 'react-native', or 'react'.": { + "category": "Message", + "code": 6080 + }, + "File '{0}' has an unsupported extension, so skipping it.": { + "category": "Message", + "code": 6081 + }, + "Only 'amd' and 'system' modules are supported alongside --{0}.": { + "category": "Error", + "code": 6082 + }, + "Base directory to resolve non-absolute module names.": { + "category": "Message", + "code": 6083 + }, + "[Deprecated] Use '--jsxFactory' instead. Specify the object invoked for createElement when targeting 'react' JSX emit": { + "category": "Message", + "code": 6084 + }, + "Enable tracing of the name resolution process.": { + "category": "Message", + "code": 6085 + }, + "======== Resolving module '{0}' from '{1}'. ========": { + "category": "Message", + "code": 6086 + }, + "Explicitly specified module resolution kind: '{0}'.": { + "category": "Message", + "code": 6087 + }, + "Module resolution kind is not specified, using '{0}'.": { + "category": "Message", + "code": 6088 + }, + "======== Module name '{0}' was successfully resolved to '{1}'. ========": { + "category": "Message", + "code": 6089 + }, + "======== Module name '{0}' was not resolved. ========": { + "category": "Message", + "code": 6090 + }, + "'paths' option is specified, looking for a pattern to match module name '{0}'.": { + "category": "Message", + "code": 6091 + }, + "Module name '{0}', matched pattern '{1}'.": { + "category": "Message", + "code": 6092 + }, + "Trying substitution '{0}', candidate module location: '{1}'.": { + "category": "Message", + "code": 6093 + }, + "Resolving module name '{0}' relative to base url '{1}' - '{2}'.": { + "category": "Message", + "code": 6094 + }, + "Loading module as file / folder, candidate module location '{0}', target file type '{1}'.": { + "category": "Message", + "code": 6095 + }, + "File '{0}' does not exist.": { + "category": "Message", + "code": 6096 + }, + "File '{0}' exist - use it as a name resolution result.": { + "category": "Message", + "code": 6097 + }, + "Loading module '{0}' from 'node_modules' folder, target file type '{1}'.": { + "category": "Message", + "code": 6098 + }, + "Found 'package.json' at '{0}'.": { + "category": "Message", + "code": 6099 + }, + "'package.json' does not have a '{0}' field.": { + "category": "Message", + "code": 6100 + }, + "'package.json' has '{0}' field '{1}' that references '{2}'.": { + "category": "Message", + "code": 6101 + }, + "Allow javascript files to be compiled.": { + "category": "Message", + "code": 6102 + }, + "Option '{0}' should have array of strings as a value.": { + "category": "Error", + "code": 6103 + }, + "Checking if '{0}' is the longest matching prefix for '{1}' - '{2}'.": { + "category": "Message", + "code": 6104 + }, + "Expected type of '{0}' field in 'package.json' to be '{1}', got '{2}'.": { + "category": "Message", + "code": 6105 + }, + "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.": { + "category": "Message", + "code": 6106 + }, + "'rootDirs' option is set, using it to resolve relative module name '{0}'.": { + "category": "Message", + "code": 6107 + }, + "Longest matching prefix for '{0}' is '{1}'.": { + "category": "Message", + "code": 6108 + }, + "Loading '{0}' from the root dir '{1}', candidate location '{2}'.": { + "category": "Message", + "code": 6109 + }, + "Trying other entries in 'rootDirs'.": { + "category": "Message", + "code": 6110 + }, + "Module resolution using 'rootDirs' has failed.": { + "category": "Message", + "code": 6111 + }, + "Do not emit 'use strict' directives in module output.": { + "category": "Message", + "code": 6112 + }, + "Enable strict null checks.": { + "category": "Message", + "code": 6113 + }, + "Unknown option 'excludes'. Did you mean 'exclude'?": { + "category": "Error", + "code": 6114 + }, + "Raise error on 'this' expressions with an implied 'any' type.": { + "category": "Message", + "code": 6115 + }, + "======== Resolving type reference directive '{0}', containing file '{1}', root directory '{2}'. ========": { + "category": "Message", + "code": 6116 + }, + "Resolving using primary search paths...": { + "category": "Message", + "code": 6117 + }, + "Resolving from node_modules folder...": { + "category": "Message", + "code": 6118 + }, + "======== Type reference directive '{0}' was successfully resolved to '{1}', primary: {2}. ========": { + "category": "Message", + "code": 6119 + }, + "======== Type reference directive '{0}' was not resolved. ========": { + "category": "Message", + "code": 6120 + }, + "Resolving with primary search path '{0}'.": { + "category": "Message", + "code": 6121 + }, + "Root directory cannot be determined, skipping primary search paths.": { + "category": "Message", + "code": 6122 + }, + "======== Resolving type reference directive '{0}', containing file '{1}', root directory not set. ========": { + "category": "Message", + "code": 6123 + }, + "Type declaration files to be included in compilation.": { + "category": "Message", + "code": 6124 + }, + "Looking up in 'node_modules' folder, initial location '{0}'.": { + "category": "Message", + "code": 6125 + }, + "Containing file is not specified and root directory cannot be determined, skipping lookup in 'node_modules' folder.": { + "category": "Message", + "code": 6126 + }, + "======== Resolving type reference directive '{0}', containing file not set, root directory '{1}'. ========": { + "category": "Message", + "code": 6127 + }, + "======== Resolving type reference directive '{0}', containing file not set, root directory not set. ========": { + "category": "Message", + "code": 6128 + }, + "Resolving real path for '{0}', result '{1}'.": { + "category": "Message", + "code": 6130 + }, + "Cannot compile modules using option '{0}' unless the '--module' flag is 'amd' or 'system'.": { + "category": "Error", + "code": 6131 + }, + "File name '{0}' has a '{1}' extension - stripping it.": { + "category": "Message", + "code": 6132 + }, + "'{0}' is declared but its value is never read.": { + "category": "Error", + "code": 6133, + "reportsUnnecessary": true + }, + "Report errors on unused locals.": { + "category": "Message", + "code": 6134 + }, + "Report errors on unused parameters.": { + "category": "Message", + "code": 6135 + }, + "The maximum dependency depth to search under node_modules and load JavaScript files.": { + "category": "Message", + "code": 6136 + }, + "Cannot import type declaration files. Consider importing '{0}' instead of '{1}'.": { + "category": "Error", + "code": 6137 + }, + "Property '{0}' is declared but its value is never read.": { + "category": "Error", + "code": 6138, + "reportsUnnecessary": true + }, + "Import emit helpers from 'tslib'.": { + "category": "Message", + "code": 6139 + }, + "Auto discovery for typings is enabled in project '{0}'. Running extra resolution pass for module '{1}' using cache location '{2}'.": { + "category": "Error", + "code": 6140 + }, + "Parse in strict mode and emit \"use strict\" for each source file.": { + "category": "Message", + "code": 6141 + }, + "Module '{0}' was resolved to '{1}', but '--jsx' is not set.": { + "category": "Error", + "code": 6142 + }, + "Module '{0}' was resolved as locally declared ambient module in file '{1}'.": { + "category": "Message", + "code": 6144 + }, + "Module '{0}' was resolved as ambient module declared in '{1}' since this file was not modified.": { + "category": "Message", + "code": 6145 + }, + "Specify the JSX factory function to use when targeting 'react' JSX emit, e.g. 'React.createElement' or 'h'.": { + "category": "Message", + "code": 6146 + }, + "Resolution for module '{0}' was found in cache from location '{1}'.": { + "category": "Message", + "code": 6147 + }, + "Directory '{0}' does not exist, skipping all lookups in it.": { + "category": "Message", + "code": 6148 + }, + "Show diagnostic information.": { + "category": "Message", + "code": 6149 + }, + "Show verbose diagnostic information.": { + "category": "Message", + "code": 6150 + }, + "Emit a single file with source maps instead of having a separate file.": { + "category": "Message", + "code": 6151 + }, + "Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set.": { + "category": "Message", + "code": 6152 + }, + "Transpile each file as a separate module (similar to 'ts.transpileModule').": { + "category": "Message", + "code": 6153 + }, + "Print names of generated files part of the compilation.": { + "category": "Message", + "code": 6154 + }, + "Print names of files part of the compilation.": { + "category": "Message", + "code": 6155 + }, + "The locale used when displaying messages to the user (e.g. 'en-us')": { + "category": "Message", + "code": 6156 + }, + "Do not generate custom helper functions like '__extends' in compiled output.": { + "category": "Message", + "code": 6157 + }, + "Do not include the default library file (lib.d.ts).": { + "category": "Message", + "code": 6158 + }, + "Do not add triple-slash references or imported modules to the list of compiled files.": { + "category": "Message", + "code": 6159 + }, + "[Deprecated] Use '--skipLibCheck' instead. Skip type checking of default library declaration files.": { + "category": "Message", + "code": 6160 + }, + "List of folders to include type definitions from.": { + "category": "Message", + "code": 6161 + }, + "Disable size limitations on JavaScript projects.": { + "category": "Message", + "code": 6162 + }, + "The character set of the input files.": { + "category": "Message", + "code": 6163 + }, + "Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.": { + "category": "Message", + "code": 6164 + }, + "Do not truncate error messages.": { + "category": "Message", + "code": 6165 + }, + "Output directory for generated declaration files.": { + "category": "Message", + "code": 6166 + }, + "A series of entries which re-map imports to lookup locations relative to the 'baseUrl'.": { + "category": "Message", + "code": 6167 + }, + "List of root folders whose combined content represents the structure of the project at runtime.": { + "category": "Message", + "code": 6168 + }, + "Show all compiler options.": { + "category": "Message", + "code": 6169 + }, + "[Deprecated] Use '--outFile' instead. Concatenate and emit output to single file": { + "category": "Message", + "code": 6170 + }, + "Command-line Options": { + "category": "Message", + "code": 6171 + }, + "Basic Options": { + "category": "Message", + "code": 6172 + }, + "Strict Type-Checking Options": { + "category": "Message", + "code": 6173 + }, + "Module Resolution Options": { + "category": "Message", + "code": 6174 + }, + "Source Map Options": { + "category": "Message", + "code": 6175 + }, + "Additional Checks": { + "category": "Message", + "code": 6176 + }, + "Experimental Options": { + "category": "Message", + "code": 6177 + }, + "Advanced Options": { + "category": "Message", + "code": 6178 + }, + "Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.": { + "category": "Message", + "code": 6179 + }, + "Enable all strict type-checking options.": { + "category": "Message", + "code": 6180 + }, + "List of language service plugins.": { + "category": "Message", + "code": 6181 + }, + "Scoped package detected, looking in '{0}'": { + "category": "Message", + "code": 6182 + }, + "Reusing resolution of module '{0}' to file '{1}' from old program.": { + "category": "Message", + "code": 6183 + }, + "Reusing module resolutions originating in '{0}' since resolutions are unchanged from old program.": { + "category": "Message", + "code": 6184 + }, + "Disable strict checking of generic signatures in function types.": { + "category": "Message", + "code": 6185 + }, + "Enable strict checking of function types.": { + "category": "Message", + "code": 6186 + }, + "Enable strict checking of property initialization in classes.": { + "category": "Message", + "code": 6187 + }, + "Numeric separators are not allowed here.": { + "category": "Error", + "code": 6188 + }, + "Multiple consecutive numeric separators are not permitted.": { + "category": "Error", + "code": 6189 + }, + "Found 'package.json' at '{0}'. Package ID is '{1}'.": { + "category": "Message", + "code": 6190 + }, + "Whether to keep outdated console output in watch mode instead of clearing the screen.": { + "category": "Message", + "code": 6191 + }, + "All imports in import declaration are unused.": { + "category": "Error", + "code": 6192, + "reportsUnnecessary": true + }, + "Found 1 error. Watching for file changes.": { + "category": "Message", + "code": 6193 + }, + "Found {0} errors. Watching for file changes.": { + "category": "Message", + "code": 6194 + }, + "Resolve 'keyof' to string valued property names only (no numbers or symbols).": { + "category": "Message", + "code": 6195 + }, + "'{0}' is declared but never used.": { + "category": "Error", + "code": 6196, + "reportsUnnecessary": true + }, + "Include modules imported with '.json' extension": { + "category": "Message", + "code": 6197 + }, + "All destructured elements are unused.": { + "category": "Error", + "code": 6198, + "reportsUnnecessary": true + }, + "All variables are unused.": { + "category": "Error", + "code": 6199, + "reportsUnnecessary": true + }, + "Definitions of the following identifiers conflict with those in another file: {0}": { + "category": "Error", + "code": 6200 + }, + "Conflicts are in this file.": { + "category": "Message", + "code": 6201 + }, + "'{0}' was also declared here.": { + "category": "Message", + "code": 6203 + }, + "and here.": { + "category": "Message", + "code": 6204 + }, + "All type parameters are unused": { + "category": "Error", + "code": 6205 + }, + "'package.json' has a 'typesVersions' field with version-specific path mappings.": { + "category": "Message", + "code": 6206 + }, + "'package.json' does not have a 'typesVersions' entry that matches version '{0}'.": { + "category": "Message", + "code": 6207 + }, + "'package.json' has a 'typesVersions' entry '{0}' that matches compiler version '{1}', looking for a pattern to match module name '{2}'.": { + "category": "Message", + "code": 6208 + }, + "'package.json' has a 'typesVersions' entry '{0}' that is not a valid semver range.": { + "category": "Message", + "code": 6209 + }, + "An argument for '{0}' was not provided.": { + "category": "Message", + "code": 6210 + }, + "An argument matching this binding pattern was not provided.": { + "category": "Message", + "code": 6211 + }, + "Did you mean to call this expression?": { + "category": "Message", + "code": 6212 + }, + "Did you mean to use 'new' with this expression?": { + "category": "Message", + "code": 6213 + }, + "Enable strict 'bind', 'call', and 'apply' methods on functions.": { + "category": "Message", + "code": 6214 + }, + + "Projects to reference": { + "category": "Message", + "code": 6300 + }, + "Enable project compilation": { + "category": "Message", + "code": 6302 + }, + "Project references may not form a circular graph. Cycle detected: {0}": { + "category": "Error", + "code": 6202 + }, + "Composite projects may not disable declaration emit.": { + "category": "Error", + "code": 6304 + }, + "Output file '{0}' has not been built from source file '{1}'.": { + "category": "Error", + "code": 6305 + }, + "Referenced project '{0}' must have setting \"composite\": true.": { + "category": "Error", + "code": 6306 + }, + "File '{0}' is not in project file list. Projects must list all files or use an 'include' pattern.": { + "category": "Error", + "code": 6307 + }, + "Cannot prepend project '{0}' because it does not have 'outFile' set": { + "category": "Error", + "code": 6308 + }, + "Output file '{0}' from project '{1}' does not exist": { + "category": "Error", + "code": 6309 + }, + "Project '{0}' is out of date because oldest output '{1}' is older than newest input '{2}'": { + "category": "Message", + "code": 6350 + }, + "Project '{0}' is up to date because newest input '{1}' is older than oldest output '{2}'": { + "category": "Message", + "code": 6351 + }, + "Project '{0}' is out of date because output file '{1}' does not exist": { + "category": "Message", + "code": 6352 + }, + "Project '{0}' is out of date because its dependency '{1}' is out of date": { + "category": "Message", + "code": 6353 + }, + + "Project '{0}' is up to date with .d.ts files from its dependencies": { + "category": "Message", + "code": 6354 + }, + "Projects in this build: {0}": { + "category": "Message", + "code": 6355 + }, + "A non-dry build would delete the following files: {0}": { + "category": "Message", + "code": 6356 + }, + "A non-dry build would build project '{0}'": { + "category": "Message", + "code": 6357 + }, + "Building project '{0}'...": { + "category": "Message", + "code": 6358 + }, + "Updating output timestamps of project '{0}'...": { + "category": "Message", + "code": 6359 + }, + "delete this - Project '{0}' is up to date because it was previously built": { + "category": "Message", + "code": 6360 + }, + "Project '{0}' is up to date": { + "category": "Message", + "code": 6361 + }, + "Skipping build of project '{0}' because its dependency '{1}' has errors": { + "category": "Message", + "code": 6362 + }, + "Project '{0}' can't be built because its dependency '{1}' has errors": { + "category": "Message", + "code": 6363 + }, + "Build one or more projects and their dependencies, if out of date": { + "category": "Message", + "code": 6364 + }, + "Delete the outputs of all projects": { + "category": "Message", + "code": 6365 + }, + "Enable verbose logging": { + "category": "Message", + "code": 6366 + }, + "Show what would be built (or deleted, if specified with '--clean')": { + "category": "Message", + "code": 6367 + }, + "Build all projects, including those that appear to be up to date": { + "category": "Message", + "code": 6368 + }, + "Option '--build' must be the first command line argument.": { + "category": "Error", + "code": 6369 + }, + "Options '{0}' and '{1}' cannot be combined.": { + "category": "Error", + "code": 6370 + }, + + "The expected type comes from property '{0}' which is declared here on type '{1}'": { + "category": "Message", + "code": 6500 + }, + "The expected type comes from this index signature.": { + "category": "Message", + "code": 6501 + }, + "The expected type comes from the return type of this signature.": { + "category": "Message", + "code": 6502 + }, + + "Variable '{0}' implicitly has an '{1}' type.": { + "category": "Error", + "code": 7005 + }, + "Parameter '{0}' implicitly has an '{1}' type.": { + "category": "Error", + "code": 7006 + }, + "Member '{0}' implicitly has an '{1}' type.": { + "category": "Error", + "code": 7008 + }, + "'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.": { + "category": "Error", + "code": 7009 + }, + "'{0}', which lacks return-type annotation, implicitly has an '{1}' return type.": { + "category": "Error", + "code": 7010 + }, + "Function expression, which lacks return-type annotation, implicitly has an '{0}' return type.": { + "category": "Error", + "code": 7011 + }, + "Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.": { + "category": "Error", + "code": 7013 + }, + "Element implicitly has an 'any' type because index expression is not of type 'number'.": { + "category": "Error", + "code": 7015 + }, + "Could not find a declaration file for module '{0}'. '{1}' implicitly has an 'any' type.": { + "category": "Error", + "code": 7016 + }, + "Element implicitly has an 'any' type because type '{0}' has no index signature.": { + "category": "Error", + "code": 7017 + }, + "Object literal's property '{0}' implicitly has an '{1}' type.": { + "category": "Error", + "code": 7018 + }, + "Rest parameter '{0}' implicitly has an 'any[]' type.": { + "category": "Error", + "code": 7019 + }, + "Call signature, which lacks return-type annotation, implicitly has an 'any' return type.": { + "category": "Error", + "code": 7020 + }, + "'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.": { + "category": "Error", + "code": 7022 + }, + "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": { + "category": "Error", + "code": 7023 + }, + "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": { + "category": "Error", + "code": 7024 + }, + "Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type.": { + "category": "Error", + "code": 7025 + }, + "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.": { + "category": "Error", + "code": 7026 + }, + "Unreachable code detected.": { + "category": "Error", + "code": 7027, + "reportsUnnecessary": true + }, + "Unused label.": { + "category": "Error", + "code": 7028, + "reportsUnnecessary": true + }, + "Fallthrough case in switch.": { + "category": "Error", + "code": 7029 + }, + "Not all code paths return a value.": { + "category": "Error", + "code": 7030 + }, + "Binding element '{0}' implicitly has an '{1}' type.": { + "category": "Error", + "code": 7031 + }, + "Property '{0}' implicitly has type 'any', because its set accessor lacks a parameter type annotation.": { + "category": "Error", + "code": 7032 + }, + "Property '{0}' implicitly has type 'any', because its get accessor lacks a return type annotation.": { + "category": "Error", + "code": 7033 + }, + "Variable '{0}' implicitly has type '{1}' in some locations where its type cannot be determined.": { + "category": "Error", + "code": 7034 + }, + "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": { + "category": "Error", + "code": 7035 + }, + "Dynamic import's specifier must be of type 'string', but here has type '{0}'.": { + "category": "Error", + "code": 7036 + }, + "Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.": { + "category": "Message", + "code": 7037 + }, + "Type originates at this import. A namespace-style import cannot be called or constructed, and will cause a failure at runtime. Consider using a default import or import require here instead.": { + "category": "Message", + "code": 7038 + }, + "Mapped object type implicitly has an 'any' template type.": { + "category": "Error", + "code": 7039 + }, + "If the '{0}' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/{1}`": { + "category": "Error", + "code": 7040 + }, + "The containing arrow function captures the global value of 'this' which implicitly has type 'any'.": { + "category": "Error", + "code": 7041 + }, + "Module '{0}' was resolved to '{1}', but '--resolveJsonModule' is not used.": { + "category": "Error", + "code": 7042 + }, + "You cannot rename this element.": { + "category": "Error", + "code": 8000 + }, + "You cannot rename elements that are defined in the standard TypeScript library.": { + "category": "Error", + "code": 8001 + }, + "'import ... =' can only be used in a .ts file.": { + "category": "Error", + "code": 8002 + }, + "'export=' can only be used in a .ts file.": { + "category": "Error", + "code": 8003 + }, + "'type parameter declarations' can only be used in a .ts file.": { + "category": "Error", + "code": 8004 + }, + "'implements clauses' can only be used in a .ts file.": { + "category": "Error", + "code": 8005 + }, + "'interface declarations' can only be used in a .ts file.": { + "category": "Error", + "code": 8006 + }, + "'module declarations' can only be used in a .ts file.": { + "category": "Error", + "code": 8007 + }, + "'type aliases' can only be used in a .ts file.": { + "category": "Error", + "code": 8008 + }, + "'{0}' can only be used in a .ts file.": { + "category": "Error", + "code": 8009 + }, + "'types' can only be used in a .ts file.": { + "category": "Error", + "code": 8010 + }, + "'type arguments' can only be used in a .ts file.": { + "category": "Error", + "code": 8011 + }, + "'parameter modifiers' can only be used in a .ts file.": { + "category": "Error", + "code": 8012 + }, + "'non-null assertions' can only be used in a .ts file.": { + "category": "Error", + "code": 8013 + }, + "'enum declarations' can only be used in a .ts file.": { + "category": "Error", + "code": 8015 + }, + "'type assertion expressions' can only be used in a .ts file.": { + "category": "Error", + "code": 8016 + }, + "Octal literal types must use ES2015 syntax. Use the syntax '{0}'.": { + "category": "Error", + "code": 8017 + }, + "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'.": { + "category": "Error", + "code": 8018 + }, + "Report errors in .js files.": { + "category": "Message", + "code": 8019 + }, + "JSDoc types can only be used inside documentation comments.": { + "category": "Error", + "code": 8020 + }, + "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.": { + "category": "Error", + "code": 8021 + }, + "JSDoc '@{0}' is not attached to a class.": { + "category": "Error", + "code": 8022 + }, + "JSDoc '@{0} {1}' does not match the 'extends {2}' clause.": { + "category": "Error", + "code": 8023 + }, + "JSDoc '@param' tag has name '{0}', but there is no parameter with that name.": { + "category": "Error", + "code": 8024 + }, + "Class declarations cannot have more than one `@augments` or `@extends` tag.": { + "category": "Error", + "code": 8025 + }, + "Expected {0} type arguments; provide these with an '@extends' tag.": { + "category": "Error", + "code": 8026 + }, + "Expected {0}-{1} type arguments; provide these with an '@extends' tag.": { + "category": "Error", + "code": 8027 + }, + "JSDoc '...' may only appear in the last parameter of a signature.": { + "category": "Error", + "code": 8028 + }, + "JSDoc '@param' tag has name '{0}', but there is no parameter with that name. It would match 'arguments' if it had an array type.": { + "category": "Error", + "code": 8029 + }, + "The type of a function declaration must match the function's signature.": { + "category": "Error", + "code": 8030 + }, + "You cannot rename a module via a global import.": { + "category": "Error", + "code": 8031 + }, + "Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clause.": { + "category": "Error", + "code": 9002 + }, + "'class' expressions are not currently supported.": { + "category": "Error", + "code": 9003 + }, + "Language service is disabled.": { + "category": "Error", + "code": 9004 + }, + "JSX attributes must only be assigned a non-empty 'expression'.": { + "category": "Error", + "code": 17000 + }, + "JSX elements cannot have multiple attributes with the same name.": { + "category": "Error", + "code": 17001 + }, + "Expected corresponding JSX closing tag for '{0}'.": { + "category": "Error", + "code": 17002 + }, + "JSX attribute expected.": { + "category": "Error", + "code": 17003 + }, + "Cannot use JSX unless the '--jsx' flag is provided.": { + "category": "Error", + "code": 17004 + }, + "A constructor cannot contain a 'super' call when its class extends 'null'.": { + "category": "Error", + "code": 17005 + }, + "An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { + "category": "Error", + "code": 17006 + }, + "A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": { + "category": "Error", + "code": 17007 + }, + "JSX element '{0}' has no corresponding closing tag.": { + "category": "Error", + "code": 17008 + }, + "'super' must be called before accessing 'this' in the constructor of a derived class.": { + "category": "Error", + "code": 17009 + }, + "Unknown type acquisition option '{0}'.": { + "category": "Error", + "code": 17010 + }, + "'super' must be called before accessing a property of 'super' in the constructor of a derived class.": { + "category": "Error", + "code": 17011 + }, + "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?": { + "category": "Error", + "code": 17012 + }, + "Meta-property '{0}' is only allowed in the body of a function declaration, function expression, or constructor.": { + "category": "Error", + "code": 17013 + }, + "JSX fragment has no corresponding closing tag.": { + "category": "Error", + "code": 17014 + }, + "Expected corresponding closing tag for JSX fragment.": { + "category": "Error", + "code": 17015 + }, + "JSX fragment is not supported when using --jsxFactory": { + "category": "Error", + "code": 17016 + }, + "JSX fragment is not supported when using an inline JSX factory pragma": { + "category": "Error", + "code": 17017 + }, + + "Circularity detected while resolving configuration: {0}": { + "category": "Error", + "code": 18000 + }, + "A path in an 'extends' option must be relative or rooted, but '{0}' is not.": { + "category": "Error", + "code": 18001 + }, + "The 'files' list in config file '{0}' is empty.": { + "category": "Error", + "code": 18002 + }, + "No inputs were found in config file '{0}'. Specified 'include' paths were '{1}' and 'exclude' paths were '{2}'.": { + "category": "Error", + "code": 18003 + }, + + "File is a CommonJS module; it may be converted to an ES6 module.": { + "category": "Suggestion", + "code": 80001 + }, + "This constructor function may be converted to a class declaration.": { + "category": "Suggestion", + "code": 80002 + }, + "Import may be converted to a default import.": { + "category": "Suggestion", + "code": 80003 + }, + "JSDoc types may be moved to TypeScript types.": { + "category": "Suggestion", + "code": 80004 + }, + "'require' call may be converted to an import.": { + "category": "Suggestion", + "code": 80005 + }, + "This may be converted to an async function.": { + "category": "Suggestion", + "code": 80006 + }, + "Add missing 'super()' call": { + "category": "Message", + "code": 90001 + }, + "Make 'super()' call the first statement in the constructor": { + "category": "Message", + "code": 90002 + }, + "Change 'extends' to 'implements'": { + "category": "Message", + "code": 90003 + }, + "Remove declaration for: '{0}'": { + "category": "Message", + "code": 90004 + }, + "Remove import from '{0}'": { + "category": "Message", + "code": 90005 + }, + "Implement interface '{0}'": { + "category": "Message", + "code": 90006 + }, + "Implement inherited abstract class": { + "category": "Message", + "code": 90007 + }, + "Add '{0}.' to unresolved variable": { + "category": "Message", + "code": 90008 + }, + "Remove destructuring": { + "category": "Message", + "code": 90009 + }, + "Remove variable statement": { + "category": "Message", + "code": 90010 + }, + "Remove template tag": { + "category": "Message", + "code": 90011 + }, + "Remove type parameters": { + "category": "Message", + "code": 90012 + }, + "Import '{0}' from module \"{1}\"": { + "category": "Message", + "code": 90013 + }, + "Change '{0}' to '{1}'": { + "category": "Message", + "code": 90014 + }, + "Add '{0}' to existing import declaration from \"{1}\"": { + "category": "Message", + "code": 90015 + }, + "Declare property '{0}'": { + "category": "Message", + "code": 90016 + }, + "Add index signature for property '{0}'": { + "category": "Message", + "code": 90017 + }, + "Disable checking for this file": { + "category": "Message", + "code": 90018 + }, + "Ignore this error message": { + "category": "Message", + "code": 90019 + }, + "Initialize property '{0}' in the constructor": { + "category": "Message", + "code": 90020 + }, + "Initialize static property '{0}'": { + "category": "Message", + "code": 90021 + }, + "Change spelling to '{0}'": { + "category": "Message", + "code": 90022 + }, + "Declare method '{0}'": { + "category": "Message", + "code": 90023 + }, + "Declare static method '{0}'": { + "category": "Message", + "code": 90024 + }, + "Prefix '{0}' with an underscore": { + "category": "Message", + "code": 90025 + }, + "Rewrite as the indexed access type '{0}'": { + "category": "Message", + "code": 90026 + }, + "Declare static property '{0}'": { + "category": "Message", + "code": 90027 + }, + "Call decorator expression": { + "category": "Message", + "code": 90028 + }, + "Add async modifier to containing function": { + "category": "Message", + "code": 90029 + }, + "Replace 'infer {0}' with 'unknown'": { + "category": "Message", + "code": 90030 + }, + "Replace all unused 'infer' with 'unknown'": { + "category": "Message", + "code": 90031 + }, + "Import default '{0}' from module \"{1}\"": { + "category": "Message", + "code": 90032 + }, + "Add default import '{0}' to existing import declaration from \"{1}\"": { + "category": "Message", + "code": 90033 + }, + "Convert function to an ES2015 class": { + "category": "Message", + "code": 95001 + }, + "Convert function '{0}' to class": { + "category": "Message", + "code": 95002 + }, + "Extract to {0} in {1}": { + "category": "Message", + "code": 95004 + }, + "Extract function": { + "category": "Message", + "code": 95005 + }, + "Extract constant": { + "category": "Message", + "code": 95006 + }, + "Extract to {0} in enclosing scope": { + "category": "Message", + "code": 95007 + }, + "Extract to {0} in {1} scope": { + "category": "Message", + "code": 95008 + }, + "Annotate with type from JSDoc": { + "category": "Message", + "code": 95009 + }, + "Annotate with types from JSDoc": { + "category": "Message", + "code": 95010 + }, + "Infer type of '{0}' from usage": { + "category": "Message", + "code": 95011 + }, + "Infer parameter types from usage": { + "category": "Message", + "code": 95012 + }, + "Convert to default import": { + "category": "Message", + "code": 95013 + }, + "Install '{0}'": { + "category": "Message", + "code": 95014 + }, + "Replace import with '{0}'.": { + "category": "Message", + "code": 95015 + }, + "Use synthetic 'default' member.": { + "category": "Message", + "code": 95016 + }, + "Convert to ES6 module": { + "category": "Message", + "code": 95017 + }, + "Add 'undefined' type to property '{0}'": { + "category": "Message", + "code": 95018 + }, + "Add initializer to property '{0}'": { + "category": "Message", + "code": 95019 + }, + "Add definite assignment assertion to property '{0}'": { + "category": "Message", + "code": 95020 + }, + "Add all missing members": { + "category": "Message", + "code": 95022 + }, + "Infer all types from usage": { + "category": "Message", + "code": 95023 + }, + "Delete all unused declarations": { + "category": "Message", + "code": 95024 + }, + "Prefix all unused declarations with '_' where possible": { + "category": "Message", + "code": 95025 + }, + "Fix all detected spelling errors": { + "category": "Message", + "code": 95026 + }, + "Add initializers to all uninitialized properties": { + "category": "Message", + "code": 95027 + }, + "Add definite assignment assertions to all uninitialized properties": { + "category": "Message", + "code": 95028 + }, + "Add undefined type to all uninitialized properties": { + "category": "Message", + "code": 95029 + }, + "Change all jsdoc-style types to TypeScript": { + "category": "Message", + "code": 95030 + }, + "Change all jsdoc-style types to TypeScript (and add '| undefined' to nullable types)": { + "category": "Message", + "code": 95031 + }, + "Implement all unimplemented interfaces": { + "category": "Message", + "code": 95032 + }, + "Install all missing types packages": { + "category": "Message", + "code": 95033 + }, + "Rewrite all as indexed access types": { + "category": "Message", + "code": 95034 + }, + "Convert all to default imports": { + "category": "Message", + "code": 95035 + }, + "Make all 'super()' calls the first statement in their constructor": { + "category": "Message", + "code": 95036 + }, + "Add qualifier to all unresolved variables matching a member name": { + "category": "Message", + "code": 95037 + }, + "Change all extended interfaces to 'implements'": { + "category": "Message", + "code": 95038 + }, + "Add all missing super calls": { + "category": "Message", + "code": 95039 + }, + "Implement all inherited abstract classes": { + "category": "Message", + "code": 95040 + }, + "Add all missing 'async' modifiers": { + "category": "Message", + "code": 95041 + }, + "Add '@ts-ignore' to all error messages": { + "category": "Message", + "code": 95042 + }, + "Annotate everything with types from JSDoc": { + "category": "Message", + "code": 95043 + }, + "Add '()' to all uncalled decorators": { + "category": "Message", + "code": 95044 + }, + "Convert all constructor functions to classes": { + "category": "Message", + "code": 95045 + }, + "Generate 'get' and 'set' accessors": { + "category": "Message", + "code": 95046 + }, + "Convert 'require' to 'import'": { + "category": "Message", + "code": 95047 + }, + "Convert all 'require' to 'import'": { + "category": "Message", + "code": 95048 + }, + "Move to a new file": { + "category": "Message", + "code": 95049 + }, + "Remove unreachable code": { + "category": "Message", + "code": 95050 + }, + "Remove all unreachable code": { + "category": "Message", + "code": 95051 + }, + "Add missing 'typeof'": { + "category": "Message", + "code": 95052 + }, + "Remove unused label": { + "category": "Message", + "code": 95053 + }, + "Remove all unused labels": { + "category": "Message", + "code": 95054 + }, + "Convert '{0}' to mapped object type": { + "category": "Message", + "code": 95055 + }, + "Convert namespace import to named imports": { + "category": "Message", + "code": 95056 + }, + "Convert named imports to namespace import": { + "category": "Message", + "code": 95057 + }, + "Add or remove braces in an arrow function": { + "category": "Message", + "code": 95058 + }, + "Add braces to arrow function": { + "category": "Message", + "code": 95059 + }, + "Remove braces from arrow function": { + "category": "Message", + "code": 95060 + }, + "Convert default export to named export": { + "category": "Message", + "code": 95061 + }, + "Convert named export to default export": { + "category": "Message", + "code": 95062 + }, + "Add missing enum member '{0}'": { + "category": "Message", + "code": 95063 + }, + "Add all missing imports": { + "category": "Message", + "code": 95064 + }, + "Convert to async function": { + "category": "Message", + "code": 95065 + }, + "Convert all to async functions": { + "category": "Message", + "code": 95066 + }, + "Generate types for '{0}'": { + "category": "Message", + "code": 95067 + }, + "Generate types for all packages without types": { + "category": "Message", + "code": 95068 + }, + "Add missing 'new' operator to call": { + "category": "Message", + "code": 95069 + }, + "Add missing 'new' operator to all calls": { + "category": "Message", + "code": 95070 + } } \ No newline at end of file diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 1d912faa116..ad4334487b7 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -381,8 +381,13 @@ namespace ts { // tslint:disable-next-line:no-null-keyword const isNotNeededPackage = host.fileExists(packageJsonPath) && (readJson(packageJsonPath, host) as PackageJson).typings === null; if (!isNotNeededPackage) { - // Return just the type directive names - result.push(getBaseFileName(normalized)); + const baseFileName = getBaseFileName(normalized); + + // At this stage, skip results with leading dot. + if (baseFileName.charCodeAt(0) !== CharacterCodes.dot) { + // Return just the type directive names + result.push(baseFileName); + } } } } diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 33829fccb7a..847c6307f79 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -7725,7 +7725,7 @@ namespace ts { /*@internal*/ export function processCommentPragmas(context: PragmaContext, sourceText: string): void { const triviaScanner = createScanner(context.languageVersion, /*skipTrivia*/ false, LanguageVariant.Standard, sourceText); - const pragmas: PragmaPsuedoMapEntry[] = []; + const pragmas: PragmaPseudoMapEntry[] = []; // Keep scanning all the leading trivia in the file until we get to something that // isn't trivia. Any single line comment will be analyzed to see if it is a @@ -7780,7 +7780,7 @@ namespace ts { const referencedFiles = context.referencedFiles; const typeReferenceDirectives = context.typeReferenceDirectives; const libReferenceDirectives = context.libReferenceDirectives; - forEach(toArray(entryOrList), (arg: PragmaPsuedoMap["reference"]) => { + forEach(toArray(entryOrList), (arg: PragmaPseudoMap["reference"]) => { // TODO: GH#18217 if (arg!.arguments["no-default-lib"]) { context.hasNoDefaultLib = true; @@ -7803,7 +7803,7 @@ namespace ts { case "amd-dependency": { context.amdDependencies = map( toArray(entryOrList), - (x: PragmaPsuedoMap["amd-dependency"]) => ({ name: x!.arguments.name!, path: x!.arguments.path })); // TODO: GH#18217 + (x: PragmaPseudoMap["amd-dependency"]) => ({ name: x!.arguments.name!, path: x!.arguments.path })); // TODO: GH#18217 break; } case "amd-module": { @@ -7813,11 +7813,11 @@ namespace ts { // TODO: It's probably fine to issue this diagnostic on all instances of the pragma reportDiagnostic(entry!.range.pos, entry!.range.end - entry!.range.pos, Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments); } - context.moduleName = (entry as PragmaPsuedoMap["amd-module"])!.arguments.name; + context.moduleName = (entry as PragmaPseudoMap["amd-module"])!.arguments.name; } } else { - context.moduleName = (entryOrList as PragmaPsuedoMap["amd-module"])!.arguments.name; + context.moduleName = (entryOrList as PragmaPseudoMap["amd-module"])!.arguments.name; } break; } @@ -7853,10 +7853,10 @@ namespace ts { const tripleSlashXMLCommentStartRegEx = /^\/\/\/\s*<(\S+)\s.*?\/>/im; const singleLinePragmaRegEx = /^\/\/\/?\s*@(\S+)\s*(.*)\s*$/im; - function extractPragmas(pragmas: PragmaPsuedoMapEntry[], range: CommentRange, text: string) { + function extractPragmas(pragmas: PragmaPseudoMapEntry[], range: CommentRange, text: string) { const tripleSlash = range.kind === SyntaxKind.SingleLineCommentTrivia && tripleSlashXMLCommentStartRegEx.exec(text); if (tripleSlash) { - const name = tripleSlash[1].toLowerCase() as keyof PragmaPsuedoMap; // Technically unsafe cast, but we do it so the below check to make it safe typechecks + const name = tripleSlash[1].toLowerCase() as keyof PragmaPseudoMap; // Technically unsafe cast, but we do it so the below check to make it safe typechecks const pragma = commentPragmas[name] as PragmaDefinition; if (!pragma || !(pragma.kind! & PragmaKindFlags.TripleSlashXML)) { return; @@ -7883,10 +7883,10 @@ namespace ts { } } } - pragmas.push({ name, args: { arguments: argument, range } } as PragmaPsuedoMapEntry); + pragmas.push({ name, args: { arguments: argument, range } } as PragmaPseudoMapEntry); } else { - pragmas.push({ name, args: { arguments: {}, range } } as PragmaPsuedoMapEntry); + pragmas.push({ name, args: { arguments: {}, range } } as PragmaPseudoMapEntry); } return; } @@ -7905,9 +7905,9 @@ namespace ts { } } - function addPragmaForMatch(pragmas: PragmaPsuedoMapEntry[], range: CommentRange, kind: PragmaKindFlags, match: RegExpExecArray) { + function addPragmaForMatch(pragmas: PragmaPseudoMapEntry[], range: CommentRange, kind: PragmaKindFlags, match: RegExpExecArray) { if (!match) return; - const name = match[1].toLowerCase() as keyof PragmaPsuedoMap; // Technically unsafe cast, but we do it so they below check to make it safe typechecks + const name = match[1].toLowerCase() as keyof PragmaPseudoMap; // Technically unsafe cast, but we do it so they below check to make it safe typechecks const pragma = commentPragmas[name] as PragmaDefinition; if (!pragma || !(pragma.kind! & kind)) { return; @@ -7915,7 +7915,7 @@ namespace ts { const args = match[2]; // Split on spaces and match up positionally with definition const argument = getNamedPragmaArguments(pragma, args); if (argument === "fail") return; // Missing required argument, fail to parse it - pragmas.push({ name, args: { arguments: argument, range } } as PragmaPsuedoMapEntry); + pragmas.push({ name, args: { arguments: argument, range } } as PragmaPseudoMapEntry); return; } diff --git a/src/compiler/program.ts b/src/compiler/program.ts index c9d8a45fedb..44eae36d654 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -207,7 +207,7 @@ namespace ts { ...program.getSemanticDiagnostics(sourceFile, cancellationToken) ]; - if (program.getCompilerOptions().declaration) { + if (getEmitDeclarations(program.getCompilerOptions())) { addRange(diagnostics, program.getDeclarationDiagnostics(sourceFile, cancellationToken)); } @@ -485,11 +485,11 @@ namespace ts { function sourceFileNotUptoDate(sourceFile: SourceFile) { return !sourceFileVersionUptoDate(sourceFile) || - hasInvalidatedResolution(sourceFile.resolvedPath || sourceFile.path); + hasInvalidatedResolution(sourceFile.resolvedPath); } function sourceFileVersionUptoDate(sourceFile: SourceFile) { - return sourceFile.version === getSourceVersion(sourceFile.resolvedPath || sourceFile.path); + return sourceFile.version === getSourceVersion(sourceFile.resolvedPath); } function projectReferenceUptoDate(oldRef: ProjectReference, newRef: ProjectReference, index: number) { @@ -663,7 +663,7 @@ namespace ts { // A parallel array to projectReferences storing the results of reading in the referenced tsconfig files let resolvedProjectReferences: (ResolvedProjectReference | undefined)[] | undefined = projectReferences ? [] : undefined; - const projectReferenceRedirects: Map = createMap(); + let projectReferenceRedirects: ParsedCommandLine[] | undefined; const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options); const structuralIsReused = tryReuseStructureFromOldProgram(); @@ -681,7 +681,7 @@ namespace ts { const dtsOutfile = changeExtension(out, ".d.ts"); processSourceFile(dtsOutfile, /*isDefaultLib*/ false, /*ignoreNoDefaultLib*/ false, /*packageId*/ undefined); } - addProjectReferenceRedirects(parsedRef.commandLine, projectReferenceRedirects); + addProjectReferenceRedirects(parsedRef.commandLine); } } } @@ -817,9 +817,9 @@ namespace ts { // If a rootDir is specified use it as the commonSourceDirectory commonSourceDirectory = getNormalizedAbsolutePath(options.rootDir, currentDirectory); } - else if (options.composite) { + else if (options.composite && options.configFilePath) { // Project compilations never infer their root from the input source paths - commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath!)); // TODO: GH#18217 + commonSourceDirectory = getDirectoryPath(normalizeSlashes(options.configFilePath)); checkSourceFilesBelongToPath(emittedFiles, commonSourceDirectory); } else { @@ -1079,7 +1079,7 @@ namespace ts { for (const oldSourceFile of oldSourceFiles) { let newSourceFile = host.getSourceFileByPath - ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath || oldSourceFile.path, options.target!, /*onError*/ undefined, shouldCreateNewSourceFile) + ? host.getSourceFileByPath(oldSourceFile.fileName, oldSourceFile.resolvedPath, options.target!, /*onError*/ undefined, shouldCreateNewSourceFile) : host.getSourceFile(oldSourceFile.fileName, options.target!, /*onError*/ undefined, shouldCreateNewSourceFile); // TODO: GH#18217 if (!newSourceFile) { @@ -1110,7 +1110,11 @@ namespace ts { fileChanged = newSourceFile !== oldSourceFile; } + // Since the project references havent changed, its right to set originalFileName and resolvedPath here newSourceFile.path = oldSourceFile.path; + newSourceFile.originalFileName = oldSourceFile.originalFileName; + newSourceFile.resolvedPath = oldSourceFile.resolvedPath; + newSourceFile.fileName = oldSourceFile.fileName; filePaths.push(newSourceFile.path); const packageName = oldProgram.sourceFileToPackageName.get(oldSourceFile.path); @@ -1187,7 +1191,7 @@ namespace ts { modifiedFilePaths = modifiedSourceFiles.map(f => f.newFile.path); // try to verify results of module resolution for (const { oldFile: oldSourceFile, newFile: newSourceFile } of modifiedSourceFiles) { - const newSourceFilePath = getNormalizedAbsolutePath(newSourceFile.fileName, currentDirectory); + const newSourceFilePath = getNormalizedAbsolutePath(newSourceFile.originalFileName, currentDirectory); if (resolveModuleNamesWorker) { const moduleNames = getModuleNames(newSourceFile); const oldProgramState: OldProgramState = { program: oldProgram, oldSourceFile, modifiedFilePaths }; @@ -1248,7 +1252,7 @@ namespace ts { if (resolvedProjectReferences) { resolvedProjectReferences.forEach(ref => { if (ref) { - addProjectReferenceRedirects(ref.commandLine, projectReferenceRedirects); + addProjectReferenceRedirects(ref.commandLine); } }); } @@ -1388,7 +1392,7 @@ namespace ts { ...program.getSemanticDiagnostics(sourceFile, cancellationToken) ]; - if (diagnostics.length === 0 && program.getCompilerOptions().declaration) { + if (diagnostics.length === 0 && getEmitDeclarations(program.getCompilerOptions())) { declarationDiagnostics = program.getDeclarationDiagnostics(/*sourceFile*/ undefined, cancellationToken); } @@ -2040,6 +2044,7 @@ namespace ts { // Get source file from normalized fileName function findSourceFile(fileName: string, path: Path, isDefaultLib: boolean, ignoreNoDefaultLib: boolean, refFile: SourceFile, refPos: number, refEnd: number, packageId: PackageId | undefined): SourceFile | undefined { + const originalFileName = fileName; if (filesByName.has(path)) { const file = filesByName.get(path); // try to check if we've already seen this file but with a different casing in path @@ -2136,6 +2141,7 @@ namespace ts { sourceFilesFoundSearchingNodeModules.set(path, currentNodeModulesDepth > 0); file.path = path; file.resolvedPath = toPath(fileName); + file.originalFileName = originalFileName; if (host.useCaseSensitiveFileNames()) { const pathLowerCase = path.toLowerCase(); @@ -2173,25 +2179,29 @@ namespace ts { } function getProjectReferenceRedirect(fileName: string): string | undefined { - const path = toPath(fileName); + // Ignore dts or any of the non ts files + if (!projectReferenceRedirects || fileExtensionIs(fileName, Extension.Dts) || !fileExtensionIsOneOf(fileName, supportedTSExtensions)) { + return undefined; + } + // If this file is produced by a referenced project, we need to rewrite it to // look in the output folder of the referenced project rather than the input - const normalized = getNormalizedAbsolutePath(fileName, path); - let result: string | undefined; - projectReferenceRedirects.forEach((v, k) => { - if (result !== undefined) { + return forEach(projectReferenceRedirects, referencedProject => { + // not input file from the referenced project, ignore + if (!contains(referencedProject.fileNames, fileName, isSameFile)) { return undefined; } - if (normalized.indexOf(k) === 0) { - result = changeExtension(fileName.replace(k, v), ".d.ts"); - } + + const out = referencedProject.options.outFile || referencedProject.options.out; + return out ? + changeExtension(out, Extension.Dts) : + getOutputDeclarationFileName(fileName, referencedProject); }); - return result; } function processReferencedFiles(file: SourceFile, isDefaultLib: boolean) { forEach(file.referencedFiles, ref => { - const referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); + const referencedFileName = resolveTripleslashReference(ref.fileName, file.originalFileName); processSourceFile(referencedFileName, isDefaultLib, /*ignoreNoDefaultLib*/ false, /*packageId*/ undefined, file, ref.pos, ref.end); }); } @@ -2203,7 +2213,7 @@ namespace ts { return; } - const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeDirectives, file.fileName); + const resolutions = resolveTypeReferenceDirectiveNamesWorker(typeDirectives, file.originalFileName); for (let i = 0; i < typeDirectives.length; i++) { const ref = file.typeReferenceDirectives[i]; @@ -2299,7 +2309,7 @@ namespace ts { // Because global augmentation doesn't have string literal name, we can check for global augmentation as such. const moduleNames = getModuleNames(file); const oldProgramState: OldProgramState = { program: oldProgram, oldSourceFile: oldProgram && oldProgram.getSourceFile(file.fileName), modifiedFilePaths }; - const resolutions = resolveModuleNamesReusingOldState(moduleNames, getNormalizedAbsolutePath(file.fileName, currentDirectory), file, oldProgramState); + const resolutions = resolveModuleNamesReusingOldState(moduleNames, getNormalizedAbsolutePath(file.originalFileName, currentDirectory), file, oldProgramState); Debug.assert(resolutions.length === moduleNames.length); for (let i = 0; i < moduleNames.length; i++) { const resolution = resolutions[i]; @@ -2390,15 +2400,8 @@ namespace ts { return { commandLine, sourceFile }; } - function addProjectReferenceRedirects(referencedProject: ParsedCommandLine, target: Map) { - const rootDir = normalizePath(referencedProject.options.rootDir || getDirectoryPath(referencedProject.options.configFilePath!)); // TODO: GH#18217 - target.set(rootDir, getDeclarationOutputDirectory(referencedProject)); - } - - function getDeclarationOutputDirectory(proj: ParsedCommandLine) { - return proj.options.declarationDir || - proj.options.outDir || - getDirectoryPath(proj.options.configFilePath!); // TODO: GH#18217 + function addProjectReferenceRedirects(referencedProject: ParsedCommandLine) { + (projectReferenceRedirects || (projectReferenceRedirects = [])).push(referencedProject); } function verifyCompilerOptions() { @@ -2407,8 +2410,8 @@ namespace ts { } if (options.isolatedModules) { - if (options.declaration) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declaration", "isolatedModules"); + if (getEmitDeclarations(options)) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, getEmitDeclarationOptionName(options), "isolatedModules"); } if (options.noEmitOnError) { @@ -2533,7 +2536,7 @@ namespace ts { if (options.declarationDir) { if (!getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "declarationDir", "declaration"); + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationDir", "declaration", "composite"); } if (options.out || options.outFile) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "declarationDir", options.out ? "out" : "outFile"); @@ -2541,7 +2544,7 @@ namespace ts { } if (options.declarationMap && !getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "declarationMap", "declaration"); + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "declarationMap", "declaration", "composite"); } if (options.lib && options.noLib) { @@ -2610,7 +2613,7 @@ namespace ts { } if (!options.noEmit && options.allowJs && getEmitDeclarations(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", options.declaration ? "declaration" : "composite"); + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", getEmitDeclarationOptionName(options)); } if (options.checkJs && !options.allowJs) { @@ -2618,8 +2621,8 @@ namespace ts { } if (options.emitDeclarationOnly) { - if (!options.declaration) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDeclarationOnly", "declaration"); + if (!getEmitDeclarations(options)) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1_or_option_2, "emitDeclarationOnly", "declaration", "composite"); } if (options.noEmit) { @@ -2877,6 +2880,9 @@ namespace ts { return resolveConfigFileProjectName(passedInRef.path); } + function getEmitDeclarationOptionName(options: CompilerOptions) { + return options.declaration ? "declaration" : "composite"; + } /* @internal */ /** * Returns a DiagnosticMessage if we won't include a resolved module due to its extension. diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts index 0865861414e..53b5750a1ed 100644 --- a/src/compiler/transformers/declarations/diagnostics.ts +++ b/src/compiler/transformers/declarations/diagnostics.ts @@ -434,7 +434,7 @@ namespace ts { // Heritage clause is written by user so it can always be named if (node.parent.parent.kind === SyntaxKind.ClassDeclaration) { // Class or Interface implemented/extended is inaccessible - diagnosticMessage = (node as ExpressionWithTypeArguments).parent.token === SyntaxKind.ImplementsKeyword ? + diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === SyntaxKind.ImplementsKeyword ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1; } @@ -446,7 +446,7 @@ namespace ts { return { diagnosticMessage, errorNode: node, - typeName: getNameOfDeclaration((node as ExpressionWithTypeArguments).parent.parent) + typeName: getNameOfDeclaration(node.parent.parent as Declaration) }; } diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index dcb0d9ac208..2e5176c4490 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -46,10 +46,16 @@ namespace ts { * so nobody can observe this new value. */ interface LoopOutParameter { + flags: LoopOutParameterFlags; originalName: Identifier; outParamName: Identifier; } + const enum LoopOutParameterFlags { + Body = 1 << 0, // Modified in the body of the iteration statement + Initializer = 1 << 1, // Set in the initializer of a ForStatement + } + const enum CopyDirection { ToOriginal, ToOutParameter @@ -129,10 +135,14 @@ namespace ts { */ hoistedLocalVariables?: Identifier[]; + conditionVariable?: Identifier; + + loopParameters: ParameterDeclaration[]; + /** * List of loop out parameters - detailed descripion can be found in the comment to LoopOutParameter */ - loopOutParameters?: LoopOutParameter[]; + loopOutParameters: LoopOutParameter[]; } const enum SuperCaptureResult { @@ -347,7 +357,7 @@ namespace ts { return (node.transformFlags & TransformFlags.ContainsES2015) !== 0 || convertedLoopState !== undefined || (hierarchyFacts & HierarchyFacts.ConstructorWithCapturedSuper && (isStatement(node) || (node.kind === SyntaxKind.Block))) - || (isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatementBody(node)) + || (isIterationStatement(node, /*lookInLabeledStatements*/ false) && shouldConvertIterationStatement(node)) || (getEmitFlags(node) & EmitFlags.TypeScriptClassWrapper) !== 0; } @@ -646,8 +656,8 @@ namespace ts { } } let returnExpression: Expression = createLiteral(labelMarker); - if (convertedLoopState.loopOutParameters!.length) { - const outParams = convertedLoopState.loopOutParameters!; + if (convertedLoopState.loopOutParameters.length) { + const outParams = convertedLoopState.loopOutParameters; let expr: Expression | undefined; for (let i = 0; i < outParams.length; i++) { const copyExpr = copyOutParameter(outParams[i], CopyDirection.ToOutParameter); @@ -2610,7 +2620,40 @@ namespace ts { return visitEachChild(node, visitor, context); } - function shouldConvertIterationStatementBody(node: IterationStatement): boolean { + interface ForStatementWithConvertibleInitializer extends ForStatement { + initializer: VariableDeclarationList; + } + + interface ForStatementWithConvertibleCondition extends ForStatement { + condition: Expression; + } + + interface ForStatementWithConvertibleIncrementor extends ForStatement { + incrementor: Expression; + } + + function shouldConvertPartOfIterationStatement(node: Node) { + return (resolver.getNodeCheckFlags(node) & NodeCheckFlags.ContainsCapturedBlockScopeBinding) !== 0; + } + + function shouldConvertInitializerOfForStatement(node: IterationStatement): node is ForStatementWithConvertibleInitializer { + return isForStatement(node) && !!node.initializer && shouldConvertPartOfIterationStatement(node.initializer); + } + + function shouldConvertConditionOfForStatement(node: IterationStatement): node is ForStatementWithConvertibleCondition { + return isForStatement(node) && !!node.condition && shouldConvertPartOfIterationStatement(node.condition); + } + + function shouldConvertIncrementorOfForStatement(node: IterationStatement): node is ForStatementWithConvertibleIncrementor { + return isForStatement(node) && !!node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor); + } + + function shouldConvertIterationStatement(node: IterationStatement) { + return shouldConvertBodyOfIterationStatement(node) + || shouldConvertInitializerOfForStatement(node); + } + + function shouldConvertBodyOfIterationStatement(node: IterationStatement): boolean { return (resolver.getNodeCheckFlags(node) & NodeCheckFlags.LoopWithCapturedBlockScopedBinding) !== 0; } @@ -2639,7 +2682,7 @@ namespace ts { } function convertIterationStatementBodyIfNecessary(node: IterationStatement, outermostLabeledStatement: LabeledStatement | undefined, convert?: LoopConverter): VisitResult { - if (!shouldConvertIterationStatementBody(node)) { + if (!shouldConvertIterationStatement(node)) { let saveAllowedNonLabeledJumps: Jump | undefined; if (convertedLoopState) { // we get here if we are trying to emit normal loop loop inside converted loop @@ -2658,7 +2701,102 @@ namespace ts { return result; } - const functionName = createUniqueName("_loop"); + const currentState = createConvertedLoopState(node); + const statements: Statement[] = []; + + const outerConvertedLoopState = convertedLoopState; + convertedLoopState = currentState; + + const initializerFunction = shouldConvertInitializerOfForStatement(node) ? createFunctionForInitializerOfForStatement(node, currentState) : undefined; + const bodyFunction = shouldConvertBodyOfIterationStatement(node) ? createFunctionForBodyOfIterationStatement(node, currentState, outerConvertedLoopState) : undefined; + + convertedLoopState = outerConvertedLoopState; + + if (initializerFunction) statements.push(initializerFunction.functionDeclaration); + if (bodyFunction) statements.push(bodyFunction.functionDeclaration); + + addExtraDeclarationsForConvertedLoop(statements, currentState, outerConvertedLoopState); + + if (initializerFunction) { + statements.push(generateCallToConvertedLoopInitializer(initializerFunction.functionName, initializerFunction.containsYield)); + } + + let loop: Statement; + if (bodyFunction) { + if (convert) { + loop = convert(node, outermostLabeledStatement, bodyFunction.part); + } + else { + const clone = convertIterationStatementCore(node, initializerFunction, createBlock(bodyFunction.part, /*multiLine*/ true)); + aggregateTransformFlags(clone); + loop = restoreEnclosingLabel(clone, outermostLabeledStatement, convertedLoopState && resetLabel); + } + } + else { + const clone = convertIterationStatementCore(node, initializerFunction, visitNode(node.statement, visitor, isStatement, liftToBlock)); + aggregateTransformFlags(clone); + loop = restoreEnclosingLabel(clone, outermostLabeledStatement, convertedLoopState && resetLabel); + } + + statements.push(loop); + return statements; + } + + function convertIterationStatementCore(node: IterationStatement, initializerFunction: IterationStatementPartFunction | undefined, convertedLoopBody: Statement) { + switch (node.kind) { + case SyntaxKind.ForStatement: return convertForStatement(node as ForStatement, initializerFunction, convertedLoopBody); + case SyntaxKind.ForInStatement: return convertForInStatement(node as ForInStatement, convertedLoopBody); + case SyntaxKind.ForOfStatement: return convertForOfStatement(node as ForOfStatement, convertedLoopBody); + case SyntaxKind.DoStatement: return convertDoStatement(node as DoStatement, convertedLoopBody); + case SyntaxKind.WhileStatement: return convertWhileStatement(node as WhileStatement, convertedLoopBody); + default: return Debug.failBadSyntaxKind(node, "IterationStatement expected"); + } + } + + function convertForStatement(node: ForStatement, initializerFunction: IterationStatementPartFunction | undefined, convertedLoopBody: Statement) { + const shouldConvertCondition = node.condition && shouldConvertPartOfIterationStatement(node.condition); + const shouldConvertIncrementor = shouldConvertCondition || node.incrementor && shouldConvertPartOfIterationStatement(node.incrementor); + return updateFor( + node, + visitNode(initializerFunction ? initializerFunction.part : node.initializer, visitor, isForInitializer), + visitNode(shouldConvertCondition ? undefined : node.condition, visitor, isExpression), + visitNode(shouldConvertIncrementor ? undefined : node.incrementor, visitor, isExpression), + convertedLoopBody + ); + } + + function convertForOfStatement(node: ForOfStatement, convertedLoopBody: Statement) { + return updateForOf( + node, + /*awaitModifier*/ undefined, + visitNode(node.initializer, visitor, isForInitializer), + visitNode(node.expression, visitor, isExpression), + convertedLoopBody); + } + + function convertForInStatement(node: ForInStatement, convertedLoopBody: Statement) { + return updateForIn( + node, + visitNode(node.initializer, visitor, isForInitializer), + visitNode(node.expression, visitor, isExpression), + convertedLoopBody); + } + + function convertDoStatement(node: DoStatement, convertedLoopBody: Statement) { + return updateDo( + node, + convertedLoopBody, + visitNode(node.expression, visitor, isExpression)); + } + + function convertWhileStatement(node: WhileStatement, convertedLoopBody: Statement) { + return updateWhile( + node, + visitNode(node.expression, visitor, isExpression), + convertedLoopBody); + } + + function createConvertedLoopState(node: IterationStatement) { let loopInitializer: VariableDeclarationList | undefined; switch (node.kind) { case SyntaxKind.ForStatement: @@ -2670,74 +2808,311 @@ namespace ts { } break; } + // variables that will be passed to the loop as parameters const loopParameters: ParameterDeclaration[] = []; // variables declared in the loop initializer that will be changed inside the loop const loopOutParameters: LoopOutParameter[] = []; if (loopInitializer && (getCombinedNodeFlags(loopInitializer) & NodeFlags.BlockScoped)) { + const hasCapturedBindingsInForInitializer = shouldConvertInitializerOfForStatement(node); for (const decl of loopInitializer.declarations) { - processLoopVariableDeclaration(decl, loopParameters, loopOutParameters); + processLoopVariableDeclaration(node, decl, loopParameters, loopOutParameters, hasCapturedBindingsInForInitializer); } } - const outerConvertedLoopState = convertedLoopState; - convertedLoopState = { loopOutParameters }; - if (outerConvertedLoopState) { + const currentState: ConvertedLoopState = { loopParameters, loopOutParameters }; + if (convertedLoopState) { // convertedOuterLoopState !== undefined means that this converted loop is nested in another converted loop. // if outer converted loop has already accumulated some state - pass it through - if (outerConvertedLoopState.argumentsName) { + if (convertedLoopState.argumentsName) { // outer loop has already used 'arguments' so we've already have some name to alias it // use the same name in all nested loops - convertedLoopState.argumentsName = outerConvertedLoopState.argumentsName; + currentState.argumentsName = convertedLoopState.argumentsName; } - if (outerConvertedLoopState.thisName) { + if (convertedLoopState.thisName) { // outer loop has already used 'this' so we've already have some name to alias it // use the same name in all nested loops - convertedLoopState.thisName = outerConvertedLoopState.thisName; + currentState.thisName = convertedLoopState.thisName; } - if (outerConvertedLoopState.hoistedLocalVariables) { + if (convertedLoopState.hoistedLocalVariables) { // we've already collected some non-block scoped variable declarations in enclosing loop // use the same storage in nested loop - convertedLoopState.hoistedLocalVariables = outerConvertedLoopState.hoistedLocalVariables; + currentState.hoistedLocalVariables = convertedLoopState.hoistedLocalVariables; + } + } + return currentState; + } + + function addExtraDeclarationsForConvertedLoop(statements: Statement[], state: ConvertedLoopState, outerState: ConvertedLoopState | undefined) { + let extraVariableDeclarations: VariableDeclaration[] | undefined; + // propagate state from the inner loop to the outer loop if necessary + if (state.argumentsName) { + // if alias for arguments is set + if (outerState) { + // pass it to outer converted loop + outerState.argumentsName = state.argumentsName; + } + else { + // this is top level converted loop and we need to create an alias for 'arguments' object + (extraVariableDeclarations || (extraVariableDeclarations = [])).push( + createVariableDeclaration( + state.argumentsName, + /*type*/ undefined, + createIdentifier("arguments") + ) + ); } } + if (state.thisName) { + // if alias for this is set + if (outerState) { + // pass it to outer converted loop + outerState.thisName = state.thisName; + } + else { + // this is top level converted loop so we need to create an alias for 'this' here + // NOTE: + // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. + // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. + (extraVariableDeclarations || (extraVariableDeclarations = [])).push( + createVariableDeclaration( + state.thisName, + /*type*/ undefined, + createIdentifier("this") + ) + ); + } + } + + if (state.hoistedLocalVariables) { + // if hoistedLocalVariables !== undefined this means that we've possibly collected some variable declarations to be hoisted later + if (outerState) { + // pass them to outer converted loop + outerState.hoistedLocalVariables = state.hoistedLocalVariables; + } + else { + if (!extraVariableDeclarations) { + extraVariableDeclarations = []; + } + // hoist collected variable declarations + for (const identifier of state.hoistedLocalVariables) { + extraVariableDeclarations.push(createVariableDeclaration(identifier)); + } + } + } + + // add extra variables to hold out parameters if necessary + if (state.loopOutParameters.length) { + if (!extraVariableDeclarations) { + extraVariableDeclarations = []; + } + for (const outParam of state.loopOutParameters) { + extraVariableDeclarations.push(createVariableDeclaration(outParam.outParamName)); + } + } + + if (state.conditionVariable) { + if (!extraVariableDeclarations) { + extraVariableDeclarations = []; + } + extraVariableDeclarations.push(createVariableDeclaration(state.conditionVariable, /*type*/ undefined, createFalse())); + } + + // create variable statement to hold all introduced variable declarations + if (extraVariableDeclarations) { + statements.push(createVariableStatement( + /*modifiers*/ undefined, + createVariableDeclarationList(extraVariableDeclarations) + )); + } + } + + interface IterationStatementPartFunction { + functionName: Identifier; + functionDeclaration: Statement; + containsYield: boolean; + part: T; + } + + function createOutVariable(p: LoopOutParameter) { + return createVariableDeclaration(p.originalName, /*type*/ undefined, p.outParamName); + } + + /** + * Creates a `_loop_init` function for a `ForStatement` with a block-scoped initializer + * that is captured in a closure inside of the initializer. The `_loop_init` function is + * used to preserve the per-iteration environment semantics of + * [13.7.4.8 RS: ForBodyEvaluation](https://tc39.github.io/ecma262/#sec-forbodyevaluation). + */ + function createFunctionForInitializerOfForStatement(node: ForStatementWithConvertibleInitializer, currentState: ConvertedLoopState): IterationStatementPartFunction { + const functionName = createUniqueName("_loop_init"); + + const containsYield = (node.initializer.transformFlags & TransformFlags.ContainsYield) !== 0; + let emitFlags = EmitFlags.None; + if (currentState.containsLexicalThis) emitFlags |= EmitFlags.CapturesThis; + if (containsYield && hierarchyFacts & HierarchyFacts.AsyncFunctionBody) emitFlags |= EmitFlags.AsyncFunctionBody; + + const statements: Statement[] = []; + statements.push(createVariableStatement(/*modifiers*/ undefined, node.initializer)); + copyOutParameters(currentState.loopOutParameters, LoopOutParameterFlags.Initializer, CopyDirection.ToOutParameter, statements); + + // This transforms the following ES2015 syntax: + // + // for (let i = (setImmediate(() => console.log(i)), 0); i < 2; i++) { + // // loop body + // } + // + // Into the following ES5 syntax: + // + // var _loop_init_1 = function () { + // var i = (setImmediate(() => console.log(i)), 0); + // out_i_1 = i; + // }; + // var out_i_1; + // _loop_init_1(); + // for (var i = out_i_1; i < 2; i++) { + // // loop body + // } + // + // Which prevents mutations to `i` in the per-iteration environment of the body + // from affecting the initial value for `i` outside of the per-iteration environment. + + const functionDeclaration = createVariableStatement( + /*modifiers*/ undefined, + setEmitFlags( + createVariableDeclarationList([ + createVariableDeclaration( + functionName, + /*type*/ undefined, + setEmitFlags( + createFunctionExpression( + /*modifiers*/ undefined, + containsYield ? createToken(SyntaxKind.AsteriskToken) : undefined, + /*name*/ undefined, + /*typeParameters*/ undefined, + /*parameters*/ undefined, + /*type*/ undefined, + visitNode( + createBlock(statements, /*multiLine*/ true), + visitor, + isBlock + ) + ), + emitFlags + ) + ) + ]), + EmitFlags.NoHoisting + ) + ); + + const part = createVariableDeclarationList(map(currentState.loopOutParameters, createOutVariable)); + return { functionName, containsYield, functionDeclaration, part }; + } + + /** + * Creates a `_loop` function for an `IterationStatement` with a block-scoped initializer + * that is captured in a closure inside of the loop body. The `_loop` function is used to + * preserve the per-iteration environment semantics of + * [13.7.4.8 RS: ForBodyEvaluation](https://tc39.github.io/ecma262/#sec-forbodyevaluation). + */ + function createFunctionForBodyOfIterationStatement(node: IterationStatement, currentState: ConvertedLoopState, outerState: ConvertedLoopState | undefined): IterationStatementPartFunction { + const functionName = createUniqueName("_loop"); startLexicalEnvironment(); - let loopBody = visitNode(node.statement, visitor, isStatement, liftToBlock); + const statement = visitNode(node.statement, visitor, isStatement, liftToBlock); const lexicalEnvironment = endLexicalEnvironment(); - const currentState = convertedLoopState; - convertedLoopState = outerConvertedLoopState; + const statements: Statement[] = []; + if (shouldConvertConditionOfForStatement(node) || shouldConvertIncrementorOfForStatement(node)) { + // If a block-scoped variable declared in the initializer of `node` is captured in + // the condition or incrementor, we must move the condition and incrementor into + // the body of the for loop. + // + // This transforms the following ES2015 syntax: + // + // for (let i = 0; setImmediate(() => console.log(i)), i < 2; setImmediate(() => console.log(i)), i++) { + // // loop body + // } + // + // Into the following ES5 syntax: + // + // var _loop_1 = function (i) { + // if (inc_1) + // setImmediate(() => console.log(i)), i++; + // else + // inc_1 = true; + // if (!(setImmediate(() => console.log(i)), i < 2)) + // return out_i_1 = i, "break"; + // // loop body + // out_i_1 = i; + // } + // var out_i_1, inc_1 = false; + // for (var i = 0;;) { + // var state_1 = _loop_1(i); + // i = out_i_1; + // if (state_1 === "break") + // break; + // } + // + // Which prevents mutations to `i` in the per-iteration environment of the body + // from affecting the value of `i` in the previous per-iteration environment. + // + // Note that the incrementor of a `for` loop is evaluated in a *new* per-iteration + // environment that is carried over to the next iteration of the loop. As a result, + // we must indicate whether this is the first evaluation of the loop body so that + // we only evaluate the incrementor on subsequent evaluations. - if (loopOutParameters.length || lexicalEnvironment) { - const statements = isBlock(loopBody) ? loopBody.statements.slice() : [loopBody]; - if (loopOutParameters.length) { - copyOutParameters(loopOutParameters, CopyDirection.ToOutParameter, statements); + currentState.conditionVariable = createUniqueName("inc"); + statements.push(createIf( + currentState.conditionVariable, + createStatement(visitNode(node.incrementor, visitor, isExpression)), + createStatement(createAssignment(currentState.conditionVariable, createTrue())) + )); + + if (shouldConvertConditionOfForStatement(node)) { + statements.push(createIf( + createPrefix(SyntaxKind.ExclamationToken, visitNode(node.condition, visitor, isExpression)), + visitNode(createBreak(), visitor, isStatement) + )); } - addStatementsAfterPrologue(statements, lexicalEnvironment); - loopBody = createBlock(statements, /*multiline*/ true); } - if (isBlock(loopBody)) { - loopBody.multiLine = true; + if (isBlock(statement)) { + addRange(statements, statement.statements); } else { - loopBody = createBlock([loopBody], /*multiline*/ true); + statements.push(statement); } + copyOutParameters(currentState.loopOutParameters, LoopOutParameterFlags.Body, CopyDirection.ToOutParameter, statements); + addStatementsAfterPrologue(statements, lexicalEnvironment); + + const loopBody = createBlock(statements, /*multiLine*/ true); + if (isBlock(statement)) setOriginalNode(loopBody, statement); + const containsYield = (node.statement.transformFlags & TransformFlags.ContainsYield) !== 0; - const isAsyncBlockContainingAwait = containsYield && (hierarchyFacts & HierarchyFacts.AsyncFunctionBody) !== 0; - let loopBodyFlags: EmitFlags = 0; - if (currentState.containsLexicalThis) { - loopBodyFlags |= EmitFlags.CapturesThis; - } + let emitFlags: EmitFlags = 0; + if (currentState.containsLexicalThis) emitFlags |= EmitFlags.CapturesThis; + if (containsYield && (hierarchyFacts & HierarchyFacts.AsyncFunctionBody) !== 0) emitFlags |= EmitFlags.AsyncFunctionBody; - if (isAsyncBlockContainingAwait) { - loopBodyFlags |= EmitFlags.AsyncFunctionBody; - } + // This transforms the following ES2015 syntax (in addition to other variations): + // + // for (let i = 0; i < 2; i++) { + // setImmediate(() => console.log(i)); + // } + // + // Into the following ES5 syntax: + // + // var _loop_1 = function (i) { + // setImmediate(() => console.log(i)); + // }; + // for (var i = 0; i < 2; i++) { + // _loop_1(i); + // } - const convertedLoopVariable = + const functionDeclaration = createVariableStatement( /*modifiers*/ undefined, setEmitFlags( @@ -2752,11 +3127,11 @@ namespace ts { containsYield ? createToken(SyntaxKind.AsteriskToken) : undefined, /*name*/ undefined, /*typeParameters*/ undefined, - loopParameters, + currentState.loopParameters, /*type*/ undefined, - loopBody + loopBody ), - loopBodyFlags + emitFlags ) ) ] @@ -2765,106 +3140,8 @@ namespace ts { ) ); - const statements: Statement[] = [convertedLoopVariable]; - - let extraVariableDeclarations: VariableDeclaration[] | undefined; - // propagate state from the inner loop to the outer loop if necessary - if (currentState.argumentsName) { - // if alias for arguments is set - if (outerConvertedLoopState) { - // pass it to outer converted loop - outerConvertedLoopState.argumentsName = currentState.argumentsName; - } - else { - // this is top level converted loop and we need to create an alias for 'arguments' object - (extraVariableDeclarations || (extraVariableDeclarations = [])).push( - createVariableDeclaration( - currentState.argumentsName, - /*type*/ undefined, - createIdentifier("arguments") - ) - ); - } - } - - if (currentState.thisName) { - // if alias for this is set - if (outerConvertedLoopState) { - // pass it to outer converted loop - outerConvertedLoopState.thisName = currentState.thisName; - } - else { - // this is top level converted loop so we need to create an alias for 'this' here - // NOTE: - // if converted loops were all nested in arrow function then we'll always emit '_this' so convertedLoopState.thisName will not be set. - // If it is set this means that all nested loops are not nested in arrow function and it is safe to capture 'this'. - (extraVariableDeclarations || (extraVariableDeclarations = [])).push( - createVariableDeclaration( - currentState.thisName, - /*type*/ undefined, - createIdentifier("this") - ) - ); - } - } - - if (currentState.hoistedLocalVariables) { - // if hoistedLocalVariables !== undefined this means that we've possibly collected some variable declarations to be hoisted later - if (outerConvertedLoopState) { - // pass them to outer converted loop - outerConvertedLoopState.hoistedLocalVariables = currentState.hoistedLocalVariables; - } - else { - if (!extraVariableDeclarations) { - extraVariableDeclarations = []; - } - // hoist collected variable declarations - for (const identifier of currentState.hoistedLocalVariables) { - extraVariableDeclarations.push(createVariableDeclaration(identifier)); - } - } - } - - // add extra variables to hold out parameters if necessary - if (loopOutParameters.length) { - if (!extraVariableDeclarations) { - extraVariableDeclarations = []; - } - for (const outParam of loopOutParameters) { - extraVariableDeclarations.push(createVariableDeclaration(outParam.outParamName)); - } - } - - // create variable statement to hold all introduced variable declarations - if (extraVariableDeclarations) { - statements.push(createVariableStatement( - /*modifiers*/ undefined, - createVariableDeclarationList(extraVariableDeclarations) - )); - } - - const convertedLoopBodyStatements = generateCallToConvertedLoop(functionName, loopParameters, currentState, containsYield); - - let loop: Statement; - if (convert) { - loop = convert(node, outermostLabeledStatement, convertedLoopBodyStatements); - } - else { - let clone = getMutableClone(node); - // clean statement part - clone.statement = undefined!; - // visit childnodes to transform initializer/condition/incrementor parts - clone = visitEachChild(clone, visitor, context); - // set loop statement - clone.statement = createBlock(convertedLoopBodyStatements, /*multiline*/ true); - // reset and re-aggregate the transform flags - clone.transformFlags = 0; - aggregateTransformFlags(clone); - loop = restoreEnclosingLabel(clone, outermostLabeledStatement, convertedLoopState && resetLabel); - } - - statements.push(loop); - return statements; + const part = generateCallToConvertedLoop(functionName, currentState, outerState, containsYield); + return { functionName, containsYield, functionDeclaration, part }; } function copyOutParameter(outParam: LoopOutParameter, copyDirection: CopyDirection): BinaryExpression { @@ -2873,14 +3150,26 @@ namespace ts { return createBinary(target, SyntaxKind.EqualsToken, source); } - function copyOutParameters(outParams: LoopOutParameter[], copyDirection: CopyDirection, statements: Statement[]): void { + function copyOutParameters(outParams: LoopOutParameter[], partFlags: LoopOutParameterFlags, copyDirection: CopyDirection, statements: Statement[]): void { for (const outParam of outParams) { - statements.push(createExpressionStatement(copyOutParameter(outParam, copyDirection))); + if (outParam.flags & partFlags) { + statements.push(createExpressionStatement(copyOutParameter(outParam, copyDirection))); + } } } - function generateCallToConvertedLoop(loopFunctionExpressionName: Identifier, parameters: ParameterDeclaration[], state: ConvertedLoopState, isAsyncBlockContainingAwait: boolean): Statement[] { - const outerConvertedLoopState = convertedLoopState; + function generateCallToConvertedLoopInitializer(initFunctionExpressionName: Identifier, containsYield: boolean): Statement { + const call = createCall(initFunctionExpressionName, /*typeArguments*/ undefined, []); + const callResult = containsYield + ? createYield( + createToken(SyntaxKind.AsteriskToken), + setEmitFlags(call, EmitFlags.Iterator) + ) + : call; + return createStatement(callResult); + } + + function generateCallToConvertedLoop(loopFunctionExpressionName: Identifier, state: ConvertedLoopState, outerState: ConvertedLoopState | undefined, containsYield: boolean): Statement[] { const statements: Statement[] = []; // loop is considered simple if it does not have any return statements or break\continue that transfer control outside of the loop @@ -2891,8 +3180,8 @@ namespace ts { !state.labeledNonLocalBreaks && !state.labeledNonLocalContinues; - const call = createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, map(parameters, p => p.name)); - const callResult = isAsyncBlockContainingAwait + const call = createCall(loopFunctionExpressionName, /*typeArguments*/ undefined, map(state.loopParameters, p => p.name)); + const callResult = containsYield ? createYield( createToken(SyntaxKind.AsteriskToken), setEmitFlags(call, EmitFlags.Iterator) @@ -2900,7 +3189,7 @@ namespace ts { : call; if (isSimpleLoop) { statements.push(createExpressionStatement(callResult)); - copyOutParameters(state.loopOutParameters!, CopyDirection.ToOriginal, statements); + copyOutParameters(state.loopOutParameters, LoopOutParameterFlags.Body, CopyDirection.ToOriginal, statements); } else { const loopResultName = createUniqueName("state"); @@ -2911,12 +3200,12 @@ namespace ts { ) ); statements.push(stateVariable); - copyOutParameters(state.loopOutParameters!, CopyDirection.ToOriginal, statements); + copyOutParameters(state.loopOutParameters, LoopOutParameterFlags.Body, CopyDirection.ToOriginal, statements); if (state.nonLocalJumps! & Jump.Return) { let returnStatement: ReturnStatement; - if (outerConvertedLoopState) { - outerConvertedLoopState.nonLocalJumps! |= Jump.Return; + if (outerState) { + outerState.nonLocalJumps! |= Jump.Return; returnStatement = createReturn(loopResultName); } else { @@ -2949,8 +3238,8 @@ namespace ts { if (state.labeledNonLocalBreaks || state.labeledNonLocalContinues) { const caseClauses: CaseClause[] = []; - processLabeledJumps(state.labeledNonLocalBreaks!, /*isBreak*/ true, loopResultName, outerConvertedLoopState, caseClauses); - processLabeledJumps(state.labeledNonLocalContinues!, /*isBreak*/ false, loopResultName, outerConvertedLoopState, caseClauses); + processLabeledJumps(state.labeledNonLocalBreaks!, /*isBreak*/ true, loopResultName, outerState, caseClauses); + processLabeledJumps(state.labeledNonLocalContinues!, /*isBreak*/ false, loopResultName, outerState, caseClauses); statements.push( createSwitch( loopResultName, @@ -2998,20 +3287,28 @@ namespace ts { }); } - function processLoopVariableDeclaration(decl: VariableDeclaration | BindingElement, loopParameters: ParameterDeclaration[], loopOutParameters: LoopOutParameter[]) { + function processLoopVariableDeclaration(container: IterationStatement, decl: VariableDeclaration | BindingElement, loopParameters: ParameterDeclaration[], loopOutParameters: LoopOutParameter[], hasCapturedBindingsInForInitializer: boolean) { const name = decl.name; if (isBindingPattern(name)) { for (const element of name.elements) { if (!isOmittedExpression(element)) { - processLoopVariableDeclaration(element, loopParameters, loopOutParameters); + processLoopVariableDeclaration(container, element, loopParameters, loopOutParameters, hasCapturedBindingsInForInitializer); } } } else { loopParameters.push(createParameter(/*decorators*/ undefined, /*modifiers*/ undefined, /*dotDotDotToken*/ undefined, name)); - if (resolver.getNodeCheckFlags(decl) & NodeCheckFlags.NeedsLoopOutParameter) { + const checkFlags = resolver.getNodeCheckFlags(decl); + if (checkFlags & NodeCheckFlags.NeedsLoopOutParameter || hasCapturedBindingsInForInitializer) { const outParamName = createUniqueName("out_" + idText(name)); - loopOutParameters.push({ originalName: name, outParamName }); + let flags: LoopOutParameterFlags = 0; + if (checkFlags & NodeCheckFlags.NeedsLoopOutParameter) { + flags |= LoopOutParameterFlags.Body; + } + if (isForStatement(container) && container.initializer && resolver.isBindingCapturedByNode(container.initializer, decl)) { + flags |= LoopOutParameterFlags.Initializer; + } + loopOutParameters.push({ flags, originalName: name, outParamName }); } } } diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts index 6c3681dbd5c..60733dbdc8c 100644 --- a/src/compiler/tsbuild.ts +++ b/src/compiler/tsbuild.ts @@ -248,7 +248,7 @@ namespace ts { return getOrCreateValueFromConfigFileMap>(configFileMap, resolved, createMap); } - function getOutputDeclarationFileName(inputFileName: string, configFile: ParsedCommandLine) { + export function getOutputDeclarationFileName(inputFileName: string, configFile: ParsedCommandLine) { const relativePath = getRelativePathFromDirectory(rootDirOfOptions(configFile.options, configFile.options.configFilePath!), inputFileName, /*ignoreCase*/ true); const outputPath = resolvePath(configFile.options.declarationDir || configFile.options.outDir || getDirectoryPath(configFile.options.configFilePath!), relativePath); return changeExtension(outputPath, Extension.Dts); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index df0396b172d..2e55f578c42 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1708,7 +1708,7 @@ namespace ts { export interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause; + parent: HeritageClause | JSDocAugmentsTag; expression: LeftHandSideExpression; } @@ -2557,6 +2557,12 @@ namespace ts { * path = input file's path */ /* @internal */ resolvedPath: Path; + /** Original file name that can be different from fileName, + * when file is included through project reference is mapped to its output instead of source + * in that case originalFileName = name of input file + * fileName = output file's name + */ + /* @internal */ originalFileName: string; /** * If two source files are for the same version of the same package, one will redirect to the other. @@ -3414,6 +3420,7 @@ namespace ts { getJsxFactoryEntity(location?: Node): EntityName | undefined; getAllAccessorDeclarations(declaration: AccessorDeclaration): AllAccessorDeclarations; getSymbolOfExternalModuleSpecifier(node: StringLiteralLike): Symbol | undefined; + isBindingCapturedByNode(node: Node, decl: VariableDeclaration | BindingElement): boolean; } export const enum SymbolFlags { @@ -3662,14 +3669,15 @@ namespace ts { EnumValuesComputed = 0x00004000, // Values for enum members have been computed, and any errors have been reported for them. LexicalModuleMergesWithClass = 0x00008000, // Instantiated lexical module declaration is merged with a previous class declaration. LoopWithCapturedBlockScopedBinding = 0x00010000, // Loop that contains block scoped variable captured in closure - CapturedBlockScopedBinding = 0x00020000, // Block-scoped binding that is captured in some function - BlockScopedBindingInLoop = 0x00040000, // Block-scoped binding with declaration nested inside iteration statement - ClassWithBodyScopedClassBinding = 0x00080000, // Decorated class that contains a binding to itself inside of the class body. - BodyScopedClassBinding = 0x00100000, // Binding to a decorated class inside of the class's body. - NeedsLoopOutParameter = 0x00200000, // Block scoped binding whose value should be explicitly copied outside of the converted loop - AssignmentsMarked = 0x00400000, // Parameter assignments have been marked - ClassWithConstructorReference = 0x00800000, // Class that contains a binding to its constructor inside of the class body. - ConstructorReferenceInClass = 0x01000000, // Binding to a class constructor inside of the class's body. + ContainsCapturedBlockScopeBinding = 0x00020000, // Part of a loop that contains block scoped variable captured in closure + CapturedBlockScopedBinding = 0x00040000, // Block-scoped binding that is captured in some function + BlockScopedBindingInLoop = 0x00080000, // Block-scoped binding with declaration nested inside iteration statement + ClassWithBodyScopedClassBinding = 0x00100000, // Decorated class that contains a binding to itself inside of the class body. + BodyScopedClassBinding = 0x00200000, // Binding to a decorated class inside of the class's body. + NeedsLoopOutParameter = 0x00400000, // Block scoped binding whose value should be explicitly copied outside of the converted loop + AssignmentsMarked = 0x00800000, // Parameter assignments have been marked + ClassWithConstructorReference = 0x01000000, // Class that contains a binding to its constructor inside of the class body. + ConstructorReferenceInClass = 0x02000000, // Binding to a class constructor inside of the class's body. } /* @internal */ @@ -3694,6 +3702,7 @@ namespace ts { switchTypes?: Type[]; // Cached array of switch case expression types jsxNamespace?: Symbol | false; // Resolved jsx namespace symbol for this node contextFreeType?: Type; // Cached context-free type used by the first pass of inference; used when a function's return is partially contextually sensitive + capturedBlockScopeBindings?: Symbol[]; // Block-scoped bindings captured beneath this part of an IterationStatement } export const enum TypeFlags { @@ -4421,6 +4430,7 @@ namespace ts { sourceRoot?: string; strict?: boolean; strictFunctionTypes?: boolean; // Always combine with strict property + strictBindCallApply?: boolean; // Always combine with strict property strictNullChecks?: boolean; // Always combine with strict property strictPropertyInitialization?: boolean; // Always combine with strict property stripInternal?: boolean; @@ -5606,15 +5616,15 @@ namespace ts { type ConcretePragmaSpecs = typeof commentPragmas; /* @internal */ - export type PragmaPsuedoMap = {[K in keyof ConcretePragmaSpecs]?: {arguments: PragmaArgumentType, range: CommentRange}}; + export type PragmaPseudoMap = {[K in keyof ConcretePragmaSpecs]?: {arguments: PragmaArgumentType, range: CommentRange}}; /* @internal */ - export type PragmaPsuedoMapEntry = {[K in keyof PragmaPsuedoMap]: {name: K, args: PragmaPsuedoMap[K]}}[keyof PragmaPsuedoMap]; + export type PragmaPseudoMapEntry = {[K in keyof PragmaPseudoMap]: {name: K, args: PragmaPseudoMap[K]}}[keyof PragmaPseudoMap]; /* @internal */ - export interface ReadonlyPragmaMap extends ReadonlyMap { - get(key: TKey): PragmaPsuedoMap[TKey] | PragmaPsuedoMap[TKey][]; - forEach(action: (value: PragmaPsuedoMap[TKey] | PragmaPsuedoMap[TKey][], key: TKey) => void): void; + export interface ReadonlyPragmaMap extends ReadonlyMap { + get(key: TKey): PragmaPseudoMap[TKey] | PragmaPseudoMap[TKey][]; + forEach(action: (value: PragmaPseudoMap[TKey] | PragmaPseudoMap[TKey][], key: TKey) => void): void; } /** @@ -5623,10 +5633,10 @@ namespace ts { * in multiple places */ /* @internal */ - export interface PragmaMap extends Map, ReadonlyPragmaMap { - set(key: TKey, value: PragmaPsuedoMap[TKey] | PragmaPsuedoMap[TKey][]): this; - get(key: TKey): PragmaPsuedoMap[TKey] | PragmaPsuedoMap[TKey][]; - forEach(action: (value: PragmaPsuedoMap[TKey] | PragmaPsuedoMap[TKey][], key: TKey) => void): void; + export interface PragmaMap extends Map, ReadonlyPragmaMap { + set(key: TKey, value: PragmaPseudoMap[TKey] | PragmaPseudoMap[TKey][]): this; + get(key: TKey): PragmaPseudoMap[TKey] | PragmaPseudoMap[TKey][]; + forEach(action: (value: PragmaPseudoMap[TKey] | PragmaPseudoMap[TKey][], key: TKey) => void): void; } export interface UserPreferences { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 00e35fb0a85..d4c28ee94c6 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3734,11 +3734,20 @@ namespace ts { /** Get `C` given `N` if `N` is in the position `class C extends N` where `N` is an ExpressionWithTypeArguments. */ export function tryGetClassExtendingExpressionWithTypeArguments(node: Node): ClassLikeDeclaration | undefined { - if (isExpressionWithTypeArguments(node) && - node.parent.token === SyntaxKind.ExtendsKeyword && - isClassLike(node.parent.parent)) { - return node.parent.parent; - } + const cls = tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node); + return cls && !cls.isImplements ? cls.class : undefined; + } + + export interface ClassImplementingOrExtendingExpressionWithTypeArguments { + readonly class: ClassLikeDeclaration; + readonly isImplements: boolean; + } + export function tryGetClassImplementingOrExtendingExpressionWithTypeArguments(node: Node): ClassImplementingOrExtendingExpressionWithTypeArguments | undefined { + return isExpressionWithTypeArguments(node) + && isHeritageClause(node.parent) + && isClassLike(node.parent.parent) + ? { class: node.parent.parent, isImplements: node.parent.token === SyntaxKind.ImplementsKeyword } + : undefined; } export function isAssignmentExpression(node: Node, excludeCompoundAssignment: true): node is AssignmentExpression; @@ -3765,15 +3774,6 @@ namespace ts { return tryGetClassExtendingExpressionWithTypeArguments(node) !== undefined; } - export function isExpressionWithTypeArgumentsInClassImplementsClause(node: Node): node is ExpressionWithTypeArguments { - return node.kind === SyntaxKind.ExpressionWithTypeArguments - && isEntityNameExpression((node as ExpressionWithTypeArguments).expression) - && node.parent - && (node.parent).token === SyntaxKind.ImplementsKeyword - && node.parent.parent - && isClassLike(node.parent.parent); - } - export function isEntityNameExpression(node: Node): node is EntityNameExpression { return node.kind === SyntaxKind.Identifier || isPropertyAccessEntityNameExpression(node); } @@ -7085,7 +7085,7 @@ namespace ts { return !!(compilerOptions.declaration || compilerOptions.composite); } - export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictPropertyInitialization" | "alwaysStrict"; + export type StrictOptionName = "noImplicitAny" | "noImplicitThis" | "strictNullChecks" | "strictFunctionTypes" | "strictBindCallApply" | "strictPropertyInitialization" | "alwaysStrict"; export function getStrictOptionValue(compilerOptions: CompilerOptions, flag: StrictOptionName): boolean { return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag]; diff --git a/src/harness/client.ts b/src/harness/client.ts index d873cd9b4fe..f59a9ca3188 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -3,12 +3,15 @@ namespace ts.server { writeMessage(message: string): void; } - interface RenameEntry extends RenameInfo { - fileName: string; - position: number; - locations: RenameLocation[]; - findInStrings: boolean; - findInComments: boolean; + interface RenameEntry { + readonly renameInfo: RenameInfo; + readonly inputs: { + readonly fileName: string; + readonly position: number; + readonly findInStrings: boolean; + readonly findInComments: boolean; + }; + readonly locations: RenameLocation[]; } /* @internal */ @@ -390,34 +393,41 @@ namespace ts.server { const locations: RenameLocation[] = []; for (const entry of body.locs) { const fileName = entry.file; - for (const loc of entry.locs) { - locations.push({ textSpan: this.decodeSpan(loc, fileName), fileName }); + for (const { start, end, ...prefixSuffixText } of entry.locs) { + locations.push({ textSpan: this.decodeSpan({ start, end }, fileName), fileName, ...prefixSuffixText }); } } - return this.lastRenameEntry = { - canRename: body.info.canRename, - fileToRename: body.info.fileToRename, - displayName: body.info.displayName, - fullDisplayName: body.info.fullDisplayName, - kind: body.info.kind, - kindModifiers: body.info.kindModifiers, - localizedErrorMessage: body.info.localizedErrorMessage, - triggerSpan: createTextSpanFromBounds(position, position), - fileName, - position, - findInStrings: !!findInStrings, - findInComments: !!findInComments, + const renameInfo = body.info.canRename + ? identity({ + canRename: body.info.canRename, + fileToRename: body.info.fileToRename, + displayName: body.info.displayName, + fullDisplayName: body.info.fullDisplayName, + kind: body.info.kind, + kindModifiers: body.info.kindModifiers, + triggerSpan: createTextSpanFromBounds(position, position), + }) + : identity({ canRename: false, localizedErrorMessage: body.info.localizedErrorMessage }); + this.lastRenameEntry = { + renameInfo, + inputs: { + fileName, + position, + findInStrings: !!findInStrings, + findInComments: !!findInComments, + }, locations, }; + return renameInfo; } findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[] { if (!this.lastRenameEntry || - this.lastRenameEntry.fileName !== fileName || - this.lastRenameEntry.position !== position || - this.lastRenameEntry.findInStrings !== findInStrings || - this.lastRenameEntry.findInComments !== findInComments) { + this.lastRenameEntry.inputs.fileName !== fileName || + this.lastRenameEntry.inputs.position !== position || + this.lastRenameEntry.inputs.findInStrings !== findInStrings || + this.lastRenameEntry.inputs.findInComments !== findInComments) { this.getRenameInfo(fileName, position, findInStrings, findInComments); } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index c06e95339f1..ccd7aa1d067 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -1395,7 +1395,7 @@ Actual: ${stringify(fullActual)}`); } } - public verifyRenameLocations(startRanges: ArrayOrSingle, options: ReadonlyArray | { findInStrings?: boolean, findInComments?: boolean, ranges: ReadonlyArray }) { + public verifyRenameLocations(startRanges: ArrayOrSingle, options: FourSlashInterface.RenameLocationsOptions) { const { findInStrings = false, findInComments = false, ranges = this.getRanges() } = ts.isArray(options) ? { findInStrings: false, findInComments: false, ranges: options } : options; for (const startRange of toArray(startRanges)) { @@ -1412,7 +1412,10 @@ Actual: ${stringify(fullActual)}`); const sort = (locations: ReadonlyArray | undefined) => locations && ts.sort(locations, (r1, r2) => ts.compareStringsCaseSensitive(r1.fileName, r2.fileName) || r1.textSpan.start - r2.textSpan.start); - assert.deepEqual(sort(references), sort(ranges.map((r): ts.RenameLocation => ({ fileName: r.fileName, textSpan: ts.createTextSpanFromRange(r) })))); + assert.deepEqual(sort(references), sort(ranges.map((rangeOrOptions): ts.RenameLocation => { + const { range, ...prefixSuffixText } = "range" in rangeOrOptions ? rangeOrOptions : { range: rangeOrOptions }; + return { fileName: range.fileName, textSpan: ts.createTextSpanFromRange(range), ...prefixSuffixText }; + }))); } } @@ -1534,7 +1537,7 @@ Actual: ${stringify(fullActual)}`); public verifyRenameInfoSucceeded(displayName: string | undefined, fullDisplayName: string | undefined, kind: string | undefined, kindModifiers: string | undefined, fileToRename: string | undefined, expectedRange: Range | undefined): void { const renameInfo = this.languageService.getRenameInfo(this.activeFile.fileName, this.currentCaretPosition); if (!renameInfo.canRename) { - this.raiseError("Rename did not succeed"); + throw this.raiseError("Rename did not succeed"); } this.validate("displayName", displayName, renameInfo.displayName); @@ -1560,9 +1563,8 @@ Actual: ${stringify(fullActual)}`); public verifyRenameInfoFailed(message?: string) { const renameInfo = this.languageService.getRenameInfo(this.activeFile.fileName, this.currentCaretPosition); if (renameInfo.canRename) { - this.raiseError("Rename was expected to fail"); + throw this.raiseError("Rename was expected to fail"); } - this.validate("error", message, renameInfo.localizedErrorMessage); } @@ -4484,7 +4486,7 @@ namespace FourSlashInterface { this.state.verifyRenameInfoFailed(message); } - public renameLocations(startRanges: ArrayOrSingle, options: FourSlash.Range[] | { findInStrings?: boolean, findInComments?: boolean, ranges: FourSlash.Range[] }) { + public renameLocations(startRanges: ArrayOrSingle, options: RenameLocationsOptions) { this.state.verifyRenameLocations(startRanges, options); } @@ -4959,4 +4961,11 @@ namespace FourSlashInterface { readonly newFileContents: { readonly [fileName: string]: string }; readonly preferences?: ts.UserPreferences; } + + export type RenameLocationsOptions = ReadonlyArray | { + readonly findInStrings?: boolean; + readonly findInComments?: boolean; + readonly ranges: ReadonlyArray; + }; + export type RenameLocationOptions = FourSlash.Range | { readonly range: FourSlash.Range, readonly prefixText?: string, readonly suffixText?: string }; } diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index b85d5aa1c79..d2b7c7869c5 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -4,6 +4,8 @@ namespace ts.TestFSWithWatch { content: `/// interface Boolean {} interface Function {} +interface CallableFunction {} +interface NewableFunction {} interface IArguments {} interface Number { toExponential: any; } interface Object {} diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 015eec5c3e0..2917539cfdb 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -295,6 +295,66 @@ interface FunctionConstructor { declare const Function: FunctionConstructor; +interface CallableFunction extends Function { + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: (this: T) => R, thisArg: T): R; + apply(this: (this: T, ...args: A) => R, thisArg: T, args: A): R; + + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: (this: T, ...args: A) => R, thisArg: T, ...args: A): R; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; + bind(this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; + bind(this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; + bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; + bind(this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; + bind(this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; +} + +interface NewableFunction extends Function { + /** + * Calls the function with the specified object as the this value and the elements of specified array as the arguments. + * @param thisArg The object to be used as the this object. + * @param args An array of argument values to be passed to the function. + */ + apply(this: new () => T, thisArg: T): void; + apply(this: new (...args: A) => T, thisArg: T, args: A): void; + + /** + * Calls the function with the specified object as the this value and the specified rest arguments as the arguments. + * @param thisArg The object to be used as the this object. + * @param args Argument values to be passed to the function. + */ + call(this: new (...args: A) => T, thisArg: T, ...args: A): void; + + /** + * For a given function, creates a bound function that has the same body as the original function. + * The this object of the bound function is associated with the specified object, and has the specified initial parameters. + * @param thisArg The object to be used as the this object. + * @param args Arguments to bind to the parameters of the function. + */ + bind(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; + bind(this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; + bind(this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; + bind(this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; + bind(this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; + bind(this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; +} + interface IArguments { [index: number]: any; length: number; diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 2f5b1d91da5..293c09b3b1c 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -44,6 +44,24 @@ namespace ts.server { readonly data: ProjectInfoTelemetryEventData; } +/* __GDPR__ + "projectInfo" : { + "${include}": ["${TypeScriptCommonProperties}"], + "projectId": { "classification": "EndUserPseudonymizedInformation", "purpose": "FeatureInsight", "endpoint": "ProjectId" }, + "fileStats": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "compilerOptions": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "extends": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "files": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "include": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "exclude": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "compileOnSave": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "typeAcquisition": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "configFileName": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "projectType": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "languageServiceEnabled": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "version": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ export interface ProjectInfoTelemetryEventData { /** Cryptographically secure hash of project file location. */ readonly projectId: string; diff --git a/src/server/project.ts b/src/server/project.ts index 89b54a56c24..e0297c640b8 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -662,7 +662,7 @@ namespace ts.server { return this.rootFiles; } return map(this.program.getSourceFiles(), sourceFile => { - const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath || sourceFile.path); + const scriptInfo = this.projectService.getScriptInfoForPath(sourceFile.resolvedPath); Debug.assert(!!scriptInfo, "getScriptInfo", () => `scriptInfo for a file '${sourceFile.fileName}' Path: '${sourceFile.path}' / '${sourceFile.resolvedPath}' is missing.`); return scriptInfo!; }); diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 1a4ee841014..4a2d35503cc 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -1087,23 +1087,18 @@ namespace ts.server.protocol { /** * Information about the item to be renamed. */ - export interface RenameInfo { + export type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + export interface RenameInfoSuccess { /** * True if item can be renamed. */ - canRename: boolean; - + canRename: true; /** * File or directory to rename. * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. */ fileToRename?: string; - /** - * Error message if item can not be renamed. - */ - localizedErrorMessage?: string; - /** * Display name of the item to be renamed. */ @@ -1127,6 +1122,13 @@ namespace ts.server.protocol { /** Span of text to rename. */ triggerSpan: TextSpan; } + export interface RenameInfoFailure { + canRename: false; + /** + * Error message if item can not be renamed. + */ + localizedErrorMessage: string; + } /** * A group of text spans, all in 'file'. @@ -1135,7 +1137,12 @@ namespace ts.server.protocol { /** The file to which the spans apply */ file: string; /** The text spans in this group */ - locs: TextSpan[]; + locs: RenameTextSpan[]; + } + + export interface RenameTextSpan extends TextSpan { + readonly prefixText?: string; + readonly suffixText?: string; } export interface RenameResponseBody { @@ -2737,6 +2744,14 @@ namespace ts.server.protocol { payload: TypingsInstalledTelemetryEventPayload; } +/* __GDPR__ + "typingsinstalled" : { + "${include}": ["${TypeScriptCommonProperties}"], + "installedPackages": { "classification": "PublicNonPersonalData", "purpose": "FeatureInsight" }, + "installSuccess": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }, + "typingsInstallerVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" } + } + */ export interface TypingsInstalledTelemetryEventPayload { /** * Comma separated list of installed typing packages diff --git a/src/server/session.ts b/src/server/session.ts index 688bccb935c..f664251cff6 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -490,6 +490,7 @@ namespace ts.server { globalPlugins?: ReadonlyArray; pluginProbeLocations?: ReadonlyArray; allowLocalPluginLoads?: boolean; + typesMapLocation?: string; } export class Session implements EventSender { @@ -550,6 +551,7 @@ namespace ts.server { globalPlugins: opts.globalPlugins, pluginProbeLocations: opts.pluginProbeLocations, allowLocalPluginLoads: opts.allowLocalPluginLoads, + typesMapLocation: opts.typesMapLocation, syntaxOnly: opts.syntaxOnly, }; this.projectService = new ProjectService(settings); @@ -619,7 +621,11 @@ namespace ts.server { } } - public logError(err: Error, cmd: string) { + public logError(err: Error, cmd: string): void { + this.logErrorWorker(err, cmd); + } + + private logErrorWorker(err: Error, cmd: string, fileRequest?: protocol.FileRequestArgs): void { let msg = "Exception on executing command " + cmd; if (err.message) { msg += ":\n" + indent(err.message); @@ -627,6 +633,19 @@ namespace ts.server { msg += "\n" + indent((err).stack!); } } + + if (fileRequest && this.logger.hasLevel(LogLevel.verbose)) { + try { + const { file, project } = this.getFileAndProject(fileRequest); + const scriptInfo = project.getScriptInfoForNormalizedPath(file); + if (scriptInfo) { + const text = getSnapshotText(scriptInfo.getSnapshot()); + msg += `\n\nFile text of ${fileRequest.file}:${indent(text)}\n`; + } + } + catch {} // tslint:disable-line no-empty + } + this.logger.msg(msg, Msg.Err); } @@ -1165,16 +1184,24 @@ namespace ts.server { return { info: renameInfo, locs: this.toSpanGroups(locations) }; } - private mapRenameInfo({ canRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan }: RenameInfo, scriptInfo: ScriptInfo): protocol.RenameInfo { - return { canRename, localizedErrorMessage, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: this.toLocationTextSpan(triggerSpan, scriptInfo) }; + private mapRenameInfo(info: RenameInfo, scriptInfo: ScriptInfo): protocol.RenameInfo { + if (info.canRename) { + const { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan } = info; + return identity( + { canRename, fileToRename, displayName, fullDisplayName, kind, kindModifiers, triggerSpan: this.toLocationTextSpan(triggerSpan, scriptInfo) }); + } + else { + return info; + } } private toSpanGroups(locations: ReadonlyArray): ReadonlyArray { const map = createMap(); - for (const { fileName, textSpan } of locations) { + for (const { fileName, textSpan, originalTextSpan: _, originalFileName: _1, ...prefixSuffixText } of locations) { let group = map.get(fileName); if (!group) map.set(fileName, group = { file: fileName, locs: [] }); - group.locs.push(this.toLocationTextSpan(textSpan, Debug.assertDefined(this.projectService.getScriptInfo(fileName)))); + const scriptInfo = Debug.assertDefined(this.projectService.getScriptInfo(fileName)); + group.locs.push({ ...this.toLocationTextSpan(textSpan, scriptInfo), ...prefixSuffixText }); } return arrayFrom(map.values()); } @@ -2321,8 +2348,10 @@ namespace ts.server { } let request: protocol.Request | undefined; + let relevantFile: protocol.FileRequestArgs | undefined; try { request = JSON.parse(message); + relevantFile = request.arguments && (request as protocol.FileRequest).arguments.file ? (request as protocol.FileRequest).arguments : undefined; const { response, responseRequired } = this.executeCommand(request); if (this.logger.hasLevel(LogLevel.requestTime)) { @@ -2348,7 +2377,7 @@ namespace ts.server { this.doOutput({ canceled: true }, request!.command, request!.seq, /*success*/ true); return; } - this.logError(err, message); + this.logErrorWorker(err, message, relevantFile); this.doOutput( /*info*/ undefined, request ? request.command : CommandNames.Unknown, diff --git a/src/server/utilities.ts b/src/server/utilities.ts index 615361cdcd8..d6cfe269c8d 100644 --- a/src/server/utilities.ts +++ b/src/server/utilities.ts @@ -246,14 +246,16 @@ namespace ts.server { return index === 0 || value !== array[index - 1]; } + const indentStr = "\n "; + /* @internal */ export function indent(str: string): string { - return "\n " + str; + return indentStr + str.replace(/\n/g, indentStr); } /** Put stringified JSON on the next line, indented. */ /* @internal */ export function stringifyIndented(json: {}): string { - return "\n " + JSON.stringify(json); + return indentStr + JSON.stringify(json); } } diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index 01aaaae65ca..fbaf0178d2f 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -15,24 +15,24 @@ namespace ts.codefix { }); interface SynthIdentifier { - identifier: Identifier; - types: Type[]; + readonly identifier: Identifier; + readonly types: Type[]; numberOfAssignmentsOriginal: number; // number of times the variable should be assigned in the refactor } interface SymbolAndIdentifier { - identifier: Identifier; - symbol: Symbol; + readonly identifier: Identifier; + readonly symbol: Symbol; } interface Transformer { - checker: TypeChecker; - synthNamesMap: Map; // keys are the symbol id of the identifier - allVarNames: SymbolAndIdentifier[]; - setOfExpressionsToReturn: Map; // keys are the node ids of the expressions - constIdentifiers: Identifier[]; - originalTypeMap: Map; // keys are the node id of the identifier - isInJSFile: boolean; + readonly checker: TypeChecker; + readonly synthNamesMap: Map; // keys are the symbol id of the identifier + readonly allVarNames: ReadonlyArray; + readonly setOfExpressionsToReturn: ReadonlyMap; // keys are the node ids of the expressions + readonly constIdentifiers: Identifier[]; + readonly originalTypeMap: ReadonlyMap; // keys are the node id of the identifier + readonly isInJSFile: boolean; } function convertToAsyncFunction(changes: textChanges.ChangeTracker, sourceFile: SourceFile, position: number, checker: TypeChecker, context: CodeFixContextBase): void { @@ -61,7 +61,7 @@ namespace ts.codefix { const functionToConvertRenamed: FunctionLikeDeclaration = renameCollidingVarNames(functionToConvert, checker, synthNamesMap, context, setOfExpressionsToReturn, originalTypeMap, allVarNames); const constIdentifiers = getConstIdentifiers(synthNamesMap); const returnStatements = getReturnStatementsWithPromiseHandlers(functionToConvertRenamed); - const transformer = { checker, synthNamesMap, allVarNames, setOfExpressionsToReturn, constIdentifiers, originalTypeMap, isInJSFile: isInJavascript }; + const transformer: Transformer = { checker, synthNamesMap, allVarNames, setOfExpressionsToReturn, constIdentifiers, originalTypeMap, isInJSFile: isInJavascript }; if (!returnStatements.length) { return; @@ -88,7 +88,7 @@ namespace ts.codefix { } // Returns the identifiers that are never reassigned in the refactor - function getConstIdentifiers(synthNamesMap: Map): Identifier[] { + function getConstIdentifiers(synthNamesMap: ReadonlyMap): Identifier[] { const constIdentifiers: Identifier[] = []; synthNamesMap.forEach((val) => { if (val.numberOfAssignmentsOriginal === 0) { @@ -249,8 +249,8 @@ namespace ts.codefix { } } - function getNewNameIfConflict(name: Identifier, originalNames: Map): SynthIdentifier { - const numVarsSameName = (originalNames.get(name.text) || []).length; + function getNewNameIfConflict(name: Identifier, originalNames: ReadonlyMap): SynthIdentifier { + const numVarsSameName = (originalNames.get(name.text) || emptyArray).length; const numberOfAssignmentsOriginal = 0; const identifier = numVarsSameName === 0 ? name : createIdentifier(name.text + "_" + numVarsSameName); return { identifier, types: [], numberOfAssignmentsOriginal }; @@ -258,9 +258,9 @@ namespace ts.codefix { // dispatch function to recursively build the refactoring // should be kept up to date with isFixablePromiseHandler in suggestionDiagnostics.ts - function transformExpression(node: Expression, transformer: Transformer, outermostParent: CallExpression, prevArgName?: SynthIdentifier): Statement[] { + function transformExpression(node: Expression, transformer: Transformer, outermostParent: CallExpression, prevArgName?: SynthIdentifier): ReadonlyArray { if (!node) { - return []; + return emptyArray; } const originalType = isIdentifier(node) && transformer.originalTypeMap.get(getNodeId(node).toString()); @@ -280,10 +280,10 @@ namespace ts.codefix { } codeActionSucceeded = false; - return []; + return emptyArray; } - function transformCatch(node: CallExpression, transformer: Transformer, prevArgName?: SynthIdentifier): Statement[] { + function transformCatch(node: CallExpression, transformer: Transformer, prevArgName?: SynthIdentifier): ReadonlyArray { const func = node.arguments[0]; const argName = getArgName(func, transformer); const shouldReturn = transformer.setOfExpressionsToReturn.get(getNodeId(node).toString()); @@ -336,7 +336,7 @@ namespace ts.codefix { return newSynthName; } - function transformThen(node: CallExpression, transformer: Transformer, outermostParent: CallExpression, prevArgName?: SynthIdentifier): Statement[] { + function transformThen(node: CallExpression, transformer: Transformer, outermostParent: CallExpression, prevArgName?: SynthIdentifier): ReadonlyArray { const [res, rej] = node.arguments; if (!res) { @@ -356,18 +356,18 @@ namespace ts.codefix { const catchArg = argNameRej ? argNameRej.identifier.text : "e"; const catchClause = createCatchClause(catchArg, createBlock(transformationBody2)); - return [createTry(tryBlock, catchClause, /* finallyBlock */ undefined) as Statement]; + return [createTry(tryBlock, catchClause, /* finallyBlock */ undefined)]; } return transformExpression(node.expression, transformer, node, argNameRes).concat(transformationBody); } - function getFlagOfIdentifier(node: Identifier, constIdentifiers: Identifier[]): NodeFlags { + function getFlagOfIdentifier(node: Identifier, constIdentifiers: ReadonlyArray): NodeFlags { const inArr: boolean = constIdentifiers.some(elem => elem.text === node.text); return inArr ? NodeFlags.Const : NodeFlags.Let; } - function transformPromiseCall(node: Expression, transformer: Transformer, prevArgName?: SynthIdentifier): Statement[] { + function transformPromiseCall(node: Expression, transformer: Transformer, prevArgName?: SynthIdentifier): ReadonlyArray { const shouldReturn = transformer.setOfExpressionsToReturn.get(getNodeId(node).toString()); // the identifier is empty when the handler (.then()) ignores the argument - In this situation we do not need to save the result of the promise returning call const originalNodeParent = node.original ? node.original.parent : node.parent; @@ -381,23 +381,23 @@ namespace ts.codefix { return [createReturn(getSynthesizedDeepClone(node))]; } - function createTransformedStatement(prevArgName: SynthIdentifier | undefined, rightHandSide: Expression, transformer: Transformer): MutableNodeArray { + function createTransformedStatement(prevArgName: SynthIdentifier | undefined, rightHandSide: Expression, transformer: Transformer): ReadonlyArray { if (!prevArgName || prevArgName.identifier.text.length === 0) { // if there's no argName to assign to, there still might be side effects - return createNodeArray([createStatement(rightHandSide)]); + return [createStatement(rightHandSide)]; } if (prevArgName.types.length < prevArgName.numberOfAssignmentsOriginal) { // if the variable has already been declared, we don't need "let" or "const" - return createNodeArray([createStatement(createAssignment(getSynthesizedDeepClone(prevArgName.identifier), rightHandSide))]); + return [createStatement(createAssignment(getSynthesizedDeepClone(prevArgName.identifier), rightHandSide))]; } - return createNodeArray([createVariableStatement(/*modifiers*/ undefined, - (createVariableDeclarationList([createVariableDeclaration(getSynthesizedDeepClone(prevArgName.identifier), /*type*/ undefined, rightHandSide)], getFlagOfIdentifier(prevArgName.identifier, transformer.constIdentifiers))))]); + return [createVariableStatement(/*modifiers*/ undefined, + (createVariableDeclarationList([createVariableDeclaration(getSynthesizedDeepClone(prevArgName.identifier), /*type*/ undefined, rightHandSide)], getFlagOfIdentifier(prevArgName.identifier, transformer.constIdentifiers))))]; } // should be kept up to date with isFixablePromiseArgument in suggestionDiagnostics.ts - function getTransformationBody(func: Expression, prevArgName: SynthIdentifier | undefined, argName: SynthIdentifier | undefined, parent: CallExpression, transformer: Transformer): NodeArray { + function getTransformationBody(func: Expression, prevArgName: SynthIdentifier | undefined, argName: SynthIdentifier | undefined, parent: CallExpression, transformer: Transformer): ReadonlyArray { const shouldReturn = transformer.setOfExpressionsToReturn.get(getNodeId(parent).toString()); switch (func.kind) { @@ -410,9 +410,9 @@ namespace ts.codefix { break; } - const synthCall = createCall(getSynthesizedDeepClone(func) as Identifier, /*typeArguments*/ undefined, argName ? [argName.identifier] : []); + const synthCall = createCall(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, argName ? [argName.identifier] : emptyArray); if (shouldReturn) { - return createNodeArray([createReturn(synthCall)]); + return [createReturn(synthCall)]; } const type = transformer.originalTypeMap.get(getNodeId(func).toString()) || transformer.checker.getTypeAtLocation(func); @@ -450,15 +450,19 @@ namespace ts.codefix { } } - return shouldReturn ? getSynthesizedDeepClones(createNodeArray(refactoredStmts)) : - removeReturns(createNodeArray(refactoredStmts), prevArgName!.identifier, transformer, seenReturnStatement); + return shouldReturn ? refactoredStmts.map(s => getSynthesizedDeepClone(s)) : + removeReturns( + refactoredStmts, + prevArgName === undefined ? undefined : prevArgName.identifier, + transformer, + seenReturnStatement); } else { const innerRetStmts = getReturnStatementsWithPromiseHandlers(createReturn(funcBody)); const innerCbBody = getInnerTransformationBody(transformer, innerRetStmts, prevArgName); if (innerCbBody.length > 0) { - return createNodeArray(innerCbBody); + return innerCbBody; } if (!shouldReturn) { @@ -473,7 +477,7 @@ namespace ts.codefix { return transformedStatement; } else { - return createNodeArray([createReturn(getSynthesizedDeepClone(funcBody))]); + return [createReturn(getSynthesizedDeepClone(funcBody))]; } } } @@ -482,7 +486,7 @@ namespace ts.codefix { codeActionSucceeded = false; break; } - return createNodeArray([]); + return emptyArray; } function getLastCallSignature(type: Type, checker: TypeChecker): Signature | undefined { @@ -491,14 +495,19 @@ namespace ts.codefix { } - function removeReturns(stmts: NodeArray, prevArgName: Identifier, transformer: Transformer, seenReturnStatement: boolean): NodeArray { + function removeReturns(stmts: ReadonlyArray, prevArgName: Identifier | undefined, transformer: Transformer, seenReturnStatement: boolean): ReadonlyArray { const ret: Statement[] = []; for (const stmt of stmts) { if (isReturnStatement(stmt)) { if (stmt.expression) { const possiblyAwaitedExpression = isPromiseReturningExpression(stmt.expression, transformer.checker) ? createAwait(stmt.expression) : stmt.expression; - ret.push(createVariableStatement(/*modifiers*/ undefined, - (createVariableDeclarationList([createVariableDeclaration(prevArgName, /*type*/ undefined, possiblyAwaitedExpression)], getFlagOfIdentifier(prevArgName, transformer.constIdentifiers))))); + if (prevArgName === undefined) { + ret.push(createExpressionStatement(possiblyAwaitedExpression)); + } + else { + ret.push(createVariableStatement(/*modifiers*/ undefined, + (createVariableDeclarationList([createVariableDeclaration(prevArgName, /*type*/ undefined, possiblyAwaitedExpression)], getFlagOfIdentifier(prevArgName, transformer.constIdentifiers))))); + } } } else { @@ -507,20 +516,20 @@ namespace ts.codefix { } // if block has no return statement, need to define prevArgName as undefined to prevent undeclared variables - if (!seenReturnStatement) { + if (!seenReturnStatement && prevArgName !== undefined) { ret.push(createVariableStatement(/*modifiers*/ undefined, (createVariableDeclarationList([createVariableDeclaration(prevArgName, /*type*/ undefined, createIdentifier("undefined"))], getFlagOfIdentifier(prevArgName, transformer.constIdentifiers))))); } - return createNodeArray(ret); + return ret; } - function getInnerTransformationBody(transformer: Transformer, innerRetStmts: Node[], prevArgName?: SynthIdentifier) { + function getInnerTransformationBody(transformer: Transformer, innerRetStmts: ReadonlyArray, prevArgName?: SynthIdentifier) { let innerCbBody: Statement[] = []; for (const stmt of innerRetStmts) { - forEachChild(stmt, function visit(node: Node) { + forEachChild(stmt, function visit(node) { if (isCallExpression(node)) { const temp = transformExpression(node, transformer, node, prevArgName); innerCbBody = innerCbBody.concat(temp); diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts index f924208e321..ed8939079e3 100644 --- a/src/services/codefixes/inferFromUsage.ts +++ b/src/services/codefixes/inferFromUsage.ts @@ -196,7 +196,7 @@ namespace ts.codefix { function getReferences(token: PropertyName | Token, program: Program, cancellationToken: CancellationToken): ReadonlyArray { // Position shouldn't matter since token is not a SourceFile. return mapDefined(FindAllReferences.getReferenceEntriesForNode(-1, token, program, program.getSourceFiles(), cancellationToken), entry => - entry.type === "node" ? tryCast(entry.node, isIdentifier) : undefined); + entry.kind !== FindAllReferences.EntryKind.Span ? tryCast(entry.node, isIdentifier) : undefined); } function inferTypeForVariableFromUsage(token: Identifier, program: Program, cancellationToken: CancellationToken): Type | undefined { diff --git a/src/services/completions.ts b/src/services/completions.ts index 7744186126a..30331746d10 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -43,7 +43,7 @@ namespace ts.Completions { } const contextToken = findPrecedingToken(position, sourceFile); - if (triggerCharacter && (!contextToken || !isValidTrigger(sourceFile, triggerCharacter, contextToken, position))) return undefined; + if (triggerCharacter && !isValidTrigger(sourceFile, triggerCharacter, contextToken, position)) return undefined; if (isInString(sourceFile, position, contextToken)) { return !contextToken || !isStringLiteralLike(contextToken) @@ -1713,6 +1713,9 @@ namespace ts.Completions { break; case SyntaxKind.AsteriskToken: return isMethodDeclaration(parent) ? tryCast(parent.parent, isObjectLiteralExpression) : undefined; + case SyntaxKind.Identifier: + return (contextToken as Identifier).text === "async" && isShorthandPropertyAssignment(contextToken.parent) + ? contextToken.parent.parent : undefined; } } @@ -1928,7 +1931,6 @@ namespace ts.Completions { // Previous token may have been a keyword that was converted to an identifier. switch (keywordForNode(contextToken)) { case SyntaxKind.AbstractKeyword: - case SyntaxKind.AsyncKeyword: case SyntaxKind.ClassKeyword: case SyntaxKind.ConstKeyword: case SyntaxKind.DeclareKeyword: @@ -1943,6 +1945,8 @@ namespace ts.Completions { case SyntaxKind.VarKeyword: case SyntaxKind.YieldKeyword: return true; + case SyntaxKind.AsyncKeyword: + return isPropertyDeclaration(contextToken.parent); } return isDeclarationName(contextToken) @@ -2272,7 +2276,7 @@ namespace ts.Completions { return !!type.getStringIndexType() || !!type.getNumberIndexType(); } - function isValidTrigger(sourceFile: SourceFile, triggerCharacter: CompletionsTriggerCharacter, contextToken: Node, position: number): boolean { + function isValidTrigger(sourceFile: SourceFile, triggerCharacter: CompletionsTriggerCharacter, contextToken: Node | undefined, position: number): boolean { switch (triggerCharacter) { case ".": case "@": @@ -2281,14 +2285,14 @@ namespace ts.Completions { case "'": case "`": // Only automatically bring up completions if this is an opening quote. - return isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; + return !!contextToken && isStringLiteralOrTemplate(contextToken) && position === contextToken.getStart(sourceFile) + 1; case "<": // Opening JSX tag - return contextToken.kind === SyntaxKind.LessThanToken && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); + return !!contextToken && contextToken.kind === SyntaxKind.LessThanToken && (!isBinaryExpression(contextToken.parent) || binaryExpressionMayBeOpenTag(contextToken.parent)); case "/": - return isStringLiteralLike(contextToken) + return !!contextToken && (isStringLiteralLike(contextToken) ? !!tryGetImportFromModuleSpecifier(contextToken) - : contextToken.kind === SyntaxKind.SlashToken && isJsxClosingElement(contextToken.parent); + : contextToken.kind === SyntaxKind.SlashToken && isJsxClosingElement(contextToken.parent)); default: return Debug.assertNever(triggerCharacter); } diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index b857a05dffb..9fde734049c 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -13,19 +13,20 @@ namespace ts.FindAllReferences { | { readonly type: DefinitionKind.This; readonly node: Node } | { readonly type: DefinitionKind.String; readonly node: StringLiteral }; + export const enum EntryKind { Span, Node, StringLiteral, SearchedLocalFoundProperty, SearchedPropertyFoundLocal } + export type NodeEntryKind = EntryKind.Node | EntryKind.StringLiteral | EntryKind.SearchedLocalFoundProperty | EntryKind.SearchedPropertyFoundLocal; export type Entry = NodeEntry | SpanEntry; export interface NodeEntry { - type: "node"; - node: Node; - isInString?: true; + readonly kind: NodeEntryKind; + readonly node: Node; } export interface SpanEntry { - type: "span"; - fileName: string; - textSpan: TextSpan; + readonly kind: EntryKind.Span; + readonly fileName: string; + readonly textSpan: TextSpan; } - export function nodeEntry(node: Node, isInString?: true): NodeEntry { - return { type: "node", node: (node as NamedDeclaration).name || node, isInString }; + export function nodeEntry(node: Node, kind: NodeEntryKind = EntryKind.Node): NodeEntry { + return { kind, node: (node as NamedDeclaration).name || node }; } export interface Options { @@ -33,7 +34,7 @@ namespace ts.FindAllReferences { readonly findInComments?: boolean; /** * True if we are renaming the symbol. - * If so, we will find fewer references -- if it is referenced by several different names, we sill only find references for the original name. + * If so, we will find fewer references -- if it is referenced by several different names, we still only find references for the original name. */ readonly isForRename?: boolean; /** True if we are searching for implementations. We will have a different method of adding references if so. */ @@ -84,10 +85,15 @@ namespace ts.FindAllReferences { } } - export function findReferencedEntries(program: Program, cancellationToken: CancellationToken, sourceFiles: ReadonlyArray, node: Node, position: number, options: Options | undefined): ReferenceEntry[] | undefined { - return map(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options)), toReferenceEntry); + export function findReferenceOrRenameEntries( + program: Program, cancellationToken: CancellationToken, sourceFiles: ReadonlyArray, node: Node, position: number, options: Options | undefined, + convertEntry: ToReferenceOrRenameEntry, + ): T[] | undefined { + return map(flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options)), entry => convertEntry(entry, node)); } + export type ToReferenceOrRenameEntry = (entry: Entry, originalNode: Node) => T; + export function getReferenceEntriesForNode(position: number, node: Node, program: Program, sourceFiles: ReadonlyArray, cancellationToken: CancellationToken, options: Options = {}, sourceFilesSet: ReadonlyMap = arrayToSet(sourceFiles, f => f.fileName)): Entry[] | undefined { return flattenEntries(Core.getReferencedSymbolsForNode(position, node, program, sourceFiles, cancellationToken, options, sourceFilesSet)); } @@ -143,26 +149,64 @@ namespace ts.FindAllReferences { return { displayParts, kind: symbolKind }; } - function toReferenceEntry(entry: Entry): ReferenceEntry { - if (entry.type === "span") { - return { textSpan: entry.textSpan, fileName: entry.fileName, isWriteAccess: false, isDefinition: false }; - } + export function toRenameLocation(entry: Entry, originalNode: Node): RenameLocation { + return { ...entryToDocumentSpan(entry), ...getPrefixAndSuffixText(entry, originalNode) }; + } - const { node, isInString } = entry; - const sourceFile = node.getSourceFile(); + export function toReferenceEntry(entry: Entry): ReferenceEntry { + const { textSpan, fileName } = entryToDocumentSpan(entry); + if (entry.kind === EntryKind.Span) { + return { textSpan, fileName, isWriteAccess: false, isDefinition: false }; + } + const { kind, node } = entry; return { - fileName: sourceFile.fileName, - textSpan: getTextSpan(node, sourceFile), + textSpan, + fileName, isWriteAccess: isWriteAccessForReference(node), isDefinition: node.kind === SyntaxKind.DefaultKeyword || !!getDeclarationFromName(node) || isLiteralComputedPropertyDeclarationName(node), - isInString, + isInString: kind === EntryKind.StringLiteral ? true : undefined, }; } + function entryToDocumentSpan(entry: Entry): DocumentSpan { + if (entry.kind === EntryKind.Span) { + return { textSpan: entry.textSpan, fileName: entry.fileName }; + } + else { + const sourceFile = entry.node.getSourceFile(); + return { textSpan: getTextSpan(entry.node, sourceFile), fileName: sourceFile.fileName }; + } + } + + function getPrefixAndSuffixText(entry: Entry, originalNode: Node): { readonly prefixText?: string, readonly suffixText?: string } { + if (entry.kind !== EntryKind.Span && isIdentifier(originalNode)) { + const { node, kind } = entry; + const name = originalNode.text; + const isShorthandAssignment = isShorthandPropertyAssignment(node.parent); + if (isShorthandAssignment || isObjectBindingElementWithoutPropertyName(node.parent)) { + if (kind === EntryKind.SearchedLocalFoundProperty) { + return { prefixText: name + ": " }; + } + else if (kind === EntryKind.SearchedPropertyFoundLocal) { + return { suffixText: ": " + name }; + } + else { + return isShorthandAssignment + // In `const o = { x }; o.x`, symbolAtLocation at `x` in `{ x }` is the property symbol. + ? { suffixText: ": " + name } + // For a binding element `const { x } = o;`, symbolAtLocation at `x` is the property symbol. + : { prefixText: name + ": " }; + } + } + } + + return emptyOptions; + } + function toImplementationLocation(entry: Entry, checker: TypeChecker): ImplementationLocation { - if (entry.type === "node") { + if (entry.kind !== EntryKind.Span) { const { node } = entry; const sourceFile = node.getSourceFile(); return { textSpan: getTextSpan(node, sourceFile), fileName: sourceFile.fileName, ...implementationKindDisplayParts(node, checker) }; @@ -196,18 +240,18 @@ namespace ts.FindAllReferences { } export function toHighlightSpan(entry: Entry): { fileName: string, span: HighlightSpan } { - if (entry.type === "span") { + if (entry.kind === EntryKind.Span) { const { fileName, textSpan } = entry; return { fileName, span: { textSpan, kind: HighlightSpanKind.reference } }; } - const { node, isInString } = entry; + const { node, kind } = entry; const sourceFile = node.getSourceFile(); const writeAccess = isWriteAccessForReference(node); const span: HighlightSpan = { textSpan: getTextSpan(node, sourceFile), kind: writeAccess ? HighlightSpanKind.writtenReference : HighlightSpanKind.reference, - isInString + isInString: kind === EntryKind.StringLiteral ? true : undefined, }; return { fileName: sourceFile.fileName, span }; } @@ -348,11 +392,11 @@ namespace ts.FindAllReferences.Core { } } // import("foo") with no qualifier will reference the `export =` of the module, which may be referenced anyway. - return { type: "node", node: reference.literal }; + return nodeEntry(reference.literal); } else { return { - type: "span", + kind: EntryKind.Span, fileName: reference.referencingFile.fileName, textSpan: createTextSpanFromRange(reference.ref), }; @@ -366,7 +410,7 @@ namespace ts.FindAllReferences.Core { break; case SyntaxKind.ModuleDeclaration: if (sourceFilesSet.has(decl.getSourceFile().fileName)) { - references.push({ type: "node", node: (decl as ModuleDeclaration).name }); + references.push(nodeEntry((decl as ModuleDeclaration).name)); } break; default: @@ -422,7 +466,7 @@ namespace ts.FindAllReferences.Core { searchForImportsOfExport(node, symbol, { exportingModuleSymbol: Debug.assertDefined(symbol.parent, "Expected export symbol to have a parent"), exportKind: ExportKind.Default }, state); } else { - const search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.implementations) : [symbol] }); + const search = state.createSearch(node, symbol, /*comingFrom*/ undefined, { allSearchSymbols: node ? populateSearchSymbolSet(symbol, node, checker, !!options.isForRename, !!options.implementations) : [symbol] }); // Try to get the smallest valid scope that we can limit our search to; // otherwise we'll need to search globally (i.e. include each file). @@ -581,21 +625,21 @@ namespace ts.FindAllReferences.Core { * Callback to add references for a particular searched symbol. * This initializes a reference group, so only call this if you will add at least one reference. */ - referenceAdder(searchSymbol: Symbol): (node: Node) => void { + referenceAdder(searchSymbol: Symbol): (node: Node, kind?: NodeEntryKind) => void { const symbolId = getSymbolId(searchSymbol); let references = this.symbolIdToReferences[symbolId]; if (!references) { references = this.symbolIdToReferences[symbolId] = []; this.result.push({ definition: { type: DefinitionKind.Symbol, symbol: searchSymbol }, references }); } - return node => references.push(nodeEntry(node)); + return (node, kind) => references.push(nodeEntry(node, kind)); } /** Add a reference with no associated definition. */ addStringOrCommentReference(fileName: string, textSpan: TextSpan): void { this.result.push({ definition: undefined, - references: [{ type: "span", fileName, textSpan }] + references: [{ kind: EntryKind.Span, fileName, textSpan }] }); } @@ -707,21 +751,6 @@ namespace ts.FindAllReferences.Core { : undefined; } - function getObjectBindingElementWithoutPropertyName(symbol: Symbol): BindingElement & { name: Identifier } | undefined { - const bindingElement = getDeclarationOfKind(symbol, SyntaxKind.BindingElement); - if (bindingElement && - bindingElement.parent.kind === SyntaxKind.ObjectBindingPattern && - isIdentifier(bindingElement.name) && - !bindingElement.propertyName) { - return bindingElement as BindingElement & { name: Identifier }; - } - } - - function getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol: Symbol, checker: TypeChecker): Symbol | undefined { - const bindingElement = getObjectBindingElementWithoutPropertyName(symbol); - return bindingElement && getPropertySymbolFromBindingElement(checker, bindingElement); - } - /** * Determines the smallest scope in which a symbol may have named references. * Note that not every construct has been accounted for. This function can @@ -754,7 +783,7 @@ namespace ts.FindAllReferences.Core { // If symbol is of object binding pattern element without property name we would want to // look for property too and that could be anywhere - if (getObjectBindingElementWithoutPropertyName(symbol)) { + if (declarations.some(isObjectBindingElementWithoutPropertyName)) { return undefined; } @@ -1099,13 +1128,14 @@ namespace ts.FindAllReferences.Core { } } - function addReference(referenceLocation: Node, relatedSymbol: Symbol, state: State): void { - const addRef = state.referenceAdder(relatedSymbol); + function addReference(referenceLocation: Node, relatedSymbol: Symbol | RelatedSymbol, state: State): void { + const { kind, symbol } = "kind" in relatedSymbol ? relatedSymbol : { kind: undefined, symbol: relatedSymbol }; + const addRef = state.referenceAdder(symbol); if (state.options.implementations) { addImplementationReferences(referenceLocation, addRef, state); } else { - addRef(referenceLocation); + addRef(referenceLocation, kind); } } @@ -1428,7 +1458,7 @@ namespace ts.FindAllReferences.Core { const references = flatMap(sourceFiles, sourceFile => { cancellationToken.throwIfCancellationRequested(); return mapDefined(getPossibleSymbolReferenceNodes(sourceFile, node.text), ref => - isStringLiteral(ref) && ref.text === node.text ? nodeEntry(ref, /*isInString*/ true) : undefined); + isStringLiteral(ref) && ref.text === node.text ? nodeEntry(ref, EntryKind.StringLiteral) : undefined); }); return [{ @@ -1439,35 +1469,21 @@ namespace ts.FindAllReferences.Core { // For certain symbol kinds, we need to include other symbols in the search set. // This is not needed when searching for re-exports. - function populateSearchSymbolSet(symbol: Symbol, location: Node, checker: TypeChecker, implementations: boolean): Symbol[] { + function populateSearchSymbolSet(symbol: Symbol, location: Node, checker: TypeChecker, isForRename: boolean, implementations: boolean): Symbol[] { const result: Symbol[] = []; - forEachRelatedSymbol(symbol, location, checker, + forEachRelatedSymbol(symbol, location, checker, isForRename, (sym, root, base) => { result.push(base || root || sym); }, /*allowBaseTypes*/ () => !implementations); return result; } function forEachRelatedSymbol( - symbol: Symbol, location: Node, checker: TypeChecker, - cbSymbol: (symbol: Symbol, rootSymbol?: Symbol, baseSymbol?: Symbol) => T | undefined, + symbol: Symbol, location: Node, checker: TypeChecker, isForRenamePopulateSearchSymbolSet: boolean, + cbSymbol: (symbol: Symbol, rootSymbol?: Symbol, baseSymbol?: Symbol, kind?: NodeEntryKind) => T | undefined, allowBaseTypes: (rootSymbol: Symbol) => boolean, ): T | undefined { const containingObjectLiteralElement = getContainingObjectLiteralElement(location); if (containingObjectLiteralElement) { - // If the location is in a context sensitive location (i.e. in an object literal) try - // to get a contextual type for it, and add the property symbol from the contextual - // type to the search set - const contextualType = checker.getContextualType(containingObjectLiteralElement.parent); - const res = contextualType && firstDefined(getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker, contextualType, /*unionSymbolOk*/ true), fromRoot); - if (res) return res; - - // If the location is name of property symbol from object literal destructuring pattern - // Search the property symbol - // for ( { property: p2 } of elems) { } - const propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); - const res1 = propertySymbol && cbSymbol(propertySymbol); - if (res1) return res1; - /* Because in short-hand property assignment, location has two meaning : property name and as value of the property * When we do findAllReference at the position of the short-hand property assignment, we would want to have references to position of * property name and variable declaration of the identifier. @@ -1479,8 +1495,29 @@ namespace ts.FindAllReferences.Core { * so that when matching with potential reference symbol, both symbols from property declaration and variable declaration * will be included correctly. */ - const shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent); - const res2 = shorthandValueSymbol && cbSymbol(shorthandValueSymbol); + const shorthandValueSymbol = checker.getShorthandAssignmentValueSymbol(location.parent); // gets the local symbol + if (shorthandValueSymbol && isForRenamePopulateSearchSymbolSet) { + // When renaming 'x' in `const o = { x }`, just rename the local variable, not the property. + return cbSymbol(shorthandValueSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, EntryKind.SearchedLocalFoundProperty); + } + + // If the location is in a context sensitive location (i.e. in an object literal) try + // to get a contextual type for it, and add the property symbol from the contextual + // type to the search set + const contextualType = checker.getContextualType(containingObjectLiteralElement.parent); + const res = contextualType && firstDefined( + getPropertySymbolsFromContextualType(containingObjectLiteralElement, checker, contextualType, /*unionSymbolOk*/ true), + sym => fromRoot(sym, EntryKind.SearchedPropertyFoundLocal)); + if (res) return res; + + // If the location is name of property symbol from object literal destructuring pattern + // Search the property symbol + // for ( { property: p2 } of elems) { } + const propertySymbol = getPropertySymbolOfDestructuringAssignment(location, checker); + const res1 = propertySymbol && cbSymbol(propertySymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, EntryKind.SearchedPropertyFoundLocal); + if (res1) return res1; + + const res2 = shorthandValueSymbol && cbSymbol(shorthandValueSymbol, /*rootSymbol*/ undefined, /*baseSymbol*/ undefined, EntryKind.SearchedLocalFoundProperty); if (res2) return res2; } @@ -1494,12 +1531,14 @@ namespace ts.FindAllReferences.Core { return fromRoot(symbol.flags & SymbolFlags.FunctionScopedVariable ? paramProps[1] : paramProps[0]); } - // If this is symbol of binding element without propertyName declaration in Object binding pattern - // Include the property in the search - const bindingElementPropertySymbol = getPropertySymbolOfObjectBindingPatternWithoutPropertyName(symbol, checker); - return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol); + // symbolAtLocation for a binding element is the local symbol. See if the search symbol is the property. + // Don't do this when populating search set for a rename -- just rename the local. + if (!isForRenamePopulateSearchSymbolSet) { + const bindingElementPropertySymbol = isObjectBindingElementWithoutPropertyName(location.parent) ? getPropertySymbolFromBindingElement(checker, location.parent) : undefined; + return bindingElementPropertySymbol && fromRoot(bindingElementPropertySymbol, EntryKind.SearchedPropertyFoundLocal); + } - function fromRoot(sym: Symbol): T | undefined { + function fromRoot(sym: Symbol, kind?: NodeEntryKind): T | undefined { // If this is a union property: // - In populateSearchSymbolsSet we will add all the symbols from all its source symbols in all unioned types. // - In findRelatedSymbol, we will just use the union symbol if any source symbol is included in the search. @@ -1507,20 +1546,24 @@ namespace ts.FindAllReferences.Core { // - In populateSearchSymbolsSet, add the root the list // - In findRelatedSymbol, return the source symbol if that is in the search. (Do not return the instantiation symbol.) return firstDefined(checker.getRootSymbols(sym), rootSymbol => - cbSymbol(sym, rootSymbol) + cbSymbol(sym, rootSymbol, /*baseSymbol*/ undefined, kind) // Add symbol of properties/methods of the same name in base classes and implemented interfaces definitions || (rootSymbol.parent && rootSymbol.parent.flags & (SymbolFlags.Class | SymbolFlags.Interface) && allowBaseTypes(rootSymbol) - ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, base => cbSymbol(sym, rootSymbol, base)) + ? getPropertySymbolsFromBaseTypes(rootSymbol.parent, rootSymbol.name, checker, base => cbSymbol(sym, rootSymbol, base, kind)) : undefined)); } } - function getRelatedSymbol(search: Search, referenceSymbol: Symbol, referenceLocation: Node, state: State): Symbol | undefined { + interface RelatedSymbol { + readonly symbol: Symbol; + readonly kind: NodeEntryKind | undefined; + } + function getRelatedSymbol(search: Search, referenceSymbol: Symbol, referenceLocation: Node, state: State): RelatedSymbol | undefined { const { checker } = state; - return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, - (sym, rootSymbol, baseSymbol) => search.includes(baseSymbol || rootSymbol || sym) + return forEachRelatedSymbol(referenceSymbol, referenceLocation, checker, /*isForRenamePopulateSearchSymbolSet*/ false, + (sym, rootSymbol, baseSymbol, kind): RelatedSymbol | undefined => search.includes(baseSymbol || rootSymbol || sym) // For a base type, use the symbol for the derived type. For a synthetic (e.g. union) property, use the union symbol. - ? rootSymbol && !(getCheckFlags(sym) & CheckFlags.Synthetic) ? rootSymbol : sym + ? { symbol: rootSymbol && !(getCheckFlags(sym) & CheckFlags.Synthetic) ? rootSymbol : sym, kind } : undefined, /*allowBaseTypes*/ rootSymbol => !(search.parents && !search.parents.some(parent => explicitlyInheritsFrom(rootSymbol.parent!, parent, state.inheritsFromCache, checker)))); diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index ab7c4327bb5..03d2aec13c5 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -631,28 +631,50 @@ namespace ts.NavigationBar { } function getFunctionOrClassName(node: FunctionExpression | FunctionDeclaration | ArrowFunction | ClassLikeDeclaration): string { + const { parent } = node; if (node.name && getFullWidth(node.name) > 0) { return declarationNameToString(node.name); } // See if it is a var initializer. If so, use the var name. - else if (node.parent.kind === SyntaxKind.VariableDeclaration) { - return declarationNameToString((node.parent as VariableDeclaration).name); + else if (isVariableDeclaration(parent)) { + return declarationNameToString(parent.name); } // See if it is of the form " = function(){...}". If so, use the text from the left-hand side. - else if (node.parent.kind === SyntaxKind.BinaryExpression && - (node.parent as BinaryExpression).operatorToken.kind === SyntaxKind.EqualsToken) { - return nodeText((node.parent as BinaryExpression).left).replace(whiteSpaceRegex, ""); + else if (isBinaryExpression(parent) && parent.operatorToken.kind === SyntaxKind.EqualsToken) { + return nodeText(parent.left).replace(whiteSpaceRegex, ""); } // See if it is a property assignment, and if so use the property name - else if (node.parent.kind === SyntaxKind.PropertyAssignment && (node.parent as PropertyAssignment).name) { - return nodeText((node.parent as PropertyAssignment).name); + else if (isPropertyAssignment(parent)) { + return nodeText(parent.name); } // Default exports are named "default" else if (getModifierFlags(node) & ModifierFlags.Default) { return "default"; } + else if (isClassLike(node)) { + return ""; + } + else if (isCallExpression(parent)) { + const name = getCalledExpressionName(parent.expression); + if (name !== undefined) { + const args = mapDefined(parent.arguments, a => isStringLiteral(a) ? a.getText(curSourceFile) : undefined).join(", "); + return `${name}(${args}) callback`; + } + } + return ""; + } + + function getCalledExpressionName(expr: Expression): string | undefined { + if (isIdentifier(expr)) { + return expr.text; + } + else if (isPropertyAccessExpression(expr)) { + const left = getCalledExpressionName(expr.expression); + const right = expr.name.text; + return left === undefined ? right : `${left}.${right}`; + } else { - return isClassLike(node) ? "" : ""; + return undefined; } } diff --git a/src/services/refactors/generateGetAccessorAndSetAccessor.ts b/src/services/refactors/generateGetAccessorAndSetAccessor.ts index 57b25445f5d..96b8b1e8b06 100644 --- a/src/services/refactors/generateGetAccessorAndSetAccessor.ts +++ b/src/services/refactors/generateGetAccessorAndSetAccessor.ts @@ -226,7 +226,7 @@ namespace ts.refactor.generateGetAccessorAndSetAccessor { const { file, program, cancellationToken } = context; const referenceEntries = mapDefined(FindAllReferences.getReferenceEntriesForNode(originalName.parent.pos, originalName, program, [file], cancellationToken!), entry => // TODO: GH#18217 - (entry.type === "node" && rangeContainsRange(constructor, entry.node) && isIdentifier(entry.node) && isWriteAccess(entry.node)) ? entry.node : undefined); + (entry.kind !== FindAllReferences.EntryKind.Span && rangeContainsRange(constructor, entry.node) && isIdentifier(entry.node) && isWriteAccess(entry.node)) ? entry.node : undefined); forEach(referenceEntries, entry => { const parent = entry.parent; diff --git a/src/services/refactors/moveToNewFile.ts b/src/services/refactors/moveToNewFile.ts index 8b6af714892..693cdd9c6cb 100644 --- a/src/services/refactors/moveToNewFile.ts +++ b/src/services/refactors/moveToNewFile.ts @@ -158,7 +158,7 @@ namespace ts.refactor { const shouldMove = (name: Identifier): boolean => { const symbol = isBindingElement(name.parent) - ? getPropertySymbolFromBindingElement(checker, name.parent as BindingElement & { name: Identifier }) + ? getPropertySymbolFromBindingElement(checker, name.parent as ObjectBindingElementWithoutPropertyName) : skipAlias(checker.getSymbolAtLocation(name)!, checker); // TODO: GH#18217 return !!symbol && movedSymbols.has(symbol); }; diff --git a/src/services/rename.ts b/src/services/rename.ts index d7f23347cb4..7ba32c91309 100644 --- a/src/services/rename.ts +++ b/src/services/rename.ts @@ -56,37 +56,26 @@ namespace ts.Rename { fileToRename: name, kind, displayName: name, - localizedErrorMessage: undefined, fullDisplayName: name, kindModifiers: ScriptElementKindModifier.none, triggerSpan, }; } - function getRenameInfoSuccess(displayName: string, fullDisplayName: string, kind: ScriptElementKind, kindModifiers: string, node: Node, sourceFile: SourceFile): RenameInfo { + function getRenameInfoSuccess(displayName: string, fullDisplayName: string, kind: ScriptElementKind, kindModifiers: string, node: Node, sourceFile: SourceFile): RenameInfoSuccess { return { canRename: true, fileToRename: undefined, kind, displayName, - localizedErrorMessage: undefined, fullDisplayName, kindModifiers, triggerSpan: createTriggerSpanForNode(node, sourceFile) }; } - function getRenameInfoError(diagnostic: DiagnosticMessage): RenameInfo { - // TODO: GH#18217 - return { - canRename: false, - localizedErrorMessage: getLocaleSpecificMessage(diagnostic), - displayName: undefined!, - fullDisplayName: undefined!, - kind: undefined!, - kindModifiers: undefined!, - triggerSpan: undefined! - }; + function getRenameInfoError(diagnostic: DiagnosticMessage): RenameInfoFailure { + return { canRename: false, localizedErrorMessage: getLocaleSpecificMessage(diagnostic) }; } function createTriggerSpanForNode(node: Node, sourceFile: SourceFile) { diff --git a/src/services/services.ts b/src/services/services.ts index 5a035a92bcd..9e08f1b14a6 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -541,6 +541,7 @@ namespace ts { public fileName: string; public path: Path; public resolvedPath: Path; + public originalFileName: string; public text: string; public scriptSnapshot: IScriptSnapshot; public lineMap: ReadonlyArray; @@ -1382,7 +1383,7 @@ namespace ts { // Therefore only get diagnostics for given file. const semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken); - if (!program.getCompilerOptions().declaration) { + if (!getEmitDeclarations(program.getCompilerOptions())) { return semanticDiagnostics.slice(); } @@ -1543,20 +1544,20 @@ namespace ts { const node = getTouchingPropertyName(sourceFile, position); if (isIdentifier(node) && isJsxOpeningElement(node.parent) || isJsxClosingElement(node.parent)) { const { openingElement, closingElement } = node.parent.parent; - return [openingElement, closingElement].map((node): RenameLocation => ({ fileName: sourceFile.fileName, textSpan: createTextSpanFromNode(node.tagName, sourceFile) })); + return [openingElement, closingElement].map((node): RenameLocation => + ({ fileName: sourceFile.fileName, textSpan: createTextSpanFromNode(node.tagName, sourceFile) })); } else { - const refs = getReferences(node, position, { findInStrings, findInComments, isForRename: true }); - return refs && refs.map(({ fileName, textSpan }): RenameLocation => ({ fileName, textSpan })); + return getReferencesWorker(node, position, { findInStrings, findInComments, isForRename: true }, FindAllReferences.toRenameLocation); } } function getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[] | undefined { synchronizeHostData(); - return getReferences(getTouchingPropertyName(getValidSourceFile(fileName), position), position); + return getReferencesWorker(getTouchingPropertyName(getValidSourceFile(fileName), position), position, {}, FindAllReferences.toReferenceEntry); } - function getReferences(node: Node, position: number, options?: FindAllReferences.Options): ReferenceEntry[] | undefined { + function getReferencesWorker(node: Node, position: number, options: FindAllReferences.Options, cb: FindAllReferences.ToReferenceOrRenameEntry): T[] | undefined { synchronizeHostData(); // Exclude default library when renaming as commonly user don't want to change that file. @@ -1564,7 +1565,7 @@ namespace ts { ? program.getSourceFiles().filter(sourceFile => !program.isSourceFileDefaultLibrary(sourceFile)) : program.getSourceFiles(); - return FindAllReferences.findReferencedEntries(program, cancellationToken, sourceFiles, node, position, options); + return FindAllReferences.findReferenceOrRenameEntries(program, cancellationToken, sourceFiles, node, position, options, cb); } function findReferences(fileName: string, position: number): ReferencedSymbol[] | undefined { diff --git a/src/services/transpile.ts b/src/services/transpile.ts index 70ca5b64314..030d2273b62 100644 --- a/src/services/transpile.ts +++ b/src/services/transpile.ts @@ -48,6 +48,7 @@ namespace ts { options.paths = undefined; options.rootDirs = undefined; options.declaration = undefined; + options.composite = undefined; options.declarationDir = undefined; options.out = undefined; options.outFile = undefined; diff --git a/src/services/types.ts b/src/services/types.ts index dbf79cea783..011c98f9da6 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -619,6 +619,8 @@ namespace ts { } export interface RenameLocation extends DocumentSpan { + readonly prefixText?: string; + readonly suffixText?: string; } export interface ReferenceEntry extends DocumentSpan { @@ -819,20 +821,24 @@ namespace ts { tags?: JSDocTagInfo[]; } - export interface RenameInfo { - canRename: boolean; + export type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + export interface RenameInfoSuccess { + canRename: true; /** * File or directory to rename. * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. */ fileToRename?: string; - localizedErrorMessage?: string; displayName: string; fullDisplayName: string; kind: ScriptElementKind; kindModifiers: string; triggerSpan: TextSpan; } + export interface RenameInfoFailure { + canRename: false; + localizedErrorMessage: string; + } export interface SignatureHelpParameter { name: string; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index a2eb2f0270c..427c31e5384 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -1325,7 +1325,16 @@ namespace ts { }); } - export function getPropertySymbolFromBindingElement(checker: TypeChecker, bindingElement: BindingElement & { name: Identifier }) { + export type ObjectBindingElementWithoutPropertyName = BindingElement & { name: Identifier }; + + export function isObjectBindingElementWithoutPropertyName(bindingElement: Node): bindingElement is ObjectBindingElementWithoutPropertyName { + return isBindingElement(bindingElement) && + isObjectBindingPattern(bindingElement.parent) && + isIdentifier(bindingElement.name) && + !bindingElement.propertyName; + } + + export function getPropertySymbolFromBindingElement(checker: TypeChecker, bindingElement: ObjectBindingElementWithoutPropertyName) { const typeOfPattern = checker.getTypeAtLocation(bindingElement.parent); const propSymbol = typeOfPattern && checker.getPropertyOfType(typeOfPattern, bindingElement.name.text); if (propSymbol && propSymbol.flags & SymbolFlags.Accessor) { diff --git a/src/testRunner/runner.ts b/src/testRunner/runner.ts index 6e430b08734..e528678ab83 100644 --- a/src/testRunner/runner.ts +++ b/src/testRunner/runner.ts @@ -138,7 +138,6 @@ function handleTestConfig() { case "compiler": runners.push(new CompilerBaselineRunner(CompilerTestType.Conformance)); runners.push(new CompilerBaselineRunner(CompilerTestType.Regressions)); - runners.push(new project.ProjectRunner()); break; case "conformance": runners.push(new CompilerBaselineRunner(CompilerTestType.Conformance)); diff --git a/src/testRunner/unittests/configurationExtension.ts b/src/testRunner/unittests/configurationExtension.ts index b9567b3b54d..fbb4950b9a5 100644 --- a/src/testRunner/unittests/configurationExtension.ts +++ b/src/testRunner/unittests/configurationExtension.ts @@ -96,6 +96,11 @@ namespace ts { include: null, files: ["../main.ts"] }), + "dev/configs/fifth.json": JSON.stringify({ + extends: "./fourth", + include: ["../tests/utils.ts"], + files: [] + }), "dev/extends.json": JSON.stringify({ extends: 42 }), "dev/extends2.json": JSON.stringify({ extends: "configs/base" }), "dev/main.ts": "", @@ -245,6 +250,15 @@ namespace ts { combinePaths(basePath, "main.ts") ]); + testSuccess("can overwrite top-level files using extended []", "configs/fifth.json", { + allowJs: true, + noImplicitAny: true, + strictNullChecks: true, + module: ModuleKind.System + }, [ + combinePaths(basePath, "tests/utils.ts") + ]); + it("adds extendedSourceFiles only once", () => { const sourceFile = readJsonConfigFile("configs/fourth.json", (path) => host.readFile(path)); const dir = combinePaths(basePath, "configs"); diff --git a/src/testRunner/unittests/convertCompilerOptionsFromJson.ts b/src/testRunner/unittests/convertCompilerOptionsFromJson.ts index 3b422e9a645..6140ab72eee 100644 --- a/src/testRunner/unittests/convertCompilerOptionsFromJson.ts +++ b/src/testRunner/unittests/convertCompilerOptionsFromJson.ts @@ -1,33 +1,50 @@ namespace ts { describe("convertCompilerOptionsFromJson", () => { - function assertCompilerOptions(json: any, configFileName: string, expectedResult: { compilerOptions: CompilerOptions, errors: Diagnostic[] }) { + const formatDiagnosticHost: FormatDiagnosticsHost = { + getCurrentDirectory: () => "/apath/", + getCanonicalFileName: createGetCanonicalFileName(/*useCaseSensitiveFileNames*/ true), + getNewLine: () => "\n" + }; + + interface ExpectedResultWithParsingSuccess { + compilerOptions: CompilerOptions; + errors: ReadonlyArray; + } + + interface ExpectedResultWithParsingFailure { + compilerOptions: CompilerOptions; + hasParseErrors: true; + } + + type ExpectedResult = ExpectedResultWithParsingSuccess | ExpectedResultWithParsingFailure; + + function isExpectedResultWithParsingFailure(expectedResult: ExpectedResult): expectedResult is ExpectedResultWithParsingFailure { + return !!(expectedResult as ExpectedResultWithParsingFailure).hasParseErrors; + } + + function assertCompilerOptions(json: any, configFileName: string, expectedResult: ExpectedResultWithParsingSuccess) { assertCompilerOptionsWithJson(json, configFileName, expectedResult); assertCompilerOptionsWithJsonNode(json, configFileName, expectedResult); } - function assertCompilerOptionsWithJson(json: any, configFileName: string, expectedResult: { compilerOptions: CompilerOptions, errors: Diagnostic[] }) { - const { options: actualCompilerOptions, errors: actualErrors} = convertCompilerOptionsFromJson(json.compilerOptions, "/apath/", configFileName); + function assertCompilerOptionsWithJson(json: any, configFileName: string, expectedResult: ExpectedResultWithParsingSuccess) { + const { options: actualCompilerOptions, errors: actualErrors } = convertCompilerOptionsFromJson(json.compilerOptions, "/apath/", configFileName); const parsedCompilerOptions = JSON.stringify(actualCompilerOptions); const expectedCompilerOptions = JSON.stringify({ ...expectedResult.compilerOptions, configFilePath: configFileName }); assert.equal(parsedCompilerOptions, expectedCompilerOptions); - const expectedErrors = expectedResult.errors; - assert.isTrue(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`); - for (let i = 0; i < actualErrors.length; i++) { - const actualError = actualErrors[i]; - const expectedError = expectedErrors[i]; - assert.equal(actualError.code, expectedError.code); - assert.equal(actualError.category, expectedError.category); - assert.equal(actualError.messageText, expectedError.messageText); - } + verifyErrors(actualErrors, expectedResult.errors, /*ignoreLocation*/ true); } - function assertCompilerOptionsWithJsonNode(json: any, configFileName: string, expectedResult: { compilerOptions: CompilerOptions, errors: Diagnostic[] }) { - const fileText = JSON.stringify(json); + function assertCompilerOptionsWithJsonNode(json: any, configFileName: string, expectedResult: ExpectedResultWithParsingSuccess) { + assertCompilerOptionsWithJsonText(JSON.stringify(json), configFileName, expectedResult); + } + + function assertCompilerOptionsWithJsonText(fileText: string, configFileName: string, expectedResult: ExpectedResult) { const result = parseJsonText(configFileName, fileText); - assert(!result.parseDiagnostics.length); assert(!!result.endOfFileToken); + assert.equal(!!result.parseDiagnostics.length, isExpectedResultWithParsingFailure(expectedResult)); const host: ParseConfigHost = new fakes.ParseConfigHost(new vfs.FileSystem(/*ignoreCase*/ false, { cwd: "/apath/" })); const { options: actualCompilerOptions, errors: actualParseErrors } = parseJsonSourceFileConfigFileContent(result, host, "/apath/", /*existingOptions*/ undefined, configFileName); expectedResult.compilerOptions.configFilePath = configFileName; @@ -37,17 +54,32 @@ namespace ts { assert.equal(parsedCompilerOptions, expectedCompilerOptions); assert.equal(actualCompilerOptions.configFile, result); - const actualErrors = filter(actualParseErrors, error => error.code !== Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code); - const expectedErrors = expectedResult.errors; - assert.isTrue(expectedResult.errors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedResult.errors)}. Actual error: ${JSON.stringify(actualErrors)}.`); + if (!isExpectedResultWithParsingFailure(expectedResult)) { + verifyErrors(actualParseErrors.filter(error => error.code !== Diagnostics.No_inputs_were_found_in_config_file_0_Specified_include_paths_were_1_and_exclude_paths_were_2.code), expectedResult.errors); + } + } + + function verifyErrors(actualErrors: Diagnostic[], expectedErrors: ReadonlyArray, ignoreLocation?: boolean) { + assert.isTrue(expectedErrors.length === actualErrors.length, `Expected error: ${JSON.stringify(expectedErrors.map(getDiagnosticString), undefined, " ")}. Actual error: ${JSON.stringify(actualErrors.map(getDiagnosticString), undefined, " ")}.`); for (let i = 0; i < actualErrors.length; i++) { const actualError = actualErrors[i]; const expectedError = expectedErrors[i]; + assert.equal(actualError.code, expectedError.code, `Expected error-code: ${JSON.stringify(expectedError.code)}. Actual error-code: ${JSON.stringify(actualError.code)}.`); assert.equal(actualError.category, expectedError.category, `Expected error-category: ${JSON.stringify(expectedError.category)}. Actual error-category: ${JSON.stringify(actualError.category)}.`); - assert(actualError.file); - assert(actualError.start); - assert(actualError.length); + if (!ignoreLocation) { + assert(actualError.file); + assert(actualError.start); + assert(actualError.length); + } + } + + function getDiagnosticString(diagnostic: Diagnostic) { + if (ignoreLocation) { + const { file, ...rest } = diagnostic; + diagnostic = { file: undefined, ...rest }; + } + return formatDiagnostic(diagnostic, formatDiagnosticHost); } } @@ -539,5 +571,37 @@ namespace ts { } ); }); + + it("Convert tsconfig options when there are multiple invalid strings", () => { + assertCompilerOptionsWithJsonText(`{ + "compilerOptions": { + "target": "<%- options.useTsWithBabel ? 'esnext' : 'es5' %>", + "module": "esnext", + <%_ if (options.classComponent) { _%> + "experimentalDecorators": true, + <%_ } _%> + "sourceMap": true, + "types": [ + "webpack-env"<% if (hasMocha || hasJest) { %>,<% } %> + <%_ if (hasMocha) { _%> + "mocha", + "chai" + <%_ } else if (hasJest) { _%> + "jest" + <%_ } _%> + ] + } +} +`, "tsconfig.json", + { + compilerOptions: { + target: undefined, + module: ModuleKind.ESNext, + types: [] + }, + hasParseErrors: true + } + ); + }); }); } diff --git a/src/testRunner/unittests/convertToAsyncFunction.ts b/src/testRunner/unittests/convertToAsyncFunction.ts index c1a08b3319c..162b3578478 100644 --- a/src/testRunner/unittests/convertToAsyncFunction.ts +++ b/src/testRunner/unittests/convertToAsyncFunction.ts @@ -1241,6 +1241,19 @@ _testConvertToAsyncFunction("convertToAsyncFunction_nestedPromises", ` function [#|f|]() { return fetch('https://typescriptlang.org').then(x => Promise.resolve(3).then(y => Promise.resolve(x.statusText.length + y))); } +`); +_testConvertToAsyncFunction("convertToAsyncFunction_noArgs", ` +function delay(millis: number): Promise { + throw "no" +} + +function [#|main2|]() { + console.log("Please wait. Loading."); + return delay(500) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) +} `); }); @@ -1251,4 +1264,4 @@ function [#|f|]() { function _testConvertToAsyncFunctionFailed(caption: string, text: string) { testConvertToAsyncFunction(caption, text, "convertToAsyncFunction", /*includeLib*/ true, /*expectFailure*/ true); } -} \ No newline at end of file +} diff --git a/src/testRunner/unittests/tsbuild.ts b/src/testRunner/unittests/tsbuild.ts index f54e3c93215..36feb68a223 100644 --- a/src/testRunner/unittests/tsbuild.ts +++ b/src/testRunner/unittests/tsbuild.ts @@ -23,6 +23,42 @@ namespace ts { assert(fs.existsSync(output), `Expect file ${output} to exist`); } }); + + it("builds correctly when outDir is specified", () => { + const fs = projFs.shadow(); + fs.writeFileSync("/src/logic/tsconfig.json", JSON.stringify({ + compilerOptions: { composite: true, declaration: true, sourceMap: true, outDir: "outDir" }, + references: [{ path: "../core" }] + })); + + const host = new fakes.SolutionBuilderHost(fs); + const builder = createSolutionBuilder(host, ["/src/tests"], {}); + builder.buildAllProjects(); + host.assertDiagnosticMessages(/*empty*/); + const expectedOutputs = allExpectedOutputs.map(f => f.replace("/logic/", "/logic/outDir/")); + // Check for outputs. Not an exhaustive list + for (const output of expectedOutputs) { + assert(fs.existsSync(output), `Expect file ${output} to exist`); + } + }); + + it("builds correctly when declarationDir is specified", () => { + const fs = projFs.shadow(); + fs.writeFileSync("/src/logic/tsconfig.json", JSON.stringify({ + compilerOptions: { composite: true, declaration: true, sourceMap: true, declarationDir: "out/decls" }, + references: [{ path: "../core" }] + })); + + const host = new fakes.SolutionBuilderHost(fs); + const builder = createSolutionBuilder(host, ["/src/tests"], {}); + builder.buildAllProjects(); + host.assertDiagnosticMessages(/*empty*/); + const expectedOutputs = allExpectedOutputs.map(f => f.replace("/logic/index.d.ts", "/logic/out/decls/index.d.ts")); + // Check for outputs. Not an exhaustive list + for (const output of expectedOutputs) { + assert(fs.existsSync(output), `Expect file ${output} to exist`); + } + }); }); describe("tsbuild - dry builds", () => { @@ -321,6 +357,25 @@ export class cNew {}`); ]); }); }); + + describe("tsbuild - with rootDir of project reference in parentDirectory", () => { + const projFs = loadProjectFromDisk("tests/projects/projectReferenceWithRootDirInParent"); + const allExpectedOutputs = [ + "/src/dist/other/other.js", "/src/dist/other/other.d.ts", + "/src/dist/main/a.js", "/src/dist/main/a.d.ts", + "/src/dist/main/b.js", "/src/dist/main/b.d.ts" + ]; + it("verify that it builds correctly", () => { + const fs = projFs.shadow(); + const host = new fakes.SolutionBuilderHost(fs); + const builder = createSolutionBuilder(host, ["/src/src/main", "/src/src/other"], {}); + builder.buildAllProjects(); + host.assertDiagnosticMessages(/*empty*/); + for (const output of allExpectedOutputs) { + assert(fs.existsSync(output), `Expect file ${output} to exist`); + } + }); + }); } export namespace OutFile { diff --git a/src/testRunner/unittests/tsbuildWatchMode.ts b/src/testRunner/unittests/tsbuildWatchMode.ts index f0745a373a0..2ffe51189d8 100644 --- a/src/testRunner/unittests/tsbuildWatchMode.ts +++ b/src/testRunner/unittests/tsbuildWatchMode.ts @@ -486,11 +486,7 @@ export function gfoo() { solutionBuilder.buildInvalidatedProject(); host.checkTimeoutQueueLengthAndRun(1); - checkOutputErrorsIncremental(host, [ - // TODO: #26036 - // The error is reported in d.ts file because it isnt resolved from ts file path, but is resolved from .d.ts file - "sample1/logic/decls/index.d.ts(2,22): error TS2307: Cannot find module '../core/anotherModule'.\n" - ]); + checkOutputErrorsIncremental(host, emptyArray); checkProgramActualFiles(watch().getProgram(), [tests[1].path, libFile.path, coreIndexDts, coreAnotherModuleDts, projectFilePath(SubProject.logic, "decls/index.d.ts")]); }); }); diff --git a/src/testRunner/unittests/tsserverProjectSystem.ts b/src/testRunner/unittests/tsserverProjectSystem.ts index 639cd657e0d..41a8d9f292e 100644 --- a/src/testRunner/unittests/tsserverProjectSystem.ts +++ b/src/testRunner/unittests/tsserverProjectSystem.ts @@ -449,6 +449,14 @@ namespace ts.projectSystem { const toLocation = protocolToLocation(str); return { start: toLocation(span.start), end: toLocation(textSpanEnd(span)) }; } + function protocolRenameSpanFromSubstring( + str: string, + substring: string, + options?: SpanFromSubstringOptions, + prefixSuffixText?: { readonly prefixText?: string, readonly suffixText?: string }, + ): protocol.RenameTextSpan { + return { ...protocolTextSpanFromSubstring(str, substring, options), ...prefixSuffixText }; + } function textSpanFromSubstring(str: string, substring: string, options?: SpanFromSubstringOptions): TextSpan { const start = nthIndexOf(str, substring, options ? options.index : 0); Debug.assert(start !== -1); @@ -463,6 +471,9 @@ namespace ts.projectSystem { function documentSpanFromSubstring(file: File, substring: string, options?: SpanFromSubstringOptions): DocumentSpan { return { fileName: file.path, textSpan: textSpanFromSubstring(file.content, substring, options) }; } + function renameLocation(file: File, substring: string, options?: SpanFromSubstringOptions): RenameLocation { + return documentSpanFromSubstring(file, substring, options); + } interface SpanFromSubstringOptions { readonly index: number; } @@ -8284,21 +8295,21 @@ namespace ts.projectSystem { const response = executeSessionRequest(session, protocol.CommandTypes.Rename, { file: aFc, ...protocolLocationFromSubstring(cFile.content, "C") }); assert.equal(aFile.content, bFile.content); - const abLocs: protocol.TextSpan[] = [ - protocolTextSpanFromSubstring(aFile.content, "C"), - protocolTextSpanFromSubstring(aFile.content, "C", { index: 1 }), + const abLocs: protocol.RenameTextSpan[] = [ + protocolRenameSpanFromSubstring(aFile.content, "C"), + protocolRenameSpanFromSubstring(aFile.content, "C", { index: 1 }), ]; - const span = protocolTextSpanFromSubstring(cFile.content, "C"); - const cLocs: protocol.TextSpan[] = [span]; + const span = protocolRenameSpanFromSubstring(cFile.content, "C"); + const cLocs: protocol.RenameTextSpan[] = [span]; assert.deepEqual(response, { info: { canRename: true, displayName: "C", + fileToRename: undefined, fullDisplayName: '"/users/username/projects/a/c/fc".C', kind: ScriptElementKind.constElement, kindModifiers: ScriptElementKindModifier.exportedModifier, - localizedErrorMessage: undefined, - triggerSpan: span, + triggerSpan: protocolTextSpanFromSubstring(cFile.content, "C"), }, locs: [ { file: aFc, locs: cLocs }, @@ -9462,8 +9473,7 @@ export function Test2() { content: "{}", }; - const host = createServerHost([aTs, bTs, tsconfig]); - const session = createSession(host); + const session = createSession(createServerHost([aTs, bTs, tsconfig])); openFilesForSession([aTs, bTs], session); const requestLocation: protocol.FileLocationRequestArgs = { @@ -9569,6 +9579,58 @@ export function Test2() { }); }); + describe("tsserverProjectSystem rename", () => { + it("works with fileToRename", () => { + const aTs: File = { path: "/a.ts", content: "export const a = 0;" }; + const bTs: File = { path: "/b.ts", content: 'import { a } from "./a";' }; + + const session = createSession(createServerHost([aTs, bTs])); + openFilesForSession([bTs], session); + + const response = executeSessionRequest(session, protocol.CommandTypes.Rename, protocolFileLocationFromSubstring(bTs, 'a";')); + assert.deepEqual(response, { + info: { + canRename: true, + fileToRename: aTs.path, + displayName: aTs.path, + fullDisplayName: aTs.path, + kind: ScriptElementKind.moduleElement, + kindModifiers: "", + triggerSpan: protocolTextSpanFromSubstring(bTs.content, "a", { index: 1 }), + }, + locs: [{ file: bTs.path, locs: [protocolRenameSpanFromSubstring(bTs.content, "./a")] }], + }); + }); + + it("works with prefixText and suffixText", () => { + const aTs: File = { path: "/a.ts", content: "const x = 0; const o = { x };" }; + const session = createSession(createServerHost([aTs])); + openFilesForSession([aTs], session); + + const response = executeSessionRequest(session, protocol.CommandTypes.Rename, protocolFileLocationFromSubstring(aTs, "x")); + assert.deepEqual(response, { + info: { + canRename: true, + fileToRename: undefined, + displayName: "x", + fullDisplayName: "x", + kind: ScriptElementKind.constElement, + kindModifiers: ScriptElementKindModifier.none, + triggerSpan: protocolTextSpanFromSubstring(aTs.content, "x"), + }, + locs: [ + { + file: aTs.path, + locs: [ + protocolRenameSpanFromSubstring(aTs.content, "x"), + protocolRenameSpanFromSubstring(aTs.content, "x", { index: 1 }, { prefixText: "x: " }), + ], + }, + ], + }); + }); + }); + describe("tsserverProjectSystem typeReferenceDirectives", () => { it("when typeReferenceDirective contains UpperCasePackage", () => { const projectLocation = "/user/username/projects/myproject"; @@ -10045,13 +10107,13 @@ declare class TestLib { const renameATs = (aTs: File): protocol.SpanGroup => ({ file: aTs.path, - locs: [protocolTextSpanFromSubstring(aTs.content, "fnA")], + locs: [protocolRenameSpanFromSubstring(aTs.content, "fnA")], }); const renameUserTs = (userTs: File): protocol.SpanGroup => ({ file: userTs.path, locs: [ - protocolTextSpanFromSubstring(userTs.content, "fnA"), - protocolTextSpanFromSubstring(userTs.content, "fnA", { index: 1 }), + protocolRenameSpanFromSubstring(userTs.content, "fnA"), + protocolRenameSpanFromSubstring(userTs.content, "fnA", { index: 1 }), ], }); @@ -10062,10 +10124,10 @@ declare class TestLib { info: { canRename: true, displayName: "fnA", + fileToRename: undefined, fullDisplayName: "fnA", kind: ScriptElementKind.alias, kindModifiers: ScriptElementKindModifier.none, - localizedErrorMessage: undefined, triggerSpan: protocolTextSpanFromSubstring(userTs.content, "fnA", { index: 1 }), }, locs: [renameUserTs(userTs), renameATs(aTs)], @@ -10081,10 +10143,10 @@ declare class TestLib { info: { canRename: true, displayName: "fnA", + fileToRename: undefined, fullDisplayName: '"/a/a".fnA', kind: ScriptElementKind.functionElement, kindModifiers: ScriptElementKindModifier.exportedModifier, - localizedErrorMessage: undefined, triggerSpan: protocolTextSpanFromSubstring(aTs.content, "fnA"), }, locs: [renameATs(aTs), renameUserTs(userTs)], @@ -10096,9 +10158,9 @@ declare class TestLib { const session = makeSampleProjects(); const response = executeSessionRequest(session, protocol.CommandTypes.RenameLocationsFull, protocolFileLocationFromSubstring(userTs, "fnA()")); assert.deepEqual>(response, [ - documentSpanFromSubstring(userTs, "fnA"), - documentSpanFromSubstring(userTs, "fnA", { index: 1 }), - documentSpanFromSubstring(aTs, "fnA"), + renameLocation(userTs, "fnA"), + renameLocation(userTs, "fnA", { index: 1 }), + renameLocation(aTs, "fnA"), ]); verifyATsConfigOriginalProject(session); }); @@ -10110,23 +10172,23 @@ declare class TestLib { info: { canRename: true, displayName: "fnB", + fileToRename: undefined, fullDisplayName: "fnB", kind: ScriptElementKind.alias, kindModifiers: ScriptElementKindModifier.none, - localizedErrorMessage: undefined, triggerSpan: protocolTextSpanFromSubstring(userTs.content, "fnB", { index: 1 }), }, locs: [ { file: userTs.path, locs: [ - protocolTextSpanFromSubstring(userTs.content, "fnB"), - protocolTextSpanFromSubstring(userTs.content, "fnB", { index: 1 }), + protocolRenameSpanFromSubstring(userTs.content, "fnB"), + protocolRenameSpanFromSubstring(userTs.content, "fnB", { index: 1 }), ], }, { file: bDts.path, - locs: [protocolTextSpanFromSubstring(bDts.content, "fnB")], + locs: [protocolRenameSpanFromSubstring(bDts.content, "fnB")], } ], }); diff --git a/src/tsserver/server.ts b/src/tsserver/server.ts index 8084d42e1c5..8a5c5b50906 100644 --- a/src/tsserver/server.ts +++ b/src/tsserver/server.ts @@ -520,6 +520,7 @@ namespace ts.server { globalPlugins, pluginProbeLocations, allowLocalPluginLoads, + typesMapLocation, }); this.eventPort = eventPort; diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 21ee605120a..a90f40f9ac7 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.1"; + const versionMajorMinor = "3.2"; /** The version of the TypeScript compiler release */ const version: string; } @@ -1082,7 +1082,7 @@ declare namespace ts { } interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause; + parent: HeritageClause | JSDocAugmentsTag; expression: LeftHandSideExpression; } interface NewExpression extends PrimaryExpression, Declaration { @@ -2494,6 +2494,7 @@ declare namespace ts { sourceRoot?: string; strict?: boolean; strictFunctionTypes?: boolean; + strictBindCallApply?: boolean; strictNullChecks?: boolean; strictPropertyInitialization?: boolean; stripInternal?: boolean; @@ -4959,6 +4960,8 @@ declare namespace ts { originalFileName?: string; } interface RenameLocation extends DocumentSpan { + readonly prefixText?: string; + readonly suffixText?: string; } interface ReferenceEntry extends DocumentSpan { isWriteAccess: boolean; @@ -5111,20 +5114,24 @@ declare namespace ts { documentation?: SymbolDisplayPart[]; tags?: JSDocTagInfo[]; } - interface RenameInfo { - canRename: boolean; + type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + interface RenameInfoSuccess { + canRename: true; /** * File or directory to rename. * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. */ fileToRename?: string; - localizedErrorMessage?: string; displayName: string; fullDisplayName: string; kind: ScriptElementKind; kindModifiers: string; triggerSpan: TextSpan; } + interface RenameInfoFailure { + canRename: false; + localizedErrorMessage: string; + } interface SignatureHelpParameter { name: string; documentation: SymbolDisplayPart[]; @@ -6434,20 +6441,17 @@ declare namespace ts.server.protocol { /** * Information about the item to be renamed. */ - interface RenameInfo { + type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + interface RenameInfoSuccess { /** * True if item can be renamed. */ - canRename: boolean; + canRename: true; /** * File or directory to rename. * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. */ fileToRename?: string; - /** - * Error message if item can not be renamed. - */ - localizedErrorMessage?: string; /** * Display name of the item to be renamed. */ @@ -6467,6 +6471,13 @@ declare namespace ts.server.protocol { /** Span of text to rename. */ triggerSpan: TextSpan; } + interface RenameInfoFailure { + canRename: false; + /** + * Error message if item can not be renamed. + */ + localizedErrorMessage: string; + } /** * A group of text spans, all in 'file'. */ @@ -6474,7 +6485,11 @@ declare namespace ts.server.protocol { /** The file to which the spans apply */ file: string; /** The text spans in this group */ - locs: TextSpan[]; + locs: RenameTextSpan[]; + } + interface RenameTextSpan extends TextSpan { + readonly prefixText?: string; + readonly suffixText?: string; } interface RenameResponseBody { /** @@ -8679,6 +8694,7 @@ declare namespace ts.server { globalPlugins?: ReadonlyArray; pluginProbeLocations?: ReadonlyArray; allowLocalPluginLoads?: boolean; + typesMapLocation?: string; } class Session implements EventSender { private readonly gcTimer; @@ -8701,6 +8717,7 @@ declare namespace ts.server { private defaultEventHandler; private projectsUpdatedInBackgroundEvent; logError(err: Error, cmd: string): void; + private logErrorWorker; send(msg: protocol.Message): void; event(body: T, eventName: string): void; /** @deprecated */ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 4b01738783d..d6bd508999d 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "3.1"; + const versionMajorMinor = "3.2"; /** The version of the TypeScript compiler release */ const version: string; } @@ -1082,7 +1082,7 @@ declare namespace ts { } interface ExpressionWithTypeArguments extends NodeWithTypeArguments { kind: SyntaxKind.ExpressionWithTypeArguments; - parent: HeritageClause; + parent: HeritageClause | JSDocAugmentsTag; expression: LeftHandSideExpression; } interface NewExpression extends PrimaryExpression, Declaration { @@ -2494,6 +2494,7 @@ declare namespace ts { sourceRoot?: string; strict?: boolean; strictFunctionTypes?: boolean; + strictBindCallApply?: boolean; strictNullChecks?: boolean; strictPropertyInitialization?: boolean; stripInternal?: boolean; @@ -4959,6 +4960,8 @@ declare namespace ts { originalFileName?: string; } interface RenameLocation extends DocumentSpan { + readonly prefixText?: string; + readonly suffixText?: string; } interface ReferenceEntry extends DocumentSpan { isWriteAccess: boolean; @@ -5111,20 +5114,24 @@ declare namespace ts { documentation?: SymbolDisplayPart[]; tags?: JSDocTagInfo[]; } - interface RenameInfo { - canRename: boolean; + type RenameInfo = RenameInfoSuccess | RenameInfoFailure; + interface RenameInfoSuccess { + canRename: true; /** * File or directory to rename. * If set, `getEditsForFileRename` should be called instead of `findRenameLocations`. */ fileToRename?: string; - localizedErrorMessage?: string; displayName: string; fullDisplayName: string; kind: ScriptElementKind; kindModifiers: string; triggerSpan: TextSpan; } + interface RenameInfoFailure { + canRename: false; + localizedErrorMessage: string; + } interface SignatureHelpParameter { name: string; documentation: SymbolDisplayPart[]; diff --git a/tests/baselines/reference/bivariantInferences.js b/tests/baselines/reference/bivariantInferences.js new file mode 100644 index 00000000000..a910ca15e93 --- /dev/null +++ b/tests/baselines/reference/bivariantInferences.js @@ -0,0 +1,17 @@ +//// [bivariantInferences.ts] +// Repro from #27337 + +interface Array { + equalsShallow(this: ReadonlyArray, other: ReadonlyArray): boolean; +} + +declare const a: (string | number)[] | null[] | undefined[] | {}[]; +declare const b: (string | number)[] | null[] | undefined[] | {}[]; + +let x = a.equalsShallow(b); + + +//// [bivariantInferences.js] +"use strict"; +// Repro from #27337 +var x = a.equalsShallow(b); diff --git a/tests/baselines/reference/bivariantInferences.symbols b/tests/baselines/reference/bivariantInferences.symbols new file mode 100644 index 00000000000..63cc239f040 --- /dev/null +++ b/tests/baselines/reference/bivariantInferences.symbols @@ -0,0 +1,31 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts === +// Repro from #27337 + +interface Array { +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(bivariantInferences.ts, 0, 0)) +>T : Symbol(T, Decl(lib.es5.d.ts, --, --), Decl(bivariantInferences.ts, 2, 16)) + + equalsShallow(this: ReadonlyArray, other: ReadonlyArray): boolean; +>equalsShallow : Symbol(Array.equalsShallow, Decl(bivariantInferences.ts, 2, 20)) +>T : Symbol(T, Decl(bivariantInferences.ts, 3, 18)) +>this : Symbol(this, Decl(bivariantInferences.ts, 3, 21)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(bivariantInferences.ts, 3, 18)) +>other : Symbol(other, Decl(bivariantInferences.ts, 3, 44)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es5.d.ts, --, --)) +>T : Symbol(T, Decl(bivariantInferences.ts, 3, 18)) +} + +declare const a: (string | number)[] | null[] | undefined[] | {}[]; +>a : Symbol(a, Decl(bivariantInferences.ts, 6, 13)) + +declare const b: (string | number)[] | null[] | undefined[] | {}[]; +>b : Symbol(b, Decl(bivariantInferences.ts, 7, 13)) + +let x = a.equalsShallow(b); +>x : Symbol(x, Decl(bivariantInferences.ts, 9, 3)) +>a.equalsShallow : Symbol(equalsShallow, Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20)) +>a : Symbol(a, Decl(bivariantInferences.ts, 6, 13)) +>equalsShallow : Symbol(equalsShallow, Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20), Decl(bivariantInferences.ts, 2, 20)) +>b : Symbol(b, Decl(bivariantInferences.ts, 7, 13)) + diff --git a/tests/baselines/reference/bivariantInferences.types b/tests/baselines/reference/bivariantInferences.types new file mode 100644 index 00000000000..e9bf31dad8e --- /dev/null +++ b/tests/baselines/reference/bivariantInferences.types @@ -0,0 +1,26 @@ +=== tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts === +// Repro from #27337 + +interface Array { + equalsShallow(this: ReadonlyArray, other: ReadonlyArray): boolean; +>equalsShallow : (this: ReadonlyArray, other: ReadonlyArray) => boolean +>this : ReadonlyArray +>other : ReadonlyArray +} + +declare const a: (string | number)[] | null[] | undefined[] | {}[]; +>a : (string | number)[] | null[] | undefined[] | {}[] +>null : null + +declare const b: (string | number)[] | null[] | undefined[] | {}[]; +>b : (string | number)[] | null[] | undefined[] | {}[] +>null : null + +let x = a.equalsShallow(b); +>x : boolean +>a.equalsShallow(b) : boolean +>a.equalsShallow : ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) +>a : (string | number)[] | null[] | undefined[] | {}[] +>equalsShallow : ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) | ((this: ReadonlyArray, other: ReadonlyArray) => boolean) +>b : (string | number)[] | null[] | undefined[] | {}[] + diff --git a/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt new file mode 100644 index 00000000000..5b8fb9b0ea8 --- /dev/null +++ b/tests/baselines/reference/booleanLiteralsContextuallyTypedFromUnion.errors.txt @@ -0,0 +1,31 @@ +error TS2318: Cannot find global type 'CallableFunction'. +error TS2318: Cannot find global type 'NewableFunction'. + + +!!! error TS2318: Cannot find global type 'CallableFunction'. +!!! error TS2318: Cannot find global type 'NewableFunction'. +==== tests/cases/compiler/booleanLiteralsContextuallyTypedFromUnion.tsx (0 errors) ==== + interface A { isIt: true; text: string; } + interface B { isIt: false; value: number; } + type C = A | B; + const isIt = Math.random() > 0.5; + const c: C = isIt ? { isIt, text: 'hey' } : { isIt, value: 123 }; + const cc: C = isIt ? { isIt: isIt, text: 'hey' } : { isIt: isIt, value: 123 }; + + type ComponentProps = + | { + optionalBool: true; + mandatoryFn: () => void; + } + | { + optionalBool: false; + }; + + let Funk = (_props: ComponentProps) =>
Hello
; + + let Fail1 = () => { }} optionalBool={true} /> + let Fail2 = () => { }} optionalBool={true as true} /> + let True = true as true; + let Fail3 = () => { }} optionalBool={True} /> + let attrs2 = { optionalBool: true as true, mandatoryFn: () => { } } + let Success = () => \ No newline at end of file diff --git a/tests/baselines/reference/capturedLetConstInLoop1.js b/tests/baselines/reference/capturedLetConstInLoop1.js index 3c064059cb0..7acaf851cc2 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.js +++ b/tests/baselines/reference/capturedLetConstInLoop1.js @@ -1,4 +1,6 @@ //// [capturedLetConstInLoop1.ts] +declare function use(x: any): any; + //==== let for (let x in {}) { (function() { return x}); @@ -56,6 +58,19 @@ for (let y = 0; y < 1; ++y) { (() => x + y); } +for (let y = (use(() => y), 0); y < 1; ++y) { +} + +for (let y = 0; use(() => y), y < 1; ++y) { +} + +for (let y = 0; y < 1; use(() => y), ++y) { +} + +for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) { + use(() => y); +} + //=========const for (const x in {}) { (function() { return x}); @@ -202,93 +217,145 @@ var _loop_10 = function (y) { for (var y = 0; y < 1; ++y) { _loop_10(y); } -var _loop_11 = function (x) { +var _loop_init_1 = function () { + var y = (use(function () { return y; }), 0); + out_y_1 = y; +}; +var out_y_1; +_loop_init_1(); +for (var y = out_y_1; y < 1; ++y) { +} +var _loop_11 = function (y) { + if (inc_1) + ++y; + else + inc_1 = true; + if (!(use(function () { return y; }), y < 1)) + return "break"; +}; +var inc_1 = false; +for (var y = 0;;) { + var state_1 = _loop_11(y); + if (state_1 === "break") + break; +} +var _loop_12 = function (y) { + if (inc_2) + use(function () { return y; }), ++y; + else + inc_2 = true; +}; +var inc_2 = false; +for (var y = 0; y < 1;) { + _loop_12(y); +} +var _loop_init_2 = function () { + var y = (use(function () { return y; }), 0); + out_y_2 = y; +}; +var _loop_13 = function (y) { + if (inc_3) + use(function () { return y; }), ++y; + else + inc_3 = true; + if (!(use(function () { return y; }), y < 1)) + return out_y_2 = y, "break"; + use(function () { return y; }); +}; +var out_y_2, inc_3 = false; +_loop_init_2(); +for (var y = out_y_2;;) { + var state_2 = _loop_13(y); + if (state_2 === "break") + break; +} +var _loop_14 = function (x) { (function () { return x; }); (function () { return x; }); }; //=========const for (var x in {}) { - _loop_11(x); + _loop_14(x); } -var _loop_12 = function (x) { +var _loop_15 = function (x) { (function () { return x; }); (function () { return x; }); }; for (var _b = 0, _c = []; _b < _c.length; _b++) { var x = _c[_b]; - _loop_12(x); + _loop_15(x); } -var _loop_13 = function (x) { +var _loop_16 = function (x) { (function () { return x; }); (function () { return x; }); }; for (var x = 0; x < 1;) { - _loop_13(x); + _loop_16(x); } -var _loop_14 = function () { +var _loop_17 = function () { var x = 1; (function () { return x; }); (function () { return x; }); }; while (1 === 1) { - _loop_14(); + _loop_17(); } -var _loop_15 = function () { +var _loop_18 = function () { var x = 1; (function () { return x; }); (function () { return x; }); }; do { - _loop_15(); + _loop_18(); } while (1 === 1); -var _loop_16 = function (y) { +var _loop_19 = function (y) { var x = 1; (function () { return x; }); (function () { return x; }); }; for (var y = 0; y < 1;) { - _loop_16(y); + _loop_19(y); } -var _loop_17 = function (x, y) { +var _loop_20 = function (x, y) { (function () { return x + y; }); (function () { return x + y; }); }; for (var x = 0, y = 1; x < 1;) { - _loop_17(x, y); + _loop_20(x, y); } -var _loop_18 = function () { +var _loop_21 = function () { var x = 1, y = 1; (function () { return x + y; }); (function () { return x + y; }); }; while (1 === 1) { - _loop_18(); + _loop_21(); } -var _loop_19 = function () { +var _loop_22 = function () { var x = 1, y = 1; (function () { return x + y; }); (function () { return x + y; }); }; do { - _loop_19(); + _loop_22(); } while (1 === 1); -var _loop_20 = function (y) { +var _loop_23 = function (y) { var x = 1; (function () { return x + y; }); (function () { return x + y; }); }; for (var y = 0; y < 1;) { - _loop_20(y); + _loop_23(y); } -var _loop_21 = function (sx) { +var _loop_24 = function (sx) { (function () { return sobj[sx]; }); }; for (var sx in sobj) { - _loop_21(sx); + _loop_24(sx); } -var _loop_22 = function (ix) { +var _loop_25 = function (ix) { (function () { return iobj[ix]; }); }; for (var ix in iobj) { - _loop_22(ix); + _loop_25(ix); } diff --git a/tests/baselines/reference/capturedLetConstInLoop1.symbols b/tests/baselines/reference/capturedLetConstInLoop1.symbols index afa7898a258..43f263bd73a 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.symbols +++ b/tests/baselines/reference/capturedLetConstInLoop1.symbols @@ -1,286 +1,330 @@ === tests/cases/compiler/capturedLetConstInLoop1.ts === +declare function use(x: any): any; +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 0, 21)) + //==== let for (let x in {}) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 1, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 1, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 1, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 3, 8)) } for (let x of []) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 6, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 6, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 6, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 8, 8)) } for (let x = 0; x < 1; ++x) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 11, 8)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 11, 8)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 11, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 11, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 11, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 13, 8)) } while (1 === 1) { let x; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 17, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 17, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 17, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 19, 7)) } do { let x; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 23, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 23, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 23, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 25, 7)) } while (1 === 1) for (let y = 0; y < 1; ++y) { ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 28, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 28, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 28, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 30, 8)) let x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 29, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 29, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 29, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 31, 7)) } for (let x = 0, y = 1; x < 1; ++x) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 34, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 34, 15)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 34, 8)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 34, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 34, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 34, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 34, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 34, 15)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 36, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 36, 15)) } while (1 === 1) { let x, y; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 40, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 40, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 40, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 40, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 40, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 40, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 42, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 42, 10)) } do { let x, y; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 46, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 46, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 46, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 46, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 46, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 46, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 48, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 48, 10)) } while (1 === 1) for (let y = 0; y < 1; ++y) { ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 51, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 51, 8)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 51, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8)) let x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 52, 7)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 52, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 51, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 52, 7)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 51, 8)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 54, 7)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 53, 8)) +} + +for (let y = (use(() => y), 0); y < 1; ++y) { +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 59, 8)) +} + +for (let y = 0; use(() => y), y < 1; ++y) { +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 62, 8)) +} + +for (let y = 0; y < 1; use(() => y), ++y) { +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 65, 8)) +} + +for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) { +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) + + use(() => y); +>use : Symbol(use, Decl(capturedLetConstInLoop1.ts, 0, 0)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 68, 8)) } //=========const for (const x in {}) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 58, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 58, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 58, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 73, 10)) } for (const x of []) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 63, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 63, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 63, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 78, 10)) } for (const x = 0; x < 1;) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 68, 10)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 68, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 68, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 68, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 83, 10)) } while (1 === 1) { const x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 74, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 74, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 74, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 89, 9)) } do { const x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 80, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 80, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 80, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 95, 9)) } while (1 === 1) for (const y = 0; y < 1;) { ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 85, 10)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 85, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 100, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 100, 10)) const x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 86, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9)) (function() { return x}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 86, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9)) (() => x); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 86, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 101, 9)) } for (const x = 0, y = 1; x < 1;) { ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 91, 10)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 91, 17)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 91, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 91, 10)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 91, 17)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 91, 10)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 91, 17)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 106, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 106, 17)) } while (1 === 1) { const x = 1, y = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 97, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 97, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 97, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 97, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 97, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 97, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 112, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 112, 16)) } do { const x = 1, y = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 103, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 103, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 103, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 103, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 103, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 103, 16)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 118, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 118, 16)) } while (1 === 1) for (const y = 0; y < 1;) { ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 108, 10)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 108, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10)) const x = 1; ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 109, 9)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9)) (function() { return x + y}); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 109, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 108, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10)) (() => x + y); ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 109, 9)) ->y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 108, 10)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 124, 9)) +>y : Symbol(y, Decl(capturedLetConstInLoop1.ts, 123, 10)) } // https://github.com/Microsoft/TypeScript/issues/20594 declare const sobj: { [x: string]: any }; ->sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 115, 13)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 115, 23)) +>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 130, 23)) for (let sx in sobj) { ->sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 116, 8)) ->sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 115, 13)) +>sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 131, 8)) +>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13)) (() => sobj[sx]); ->sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 115, 13)) ->sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 116, 8)) +>sobj : Symbol(sobj, Decl(capturedLetConstInLoop1.ts, 130, 13)) +>sx : Symbol(sx, Decl(capturedLetConstInLoop1.ts, 131, 8)) } declare const iobj: { [x: number]: any }; ->iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 119, 13)) ->x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 119, 23)) +>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13)) +>x : Symbol(x, Decl(capturedLetConstInLoop1.ts, 134, 23)) for (let ix in iobj) { ->ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 120, 8)) ->iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 119, 13)) +>ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 135, 8)) +>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13)) (() => iobj[ix]); ->iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 119, 13)) ->ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 120, 8)) +>iobj : Symbol(iobj, Decl(capturedLetConstInLoop1.ts, 134, 13)) +>ix : Symbol(ix, Decl(capturedLetConstInLoop1.ts, 135, 8)) } diff --git a/tests/baselines/reference/capturedLetConstInLoop1.types b/tests/baselines/reference/capturedLetConstInLoop1.types index 34ba101752b..a7d3094268c 100644 --- a/tests/baselines/reference/capturedLetConstInLoop1.types +++ b/tests/baselines/reference/capturedLetConstInLoop1.types @@ -1,4 +1,8 @@ === tests/cases/compiler/capturedLetConstInLoop1.ts === +declare function use(x: any): any; +>use : (x: any) => any +>x : any + //==== let for (let x in {}) { >x : string @@ -214,6 +218,84 @@ for (let y = 0; y < 1; ++y) { >y : number } +for (let y = (use(() => y), 0); y < 1; ++y) { +>y : number +>(use(() => y), 0) : 0 +>use(() => y), 0 : 0 +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>0 : 0 +>y < 1 : boolean +>y : number +>1 : 1 +>++y : number +>y : number +} + +for (let y = 0; use(() => y), y < 1; ++y) { +>y : number +>0 : 0 +>use(() => y), y < 1 : boolean +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>y < 1 : boolean +>y : number +>1 : 1 +>++y : number +>y : number +} + +for (let y = 0; y < 1; use(() => y), ++y) { +>y : number +>0 : 0 +>y < 1 : boolean +>y : number +>1 : 1 +>use(() => y), ++y : number +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>++y : number +>y : number +} + +for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) { +>y : number +>(use(() => y), 0) : 0 +>use(() => y), 0 : 0 +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>0 : 0 +>use(() => y), y < 1 : boolean +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>y < 1 : boolean +>y : number +>1 : 1 +>use(() => y), ++y : number +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +>++y : number +>y : number + + use(() => y); +>use(() => y) : any +>use : (x: any) => any +>() => y : () => number +>y : number +} + //=========const for (const x in {}) { >x : string diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.js b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.js new file mode 100644 index 00000000000..ec101ecd3af --- /dev/null +++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.js @@ -0,0 +1,25 @@ +//// [contextualTypeOfIndexedAccessParameter.ts] +type Keys = "a" | "b"; + +type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; + +declare function f(key: K, options: OptionsForKey[K]): void; + +f("a", { + cb: p => p, +}); + +function g< + K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) { + x = y; +} + + +//// [contextualTypeOfIndexedAccessParameter.js] +"use strict"; +f("a", { + cb: function (p) { return p; } +}); +function g(x, y) { + x = y; +} diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.symbols b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.symbols new file mode 100644 index 00000000000..74cc7843f87 --- /dev/null +++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.symbols @@ -0,0 +1,47 @@ +=== tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts === +type Keys = "a" | "b"; +>Keys : Symbol(Keys, Decl(contextualTypeOfIndexedAccessParameter.ts, 0, 0)) + +type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; +>OptionsForKey : Symbol(OptionsForKey, Decl(contextualTypeOfIndexedAccessParameter.ts, 0, 22)) +>a : Symbol(a, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 22)) +>cb : Symbol(cb, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 27)) +>p : Symbol(p, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 33)) +>b : Symbol(b, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 61)) + +declare function f(key: K, options: OptionsForKey[K]): void; +>f : Symbol(f, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 70)) +>K : Symbol(K, Decl(contextualTypeOfIndexedAccessParameter.ts, 4, 19)) +>Keys : Symbol(Keys, Decl(contextualTypeOfIndexedAccessParameter.ts, 0, 0)) +>key : Symbol(key, Decl(contextualTypeOfIndexedAccessParameter.ts, 4, 35)) +>K : Symbol(K, Decl(contextualTypeOfIndexedAccessParameter.ts, 4, 19)) +>options : Symbol(options, Decl(contextualTypeOfIndexedAccessParameter.ts, 4, 42)) +>OptionsForKey : Symbol(OptionsForKey, Decl(contextualTypeOfIndexedAccessParameter.ts, 0, 22)) +>K : Symbol(K, Decl(contextualTypeOfIndexedAccessParameter.ts, 4, 19)) + +f("a", { +>f : Symbol(f, Decl(contextualTypeOfIndexedAccessParameter.ts, 2, 70)) + + cb: p => p, +>cb : Symbol(cb, Decl(contextualTypeOfIndexedAccessParameter.ts, 6, 8)) +>p : Symbol(p, Decl(contextualTypeOfIndexedAccessParameter.ts, 7, 7)) +>p : Symbol(p, Decl(contextualTypeOfIndexedAccessParameter.ts, 7, 7)) + +}); + +function g< +>g : Symbol(g, Decl(contextualTypeOfIndexedAccessParameter.ts, 8, 3)) + + K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) { +>K : Symbol(K, Decl(contextualTypeOfIndexedAccessParameter.ts, 10, 11)) +>x : Symbol(x, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 25)) +>a : Symbol(a, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 30)) +>b : Symbol(b, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 46)) +>K : Symbol(K, Decl(contextualTypeOfIndexedAccessParameter.ts, 10, 11)) +>y : Symbol(y, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 63)) + + x = y; +>x : Symbol(x, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 25)) +>y : Symbol(y, Decl(contextualTypeOfIndexedAccessParameter.ts, 11, 63)) +} + diff --git a/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types new file mode 100644 index 00000000000..e2fe48b76e2 --- /dev/null +++ b/tests/baselines/reference/contextualTypeOfIndexedAccessParameter.types @@ -0,0 +1,45 @@ +=== tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts === +type Keys = "a" | "b"; +>Keys : Keys + +type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; +>OptionsForKey : OptionsForKey +>a : { cb: (p: number) => number; } +>cb : (p: number) => number +>p : number +>b : {} + +declare function f(key: K, options: OptionsForKey[K]): void; +>f : (key: K, options: OptionsForKey[K]) => void +>key : K +>options : OptionsForKey[K] + +f("a", { +>f("a", { cb: p => p,}) : void +>f : (key: K, options: OptionsForKey[K]) => void +>"a" : "a" +>{ cb: p => p,} : { cb: (p: number) => number; } + + cb: p => p, +>cb : (p: number) => number +>p => p : (p: number) => number +>p : number +>p : number + +}); + +function g< +>g : (x: ({ a: string; } & { b: string; })[K], y: string) => void + + K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) { +>x : ({ a: string; } & { b: string; })[K] +>a : string +>b : string +>y : string + + x = y; +>x = y : string +>x : ({ a: string; } & { b: string; })[K] +>y : string +} + diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.symbols b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.symbols new file mode 100644 index 00000000000..123cceea15a --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.symbols @@ -0,0 +1,27 @@ +=== tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts === +interface Obj { key: "value"; } +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 0)) +>key : Symbol(Obj.key, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 15)) + +async function fn1(): Promise { +>fn1 : Symbol(fn1, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 31)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 0)) + + const obj1: Obj = await { key: "value" }; +>obj1 : Symbol(obj1, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 3, 9)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 0)) +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 3, 29)) + + const obj2: Obj = await new Promise(resolve => resolve({ key: "value" })); +>obj2 : Symbol(obj2, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 4, 9)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 0, 0)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 4, 40)) +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 4, 40)) +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 4, 60)) + + return await { key: "value" }; +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionAwaitOperand.ts, 5, 18)) +} + diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types new file mode 100644 index 00000000000..377f7c15ae3 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types @@ -0,0 +1,34 @@ +=== tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts === +interface Obj { key: "value"; } +>key : "value" + +async function fn1(): Promise { +>fn1 : () => Promise + + const obj1: Obj = await { key: "value" }; +>obj1 : Obj +>await { key: "value" } : { key: "value"; } +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" + + const obj2: Obj = await new Promise(resolve => resolve({ key: "value" })); +>obj2 : Obj +>await new Promise(resolve => resolve({ key: "value" })) : Obj +>new Promise(resolve => resolve({ key: "value" })) : Promise +>Promise : PromiseConstructor +>resolve => resolve({ key: "value" }) : (resolve: (value?: Obj | PromiseLike) => void) => void +>resolve : (value?: Obj | PromiseLike) => void +>resolve({ key: "value" }) : void +>resolve : (value?: Obj | PromiseLike) => void +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" + + return await { key: "value" }; +>await { key: "value" } : { key: "value"; } +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" +} + diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.symbols b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.symbols new file mode 100644 index 00000000000..e85fa4d0d9a --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.symbols @@ -0,0 +1,54 @@ +=== tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts === +interface Obj { key: "value"; } +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 0)) +>key : Symbol(Obj.key, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 15)) + +async function fn1(): Promise { +>fn1 : Symbol(fn1, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 31)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 0)) + + return { key: "value" }; +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 3, 12)) +} + +async function fn2(): Promise { +>fn2 : Symbol(fn2, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 4, 1)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 0)) + + return new Promise(resolve => { +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 7, 23)) + + resolve({ key: "value" }); +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 7, 23)) +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 8, 17)) + + }); +} + +async function fn3(): Promise { +>fn3 : Symbol(fn3, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 10, 1)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 0)) + + return await { key: "value" }; +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 13, 18)) +} + +async function fn4(): Promise { +>fn4 : Symbol(fn4, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 14, 1)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>Obj : Symbol(Obj, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 0, 0)) + + return await new Promise(resolve => { +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 17, 29)) + + resolve({ key: "value" }); +>resolve : Symbol(resolve, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 17, 29)) +>key : Symbol(key, Decl(contextuallyTypeAsyncFunctionReturnType.ts, 18, 17)) + + }); +} diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types new file mode 100644 index 00000000000..d47a623ffc6 --- /dev/null +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types @@ -0,0 +1,61 @@ +=== tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts === +interface Obj { key: "value"; } +>key : "value" + +async function fn1(): Promise { +>fn1 : () => Promise + + return { key: "value" }; +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" +} + +async function fn2(): Promise { +>fn2 : () => Promise + + return new Promise(resolve => { +>new Promise(resolve => { resolve({ key: "value" }); }) : Promise +>Promise : PromiseConstructor +>resolve => { resolve({ key: "value" }); } : (resolve: (value?: Obj | PromiseLike) => void) => void +>resolve : (value?: Obj | PromiseLike) => void + + resolve({ key: "value" }); +>resolve({ key: "value" }) : void +>resolve : (value?: Obj | PromiseLike) => void +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" + + }); +} + +async function fn3(): Promise { +>fn3 : () => Promise + + return await { key: "value" }; +>await { key: "value" } : { key: "value"; } +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" +} + +async function fn4(): Promise { +>fn4 : () => Promise + + return await new Promise(resolve => { +>await new Promise(resolve => { resolve({ key: "value" }); }) : Obj +>new Promise(resolve => { resolve({ key: "value" }); }) : Promise +>Promise : PromiseConstructor +>resolve => { resolve({ key: "value" }); } : (resolve: (value?: Obj | PromiseLike) => void) => void +>resolve : (value?: Obj | PromiseLike) => void + + resolve({ key: "value" }); +>resolve({ key: "value" }) : void +>resolve : (value?: Obj | PromiseLike) => void +>{ key: "value" } : { key: "value"; } +>key : "value" +>"value" : "value" + + }); +} diff --git a/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.js b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.js new file mode 100644 index 00000000000..04e3c00b518 --- /dev/null +++ b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.js @@ -0,0 +1,30 @@ +//// [controlFlowInstanceOfGuardPrimitives.ts] +function distinguish(thing: string | number | Date) { + if (thing instanceof Object) { + console.log("Aha!! It's a Date in " + thing.getFullYear()); + } else if (typeof thing === 'string') { + console.log("Aha!! It's a string of length " + thing.length); + } else { + console.log("Aha!! It's the number " + thing.toPrecision(3)); + } +} + +distinguish(new Date()); +distinguish("beef"); +distinguish(3.14159265); + +//// [controlFlowInstanceOfGuardPrimitives.js] +function distinguish(thing) { + if (thing instanceof Object) { + console.log("Aha!! It's a Date in " + thing.getFullYear()); + } + else if (typeof thing === 'string') { + console.log("Aha!! It's a string of length " + thing.length); + } + else { + console.log("Aha!! It's the number " + thing.toPrecision(3)); + } +} +distinguish(new Date()); +distinguish("beef"); +distinguish(3.14159265); diff --git a/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.symbols b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.symbols new file mode 100644 index 00000000000..6b51a85d0f2 --- /dev/null +++ b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.symbols @@ -0,0 +1,50 @@ +=== tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts === +function distinguish(thing: string | number | Date) { +>distinguish : Symbol(distinguish, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 0)) +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + + if (thing instanceof Object) { +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) +>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + console.log("Aha!! It's a Date in " + thing.getFullYear()); +>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, --, --)) +>thing.getFullYear : Symbol(Date.getFullYear, Decl(lib.es5.d.ts, --, --)) +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) +>getFullYear : Symbol(Date.getFullYear, Decl(lib.es5.d.ts, --, --)) + + } else if (typeof thing === 'string') { +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) + + console.log("Aha!! It's a string of length " + thing.length); +>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, --, --)) +>thing.length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) +>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) + + } else { + console.log("Aha!! It's the number " + thing.toPrecision(3)); +>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, --, --)) +>thing.toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --)) +>thing : Symbol(thing, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 21)) +>toPrecision : Symbol(Number.toPrecision, Decl(lib.es5.d.ts, --, --)) + } +} + +distinguish(new Date()); +>distinguish : Symbol(distinguish, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 0)) +>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --)) + +distinguish("beef"); +>distinguish : Symbol(distinguish, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 0)) + +distinguish(3.14159265); +>distinguish : Symbol(distinguish, Decl(controlFlowInstanceOfGuardPrimitives.ts, 0, 0)) + diff --git a/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types new file mode 100644 index 00000000000..2531f6ae891 --- /dev/null +++ b/tests/baselines/reference/controlFlowInstanceOfGuardPrimitives.types @@ -0,0 +1,71 @@ +=== tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts === +function distinguish(thing: string | number | Date) { +>distinguish : (thing: string | number | Date) => void +>thing : string | number | Date + + if (thing instanceof Object) { +>thing instanceof Object : boolean +>thing : string | number | Date +>Object : ObjectConstructor + + console.log("Aha!! It's a Date in " + thing.getFullYear()); +>console.log("Aha!! It's a Date in " + thing.getFullYear()) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>"Aha!! It's a Date in " + thing.getFullYear() : string +>"Aha!! It's a Date in " : "Aha!! It's a Date in " +>thing.getFullYear() : number +>thing.getFullYear : () => number +>thing : Date +>getFullYear : () => number + + } else if (typeof thing === 'string') { +>typeof thing === 'string' : boolean +>typeof thing : "string" | "number" | "boolean" | "symbol" | "undefined" | "object" | "function" +>thing : string | number +>'string' : "string" + + console.log("Aha!! It's a string of length " + thing.length); +>console.log("Aha!! It's a string of length " + thing.length) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>"Aha!! It's a string of length " + thing.length : string +>"Aha!! It's a string of length " : "Aha!! It's a string of length " +>thing.length : number +>thing : string +>length : number + + } else { + console.log("Aha!! It's the number " + thing.toPrecision(3)); +>console.log("Aha!! It's the number " + thing.toPrecision(3)) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>"Aha!! It's the number " + thing.toPrecision(3) : string +>"Aha!! It's the number " : "Aha!! It's the number " +>thing.toPrecision(3) : string +>thing.toPrecision : (precision?: number) => string +>thing : number +>toPrecision : (precision?: number) => string +>3 : 3 + } +} + +distinguish(new Date()); +>distinguish(new Date()) : void +>distinguish : (thing: string | number | Date) => void +>new Date() : Date +>Date : DateConstructor + +distinguish("beef"); +>distinguish("beef") : void +>distinguish : (thing: string | number | Date) => void +>"beef" : "beef" + +distinguish(3.14159265); +>distinguish(3.14159265) : void +>distinguish : (thing: string | number | Date) => void +>3.14159265 : 3.14159265 + diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.js b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.js new file mode 100644 index 00000000000..8cda2c9dc94 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.js @@ -0,0 +1,30 @@ +// ==ORIGINAL== + +function delay(millis) { + throw "no" +} + +function /*[#|*/main2/*|]*/() { + console.log("Please wait. Loading."); + return delay(500) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) +} + +// ==ASYNC FUNCTION::Convert to async function== + +function delay(millis) { + throw "no" +} + +async function main2() { + console.log("Please wait. Loading."); + await delay(500); + console.log("."); + await delay(500); + console.log("."); + await delay(500); + console.log("."); + return delay(500); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts new file mode 100644 index 00000000000..088bf9f828e --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts @@ -0,0 +1,30 @@ +// ==ORIGINAL== + +function delay(millis: number): Promise { + throw "no" +} + +function /*[#|*/main2/*|]*/() { + console.log("Please wait. Loading."); + return delay(500) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) + .then(() => { console.log("."); return delay(500); }) +} + +// ==ASYNC FUNCTION::Convert to async function== + +function delay(millis: number): Promise { + throw "no" +} + +async function main2() { + console.log("Please wait. Loading."); + await delay(500); + console.log("."); + await delay(500); + console.log("."); + await delay(500); + console.log("."); + return delay(500); +} diff --git a/tests/baselines/reference/declFileEmitDeclarationOnlyError1.errors.txt b/tests/baselines/reference/declFileEmitDeclarationOnlyError1.errors.txt index 62447a4a911..968b2a09b00 100644 --- a/tests/baselines/reference/declFileEmitDeclarationOnlyError1.errors.txt +++ b/tests/baselines/reference/declFileEmitDeclarationOnlyError1.errors.txt @@ -1,7 +1,7 @@ -error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'. +error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. -!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'. +!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. ==== tests/cases/compiler/hello.ts (0 errors) ==== var hello = "yo!"; \ No newline at end of file diff --git a/tests/baselines/reference/declFileEmitDeclarationOnlyError2.errors.txt b/tests/baselines/reference/declFileEmitDeclarationOnlyError2.errors.txt index 37be20aa132..0b1ea1409c5 100644 --- a/tests/baselines/reference/declFileEmitDeclarationOnlyError2.errors.txt +++ b/tests/baselines/reference/declFileEmitDeclarationOnlyError2.errors.txt @@ -1,9 +1,9 @@ -error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'. error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'. +error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. -!!! error TS5052: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration'. !!! error TS5053: Option 'emitDeclarationOnly' cannot be specified with option 'noEmit'. +!!! error TS5069: Option 'emitDeclarationOnly' cannot be specified without specifying option 'declaration' or option 'composite'. ==== tests/cases/compiler/hello.ts (0 errors) ==== var hello = "yo!"; \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt b/tests/baselines/reference/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt index e2a5a20452c..63ba6281732 100644 --- a/tests/baselines/reference/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt +++ b/tests/baselines/reference/declarationEmitToDeclarationDirWithoutCompositeAndDeclarationOptions.errors.txt @@ -1,11 +1,11 @@ -/foo/tsconfig.json(2,26): error TS5052: Option 'declarationDir' cannot be specified without specifying option 'declaration'. +/foo/tsconfig.json(2,26): error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. ==== /foo/tsconfig.json (1 errors) ==== { "compilerOptions": { "declarationDir": "out" } ~~~~~~~~~~~~~~~~ -!!! error TS5052: Option 'declarationDir' cannot be specified without specifying option 'declaration'. +!!! error TS5069: Option 'declarationDir' cannot be specified without specifying option 'declaration' or option 'composite'. } ==== /foo/test.ts (0 errors) ==== diff --git a/tests/baselines/reference/declarationMapsWithoutDeclaration.errors.txt b/tests/baselines/reference/declarationMapsWithoutDeclaration.errors.txt index c432f445130..8574b7d3388 100644 --- a/tests/baselines/reference/declarationMapsWithoutDeclaration.errors.txt +++ b/tests/baselines/reference/declarationMapsWithoutDeclaration.errors.txt @@ -1,7 +1,7 @@ -error TS5052: Option 'declarationMap' cannot be specified without specifying option 'declaration'. +error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. -!!! error TS5052: Option 'declarationMap' cannot be specified without specifying option 'declaration'. +!!! error TS5069: Option 'declarationMap' cannot be specified without specifying option 'declaration' or option 'composite'. ==== tests/cases/compiler/declarationMapsWithoutDeclaration.ts (0 errors) ==== module m2 { export interface connectModule { diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index d970223cb1c..ed6360bdd32 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -41,7 +41,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ !!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? -!!! related TS2728 /.ts/lib.es5.d.ts:1298:15: 'Array' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:1358:15: 'Array' is declared here. a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~ !!! error TS2322: Type 'string' is not assignable to type '[[any]]'. diff --git a/tests/baselines/reference/enumTagUseBeforeDefCrash.symbols b/tests/baselines/reference/enumTagUseBeforeDefCrash.symbols new file mode 100644 index 00000000000..1cef96a9823 --- /dev/null +++ b/tests/baselines/reference/enumTagUseBeforeDefCrash.symbols @@ -0,0 +1,13 @@ +=== tests/cases/conformance/jsdoc/bug27134.js === +/** + * @enum {number} + */ +var foo = { }; +>foo : Symbol(foo, Decl(bug27134.js, 3, 3)) + +/** + * @type {foo} + */ +var s; +>s : Symbol(s, Decl(bug27134.js, 8, 3)) + diff --git a/tests/baselines/reference/enumTagUseBeforeDefCrash.types b/tests/baselines/reference/enumTagUseBeforeDefCrash.types new file mode 100644 index 00000000000..159781fee05 --- /dev/null +++ b/tests/baselines/reference/enumTagUseBeforeDefCrash.types @@ -0,0 +1,14 @@ +=== tests/cases/conformance/jsdoc/bug27134.js === +/** + * @enum {number} + */ +var foo = { }; +>foo : typeof foo +>{ } : {} + +/** + * @type {foo} + */ +var s; +>s : number + diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 1ca359d5d1d..e1077550985 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -69,20 +69,20 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat var d=new XDate(); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here. d.getDay(); d=new XDate(1978,2); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here. d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here. n=XDate.UTC(1964,2,1); ~~~~~ !!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? -!!! related TS2728 /.ts/lib.es5.d.ts:837:15: 'Date' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:897:15: 'Date' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArityStrict.errors.txt b/tests/baselines/reference/genericRestArityStrict.errors.txt index 9a77f8d8498..2803c6215e4 100644 --- a/tests/baselines/reference/genericRestArityStrict.errors.txt +++ b/tests/baselines/reference/genericRestArityStrict.errors.txt @@ -1,7 +1,8 @@ -tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,6): error TS2345: Argument of type '(x: number, y: number) => number' is not assignable to parameter of type '() => void'. +tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,1): error TS2554: Expected 3 arguments, but got 1. +tests/cases/conformance/types/rest/genericRestArityStrict.ts(8,1): error TS2554: Expected 3 arguments, but got 8. -==== tests/cases/conformance/types/rest/genericRestArityStrict.ts (1 errors) ==== +==== tests/cases/conformance/types/rest/genericRestArityStrict.ts (2 errors) ==== // Repro from #25559 declare function call( @@ -9,7 +10,10 @@ tests/cases/conformance/types/rest/genericRestArityStrict.ts(7,6): error TS2345: ...args: TS): void; call((x: number, y: number) => x + y); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2345: Argument of type '(x: number, y: number) => number' is not assignable to parameter of type '() => void'. + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 1. +!!! related TS6210 tests/cases/conformance/types/rest/genericRestArityStrict.ts:5:5: An argument for 'args' was not provided. call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 8. \ No newline at end of file diff --git a/tests/baselines/reference/genericRestArityStrict.types b/tests/baselines/reference/genericRestArityStrict.types index afdcbb2df0d..0bdf6d0e96d 100644 --- a/tests/baselines/reference/genericRestArityStrict.types +++ b/tests/baselines/reference/genericRestArityStrict.types @@ -22,7 +22,7 @@ call((x: number, y: number) => x + y); >y : number call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7); ->call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : void +>call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7) : any >call : (handler: (...args: TS) => void, ...args: TS) => void >(x: number, y: number) => x + y : (x: number, y: number) => number >x : number diff --git a/tests/baselines/reference/infiniteConstraints.errors.txt b/tests/baselines/reference/infiniteConstraints.errors.txt index 71034e87edf..36b77b2b3f6 100644 --- a/tests/baselines/reference/infiniteConstraints.errors.txt +++ b/tests/baselines/reference/infiniteConstraints.errors.txt @@ -1,4 +1,6 @@ -error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. tests/cases/compiler/infiniteConstraints.ts(4,37): error TS2536: Type '"val"' cannot be used to index type 'B[Exclude]'. tests/cases/compiler/infiniteConstraints.ts(27,37): error TS2322: Type 'Record<"val", "test">' is not assignable to type 'never'. tests/cases/compiler/infiniteConstraints.ts(27,58): error TS2322: Type 'Record<"val", "test2">' is not assignable to type 'never'. @@ -8,7 +10,9 @@ tests/cases/compiler/infiniteConstraints.ts(31,63): error TS2322: Type 'Record<" tests/cases/compiler/infiniteConstraints.ts(36,71): error TS2536: Type '"foo"' cannot be used to index type 'T[keyof T]'. -!!! error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +!!! error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +!!! error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. +!!! error TS2321: Excessive stack depth comparing types 'Extract], Record<"val", string>>["val"]' and 'Extract>], Record<"val", string>>["val"]'. ==== tests/cases/compiler/infiniteConstraints.ts (7 errors) ==== // Both of the following types trigger the recursion limiter in getImmediateBaseConstraint diff --git a/tests/baselines/reference/jsdocBindingInUnreachableCode.symbols b/tests/baselines/reference/jsdocBindingInUnreachableCode.symbols new file mode 100644 index 00000000000..62ef96f854a --- /dev/null +++ b/tests/baselines/reference/jsdocBindingInUnreachableCode.symbols @@ -0,0 +1,12 @@ +=== tests/cases/conformance/jsdoc/bug27341.js === +if (false) { + /** + * @param {string} s + */ + const x = function (s) { +>x : Symbol(x, Decl(bug27341.js, 4, 9)) +>s : Symbol(s, Decl(bug27341.js, 4, 24)) + + }; +} + diff --git a/tests/baselines/reference/jsdocBindingInUnreachableCode.types b/tests/baselines/reference/jsdocBindingInUnreachableCode.types new file mode 100644 index 00000000000..d1d01d17e96 --- /dev/null +++ b/tests/baselines/reference/jsdocBindingInUnreachableCode.types @@ -0,0 +1,15 @@ +=== tests/cases/conformance/jsdoc/bug27341.js === +if (false) { +>false : false + + /** + * @param {string} s + */ + const x = function (s) { +>x : (s: string) => void +>function (s) { } : (s: string) => void +>s : string + + }; +} + diff --git a/tests/baselines/reference/jsdocClassMissingTypeArguments.errors.txt b/tests/baselines/reference/jsdocClassMissingTypeArguments.errors.txt new file mode 100644 index 00000000000..ae966c3990e --- /dev/null +++ b/tests/baselines/reference/jsdocClassMissingTypeArguments.errors.txt @@ -0,0 +1,12 @@ +/a.js(4,13): error TS2314: Generic type 'C' requires 1 type argument(s). + + +==== /a.js (1 errors) ==== + /** @template T */ + class C {} + + /** @param {C} p */ + ~ +!!! error TS2314: Generic type 'C' requires 1 type argument(s). + function f(p) {} + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocClassMissingTypeArguments.symbols b/tests/baselines/reference/jsdocClassMissingTypeArguments.symbols new file mode 100644 index 00000000000..26c59f13785 --- /dev/null +++ b/tests/baselines/reference/jsdocClassMissingTypeArguments.symbols @@ -0,0 +1,10 @@ +=== /a.js === +/** @template T */ +class C {} +>C : Symbol(C, Decl(a.js, 0, 0)) + +/** @param {C} p */ +function f(p) {} +>f : Symbol(f, Decl(a.js, 1, 10)) +>p : Symbol(p, Decl(a.js, 4, 11)) + diff --git a/tests/baselines/reference/jsdocClassMissingTypeArguments.types b/tests/baselines/reference/jsdocClassMissingTypeArguments.types new file mode 100644 index 00000000000..0c64fd3c5a7 --- /dev/null +++ b/tests/baselines/reference/jsdocClassMissingTypeArguments.types @@ -0,0 +1,10 @@ +=== /a.js === +/** @template T */ +class C {} +>C : C + +/** @param {C} p */ +function f(p) {} +>f : (p: C) => void +>p : C + diff --git a/tests/baselines/reference/jsxChildrenGenericContextualTypes.errors.txt b/tests/baselines/reference/jsxChildrenGenericContextualTypes.errors.txt index 68837c6e1fb..844459e5f95 100644 --- a/tests/baselines/reference/jsxChildrenGenericContextualTypes.errors.txt +++ b/tests/baselines/reference/jsxChildrenGenericContextualTypes.errors.txt @@ -1,14 +1,9 @@ tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(20,46): error TS2322: Type '"y"' is not assignable to type '"x"'. -tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'. - Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'. +tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(21,19): error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. + Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x">'. Types of property 'children' are incompatible. - Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'. - Types of parameters 'p' and 'x' are incompatible. - Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. - Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'. - Types of property 'prop' are incompatible. - Type '"x" | "y"' is not assignable to type '"x"'. - Type '"y"' is not assignable to type '"x"'. + Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'. + Type '"y"' is not assignable to type '"x"'. tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,21): error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. Type '{ children: () => number; prop: "x"; }' is not assignable to type 'LitProps<"x">'. Types of property 'children' are incompatible. @@ -42,16 +37,11 @@ tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx(22,21): error TS2322: !!! related TS6502 tests/cases/compiler/jsxChildrenGenericContextualTypes.tsx:13:44: The expected type comes from the return type of this signature. const argchild = {p => "y"} ~~~~~~~ -!!! error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x" | "y">'. -!!! error TS2322: Type '{ children: (p: IntrinsicAttributes & LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x" | "y">'. +!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. +!!! error TS2322: Type '{ children: (p: LitProps<"x">) => "y"; prop: "x"; }' is not assignable to type 'LitProps<"x">'. !!! error TS2322: Types of property 'children' are incompatible. -!!! error TS2322: Type '(p: IntrinsicAttributes & LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x" | "y">) => "x" | "y"'. -!!! error TS2322: Types of parameters 'p' and 'x' are incompatible. -!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. -!!! error TS2322: Type 'LitProps<"x" | "y">' is not assignable to type 'LitProps<"x">'. -!!! error TS2322: Types of property 'prop' are incompatible. -!!! error TS2322: Type '"x" | "y"' is not assignable to type '"x"'. -!!! error TS2322: Type '"y"' is not assignable to type '"x"'. +!!! error TS2322: Type '(p: LitProps<"x">) => "y"' is not assignable to type '(x: LitProps<"x">) => "x"'. +!!! error TS2322: Type '"y"' is not assignable to type '"x"'. const mismatched = {() => 12} ~~~~~~~ !!! error TS2322: Type '{ children: () => number; prop: "x"; }' is not assignable to type 'IntrinsicAttributes & LitProps<"x">'. diff --git a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types index 0e5cf26d4c7..12d1431920e 100644 --- a/tests/baselines/reference/jsxChildrenGenericContextualTypes.types +++ b/tests/baselines/reference/jsxChildrenGenericContextualTypes.types @@ -127,8 +127,8 @@ const argchild = {p => "y"} >{p => "y"} : JSX.Element >ElemLit : (p: LitProps) => JSX.Element >prop : "x" ->p => "y" : (p: JSX.IntrinsicAttributes & LitProps<"x">) => "y" ->p : JSX.IntrinsicAttributes & LitProps<"x"> +>p => "y" : (p: LitProps<"x">) => "y" +>p : LitProps<"x"> >"y" : "y" >ElemLit : (p: LitProps) => JSX.Element diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt new file mode 100644 index 00000000000..63e68d79d89 --- /dev/null +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.errors.txt @@ -0,0 +1,72 @@ +tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(37,5): error TS2322: Type '"y"' is not assignable to type '"x"'. +tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts(60,5): error TS2322: Type 'string[]' is not assignable to type 'XY[]'. + Type 'string' is not assignable to type 'XY'. + + +==== tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts (2 errors) ==== + function f1() { + let b = true; + let obj = { b }; + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; + } + + function f2() { + type Element = (string | false); + type ElementOrArray = Element | Element[]; + let el: Element = null as any; + let arr: Element[] = null as any; + let elOrA: ElementOrArray = null as any; + + // Desired/actual: All OK + let a1: ElementOrArray = el; + let a2: ElementOrArray = arr; + let a3: ElementOrArray = [el]; + let a4: ElementOrArray = Array.isArray(elOrA) ? elOrA : [elOrA]; + + // Desired: OK + // 3.0: Error + // 3.1: OK + let a5: ElementOrArray = [...Array.isArray(elOrA) ? elOrA : [elOrA]]; + } + + function f3() { + type XY = 'x' | 'y'; + const x: XY = 'x'; + let x2 = x; + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; + ~~ +!!! error TS2322: Type '"y"' is not assignable to type '"x"'. + + // Desired/actual: All OK + let x3: XY = x; + x3 = 'y'; + } + + function f4() { + const x: boolean = true; + let x1 = x; + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; + } + + function f5() { + type XY = 'x' | 'y'; + let arr: XY[] = ['x']; + arr = ['y']; + // Desired: OK + // Error in all extant branches + arr = [...['y']]; + ~~~ +!!! error TS2322: Type 'string[]' is not assignable to type 'XY[]'. +!!! error TS2322: Type 'string' is not assignable to type 'XY'. + } \ No newline at end of file diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.js b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.js new file mode 100644 index 00000000000..a4ab83607cf --- /dev/null +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.js @@ -0,0 +1,114 @@ +//// [literalFreshnessPropagationOnNarrowing.ts] +function f1() { + let b = true; + let obj = { b }; + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; +} + +function f2() { + type Element = (string | false); + type ElementOrArray = Element | Element[]; + let el: Element = null as any; + let arr: Element[] = null as any; + let elOrA: ElementOrArray = null as any; + + // Desired/actual: All OK + let a1: ElementOrArray = el; + let a2: ElementOrArray = arr; + let a3: ElementOrArray = [el]; + let a4: ElementOrArray = Array.isArray(elOrA) ? elOrA : [elOrA]; + + // Desired: OK + // 3.0: Error + // 3.1: OK + let a5: ElementOrArray = [...Array.isArray(elOrA) ? elOrA : [elOrA]]; +} + +function f3() { + type XY = 'x' | 'y'; + const x: XY = 'x'; + let x2 = x; + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; + + // Desired/actual: All OK + let x3: XY = x; + x3 = 'y'; +} + +function f4() { + const x: boolean = true; + let x1 = x; + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; +} + +function f5() { + type XY = 'x' | 'y'; + let arr: XY[] = ['x']; + arr = ['y']; + // Desired: OK + // Error in all extant branches + arr = [...['y']]; +} + +//// [literalFreshnessPropagationOnNarrowing.js] +function f1() { + var b = true; + var obj = { b: b }; + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; +} +function f2() { + var el = null; + var arr = null; + var elOrA = null; + // Desired/actual: All OK + var a1 = el; + var a2 = arr; + var a3 = [el]; + var a4 = Array.isArray(elOrA) ? elOrA : [elOrA]; + // Desired: OK + // 3.0: Error + // 3.1: OK + var a5 = (Array.isArray(elOrA) ? elOrA : [elOrA]).slice(); +} +function f3() { + var x = 'x'; + var x2 = x; + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; + // Desired/actual: All OK + var x3 = x; + x3 = 'y'; +} +function f4() { + var x = true; + var x1 = x; + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; +} +function f5() { + var arr = ['x']; + arr = ['y']; + // Desired: OK + // Error in all extant branches + arr = ['y']; +} diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.symbols b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.symbols new file mode 100644 index 00000000000..790def0be43 --- /dev/null +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.symbols @@ -0,0 +1,150 @@ +=== tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts === +function f1() { +>f1 : Symbol(f1, Decl(literalFreshnessPropagationOnNarrowing.ts, 0, 0)) + + let b = true; +>b : Symbol(b, Decl(literalFreshnessPropagationOnNarrowing.ts, 1, 7)) + + let obj = { b }; +>obj : Symbol(obj, Decl(literalFreshnessPropagationOnNarrowing.ts, 2, 7)) +>b : Symbol(b, Decl(literalFreshnessPropagationOnNarrowing.ts, 2, 15)) + + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; +>obj.b : Symbol(b, Decl(literalFreshnessPropagationOnNarrowing.ts, 2, 15)) +>obj : Symbol(obj, Decl(literalFreshnessPropagationOnNarrowing.ts, 2, 7)) +>b : Symbol(b, Decl(literalFreshnessPropagationOnNarrowing.ts, 2, 15)) +} + +function f2() { +>f2 : Symbol(f2, Decl(literalFreshnessPropagationOnNarrowing.ts, 8, 1)) + + type Element = (string | false); +>Element : Symbol(Element, Decl(literalFreshnessPropagationOnNarrowing.ts, 10, 15)) + + type ElementOrArray = Element | Element[]; +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>Element : Symbol(Element, Decl(literalFreshnessPropagationOnNarrowing.ts, 10, 15)) +>Element : Symbol(Element, Decl(literalFreshnessPropagationOnNarrowing.ts, 10, 15)) + + let el: Element = null as any; +>el : Symbol(el, Decl(literalFreshnessPropagationOnNarrowing.ts, 13, 7)) +>Element : Symbol(Element, Decl(literalFreshnessPropagationOnNarrowing.ts, 10, 15)) + + let arr: Element[] = null as any; +>arr : Symbol(arr, Decl(literalFreshnessPropagationOnNarrowing.ts, 14, 7)) +>Element : Symbol(Element, Decl(literalFreshnessPropagationOnNarrowing.ts, 10, 15)) + + let elOrA: ElementOrArray = null as any; +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) + + // Desired/actual: All OK + let a1: ElementOrArray = el; +>a1 : Symbol(a1, Decl(literalFreshnessPropagationOnNarrowing.ts, 18, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>el : Symbol(el, Decl(literalFreshnessPropagationOnNarrowing.ts, 13, 7)) + + let a2: ElementOrArray = arr; +>a2 : Symbol(a2, Decl(literalFreshnessPropagationOnNarrowing.ts, 19, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>arr : Symbol(arr, Decl(literalFreshnessPropagationOnNarrowing.ts, 14, 7)) + + let a3: ElementOrArray = [el]; +>a3 : Symbol(a3, Decl(literalFreshnessPropagationOnNarrowing.ts, 20, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>el : Symbol(el, Decl(literalFreshnessPropagationOnNarrowing.ts, 13, 7)) + + let a4: ElementOrArray = Array.isArray(elOrA) ? elOrA : [elOrA]; +>a4 : Symbol(a4, Decl(literalFreshnessPropagationOnNarrowing.ts, 21, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) + + // Desired: OK + // 3.0: Error + // 3.1: OK + let a5: ElementOrArray = [...Array.isArray(elOrA) ? elOrA : [elOrA]]; +>a5 : Symbol(a5, Decl(literalFreshnessPropagationOnNarrowing.ts, 26, 7)) +>ElementOrArray : Symbol(ElementOrArray, Decl(literalFreshnessPropagationOnNarrowing.ts, 11, 36)) +>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.es5.d.ts, --, --)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +>elOrA : Symbol(elOrA, Decl(literalFreshnessPropagationOnNarrowing.ts, 15, 7)) +} + +function f3() { +>f3 : Symbol(f3, Decl(literalFreshnessPropagationOnNarrowing.ts, 27, 1)) + + type XY = 'x' | 'y'; +>XY : Symbol(XY, Decl(literalFreshnessPropagationOnNarrowing.ts, 29, 15)) + + const x: XY = 'x'; +>x : Symbol(x, Decl(literalFreshnessPropagationOnNarrowing.ts, 31, 9)) +>XY : Symbol(XY, Decl(literalFreshnessPropagationOnNarrowing.ts, 29, 15)) + + let x2 = x; +>x2 : Symbol(x2, Decl(literalFreshnessPropagationOnNarrowing.ts, 32, 7)) +>x : Symbol(x, Decl(literalFreshnessPropagationOnNarrowing.ts, 31, 9)) + + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; +>x2 : Symbol(x2, Decl(literalFreshnessPropagationOnNarrowing.ts, 32, 7)) + + // Desired/actual: All OK + let x3: XY = x; +>x3 : Symbol(x3, Decl(literalFreshnessPropagationOnNarrowing.ts, 39, 7)) +>XY : Symbol(XY, Decl(literalFreshnessPropagationOnNarrowing.ts, 29, 15)) +>x : Symbol(x, Decl(literalFreshnessPropagationOnNarrowing.ts, 31, 9)) + + x3 = 'y'; +>x3 : Symbol(x3, Decl(literalFreshnessPropagationOnNarrowing.ts, 39, 7)) +} + +function f4() { +>f4 : Symbol(f4, Decl(literalFreshnessPropagationOnNarrowing.ts, 41, 1)) + + const x: boolean = true; +>x : Symbol(x, Decl(literalFreshnessPropagationOnNarrowing.ts, 44, 9)) + + let x1 = x; +>x1 : Symbol(x1, Decl(literalFreshnessPropagationOnNarrowing.ts, 45, 7)) +>x : Symbol(x, Decl(literalFreshnessPropagationOnNarrowing.ts, 44, 9)) + + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; +>x1 : Symbol(x1, Decl(literalFreshnessPropagationOnNarrowing.ts, 45, 7)) +} + +function f5() { +>f5 : Symbol(f5, Decl(literalFreshnessPropagationOnNarrowing.ts, 51, 1)) + + type XY = 'x' | 'y'; +>XY : Symbol(XY, Decl(literalFreshnessPropagationOnNarrowing.ts, 53, 15)) + + let arr: XY[] = ['x']; +>arr : Symbol(arr, Decl(literalFreshnessPropagationOnNarrowing.ts, 55, 7)) +>XY : Symbol(XY, Decl(literalFreshnessPropagationOnNarrowing.ts, 53, 15)) + + arr = ['y']; +>arr : Symbol(arr, Decl(literalFreshnessPropagationOnNarrowing.ts, 55, 7)) + + // Desired: OK + // Error in all extant branches + arr = [...['y']]; +>arr : Symbol(arr, Decl(literalFreshnessPropagationOnNarrowing.ts, 55, 7)) +} diff --git a/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types new file mode 100644 index 00000000000..8fb03bc413f --- /dev/null +++ b/tests/baselines/reference/literalFreshnessPropagationOnNarrowing.types @@ -0,0 +1,175 @@ +=== tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts === +function f1() { +>f1 : () => void + + let b = true; +>b : boolean +>true : true + + let obj = { b }; +>obj : { b: boolean; } +>{ b } : { b: boolean; } +>b : boolean + + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; +>obj.b = false : false +>obj.b : boolean +>obj : { b: boolean; } +>b : boolean +>false : false +} + +function f2() { +>f2 : () => void + + type Element = (string | false); +>Element : string | false +>false : false + + type ElementOrArray = Element | Element[]; +>ElementOrArray : string | false | (string | false)[] + + let el: Element = null as any; +>el : string | false +>null as any : any +>null : null + + let arr: Element[] = null as any; +>arr : (string | false)[] +>null as any : any +>null : null + + let elOrA: ElementOrArray = null as any; +>elOrA : string | false | (string | false)[] +>null as any : any +>null : null + + // Desired/actual: All OK + let a1: ElementOrArray = el; +>a1 : string | false | (string | false)[] +>el : string | false + + let a2: ElementOrArray = arr; +>a2 : string | false | (string | false)[] +>arr : (string | false)[] + + let a3: ElementOrArray = [el]; +>a3 : string | false | (string | false)[] +>[el] : (string | false)[] +>el : string | false + + let a4: ElementOrArray = Array.isArray(elOrA) ? elOrA : [elOrA]; +>a4 : string | false | (string | false)[] +>Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] +>Array.isArray(elOrA) : boolean +>Array.isArray : (arg: any) => arg is any[] +>Array : ArrayConstructor +>isArray : (arg: any) => arg is any[] +>elOrA : string | false | (string | false)[] +>elOrA : (string | false)[] +>[elOrA] : (string | false)[] +>elOrA : string | false + + // Desired: OK + // 3.0: Error + // 3.1: OK + let a5: ElementOrArray = [...Array.isArray(elOrA) ? elOrA : [elOrA]]; +>a5 : string | false | (string | false)[] +>[...Array.isArray(elOrA) ? elOrA : [elOrA]] : (string | false)[] +>...Array.isArray(elOrA) ? elOrA : [elOrA] : string | false +>Array.isArray(elOrA) ? elOrA : [elOrA] : (string | false)[] +>Array.isArray(elOrA) : boolean +>Array.isArray : (arg: any) => arg is any[] +>Array : ArrayConstructor +>isArray : (arg: any) => arg is any[] +>elOrA : string | false | (string | false)[] +>elOrA : (string | false)[] +>[elOrA] : (string | false)[] +>elOrA : string | false +} + +function f3() { +>f3 : () => void + + type XY = 'x' | 'y'; +>XY : "x" | "y" + + const x: XY = 'x'; +>x : "x" | "y" +>'x' : "x" + + let x2 = x; +>x2 : "x" +>x : "x" + + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; +>x2 = 'y' : "y" +>x2 : "x" +>'y' : "y" + + // Desired/actual: All OK + let x3: XY = x; +>x3 : "x" | "y" +>x : "x" + + x3 = 'y'; +>x3 = 'y' : "y" +>x3 : "x" | "y" +>'y' : "y" +} + +function f4() { +>f4 : () => void + + const x: boolean = true; +>x : boolean +>true : true + + let x1 = x; +>x1 : boolean +>x : true + + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; +>x1 = false : false +>x1 : boolean +>false : false +} + +function f5() { +>f5 : () => void + + type XY = 'x' | 'y'; +>XY : "x" | "y" + + let arr: XY[] = ['x']; +>arr : ("x" | "y")[] +>['x'] : "x"[] +>'x' : "x" + + arr = ['y']; +>arr = ['y'] : "y"[] +>arr : ("x" | "y")[] +>['y'] : "y"[] +>'y' : "y" + + // Desired: OK + // Error in all extant branches + arr = [...['y']]; +>arr = [...['y']] : string[] +>arr : ("x" | "y")[] +>[...['y']] : string[] +>...['y'] : string +>['y'] : string[] +>'y' : "y" +} diff --git a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt index 35e0e0fb1ab..f2c77d62984 100644 --- a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt +++ b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt @@ -41,7 +41,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t Math.sign(1); ~~~~ !!! error TS2551: Property 'sign' does not exist on type 'Math'. Did you mean 'sin'? -!!! related TS2728 /.ts/lib.es5.d.ts:643:5: 'sin' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:703:5: 'sin' is declared here. // Using ES6 object var o = { diff --git a/tests/baselines/reference/moduleExportAliasUnknown.errors.txt b/tests/baselines/reference/moduleExportAliasUnknown.errors.txt new file mode 100644 index 00000000000..83d04dfefb7 --- /dev/null +++ b/tests/baselines/reference/moduleExportAliasUnknown.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/salsa/bug27025.js(1,25): error TS2339: Property 'nonprop' does not exist on type 'Window'. +tests/cases/conformance/salsa/bug27025.js(2,15): error TS2304: Cannot find name 'bar'. + + +==== tests/cases/conformance/salsa/bug27025.js (2 errors) ==== + module.exports = window.nonprop; + ~~~~~~~ +!!! error TS2339: Property 'nonprop' does not exist on type 'Window'. + exports.foo = bar; + ~~~ +!!! error TS2304: Cannot find name 'bar'. + \ No newline at end of file diff --git a/tests/baselines/reference/moduleExportAliasUnknown.symbols b/tests/baselines/reference/moduleExportAliasUnknown.symbols new file mode 100644 index 00000000000..2913a704e10 --- /dev/null +++ b/tests/baselines/reference/moduleExportAliasUnknown.symbols @@ -0,0 +1,11 @@ +=== tests/cases/conformance/salsa/bug27025.js === +module.exports = window.nonprop; +>module.exports : Symbol("tests/cases/conformance/salsa/bug27025", Decl(bug27025.js, 0, 0)) +>module : Symbol(export=, Decl(bug27025.js, 0, 0)) +>exports : Symbol(export=, Decl(bug27025.js, 0, 0)) +>window : Symbol(window, Decl(lib.dom.d.ts, --, --)) + +exports.foo = bar; +>exports : Symbol(foo, Decl(bug27025.js, 0, 32)) +>foo : Symbol(foo, Decl(bug27025.js, 0, 32)) + diff --git a/tests/baselines/reference/moduleExportAliasUnknown.types b/tests/baselines/reference/moduleExportAliasUnknown.types new file mode 100644 index 00000000000..60fae1456d1 --- /dev/null +++ b/tests/baselines/reference/moduleExportAliasUnknown.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/salsa/bug27025.js === +module.exports = window.nonprop; +>module.exports = window.nonprop : any +>module.exports : any +>module : { "tests/cases/conformance/salsa/bug27025": any; } +>exports : any +>window.nonprop : any +>window : Window +>nonprop : any + +exports.foo = bar; +>exports.foo = bar : any +>exports.foo : any +>exports : any +>foo : any +>bar : any + diff --git a/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.js b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.js new file mode 100644 index 00000000000..14e34f6d7ed --- /dev/null +++ b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.js @@ -0,0 +1,14 @@ +//// [tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts] //// + +//// [index.d.ts] +declare const a: number; + +//// [index.d.ts] +declare const a: string; + +//// [a.ts] +a; + + +//// [a.js] +a; diff --git a/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.symbols b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.symbols new file mode 100644 index 00000000000..83074ddb6b5 --- /dev/null +++ b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.symbols @@ -0,0 +1,8 @@ +=== /a.ts === +a; +>a : Symbol(a, Decl(index.d.ts, 0, 13)) + +=== /node_modules/@types/a/index.d.ts === +declare const a: string; +>a : Symbol(a, Decl(index.d.ts, 0, 13)) + diff --git a/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.types b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.types new file mode 100644 index 00000000000..fee11fb8b06 --- /dev/null +++ b/tests/baselines/reference/moduleResolution_automaticTypeDirectiveNames.types @@ -0,0 +1,8 @@ +=== /a.ts === +a; +>a : string + +=== /node_modules/@types/a/index.d.ts === +declare const a: string; +>a : string + diff --git a/tests/baselines/reference/moduleResolution_noLeadingDot.js b/tests/baselines/reference/moduleResolution_noLeadingDot.js new file mode 100644 index 00000000000..9e2cbaa736e --- /dev/null +++ b/tests/baselines/reference/moduleResolution_noLeadingDot.js @@ -0,0 +1,11 @@ +//// [tests/cases/compiler/moduleResolution_noLeadingDot.ts] //// + +//// [README.md] +This is a test. + +//// [a.ts] +true; + + +//// [a.js] +true; diff --git a/tests/baselines/reference/moduleResolution_noLeadingDot.symbols b/tests/baselines/reference/moduleResolution_noLeadingDot.symbols new file mode 100644 index 00000000000..a7ee88bd3ff --- /dev/null +++ b/tests/baselines/reference/moduleResolution_noLeadingDot.symbols @@ -0,0 +1,4 @@ +=== /a.ts === +true; +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolution_noLeadingDot.types b/tests/baselines/reference/moduleResolution_noLeadingDot.types new file mode 100644 index 00000000000..829e8be6f64 --- /dev/null +++ b/tests/baselines/reference/moduleResolution_noLeadingDot.types @@ -0,0 +1,4 @@ +=== /a.ts === +true; +>true : true + diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index 699b65a4f64..12b2790c3de 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -24,7 +24,7 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ !!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here. } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 216211b2fa2..f5c0c5728f1 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -22,7 +22,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here. } if (x instanceof Date) { @@ -30,6 +30,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:693:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:753:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index c35d3263b8f..385357f2204 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -39,7 +39,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.mesage; ~~~~~~ !!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? -!!! related TS2728 /.ts/lib.es5.d.ts:904:5: 'message' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:964:5: 'message' is declared here. } if (isDate(x)) { @@ -47,6 +47,6 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.getHuors(); ~~~~~~~~ !!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? -!!! related TS2728 /.ts/lib.es5.d.ts:693:5: 'getHours' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:753:5: 'getHours' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index d0db1597607..bd7db9c44fe 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo !!! error TS1005: ';' expected. ~~~~~~~~ !!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? -!!! related TS2728 /.ts/lib.es5.d.ts:457:15: 'String' is declared here. \ No newline at end of file +!!! related TS2728 /.ts/lib.es5.d.ts:517:15: 'String' is declared here. \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index 16a1a9c5ff2..136d4477268 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index a644e1b6f0d..3a35d5f0a83 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index f29839f43c1..35fc8935b73 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index 803119cc3e7..2e16f696620 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -11,13 +11,13 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/promiseTypeInference.errors.txt b/tests/baselines/reference/promiseTypeInference.errors.txt index 0ae42f3cbbd..5edf8f5b091 100644 --- a/tests/baselines/reference/promiseTypeInference.errors.txt +++ b/tests/baselines/reference/promiseTypeInference.errors.txt @@ -26,5 +26,5 @@ tests/cases/compiler/promiseTypeInference.ts(10,39): error TS2322: Type 'IPromis !!! error TS2322: Types of parameters 'success' and 'onfulfilled' are incompatible. !!! error TS2322: Type 'TResult1 | PromiseLike' is not assignable to type 'IPromise'. !!! error TS2322: Type 'TResult1' is not assignable to type 'IPromise'. -!!! related TS6502 /.ts/lib.es5.d.ts:1336:57: The expected type comes from the return type of this signature. +!!! related TS6502 /.ts/lib.es5.d.ts:1396:57: The expected type comes from the return type of this signature. \ No newline at end of file diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt index 2ec0fc09c92..dbc1e42c572 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.errors.txt @@ -1,16 +1,21 @@ -tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(26,36): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. - Type 'void' is not assignable to type 'boolean'. -tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(48,37): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(27,36): error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. + Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. + Type 'void' is not assignable to type 'boolean'. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(43,41): error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. + Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. + Type 'void' is not assignable to type 'boolean'. +tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(64,37): error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. Type 'void' is not assignable to type 'boolean'. -==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (2 errors) ==== +==== tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx (3 errors) ==== /// import React from 'react'; interface BaseProps { - when?: (value: string) => boolean; + when?: ((value: string) => boolean) | "a" | "b"; + error?: boolean; } interface Props extends BaseProps { @@ -32,10 +37,31 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(48,37): error TS2322: // Error: Void not assignable to boolean const Test2 = () => console.log(value)} />; ~~~~ -!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. -!!! error TS2322: Type 'void' is not assignable to type 'boolean'. -!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Pick & Readonly, "children"> & Partial & Readonly, "when">> & Partial boolean; }, never>>' +!!! error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. +!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. +!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Pick & Readonly, "children" | "error"> & Partial & Readonly, "when">> & Partial boolean; }, never>>' + class FieldFeedbackBeta

extends React.Component

{ + static defaultProps: BaseProps = { + when: () => true + }; + + render() { + return

Hello
; + } + } + + // OK + const Test1a = () => !!value} error>Hah; + + // Error: Void not assignable to boolean + const Test2a = () => console.log(value)} error>Hah; + ~~~~ +!!! error TS2322: Type '(value: string) => void' is not assignable to type '"a" | "b" | ((value: string) => boolean) | undefined'. +!!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. +!!! error TS2322: Type 'void' is not assignable to type 'boolean'. +!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:6:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Pick & Readonly, "children"> & Partial & Readonly, "when" | "error">> & Partial>' interface MyPropsProps extends Props { when: (value: string) => boolean; @@ -60,7 +86,7 @@ tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx(48,37): error TS2322: ~~~~ !!! error TS2322: Type '(value: string) => void' is not assignable to type '(value: string) => boolean'. !!! error TS2322: Type 'void' is not assignable to type 'boolean'. -!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:30:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Pick & Readonly, "children"> & Partial & Readonly, "when">> & Partial boolean; }, never>>' +!!! related TS6500 tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx:46:3: The expected type comes from property 'when' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes> & Pick & Readonly, "children" | "error"> & Partial & Readonly, "when">> & Partial boolean; }, never>>' // OK const Test5 = () => ; diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js index 84db36ee4da..34d370ca2a2 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.js @@ -4,7 +4,8 @@ import React from 'react'; interface BaseProps { - when?: (value: string) => boolean; + when?: ((value: string) => boolean) | "a" | "b"; + error?: boolean; } interface Props extends BaseProps { @@ -26,6 +27,21 @@ const Test1 = () => !!value} />; // Error: Void not assignable to boolean const Test2 = () => console.log(value)} />; +class FieldFeedbackBeta

extends React.Component

{ + static defaultProps: BaseProps = { + when: () => true + }; + + render() { + return

Hello
; + } +} + +// OK +const Test1a = () => !!value} error>Hah; + +// Error: Void not assignable to boolean +const Test2a = () => console.log(value)} error>Hah; interface MyPropsProps extends Props { when: (value: string) => boolean; @@ -90,6 +106,23 @@ var FieldFeedback = /** @class */ (function (_super) { var Test1 = function () { return react_1["default"].createElement(FieldFeedback, { when: function (value) { return !!value; } }); }; // Error: Void not assignable to boolean var Test2 = function () { return react_1["default"].createElement(FieldFeedback, { when: function (value) { return console.log(value); } }); }; +var FieldFeedbackBeta = /** @class */ (function (_super) { + __extends(FieldFeedbackBeta, _super); + function FieldFeedbackBeta() { + return _super !== null && _super.apply(this, arguments) || this; + } + FieldFeedbackBeta.prototype.render = function () { + return react_1["default"].createElement("div", null, "Hello"); + }; + FieldFeedbackBeta.defaultProps = { + when: function () { return true; } + }; + return FieldFeedbackBeta; +}(react_1["default"].Component)); +// OK +var Test1a = function () { return react_1["default"].createElement(FieldFeedbackBeta, { when: function (value) { return !!value; }, error: true }, "Hah"); }; +// Error: Void not assignable to boolean +var Test2a = function () { return react_1["default"].createElement(FieldFeedbackBeta, { when: function (value) { return console.log(value); }, error: true }, "Hah"); }; var FieldFeedback2 = /** @class */ (function (_super) { __extends(FieldFeedback2, _super); function FieldFeedback2() { diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols index dadaf9ea745..f5cff116a4c 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.symbols @@ -7,36 +7,39 @@ import React from 'react'; interface BaseProps { >BaseProps : Symbol(BaseProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 26)) - when?: (value: string) => boolean; + when?: ((value: string) => boolean) | "a" | "b"; >when : Symbol(BaseProps.when, Decl(reactDefaultPropsInferenceSuccess.tsx, 4, 21)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 5, 10)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 5, 11)) + + error?: boolean; +>error : Symbol(BaseProps.error, Decl(reactDefaultPropsInferenceSuccess.tsx, 5, 50)) } interface Props extends BaseProps { ->Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 6, 1)) +>Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 7, 1)) >BaseProps : Symbol(BaseProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 26)) } class FieldFeedback

extends React.Component

{ ->FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 9, 1)) ->P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 11, 20)) ->Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 6, 1)) +>FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 10, 1)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 12, 20)) +>Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 7, 1)) >BaseProps : Symbol(BaseProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 26)) >React.Component : Symbol(React.Component, Decl(react16.d.ts, 345, 54), Decl(react16.d.ts, 349, 94)) >React : Symbol(React, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 6)) >Component : Symbol(React.Component, Decl(react16.d.ts, 345, 54), Decl(react16.d.ts, 349, 94)) ->P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 11, 20)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 12, 20)) static defaultProps = { ->defaultProps : Symbol(FieldFeedback.defaultProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 11, 77)) +>defaultProps : Symbol(FieldFeedback.defaultProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 12, 77)) when: () => true ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 12, 25)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 13, 25)) }; render() { ->render : Symbol(FieldFeedback.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 14, 4)) +>render : Symbol(FieldFeedback.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 15, 4)) return

Hello
; >div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) @@ -46,58 +49,108 @@ class FieldFeedback

extends React.Component

{ // OK const Test1 = () => !!value} />; ->Test1 : Symbol(Test1, Decl(reactDefaultPropsInferenceSuccess.tsx, 22, 5)) ->FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 9, 1)) ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 22, 34)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 22, 41)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 22, 41)) +>Test1 : Symbol(Test1, Decl(reactDefaultPropsInferenceSuccess.tsx, 23, 5)) +>FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 10, 1)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 23, 34)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 23, 41)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 23, 41)) // Error: Void not assignable to boolean const Test2 = () => console.log(value)} />; ->Test2 : Symbol(Test2, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 5)) ->FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 9, 1)) ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 34)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 41)) +>Test2 : Symbol(Test2, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 5)) +>FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 10, 1)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 34)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 41)) >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, --, --)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 41)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 41)) +class FieldFeedbackBeta

extends React.Component

{ +>FieldFeedbackBeta : Symbol(FieldFeedbackBeta, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 73)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 24)) +>Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 7, 1)) +>BaseProps : Symbol(BaseProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 26)) +>React.Component : Symbol(React.Component, Decl(react16.d.ts, 345, 54), Decl(react16.d.ts, 349, 94)) +>React : Symbol(React, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 6)) +>Component : Symbol(React.Component, Decl(react16.d.ts, 345, 54), Decl(react16.d.ts, 349, 94)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 24)) -interface MyPropsProps extends Props { ->MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 73)) ->Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 6, 1)) - - when: (value: string) => boolean; ->when : Symbol(MyPropsProps.when, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 38)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 29, 9)) -} - -class FieldFeedback2

extends FieldFeedback

{ ->FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 30, 1)) ->P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 32, 21)) ->MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 73)) ->MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 25, 73)) ->FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 9, 1)) ->P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 32, 21)) - - static defaultProps = { ->defaultProps : Symbol(FieldFeedback2.defaultProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 32, 86)) + static defaultProps: BaseProps = { +>defaultProps : Symbol(FieldFeedbackBeta.defaultProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 81)) +>BaseProps : Symbol(BaseProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 2, 26)) when: () => true ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 33, 25)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 29, 36)) }; render() { ->render : Symbol(FieldFeedback2.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 35, 4)) +>render : Symbol(FieldFeedbackBeta.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 31, 4)) + + return

Hello
; +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) +>div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) + } +} + +// OK +const Test1a = () => !!value} error>Hah; +>Test1a : Symbol(Test1a, Decl(reactDefaultPropsInferenceSuccess.tsx, 39, 5)) +>FieldFeedbackBeta : Symbol(FieldFeedbackBeta, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 73)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 39, 39)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 39, 46)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 39, 46)) +>error : Symbol(error, Decl(reactDefaultPropsInferenceSuccess.tsx, 39, 63)) +>FieldFeedbackBeta : Symbol(FieldFeedbackBeta, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 73)) + +// Error: Void not assignable to boolean +const Test2a = () => console.log(value)} error>Hah; +>Test2a : Symbol(Test2a, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 5)) +>FieldFeedbackBeta : Symbol(FieldFeedbackBeta, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 73)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 39)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 46)) +>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, --, --)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 46)) +>error : Symbol(error, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 74)) +>FieldFeedbackBeta : Symbol(FieldFeedbackBeta, Decl(reactDefaultPropsInferenceSuccess.tsx, 26, 73)) + +interface MyPropsProps extends Props { +>MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 105)) +>Props : Symbol(Props, Decl(reactDefaultPropsInferenceSuccess.tsx, 7, 1)) + + when: (value: string) => boolean; +>when : Symbol(MyPropsProps.when, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 38)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 45, 9)) +} + +class FieldFeedback2

extends FieldFeedback

{ +>FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 46, 1)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 48, 21)) +>MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 105)) +>MyPropsProps : Symbol(MyPropsProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 42, 105)) +>FieldFeedback : Symbol(FieldFeedback, Decl(reactDefaultPropsInferenceSuccess.tsx, 10, 1)) +>P : Symbol(P, Decl(reactDefaultPropsInferenceSuccess.tsx, 48, 21)) + + static defaultProps = { +>defaultProps : Symbol(FieldFeedback2.defaultProps, Decl(reactDefaultPropsInferenceSuccess.tsx, 48, 86)) + + when: () => true +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 49, 25)) + + }; + + render() { +>render : Symbol(FieldFeedback2.render, Decl(reactDefaultPropsInferenceSuccess.tsx, 51, 4)) this.props.when("now"); // OK, always defined ->this.props.when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 38)) +>this.props.when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 38)) >this.props : Symbol(React.Component.props, Decl(react16.d.ts, 367, 32)) ->this : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 30, 1)) +>this : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 46, 1)) >props : Symbol(React.Component.props, Decl(react16.d.ts, 367, 32)) ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 28, 38)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 38)) return

Hello
; >div : Symbol(JSX.IntrinsicElements.div, Decl(react16.d.ts, 2420, 114)) @@ -107,25 +160,25 @@ class FieldFeedback2

extends FieldFeedbac // OK const Test3 = () => !!value} />; ->Test3 : Symbol(Test3, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 5)) ->FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 30, 1)) ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 35)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 42)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 44, 42)) +>Test3 : Symbol(Test3, Decl(reactDefaultPropsInferenceSuccess.tsx, 60, 5)) +>FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 46, 1)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 60, 35)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 60, 42)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 60, 42)) // Error: Void not assignable to boolean const Test4 = () => console.log(value)} />; ->Test4 : Symbol(Test4, Decl(reactDefaultPropsInferenceSuccess.tsx, 47, 5)) ->FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 30, 1)) ->when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 47, 35)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 47, 42)) +>Test4 : Symbol(Test4, Decl(reactDefaultPropsInferenceSuccess.tsx, 63, 5)) +>FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 46, 1)) +>when : Symbol(when, Decl(reactDefaultPropsInferenceSuccess.tsx, 63, 35)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 63, 42)) >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, --, --)) ->value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 47, 42)) +>value : Symbol(value, Decl(reactDefaultPropsInferenceSuccess.tsx, 63, 42)) // OK const Test5 = () => ; ->Test5 : Symbol(Test5, Decl(reactDefaultPropsInferenceSuccess.tsx, 50, 5)) ->FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 30, 1)) +>Test5 : Symbol(Test5, Decl(reactDefaultPropsInferenceSuccess.tsx, 66, 5)) +>FieldFeedback2 : Symbol(FieldFeedback2, Decl(reactDefaultPropsInferenceSuccess.tsx, 46, 1)) diff --git a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types index 91d918b0923..bca297d3a1d 100644 --- a/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types +++ b/tests/baselines/reference/reactDefaultPropsInferenceSuccess.types @@ -5,9 +5,12 @@ import React from 'react'; >React : typeof React interface BaseProps { - when?: (value: string) => boolean; ->when : ((value: string) => boolean) | undefined + when?: ((value: string) => boolean) | "a" | "b"; +>when : "a" | "b" | ((value: string) => boolean) | undefined >value : string + + error?: boolean; +>error : boolean | undefined } interface Props extends BaseProps { @@ -68,6 +71,64 @@ const Test2 = () => console.log(value)} />; >log : (message?: any, ...optionalParams: any[]) => void >value : string +class FieldFeedbackBeta

extends React.Component

{ +>FieldFeedbackBeta : FieldFeedbackBeta

+>React.Component : React.Component +>React : typeof React +>Component : typeof React.Component + + static defaultProps: BaseProps = { +>defaultProps : BaseProps +>{ when: () => true } : { when: () => true; } + + when: () => true +>when : () => true +>() => true : () => true +>true : true + + }; + + render() { +>render : () => JSX.Element + + return

Hello
; +>
Hello
: JSX.Element +>div : any +>div : any + } +} + +// OK +const Test1a = () => !!value} error>Hah; +>Test1a : () => JSX.Element +>() => !!value} error>Hah : () => JSX.Element +> !!value} error>Hah : JSX.Element +>FieldFeedbackBeta : typeof FieldFeedbackBeta +>when : (value: string) => boolean +>value => !!value : (value: string) => boolean +>value : string +>!!value : boolean +>!value : boolean +>value : string +>error : true +>FieldFeedbackBeta : typeof FieldFeedbackBeta + +// Error: Void not assignable to boolean +const Test2a = () => console.log(value)} error>Hah; +>Test2a : () => JSX.Element +>() => console.log(value)} error>Hah : () => JSX.Element +> console.log(value)} error>Hah : JSX.Element +>FieldFeedbackBeta : typeof FieldFeedbackBeta +>when : (value: string) => void +>value => console.log(value) : (value: string) => void +>value : string +>console.log(value) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>value : string +>error : true +>FieldFeedbackBeta : typeof FieldFeedbackBeta interface MyPropsProps extends Props { when: (value: string) => boolean; diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index da25f2199cf..f61392a51ec 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -19,7 +19,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } //CHECK#2 @@ -28,7 +28,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 4bfaf868f6d..f7ab44d83d5 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -21,7 +21,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index 1ff3ea85676..ab3bddb5bc6 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -50,70 +50,70 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error $ERROR('#А'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ !!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? -!!! related TS2728 /.ts/lib.es5.d.ts:914:15: 'Error' is declared here. +!!! related TS2728 /.ts/lib.es5.d.ts:974:15: 'Error' is declared here. } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/strictBindCallApply1.errors.txt b/tests/baselines/reference/strictBindCallApply1.errors.txt new file mode 100644 index 00000000000..e998238a8f7 --- /dev/null +++ b/tests/baselines/reference/strictBindCallApply1.errors.txt @@ -0,0 +1,139 @@ +tests/cases/conformance/functions/strictBindCallApply1.ts(6,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(9,11): error TS2554: Expected 3 arguments, but got 2. +tests/cases/conformance/functions/strictBindCallApply1.ts(10,35): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(11,11): error TS2554: Expected 3 arguments, but got 4. +tests/cases/conformance/functions/strictBindCallApply1.ts(14,32): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. + Property '1' is missing in type '[number]'. +tests/cases/conformance/functions/strictBindCallApply1.ts(15,37): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(16,32): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. + Types of property 'length' are incompatible. + Type '3' is not assignable to type '2'. +tests/cases/conformance/functions/strictBindCallApply1.ts(29,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(30,22): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +tests/cases/conformance/functions/strictBindCallApply1.ts(33,11): error TS2554: Expected 3 arguments, but got 2. +tests/cases/conformance/functions/strictBindCallApply1.ts(34,29): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(35,11): error TS2554: Expected 3 arguments, but got 4. +tests/cases/conformance/functions/strictBindCallApply1.ts(36,22): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +tests/cases/conformance/functions/strictBindCallApply1.ts(39,26): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. +tests/cases/conformance/functions/strictBindCallApply1.ts(40,31): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(41,26): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. +tests/cases/conformance/functions/strictBindCallApply1.ts(42,23): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. +tests/cases/conformance/functions/strictBindCallApply1.ts(47,33): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(50,1): error TS2554: Expected 3 arguments, but got 2. +tests/cases/conformance/functions/strictBindCallApply1.ts(51,15): error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(52,1): error TS2554: Expected 3 arguments, but got 4. +tests/cases/conformance/functions/strictBindCallApply1.ts(55,12): error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. +tests/cases/conformance/functions/strictBindCallApply1.ts(56,17): error TS2322: Type 'number' is not assignable to type 'string'. +tests/cases/conformance/functions/strictBindCallApply1.ts(57,12): error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. + + +==== tests/cases/conformance/functions/strictBindCallApply1.ts (24 errors) ==== + declare function foo(a: number, b: string): string; + + let f00 = foo.bind(undefined); + let f01 = foo.bind(undefined, 10); + let f02 = foo.bind(undefined, 10, "hello"); + let f03 = foo.bind(undefined, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + + let c00 = foo.call(undefined, 10, "hello"); + let c01 = foo.call(undefined, 10); // Error + ~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 2. + let c02 = foo.call(undefined, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + let c03 = foo.call(undefined, 10, "hello", 30); // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 4. + + let a00 = foo.apply(undefined, [10, "hello"]); + let a01 = foo.apply(undefined, [10]); // Error + ~~~~ +!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. +!!! error TS2345: Property '1' is missing in type '[number]'. + let a02 = foo.apply(undefined, [10, 20]); // Error + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + let a03 = foo.apply(undefined, [10, "hello", 30]); // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. +!!! error TS2345: Types of property 'length' are incompatible. +!!! error TS2345: Type '3' is not assignable to type '2'. + + class C { + constructor(a: number, b: string) {} + foo(this: this, a: number, b: string): string { return "" } + } + + declare let c: C; + declare let obj: {}; + + let f10 = c.foo.bind(c); + let f11 = c.foo.bind(c, 10); + let f12 = c.foo.bind(c, 10, "hello"); + let f13 = c.foo.bind(c, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + let f14 = c.foo.bind(undefined); // Error + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. + + let c10 = c.foo.call(c, 10, "hello"); + let c11 = c.foo.call(c, 10); // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 2. + let c12 = c.foo.call(c, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + let c13 = c.foo.call(c, 10, "hello", 30); // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 4. + let c14 = c.foo.call(undefined, 10, "hello"); // Error + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. + + let a10 = c.foo.apply(c, [10, "hello"]); + let a11 = c.foo.apply(c, [10]); // Error + ~~~~ +!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. + let a12 = c.foo.apply(c, [10, 20]); // Error + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + let a13 = c.foo.apply(c, [10, "hello", 30]); // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. + let a14 = c.foo.apply(undefined, [10, "hello"]); // Error + ~~~~~~~~~ +!!! error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'C'. + + let f20 = C.bind(undefined); + let f21 = C.bind(undefined, 10); + let f22 = C.bind(undefined, 10, "hello"); + let f23 = C.bind(undefined, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + + C.call(c, 10, "hello"); + C.call(c, 10); // Error + ~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 2. + C.call(c, 10, 20); // Error + ~~ +!!! error TS2345: Argument of type '20' is not assignable to parameter of type 'string'. + C.call(c, 10, "hello", 30); // Error + ~~~~~~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2554: Expected 3 arguments, but got 4. + + C.apply(c, [10, "hello"]); + C.apply(c, [10]); // Error + ~~~~ +!!! error TS2345: Argument of type '[number]' is not assignable to parameter of type '[number, string]'. + C.apply(c, [10, 20]); // Error + ~~ +!!! error TS2322: Type 'number' is not assignable to type 'string'. + C.apply(c, [10, "hello", 30]); // Error + ~~~~~~~~~~~~~~~~~ +!!! error TS2345: Argument of type '[number, string, number]' is not assignable to parameter of type '[number, string]'. + \ No newline at end of file diff --git a/tests/baselines/reference/strictBindCallApply1.js b/tests/baselines/reference/strictBindCallApply1.js new file mode 100644 index 00000000000..e43c84edbf1 --- /dev/null +++ b/tests/baselines/reference/strictBindCallApply1.js @@ -0,0 +1,107 @@ +//// [strictBindCallApply1.ts] +declare function foo(a: number, b: string): string; + +let f00 = foo.bind(undefined); +let f01 = foo.bind(undefined, 10); +let f02 = foo.bind(undefined, 10, "hello"); +let f03 = foo.bind(undefined, 10, 20); // Error + +let c00 = foo.call(undefined, 10, "hello"); +let c01 = foo.call(undefined, 10); // Error +let c02 = foo.call(undefined, 10, 20); // Error +let c03 = foo.call(undefined, 10, "hello", 30); // Error + +let a00 = foo.apply(undefined, [10, "hello"]); +let a01 = foo.apply(undefined, [10]); // Error +let a02 = foo.apply(undefined, [10, 20]); // Error +let a03 = foo.apply(undefined, [10, "hello", 30]); // Error + +class C { + constructor(a: number, b: string) {} + foo(this: this, a: number, b: string): string { return "" } +} + +declare let c: C; +declare let obj: {}; + +let f10 = c.foo.bind(c); +let f11 = c.foo.bind(c, 10); +let f12 = c.foo.bind(c, 10, "hello"); +let f13 = c.foo.bind(c, 10, 20); // Error +let f14 = c.foo.bind(undefined); // Error + +let c10 = c.foo.call(c, 10, "hello"); +let c11 = c.foo.call(c, 10); // Error +let c12 = c.foo.call(c, 10, 20); // Error +let c13 = c.foo.call(c, 10, "hello", 30); // Error +let c14 = c.foo.call(undefined, 10, "hello"); // Error + +let a10 = c.foo.apply(c, [10, "hello"]); +let a11 = c.foo.apply(c, [10]); // Error +let a12 = c.foo.apply(c, [10, 20]); // Error +let a13 = c.foo.apply(c, [10, "hello", 30]); // Error +let a14 = c.foo.apply(undefined, [10, "hello"]); // Error + +let f20 = C.bind(undefined); +let f21 = C.bind(undefined, 10); +let f22 = C.bind(undefined, 10, "hello"); +let f23 = C.bind(undefined, 10, 20); // Error + +C.call(c, 10, "hello"); +C.call(c, 10); // Error +C.call(c, 10, 20); // Error +C.call(c, 10, "hello", 30); // Error + +C.apply(c, [10, "hello"]); +C.apply(c, [10]); // Error +C.apply(c, [10, 20]); // Error +C.apply(c, [10, "hello", 30]); // Error + + +//// [strictBindCallApply1.js] +"use strict"; +var f00 = foo.bind(undefined); +var f01 = foo.bind(undefined, 10); +var f02 = foo.bind(undefined, 10, "hello"); +var f03 = foo.bind(undefined, 10, 20); // Error +var c00 = foo.call(undefined, 10, "hello"); +var c01 = foo.call(undefined, 10); // Error +var c02 = foo.call(undefined, 10, 20); // Error +var c03 = foo.call(undefined, 10, "hello", 30); // Error +var a00 = foo.apply(undefined, [10, "hello"]); +var a01 = foo.apply(undefined, [10]); // Error +var a02 = foo.apply(undefined, [10, 20]); // Error +var a03 = foo.apply(undefined, [10, "hello", 30]); // Error +var C = /** @class */ (function () { + function C(a, b) { + } + C.prototype.foo = function (a, b) { return ""; }; + return C; +}()); +var f10 = c.foo.bind(c); +var f11 = c.foo.bind(c, 10); +var f12 = c.foo.bind(c, 10, "hello"); +var f13 = c.foo.bind(c, 10, 20); // Error +var f14 = c.foo.bind(undefined); // Error +var c10 = c.foo.call(c, 10, "hello"); +var c11 = c.foo.call(c, 10); // Error +var c12 = c.foo.call(c, 10, 20); // Error +var c13 = c.foo.call(c, 10, "hello", 30); // Error +var c14 = c.foo.call(undefined, 10, "hello"); // Error +var a10 = c.foo.apply(c, [10, "hello"]); +var a11 = c.foo.apply(c, [10]); // Error +var a12 = c.foo.apply(c, [10, 20]); // Error +var a13 = c.foo.apply(c, [10, "hello", 30]); // Error +var a14 = c.foo.apply(undefined, [10, "hello"]); // Error +var f20 = C.bind(undefined); +var f21 = C.bind(undefined, 10); +var f22 = C.bind(undefined, 10, "hello"); +var f23 = C.bind(undefined, 10, 20); // Error +C.call(c, 10, "hello"); +C.call(c, 10); // Error +C.call(c, 10, 20); // Error +C.call(c, 10, "hello", 30); // Error +C.apply(c, [10, "hello"]); +C.apply(c, [10]); // Error +C.apply(c, [10, 20]); // Error +C.apply(c, [10, "hello", 30]); // Error diff --git a/tests/baselines/reference/strictBindCallApply1.symbols b/tests/baselines/reference/strictBindCallApply1.symbols new file mode 100644 index 00000000000..b8133a65a78 --- /dev/null +++ b/tests/baselines/reference/strictBindCallApply1.symbols @@ -0,0 +1,322 @@ +=== tests/cases/conformance/functions/strictBindCallApply1.ts === +declare function foo(a: number, b: string): string; +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>a : Symbol(a, Decl(strictBindCallApply1.ts, 0, 21)) +>b : Symbol(b, Decl(strictBindCallApply1.ts, 0, 31)) + +let f00 = foo.bind(undefined); +>f00 : Symbol(f00, Decl(strictBindCallApply1.ts, 2, 3)) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f01 = foo.bind(undefined, 10); +>f01 : Symbol(f01, Decl(strictBindCallApply1.ts, 3, 3)) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f02 = foo.bind(undefined, 10, "hello"); +>f02 : Symbol(f02, Decl(strictBindCallApply1.ts, 4, 3)) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f03 = foo.bind(undefined, 10, 20); // Error +>f03 : Symbol(f03, Decl(strictBindCallApply1.ts, 5, 3)) +>foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let c00 = foo.call(undefined, 10, "hello"); +>c00 : Symbol(c00, Decl(strictBindCallApply1.ts, 7, 3)) +>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let c01 = foo.call(undefined, 10); // Error +>c01 : Symbol(c01, Decl(strictBindCallApply1.ts, 8, 3)) +>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let c02 = foo.call(undefined, 10, 20); // Error +>c02 : Symbol(c02, Decl(strictBindCallApply1.ts, 9, 3)) +>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let c03 = foo.call(undefined, 10, "hello", 30); // Error +>c03 : Symbol(c03, Decl(strictBindCallApply1.ts, 10, 3)) +>foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let a00 = foo.apply(undefined, [10, "hello"]); +>a00 : Symbol(a00, Decl(strictBindCallApply1.ts, 12, 3)) +>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let a01 = foo.apply(undefined, [10]); // Error +>a01 : Symbol(a01, Decl(strictBindCallApply1.ts, 13, 3)) +>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let a02 = foo.apply(undefined, [10, 20]); // Error +>a02 : Symbol(a02, Decl(strictBindCallApply1.ts, 14, 3)) +>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let a03 = foo.apply(undefined, [10, "hello", 30]); // Error +>a03 : Symbol(a03, Decl(strictBindCallApply1.ts, 15, 3)) +>foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>foo : Symbol(foo, Decl(strictBindCallApply1.ts, 0, 0)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +class C { +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) + + constructor(a: number, b: string) {} +>a : Symbol(a, Decl(strictBindCallApply1.ts, 18, 16)) +>b : Symbol(b, Decl(strictBindCallApply1.ts, 18, 26)) + + foo(this: this, a: number, b: string): string { return "" } +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>this : Symbol(this, Decl(strictBindCallApply1.ts, 19, 8)) +>a : Symbol(a, Decl(strictBindCallApply1.ts, 19, 19)) +>b : Symbol(b, Decl(strictBindCallApply1.ts, 19, 30)) +} + +declare let c: C; +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) + +declare let obj: {}; +>obj : Symbol(obj, Decl(strictBindCallApply1.ts, 23, 11)) + +let f10 = c.foo.bind(c); +>f10 : Symbol(f10, Decl(strictBindCallApply1.ts, 25, 3)) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let f11 = c.foo.bind(c, 10); +>f11 : Symbol(f11, Decl(strictBindCallApply1.ts, 26, 3)) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let f12 = c.foo.bind(c, 10, "hello"); +>f12 : Symbol(f12, Decl(strictBindCallApply1.ts, 27, 3)) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let f13 = c.foo.bind(c, 10, 20); // Error +>f13 : Symbol(f13, Decl(strictBindCallApply1.ts, 28, 3)) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let f14 = c.foo.bind(undefined); // Error +>f14 : Symbol(f14, Decl(strictBindCallApply1.ts, 29, 3)) +>c.foo.bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>bind : Symbol(CallableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let c10 = c.foo.call(c, 10, "hello"); +>c10 : Symbol(c10, Decl(strictBindCallApply1.ts, 31, 3)) +>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let c11 = c.foo.call(c, 10); // Error +>c11 : Symbol(c11, Decl(strictBindCallApply1.ts, 32, 3)) +>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let c12 = c.foo.call(c, 10, 20); // Error +>c12 : Symbol(c12, Decl(strictBindCallApply1.ts, 33, 3)) +>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let c13 = c.foo.call(c, 10, "hello", 30); // Error +>c13 : Symbol(c13, Decl(strictBindCallApply1.ts, 34, 3)) +>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let c14 = c.foo.call(undefined, 10, "hello"); // Error +>c14 : Symbol(c14, Decl(strictBindCallApply1.ts, 35, 3)) +>c.foo.call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>call : Symbol(CallableFunction.call, Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let a10 = c.foo.apply(c, [10, "hello"]); +>a10 : Symbol(a10, Decl(strictBindCallApply1.ts, 37, 3)) +>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let a11 = c.foo.apply(c, [10]); // Error +>a11 : Symbol(a11, Decl(strictBindCallApply1.ts, 38, 3)) +>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let a12 = c.foo.apply(c, [10, 20]); // Error +>a12 : Symbol(a12, Decl(strictBindCallApply1.ts, 39, 3)) +>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let a13 = c.foo.apply(c, [10, "hello", 30]); // Error +>a13 : Symbol(a13, Decl(strictBindCallApply1.ts, 40, 3)) +>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +let a14 = c.foo.apply(undefined, [10, "hello"]); // Error +>a14 : Symbol(a14, Decl(strictBindCallApply1.ts, 41, 3)) +>c.foo.apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c.foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) +>foo : Symbol(C.foo, Decl(strictBindCallApply1.ts, 18, 40)) +>apply : Symbol(CallableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>undefined : Symbol(undefined) + +let f20 = C.bind(undefined); +>f20 : Symbol(f20, Decl(strictBindCallApply1.ts, 43, 3)) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f21 = C.bind(undefined, 10); +>f21 : Symbol(f21, Decl(strictBindCallApply1.ts, 44, 3)) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f22 = C.bind(undefined, 10, "hello"); +>f22 : Symbol(f22, Decl(strictBindCallApply1.ts, 45, 3)) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +let f23 = C.bind(undefined, 10, 20); // Error +>f23 : Symbol(f23, Decl(strictBindCallApply1.ts, 46, 3)) +>C.bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>bind : Symbol(NewableFunction.bind, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --) ... and 1 more) +>undefined : Symbol(undefined) + +C.call(c, 10, "hello"); +>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.call(c, 10); // Error +>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.call(c, 10, 20); // Error +>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.call(c, 10, "hello", 30); // Error +>C.call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>call : Symbol(NewableFunction.call, Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.apply(c, [10, "hello"]); +>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.apply(c, [10]); // Error +>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.apply(c, [10, 20]); // Error +>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + +C.apply(c, [10, "hello", 30]); // Error +>C.apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>C : Symbol(C, Decl(strictBindCallApply1.ts, 15, 50)) +>apply : Symbol(NewableFunction.apply, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>c : Symbol(c, Decl(strictBindCallApply1.ts, 22, 11)) + diff --git a/tests/baselines/reference/strictBindCallApply1.types b/tests/baselines/reference/strictBindCallApply1.types new file mode 100644 index 00000000000..a895447e182 --- /dev/null +++ b/tests/baselines/reference/strictBindCallApply1.types @@ -0,0 +1,441 @@ +=== tests/cases/conformance/functions/strictBindCallApply1.ts === +declare function foo(a: number, b: string): string; +>foo : (a: number, b: string) => string +>a : number +>b : string + +let f00 = foo.bind(undefined); +>f00 : (a: number, b: string) => string +>foo.bind(undefined) : (a: number, b: string) => string +>foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo : (a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>undefined : undefined + +let f01 = foo.bind(undefined, 10); +>f01 : (b: string) => string +>foo.bind(undefined, 10) : (b: string) => string +>foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo : (a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 + +let f02 = foo.bind(undefined, 10, "hello"); +>f02 : () => string +>foo.bind(undefined, 10, "hello") : () => string +>foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo : (a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 +>"hello" : "hello" + +let f03 = foo.bind(undefined, 10, 20); // Error +>f03 : any +>foo.bind(undefined, 10, 20) : any +>foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>foo : (a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 +>20 : 20 + +let c00 = foo.call(undefined, 10, "hello"); +>c00 : string +>foo.call(undefined, 10, "hello") : string +>foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>foo : (a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>undefined : undefined +>10 : 10 +>"hello" : "hello" + +let c01 = foo.call(undefined, 10); // Error +>c01 : any +>foo.call(undefined, 10) : any +>foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>foo : (a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>undefined : undefined +>10 : 10 + +let c02 = foo.call(undefined, 10, 20); // Error +>c02 : any +>foo.call(undefined, 10, 20) : any +>foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>foo : (a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>undefined : undefined +>10 : 10 +>20 : 20 + +let c03 = foo.call(undefined, 10, "hello", 30); // Error +>c03 : any +>foo.call(undefined, 10, "hello", 30) : any +>foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>foo : (a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>undefined : undefined +>10 : 10 +>"hello" : "hello" +>30 : 30 + +let a00 = foo.apply(undefined, [10, "hello"]); +>a00 : string +>foo.apply(undefined, [10, "hello"]) : string +>foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>foo : (a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>undefined : undefined +>[10, "hello"] : [number, string] +>10 : 10 +>"hello" : "hello" + +let a01 = foo.apply(undefined, [10]); // Error +>a01 : any +>foo.apply(undefined, [10]) : any +>foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>foo : (a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>undefined : undefined +>[10] : number[] +>10 : 10 + +let a02 = foo.apply(undefined, [10, 20]); // Error +>a02 : any +>foo.apply(undefined, [10, 20]) : any +>foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>foo : (a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>undefined : undefined +>[10, 20] : number[] +>10 : 10 +>20 : 20 + +let a03 = foo.apply(undefined, [10, "hello", 30]); // Error +>a03 : any +>foo.apply(undefined, [10, "hello", 30]) : any +>foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>foo : (a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>undefined : undefined +>[10, "hello", 30] : (string | number)[] +>10 : 10 +>"hello" : "hello" +>30 : 30 + +class C { +>C : C + + constructor(a: number, b: string) {} +>a : number +>b : string + + foo(this: this, a: number, b: string): string { return "" } +>foo : (this: this, a: number, b: string) => string +>this : this +>a : number +>b : string +>"" : "" +} + +declare let c: C; +>c : C + +declare let obj: {}; +>obj : {} + +let f10 = c.foo.bind(c); +>f10 : (a: number, b: string) => string +>c.foo.bind(c) : (a: number, b: string) => string +>c.foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c : C + +let f11 = c.foo.bind(c, 10); +>f11 : (b: string) => string +>c.foo.bind(c, 10) : (b: string) => string +>c.foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c : C +>10 : 10 + +let f12 = c.foo.bind(c, 10, "hello"); +>f12 : () => string +>c.foo.bind(c, 10, "hello") : () => string +>c.foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c : C +>10 : 10 +>"hello" : "hello" + +let f13 = c.foo.bind(c, 10, 20); // Error +>f13 : any +>c.foo.bind(c, 10, 20) : any +>c.foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c : C +>10 : 10 +>20 : 20 + +let f14 = c.foo.bind(undefined); // Error +>f14 : any +>c.foo.bind(undefined) : any +>c.foo.bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>bind : { (this: (this: T, ...args: A) => R, thisArg: T): (...args: A) => R; (this: (this: T, arg0: A0, ...args: A) => R, thisArg: T, arg0: A0): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2): (...args: A) => R; (this: (this: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: T, arg0: A0, arg1: A1, arg2: A2, arg3: A3): (...args: A) => R; (this: (this: T, ...args: AX[]) => R, thisArg: T, ...args: AX[]): (...args: AX[]) => R; } +>undefined : undefined + +let c10 = c.foo.call(c, 10, "hello"); +>c10 : string +>c.foo.call(c, 10, "hello") : string +>c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c : C +>10 : 10 +>"hello" : "hello" + +let c11 = c.foo.call(c, 10); // Error +>c11 : any +>c.foo.call(c, 10) : any +>c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c : C +>10 : 10 + +let c12 = c.foo.call(c, 10, 20); // Error +>c12 : any +>c.foo.call(c, 10, 20) : any +>c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c : C +>10 : 10 +>20 : 20 + +let c13 = c.foo.call(c, 10, "hello", 30); // Error +>c13 : any +>c.foo.call(c, 10, "hello", 30) : any +>c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c : C +>10 : 10 +>"hello" : "hello" +>30 : 30 + +let c14 = c.foo.call(undefined, 10, "hello"); // Error +>c14 : any +>c.foo.call(undefined, 10, "hello") : any +>c.foo.call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>call : (this: (this: T, ...args: A) => R, thisArg: T, ...args: A) => R +>undefined : undefined +>10 : 10 +>"hello" : "hello" + +let a10 = c.foo.apply(c, [10, "hello"]); +>a10 : string +>c.foo.apply(c, [10, "hello"]) : string +>c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c : C +>[10, "hello"] : [number, string] +>10 : 10 +>"hello" : "hello" + +let a11 = c.foo.apply(c, [10]); // Error +>a11 : any +>c.foo.apply(c, [10]) : any +>c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c : C +>[10] : number[] +>10 : 10 + +let a12 = c.foo.apply(c, [10, 20]); // Error +>a12 : any +>c.foo.apply(c, [10, 20]) : any +>c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c : C +>[10, 20] : number[] +>10 : 10 +>20 : 20 + +let a13 = c.foo.apply(c, [10, "hello", 30]); // Error +>a13 : any +>c.foo.apply(c, [10, "hello", 30]) : any +>c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c : C +>[10, "hello", 30] : (string | number)[] +>10 : 10 +>"hello" : "hello" +>30 : 30 + +let a14 = c.foo.apply(undefined, [10, "hello"]); // Error +>a14 : any +>c.foo.apply(undefined, [10, "hello"]) : any +>c.foo.apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>c.foo : (this: C, a: number, b: string) => string +>c : C +>foo : (this: C, a: number, b: string) => string +>apply : { (this: (this: T) => R, thisArg: T): R; (this: (this: T, ...args: A) => R, thisArg: T, args: A): R; } +>undefined : undefined +>[10, "hello"] : (string | number)[] +>10 : 10 +>"hello" : "hello" + +let f20 = C.bind(undefined); +>f20 : new (a: number, b: string) => C +>C.bind(undefined) : new (a: number, b: string) => C +>C.bind : {
(this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C : typeof C +>bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>undefined : undefined + +let f21 = C.bind(undefined, 10); +>f21 : new (b: string) => C +>C.bind(undefined, 10) : new (b: string) => C +>C.bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C : typeof C +>bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 + +let f22 = C.bind(undefined, 10, "hello"); +>f22 : new () => C +>C.bind(undefined, 10, "hello") : new () => C +>C.bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C : typeof C +>bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 +>"hello" : "hello" + +let f23 = C.bind(undefined, 10, 20); // Error +>f23 : any +>C.bind(undefined, 10, 20) : any +>C.bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>C : typeof C +>bind : { (this: new (...args: A) => R, thisArg: any): new (...args: A) => R; (this: new (arg0: A0, ...args: A) => R, thisArg: any, arg0: A0): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2): new (...args: A) => R; (this: new (arg0: A0, arg1: A1, arg2: A2, arg3: A3, ...args: A) => R, thisArg: any, arg0: A0, arg1: A1, arg2: A2, arg3: A3): new (...args: A) => R; (this: new (...args: AX[]) => R, thisArg: any, ...args: AX[]): new (...args: AX[]) => R; } +>undefined : undefined +>10 : 10 +>20 : 20 + +C.call(c, 10, "hello"); +>C.call(c, 10, "hello") : void +>C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>C : typeof C +>call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>c : C +>10 : 10 +>"hello" : "hello" + +C.call(c, 10); // Error +>C.call(c, 10) : any +>C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>C : typeof C +>call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>c : C +>10 : 10 + +C.call(c, 10, 20); // Error +>C.call(c, 10, 20) : any +>C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>C : typeof C +>call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>c : C +>10 : 10 +>20 : 20 + +C.call(c, 10, "hello", 30); // Error +>C.call(c, 10, "hello", 30) : any +>C.call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>C : typeof C +>call : (this: new (...args: A) => T, thisArg: T, ...args: A) => void +>c : C +>10 : 10 +>"hello" : "hello" +>30 : 30 + +C.apply(c, [10, "hello"]); +>C.apply(c, [10, "hello"]) : void +>C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>C : typeof C +>apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>c : C +>[10, "hello"] : [number, string] +>10 : 10 +>"hello" : "hello" + +C.apply(c, [10]); // Error +>C.apply(c, [10]) : any +>C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>C : typeof C +>apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>c : C +>[10] : number[] +>10 : 10 + +C.apply(c, [10, 20]); // Error +>C.apply(c, [10, 20]) : any +>C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>C : typeof C +>apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>c : C +>[10, 20] : number[] +>10 : 10 +>20 : 20 + +C.apply(c, [10, "hello", 30]); // Error +>C.apply(c, [10, "hello", 30]) : any +>C.apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>C : typeof C +>apply : { (this: new () => T, thisArg: T): void; (this: new (...args: A) => T, thisArg: T, args: A): void; } +>c : C +>[10, "hello", 30] : (string | number)[] +>10 : 10 +>"hello" : "hello" +>30 : 30 + diff --git a/tests/baselines/reference/strictBooleanMemberAssignability.js b/tests/baselines/reference/strictBooleanMemberAssignability.js new file mode 100644 index 00000000000..c19fc0b33c9 --- /dev/null +++ b/tests/baselines/reference/strictBooleanMemberAssignability.js @@ -0,0 +1,16 @@ +//// [strictBooleanMemberAssignability.ts] +class Abc { + def: boolean + constructor() { + this.def = true + } +} + +//// [strictBooleanMemberAssignability.js] +"use strict"; +var Abc = /** @class */ (function () { + function Abc() { + this.def = true; + } + return Abc; +}()); diff --git a/tests/baselines/reference/strictBooleanMemberAssignability.symbols b/tests/baselines/reference/strictBooleanMemberAssignability.symbols new file mode 100644 index 00000000000..b9c449f6051 --- /dev/null +++ b/tests/baselines/reference/strictBooleanMemberAssignability.symbols @@ -0,0 +1,14 @@ +=== tests/cases/compiler/strictBooleanMemberAssignability.ts === +class Abc { +>Abc : Symbol(Abc, Decl(strictBooleanMemberAssignability.ts, 0, 0)) + + def: boolean +>def : Symbol(Abc.def, Decl(strictBooleanMemberAssignability.ts, 0, 11)) + + constructor() { + this.def = true +>this.def : Symbol(Abc.def, Decl(strictBooleanMemberAssignability.ts, 0, 11)) +>this : Symbol(Abc, Decl(strictBooleanMemberAssignability.ts, 0, 0)) +>def : Symbol(Abc.def, Decl(strictBooleanMemberAssignability.ts, 0, 11)) + } +} diff --git a/tests/baselines/reference/strictBooleanMemberAssignability.types b/tests/baselines/reference/strictBooleanMemberAssignability.types new file mode 100644 index 00000000000..694f44f2695 --- /dev/null +++ b/tests/baselines/reference/strictBooleanMemberAssignability.types @@ -0,0 +1,16 @@ +=== tests/cases/compiler/strictBooleanMemberAssignability.ts === +class Abc { +>Abc : Abc + + def: boolean +>def : boolean + + constructor() { + this.def = true +>this.def = true : true +>this.def : boolean +>this : this +>def : boolean +>true : true + } +} diff --git a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json index 261cdca7011..e4e3d7b8ec4 100644 --- a/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Default initialized TSConfig/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json index d3a9f8e9f47..1919671c489 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with advanced options/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json index 8484e61bcfa..3b49dee6e3d 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with boolean value compiler options/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json index 35aa1cf7eab..d91e167877d 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with enum value compiler options/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json index fbc441b823c..e6107b29b4c 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with files options/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json index f758c1f6c20..7c18b695c7b 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option value/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json index 261cdca7011..e4e3d7b8ec4 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with incorrect compiler option/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json index cdb52963ccb..eedcc357043 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options with enum value/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json index fd6419e1e35..6fc7833730f 100644 --- a/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json +++ b/tests/baselines/reference/tsConfig/Initialized TSConfig with list compiler options/tsconfig.json @@ -25,6 +25,7 @@ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ diff --git a/tests/baselines/reference/typeFromPropertyAssignment37.symbols b/tests/baselines/reference/typeFromPropertyAssignment37.symbols new file mode 100644 index 00000000000..4d2af775b00 --- /dev/null +++ b/tests/baselines/reference/typeFromPropertyAssignment37.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/salsa/use.js === +const util = require('./mod') +>util : Symbol(util, Decl(use.js, 0, 5)) +>require : Symbol(require) +>'./mod' : Symbol("tests/cases/conformance/salsa/mod", Decl(mod.js, 0, 0)) + +function n() { +>n : Symbol(n, Decl(use.js, 0, 29)) + + util.existy // no error +>util.existy : Symbol(existy, Decl(mod.js, 1, 14)) +>util : Symbol(util, Decl(use.js, 0, 5)) +>existy : Symbol(existy, Decl(mod.js, 1, 14)) +} +util.existy // no error +>util.existy : Symbol(existy, Decl(mod.js, 1, 14)) +>util : Symbol(util, Decl(use.js, 0, 5)) +>existy : Symbol(existy, Decl(mod.js, 1, 14)) + +=== tests/cases/conformance/salsa/mod.js === +const util = exports = module.exports = {} +>util : Symbol(util, Decl(mod.js, 0, 5)) +>exports : Symbol("tests/cases/conformance/salsa/mod", Decl(mod.js, 0, 0)) +>module.exports : Symbol("tests/cases/conformance/salsa/mod", Decl(mod.js, 0, 0)) +>module : Symbol(module, Decl(mod.js, 0, 22)) +>exports : Symbol("tests/cases/conformance/salsa/mod", Decl(mod.js, 0, 0)) + +if (!!false) { + util.existy = function () { } +>util.existy : Symbol(existy, Decl(mod.js, 1, 14)) +>util : Symbol(util, Decl(mod.js, 0, 5)) +>existy : Symbol(existy, Decl(mod.js, 1, 14)) +} + diff --git a/tests/baselines/reference/typeFromPropertyAssignment37.types b/tests/baselines/reference/typeFromPropertyAssignment37.types new file mode 100644 index 00000000000..b7355cbecf2 --- /dev/null +++ b/tests/baselines/reference/typeFromPropertyAssignment37.types @@ -0,0 +1,44 @@ +=== tests/cases/conformance/salsa/use.js === +const util = require('./mod') +>util : typeof import("tests/cases/conformance/salsa/mod") +>require('./mod') : typeof import("tests/cases/conformance/salsa/mod") +>require : any +>'./mod' : "./mod" + +function n() { +>n : () => void + + util.existy // no error +>util.existy : () => void +>util : typeof import("tests/cases/conformance/salsa/mod") +>existy : () => void +} +util.existy // no error +>util.existy : () => void +>util : typeof import("tests/cases/conformance/salsa/mod") +>existy : () => void + +=== tests/cases/conformance/salsa/mod.js === +const util = exports = module.exports = {} +>util : typeof import("tests/cases/conformance/salsa/mod") +>exports = module.exports = {} : typeof import("tests/cases/conformance/salsa/mod") +>exports : typeof import("tests/cases/conformance/salsa/mod") +>module.exports = {} : typeof import("tests/cases/conformance/salsa/mod") +>module.exports : typeof import("tests/cases/conformance/salsa/mod") +>module : { "tests/cases/conformance/salsa/mod": typeof import("tests/cases/conformance/salsa/mod"); } +>exports : typeof import("tests/cases/conformance/salsa/mod") +>{} : {} + +if (!!false) { +>!!false : boolean +>!false : true +>false : false + + util.existy = function () { } +>util.existy = function () { } : () => void +>util.existy : () => void +>util : typeof import("tests/cases/conformance/salsa/mod") +>existy : () => void +>function () { } : () => void +} + diff --git a/tests/baselines/reference/types.forAwait.esnext.1.symbols b/tests/baselines/reference/types.forAwait.esnext.1.symbols index 286f0a8555c..c3c10c42109 100644 --- a/tests/baselines/reference/types.forAwait.esnext.1.symbols +++ b/tests/baselines/reference/types.forAwait.esnext.1.symbols @@ -7,49 +7,70 @@ declare const iterable: Iterable; >iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13)) >Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +declare const iterableOfPromise: Iterable>; +>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) + async function f1() { ->f1 : Symbol(f1, Decl(types.forAwait.esnext.1.ts, 1, 41)) +>f1 : Symbol(f1, Decl(types.forAwait.esnext.1.ts, 2, 59)) let y: number; ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 3, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7)) for await (const x of asyncIterable) { ->x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 4, 20)) +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 5, 20)) >asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13)) } for await (const x of iterable) { ->x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 6, 20)) +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 7, 20)) >iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13)) + } + for await (const x of iterableOfPromise) { +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 9, 20)) +>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13)) } for await (y of asyncIterable) { ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 3, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7)) >asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13)) } for await (y of iterable) { ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 3, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7)) >iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13)) } + for await (y of iterableOfPromise) { +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 4, 7)) +>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13)) + } } async function * f2() { ->f2 : Symbol(f2, Decl(types.forAwait.esnext.1.ts, 12, 1)) +>f2 : Symbol(f2, Decl(types.forAwait.esnext.1.ts, 17, 1)) let y: number; ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 14, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7)) for await (const x of asyncIterable) { ->x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 15, 20)) +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 20, 20)) >asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13)) } for await (const x of iterable) { ->x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 17, 20)) +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 22, 20)) >iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13)) + } + for await (const x of iterableOfPromise) { +>x : Symbol(x, Decl(types.forAwait.esnext.1.ts, 24, 20)) +>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13)) } for await (y of asyncIterable) { ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 14, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7)) >asyncIterable : Symbol(asyncIterable, Decl(types.forAwait.esnext.1.ts, 0, 13)) } for await (y of iterable) { ->y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 14, 7)) +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7)) >iterable : Symbol(iterable, Decl(types.forAwait.esnext.1.ts, 1, 13)) } + for await (y of iterableOfPromise) { +>y : Symbol(y, Decl(types.forAwait.esnext.1.ts, 19, 7)) +>iterableOfPromise : Symbol(iterableOfPromise, Decl(types.forAwait.esnext.1.ts, 2, 13)) + } } diff --git a/tests/baselines/reference/types.forAwait.esnext.1.types b/tests/baselines/reference/types.forAwait.esnext.1.types index f001b39a071..69403b40593 100644 --- a/tests/baselines/reference/types.forAwait.esnext.1.types +++ b/tests/baselines/reference/types.forAwait.esnext.1.types @@ -5,6 +5,9 @@ declare const asyncIterable: AsyncIterable; declare const iterable: Iterable; >iterable : Iterable +declare const iterableOfPromise: Iterable>; +>iterableOfPromise : Iterable> + async function f1() { >f1 : () => Promise @@ -18,6 +21,10 @@ async function f1() { for await (const x of iterable) { >x : number >iterable : Iterable + } + for await (const x of iterableOfPromise) { +>x : number +>iterableOfPromise : Iterable> } for await (y of asyncIterable) { >y : number @@ -27,6 +34,10 @@ async function f1() { >y : number >iterable : Iterable } + for await (y of iterableOfPromise) { +>y : number +>iterableOfPromise : Iterable> + } } async function * f2() { >f2 : () => AsyncIterableIterator @@ -41,6 +52,10 @@ async function * f2() { for await (const x of iterable) { >x : number >iterable : Iterable + } + for await (const x of iterableOfPromise) { +>x : number +>iterableOfPromise : Iterable> } for await (y of asyncIterable) { >y : number @@ -50,4 +65,8 @@ async function * f2() { >y : number >iterable : Iterable } + for await (y of iterableOfPromise) { +>y : number +>iterableOfPromise : Iterable> + } } diff --git a/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.js b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.js new file mode 100644 index 00000000000..468344c3e9c --- /dev/null +++ b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.js @@ -0,0 +1,16 @@ +//// [undefinedAssignableToGenericMappedIntersection.ts] +type Errors = { [P in keyof T]: string | undefined } & {all: string | undefined}; +function foo() { + let obj!: Errors + let x!: keyof T; + obj[x] = undefined; +} + + +//// [undefinedAssignableToGenericMappedIntersection.js] +"use strict"; +function foo() { + var obj; + var x; + obj[x] = undefined; +} diff --git a/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.symbols b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.symbols new file mode 100644 index 00000000000..613b3bcc538 --- /dev/null +++ b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.symbols @@ -0,0 +1,27 @@ +=== tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts === +type Errors = { [P in keyof T]: string | undefined } & {all: string | undefined}; +>Errors : Symbol(Errors, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 0)) +>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 12)) +>P : Symbol(P, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 20)) +>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 12)) +>all : Symbol(all, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 59)) + +function foo() { +>foo : Symbol(foo, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 84)) +>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13)) + + let obj!: Errors +>obj : Symbol(obj, Decl(undefinedAssignableToGenericMappedIntersection.ts, 2, 7)) +>Errors : Symbol(Errors, Decl(undefinedAssignableToGenericMappedIntersection.ts, 0, 0)) +>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13)) + + let x!: keyof T; +>x : Symbol(x, Decl(undefinedAssignableToGenericMappedIntersection.ts, 3, 7)) +>T : Symbol(T, Decl(undefinedAssignableToGenericMappedIntersection.ts, 1, 13)) + + obj[x] = undefined; +>obj : Symbol(obj, Decl(undefinedAssignableToGenericMappedIntersection.ts, 2, 7)) +>x : Symbol(x, Decl(undefinedAssignableToGenericMappedIntersection.ts, 3, 7)) +>undefined : Symbol(undefined) +} + diff --git a/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.types b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.types new file mode 100644 index 00000000000..1bf4aae0198 --- /dev/null +++ b/tests/baselines/reference/undefinedAssignableToGenericMappedIntersection.types @@ -0,0 +1,22 @@ +=== tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts === +type Errors = { [P in keyof T]: string | undefined } & {all: string | undefined}; +>Errors : Errors +>all : string | undefined + +function foo() { +>foo : () => void + + let obj!: Errors +>obj : Errors + + let x!: keyof T; +>x : keyof T + + obj[x] = undefined; +>obj[x] = undefined : undefined +>obj[x] : Errors[keyof T] +>obj : Errors +>x : keyof T +>undefined : undefined +} + diff --git a/tests/baselines/reference/user/adonis-framework.log b/tests/baselines/reference/user/adonis-framework.log index 7796b296dbe..a370c326c0a 100644 --- a/tests/baselines/reference/user/adonis-framework.log +++ b/tests/baselines/reference/user/adonis-framework.log @@ -39,10 +39,15 @@ node_modules/adonis-framework/src/Event/index.js(128,12): error TS2322: Type '() Property 'pop' is missing in type '() => {}[]'. node_modules/adonis-framework/src/Event/index.js(153,25): error TS2339: Property 'wildcard' does not exist on type 'EventEmitter2'. node_modules/adonis-framework/src/Event/index.js(188,17): error TS2304: Cannot find name 'Spread'. +node_modules/adonis-framework/src/Event/index.js(201,27): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. + Property 'pop' is missing in type 'IArguments'. node_modules/adonis-framework/src/Event/index.js(207,24): error TS2304: Cannot find name 'Sring'. node_modules/adonis-framework/src/Event/index.js(256,52): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. Type 'Function' provides no match for the signature '(...values: any[]): void'. node_modules/adonis-framework/src/Event/index.js(264,28): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. +node_modules/adonis-framework/src/Event/index.js(271,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[string, any, TimerHandler]'. + Property '0' is missing in type 'IArguments'. +node_modules/adonis-framework/src/Event/index.js(278,25): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[string, any, TimerHandler]'. node_modules/adonis-framework/src/Event/index.js(294,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'Listener'. node_modules/adonis-framework/src/Exceptions/index.js(13,14): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher. node_modules/adonis-framework/src/Exceptions/index.js(27,12): error TS2554: Expected 0 arguments, but got 3. @@ -107,6 +112,13 @@ node_modules/adonis-framework/src/Response/index.js(95,16): error TS2304: Cannot node_modules/adonis-framework/src/Response/index.js(172,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Response/index.js(299,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Response/index.js(323,15): error TS2304: Cannot find name 'Mixed'. +node_modules/adonis-framework/src/Route/ResourceCollection.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. + Property 'pop' is missing in type 'IArguments'. +node_modules/adonis-framework/src/Route/ResourceCollection.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. +node_modules/adonis-framework/src/Route/ResourceMember.js(43,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. +node_modules/adonis-framework/src/Route/ResourceMember.js(56,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. +node_modules/adonis-framework/src/Route/group.js(34,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. +node_modules/adonis-framework/src/Route/group.js(43,41): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Route/helpers.js(22,13): error TS2304: Cannot find name 'Any'. node_modules/adonis-framework/src/Route/helpers.js(34,3): error TS2322: Type 'string | string[]' is not assignable to type 'string'. Type 'string[]' is not assignable to type 'string'. @@ -120,6 +132,8 @@ node_modules/adonis-framework/src/Route/index.js(259,21): error TS2345: Argument node_modules/adonis-framework/src/Route/index.js(280,21): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'. node_modules/adonis-framework/src/Route/index.js(321,13): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Route/index.js(321,20): error TS8029: JSDoc '@param' tag has name 'keys', but there is no parameter with that name. It would match 'arguments' if it had an array type. +node_modules/adonis-framework/src/Route/index.js(333,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. +node_modules/adonis-framework/src/Route/index.js(343,33): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Route/index.js(354,20): error TS2694: Namespace 'Route' has no exported member 'Group'. node_modules/adonis-framework/src/Route/index.js(368,3): error TS2322: Type 'null' is not assignable to type 'string'. node_modules/adonis-framework/src/Route/index.js(396,10): error TS2554: Expected 2 arguments, but got 3. @@ -133,11 +147,16 @@ node_modules/adonis-framework/src/Route/resource.js(96,25): error TS2345: Argume node_modules/adonis-framework/src/Route/resource.js(97,25): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'string'. node_modules/adonis-framework/src/Route/resource.js(172,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Route/resource.js(172,22): error TS8029: JSDoc '@param' tag has name 'methods', but there is no parameter with that name. It would match 'arguments' if it had an array type. +node_modules/adonis-framework/src/Route/resource.js(183,45): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Route/resource.js(198,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Route/resource.js(198,22): error TS8029: JSDoc '@param' tag has name 'methods', but there is no parameter with that name. It would match 'arguments' if it had an array type. +node_modules/adonis-framework/src/Route/resource.js(209,45): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Route/resource.js(233,15): error TS2304: Cannot find name 'Mixed'. node_modules/adonis-framework/src/Route/resource.js(261,15): error TS2304: Cannot find name 'Mixed'. +node_modules/adonis-framework/src/Route/resource.js(290,40): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'. + Property '0' is missing in type 'IArguments'. node_modules/adonis-framework/src/Route/resource.js(296,15): error TS2304: Cannot find name 'Mixed'. +node_modules/adonis-framework/src/Route/resource.js(314,62): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/adonis-framework/src/Server/helpers.js(17,29): error TS8024: JSDoc '@param' tag has name 'appNamespace', but there is no parameter with that name. node_modules/adonis-framework/src/Server/index.js(17,21): error TS2307: Cannot find module 'adonis-fold'. node_modules/adonis-framework/src/Server/index.js(54,21): error TS2554: Expected 4 arguments, but got 3. diff --git a/tests/baselines/reference/user/bluebird.log b/tests/baselines/reference/user/bluebird.log index 35d6d9ca05b..0c4d4ab75fd 100644 --- a/tests/baselines/reference/user/bluebird.log +++ b/tests/baselines/reference/user/bluebird.log @@ -20,6 +20,10 @@ node_modules/bluebird/js/release/debuggability.js(168,17): error TS2403: Subsequ node_modules/bluebird/js/release/debuggability.js(174,26): error TS2339: Property 'detail' does not exist on type 'Event'. node_modules/bluebird/js/release/debuggability.js(175,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType) => any) | ((o: any, key: any, desc: any) => any)' has no compatible call signatures. node_modules/bluebird/js/release/debuggability.js(176,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: any, p: string | number | symbol, attributes: PropertyDescriptor & ThisType) => any) | ((o: any, key: any, desc: any) => any)' has no compatible call signatures. +node_modules/bluebird/js/release/debuggability.js(199,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '["removeListener", string, (...args: any[]) => void]'. + Property '0' is missing in type 'IArguments'. +node_modules/bluebird/js/release/debuggability.js(242,56): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. + Property 'pop' is missing in type 'IArguments'. node_modules/bluebird/js/release/debuggability.js(491,19): error TS2350: Only a void function can be called with the 'new' keyword. node_modules/bluebird/js/release/debuggability.js(562,46): error TS2554: Expected 0 arguments, but got 1. node_modules/bluebird/js/release/debuggability.js(736,5): error TS2721: Cannot invoke an object which is possibly 'null'. @@ -50,6 +54,7 @@ node_modules/bluebird/js/release/map.js(111,23): error TS2339: Property '_values node_modules/bluebird/js/release/map.js(113,18): error TS2339: Property '_isResolved' does not exist on type 'MappingPromiseArray'. node_modules/bluebird/js/release/map.js(127,10): error TS2339: Property '_resolve' does not exist on type 'MappingPromiseArray'. node_modules/bluebird/js/release/map.js(156,66): error TS2339: Property 'promise' does not exist on type 'MappingPromiseArray'. +node_modules/bluebird/js/release/method.js(15,46): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/bluebird/js/release/nodeback.js(21,20): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((o: {}) => string[]) | ((o: any) => string[])' has no compatible call signatures. node_modules/bluebird/js/release/nodeify.js(32,19): error TS2339: Property 'cause' does not exist on type 'Error'. node_modules/bluebird/js/release/promise.js(4,12): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. diff --git a/tests/baselines/reference/user/chrome-devtools-frontend.log b/tests/baselines/reference/user/chrome-devtools-frontend.log index 7a53da21ec4..2fcfcea49f0 100644 --- a/tests/baselines/reference/user/chrome-devtools-frontend.log +++ b/tests/baselines/reference/user/chrome-devtools-frontend.log @@ -11,8 +11,8 @@ Standard output: ../../../../built/local/lib.dom.d.ts(11899,13): error TS2300: Duplicate identifier 'Request'. ../../../../built/local/lib.dom.d.ts(16316,11): error TS2300: Duplicate identifier 'Window'. ../../../../built/local/lib.dom.d.ts(16447,13): error TS2300: Duplicate identifier 'Window'. -../../../../built/local/lib.es5.d.ts(1346,11): error TS2300: Duplicate identifier 'ArrayLike'. -../../../../built/local/lib.es5.d.ts(1382,6): error TS2300: Duplicate identifier 'Record'. +../../../../built/local/lib.es5.d.ts(1406,11): error TS2300: Duplicate identifier 'ArrayLike'. +../../../../built/local/lib.es5.d.ts(1442,6): error TS2300: Duplicate identifier 'Record'. ../../../../node_modules/@types/node/index.d.ts(150,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'module' must be of type '{}', but here has type 'NodeModule'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(43,8): error TS2339: Property '_importScriptPathPrefix' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/Runtime.js(95,28): error TS2339: Property 'response' does not exist on type 'EventTarget'. @@ -51,8 +51,17 @@ node_modules/chrome-devtools-frontend/front_end/Tests.js(440,5): error TS2554: E node_modules/chrome-devtools-frontend/front_end/Tests.js(475,5): error TS2554: Expected 4 arguments, but got 3. node_modules/chrome-devtools-frontend/front_end/Tests.js(571,33): error TS2339: Property 'deprecatedRunAfterPendingDispatches' does not exist on type 'typeof InspectorBackend'. node_modules/chrome-devtools-frontend/front_end/Tests.js(590,27): error TS2554: Expected 0 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/Tests.js(619,44): error TS2339: Property 'emulationAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(666,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(668,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(673,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(675,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(677,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(679,38): error TS2339: Property 'inputAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/Tests.js(687,7): error TS2554: Expected 3 arguments, but got 2. node_modules/chrome-devtools-frontend/front_end/Tests.js(711,7): error TS2554: Expected 3 arguments, but got 2. +node_modules/chrome-devtools-frontend/front_end/Tests.js(717,36): error TS2339: Property 'inputAgent' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/Tests.js(719,36): error TS2339: Property 'inputAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/Tests.js(735,5): error TS2554: Expected 4 arguments, but got 3. node_modules/chrome-devtools-frontend/front_end/Tests.js(814,38): error TS2339: Property 'timeline' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/Tests.js(816,7): error TS2554: Expected 2 arguments, but got 1. @@ -298,6 +307,12 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(2 node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(21,32): error TS2554: Expected 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(26,32): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(36,47): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(36,63): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'AnimationTimeline' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(animationModel: AnimationModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'animationModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'AnimationModel'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(44,67): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(52,67): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(80,19): error TS2339: Property 'AnimationModel' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. @@ -308,11 +323,7 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(1 node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(105,28): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(110,48): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(112,44): error TS2554: Expected 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(114,34): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(117,46): error TS2554: Expected 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(119,34): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(123,40): error TS2339: Property 'AnimationTimeline' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(125,45): error TS2345: Argument of type 'TemplateStringsArray' is not assignable to parameter of type 'string | string[]'. Type 'TemplateStringsArray' is not assignable to type 'string[]'. @@ -325,8 +336,6 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(1 node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(139,41): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(144,48): error TS2554: Expected 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(145,36): error TS2339: Property 'AnimationTimeline' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(148,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(165,19): error TS2694: Namespace 'UI' has no exported member 'PopoverRequest'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(169,18): error TS2339: Property 'isDescendant' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(173,25): error TS2339: Property 'boxInWindow' does not exist on type 'EventTarget'. @@ -355,10 +364,10 @@ node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(4 node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(450,37): error TS2339: Property 'AnimationUI' does not exist on type '{ new (effect?: AnimationEffect, timeline?: AnimationTimeline): Animation; prototype: Animation; }'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(457,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(484,36): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. -node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(566,9): error TS2345: Argument of type '{ transform: string; }[]' is not assignable to parameter of type 'PropertyIndexedKeyframes | Keyframe[]'. - Type '{ transform: string; }[]' is not assignable to type 'Keyframe[]'. - Type '{ transform: string; }' is not assignable to type 'Keyframe'. - Property 'alignContent' is missing in type '{ transform: string; }'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(566,10): error TS2322: Type '{ transform: string; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ transform: string; }' is not assignable to type 'string'. +node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(566,42): error TS2322: Type '{ transform: string; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ transform: string; }' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(571,18): error TS2339: Property 'window' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(587,44): error TS2339: Property 'millisToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/animation/AnimationTimeline.js(589,20): error TS2339: Property 'window' does not exist on type 'Element'. @@ -453,23 +462,20 @@ node_modules/chrome-devtools-frontend/front_end/application_test_runner/Resource node_modules/chrome-devtools-frontend/front_end/application_test_runner/ResourcesTestRunner.js(76,15): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/ResourcesTestRunner.js(77,33): error TS2339: Property 'resources' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/application_test_runner/ServiceWorkersTestRunner.js(44,26): error TS2339: Property 'resources' does not exist on type 'any[]'. -node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(16,50): error TS2345: Argument of type '(msg: string) => void' is not assignable to parameter of type '(arg0: string) => undefined'. - Type 'void' is not assignable to type 'undefined'. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(16,57): error TS2322: Type 'void' is not assignable to type 'undefined'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(16,76): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(20,42): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(21,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(24,47): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(25,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(31,31): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarComboBox'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(33,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(34,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(37,53): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(39,57): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(45,63): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'Audits2Panel' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(serviceWorkerManager: ServiceWorkerManager) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'serviceWorkerManager' and 'model' are incompatible. + Type 'T' is not assignable to type 'ServiceWorkerManager'. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(94,50): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(126,14): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(135,14): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(147,42): error TS2555: Expected at least 2 arguments, but got 1. @@ -486,6 +492,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(229,29): node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(230,23): error TS2339: Property 'autofocus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(233,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(252,7): error TS2322: Type 'Promise' is not assignable to type 'Promise'. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(256,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(276,31): error TS2339: Property 'singleton' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(302,30): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(342,26): error TS2555: Expected at least 2 arguments, but got 1. @@ -520,6 +527,7 @@ node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(690,15): node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(701,15): error TS2503: Cannot find namespace 'ReportRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(718,22): error TS2551: Property 'Preset' does not exist on type 'typeof Audits2Panel'. Did you mean 'Presets'? node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(720,42): error TS2694: Namespace 'Audits2.Audits2Panel' has no exported member 'Preset'. +node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(772,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(780,25): error TS2503: Cannot find namespace 'ReportRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(832,25): error TS2503: Cannot find namespace 'ReportRenderer'. node_modules/chrome-devtools-frontend/front_end/audits2/Audits2Panel.js(901,15): error TS2503: Cannot find namespace 'ReportRenderer'. @@ -1285,20 +1293,9 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44340,15): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44348,15): error TS2339: Property 'keysArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44356,15): error TS2339: Property 'inverse' does not exist on type 'Map'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44361,8): error TS2339: Property 'set' does not exist on type 'Multimap'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44439,17): error TS2339: Property 'get' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44458,18): error TS2339: Property 'keysArray' does not exist on type 'Map'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44467,15): error TS2339: Property 'keysArray' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44469,8): error TS2339: Property 'pushAll' does not exist on type 'any[]'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44469,21): error TS2339: Property 'get' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44495,27): error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44525,22): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44527,13): error TS2339: Property '_incomingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44535,22): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44536,6): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44538,6): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44568,50): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44569,6): error TS2339: Property '_outgoingCallback' does not exist on type 'CallbackBarrier'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44584,6): error TS2339: Property 'setImmediate' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44595,19): error TS2339: Property 'spread' does not exist on type 'Promise'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(44610,19): error TS2339: Property 'catchException' does not exist on type 'Promise'. @@ -3017,8 +3014,6 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(65576,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'comment' must be of type '{ multiLine: boolean; slice: any[]; range: number[]; loc: { start: { line: number; column: number; }; end: {}; }; }[]', but here has type '{ multiLine: boolean; slice: number[]; range: any[]; loc: { start: { line: number; column: number; }; end: {}; }; }[]'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67117,1): error TS2322: Type 'string[]' is not assignable to type 'RegExpExecArray'. Property 'index' is missing in type 'string[]'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67167,19): error TS2339: Property 'parse' does not exist on type 'Link'. -node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67225,13): error TS2339: Property 'get' does not exist on type 'Link'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67300,14): error TS2339: Property 'Channels' does not exist on type '{}'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67300,35): error TS2339: Property 'Channels' does not exist on type '{}'. node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighthouse-background.js(67301,24): error TS2339: Property 'Channels' does not exist on type '{}'. @@ -3058,6 +3053,12 @@ node_modules/chrome-devtools-frontend/front_end/audits2_worker/lighthouse/lighth node_modules/chrome-devtools-frontend/front_end/audits2_worker.js(5,11): error TS2339: Property 'Runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/audits2_worker.js(6,8): error TS2339: Property 'importScripts' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(25,71): error TS2694: Namespace 'Protocol' has no exported member 'Debugger'. +node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(30,56): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'BlackboxManager' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(69,72): error TS2339: Property 'getAsArray' does not exist on type 'Setting'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(89,27): error TS2339: Property 'lowerBound' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(94,26): error TS2694: Namespace 'Protocol' has no exported member 'Debugger'. @@ -3078,6 +3079,12 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(362, node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(375,9): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(378,9): error TS2322: Type 'Promise' is not assignable to type 'Promise'. node_modules/chrome-devtools-frontend/front_end/bindings/BlackboxManager.js(381,5): error TS2322: Type 'Promise' is not assignable to type 'Promise'. +node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(60,52): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'BreakpointManager' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(97,52): error TS2339: Property 'get' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(120,52): error TS2339: Property 'valuesArray' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(123,34): error TS2339: Property 'clear' does not exist on type 'Multimap'. @@ -3098,12 +3105,28 @@ node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(44 node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(444,23): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(446,19): error TS2339: Property 'remove' does not exist on type 'Map>'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(448,40): error TS2339: Property 'remove' does not exist on type 'Map>>'. +node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(518,77): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'Breakpoint' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(536,50): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(655,51): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(667,51): error TS2339: Property 'valuesArray' does not exist on type 'Map'. +node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(674,79): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'Breakpoint' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(713,51): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(863,24): error TS2694: Namespace 'Protocol' has no exported member 'Debugger'. node_modules/chrome-devtools-frontend/front_end/bindings/BreakpointManager.js(905,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(20,47): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'CSSWorkspaceBinding' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(cssModel: CSSModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'cssModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'CSSModel'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(104,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'rawLocations' must be of type 'CSSLocation[]', but here has type 'any[]'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(106,20): error TS2339: Property 'pushAll' does not exist on type 'CSSLocation[]'. node_modules/chrome-devtools-frontend/front_end/bindings/CSSWorkspaceBinding.js(126,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -3126,6 +3149,12 @@ node_modules/chrome-devtools-frontend/front_end/bindings/CompilerScriptMapping.j node_modules/chrome-devtools-frontend/front_end/bindings/CompilerScriptMapping.js(202,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/CompilerScriptMapping.js(218,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/ContentProviderBasedProject.js(180,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. +node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(26,52): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'DebuggerWorkspaceBinding' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(51,31): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(85,5): error TS2322: Type 'StackTraceTopFrameLocation' is not assignable to type '{ update(): void; uiLocation(): UILocation; dispose(): void; isBlackboxed(): boolean; }'. node_modules/chrome-devtools-frontend/front_end/bindings/DebuggerWorkspaceBinding.js(85,5): error TS2322: Type 'StackTraceTopFrameLocation' is not assignable to type '{ update(): void; uiLocation(): UILocation; dispose(): void; isBlackboxed(): boolean; }'. @@ -3158,6 +3187,12 @@ node_modules/chrome-devtools-frontend/front_end/bindings/NetworkProject.js(286,2 node_modules/chrome-devtools-frontend/front_end/bindings/NetworkProject.js(308,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/PresentationConsoleMessageHelper.js(66,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/PresentationConsoleMessageHelper.js(130,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/bindings/ResourceMapping.js(17,56): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ResourceMapping' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(resourceTreeModel: ResourceTreeModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'resourceTreeModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'ResourceTreeModel'. node_modules/chrome-devtools-frontend/front_end/bindings/ResourceMapping.js(147,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/ResourceMapping.js(181,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/ResourceMapping.js(189,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -3182,6 +3217,7 @@ node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.j node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(323,14): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'. node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(384,38): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'. node_modules/chrome-devtools-frontend/front_end/bindings/ResourceScriptMapping.js(395,12): error TS2339: Property '_scriptSource' does not exist on type 'ResourceScriptFile'. +node_modules/chrome-devtools-frontend/front_end/bindings/ResourceUtils.js(72,32): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/bindings/SASSSourceMapping.js(63,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/SASSSourceMapping.js(90,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/bindings/SASSSourceMapping.js(108,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -3256,10 +3292,6 @@ node_modules/chrome-devtools-frontend/front_end/changes/ChangesSidebar.js(38,22) node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(26,44): error TS2694: Namespace 'Changes.ChangesView' has no exported member 'Row'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(37,42): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(43,45): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(45,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(47,37): error TS2345: Argument of type 'ToolbarText' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(50,20): error TS2554: Expected 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(75,11): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/changes/ChangesView.js(111,22): error TS2554: Expected 2 arguments, but got 1. @@ -3319,8 +3351,6 @@ node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2858,32): error node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(2858,49): error TS2339: Property 'right' does not exist on type 'never'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(3034,25): error TS2339: Property 'xRel' does not exist on type 'Pos'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(4840,5): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(5583,12): error TS2339: Property 'collapse' does not exist on type 'BranchChunk'. -node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(5615,18): error TS2339: Property 'maybeSpill' does not exist on type 'BranchChunk'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(5675,35): error TS2339: Property 'line' does not exist on type 'LineWidget'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(5675,61): error TS2339: Property 'line' does not exist on type 'LineWidget'. node_modules/chrome-devtools-frontend/front_end/cm/codemirror.js(5693,57): error TS2339: Property 'line' does not exist on type 'LineWidget'. @@ -3430,11 +3460,10 @@ node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(16,19): error TS23 node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(16,43): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm/overlay.js(17,5): error TS2304: Cannot find name 'define'. node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(30,14): error TS2403: Subsequent variable declarations must have the same type. Variable 'ok' must be of type 'boolean', but here has type 'any'. -node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(35,17): error TS2339: Property 'eat' does not exist on type 'StringStream'. node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(74,1): error TS2719: Type 'typeof StringStream' is not assignable to type 'typeof StringStream'. Two different types with this name exist, but they are unrelated. - Type 'StringStream' is not assignable to type 'StringStream & { backUp: (n: any) => void; column: () => void; current: () => void; eat: (match: any) => void; eatSpace: () => void; eatWhile: (match: any) => void; eol: () => void; indentation: () => void; ... 5 more ...; sol: () => void; }'. - Type 'StringStream' is not assignable to type '{ backUp: (n: any) => void; column: () => void; current: () => void; eat: (match: any) => void; eatSpace: () => void; eatWhile: (match: any) => void; eol: () => void; indentation: () => void; match: (pattern: string | RegExp, consume?: boolean, caseInsensitive?: boolean) => void; ... 4 more ...; sol: () => void; }'. - Property 'backUp' is missing in type 'StringStream'. + Types of property 'prototype' are incompatible. + Type '{ eol: () => boolean; sol: () => boolean; peek: () => any; next: () => any; eat: (match: any) => any; eatWhile: (match: any) => boolean; eatSpace: () => boolean; skipToEnd: typeof skipToEnd; skipTo: typeof skipTo; backUp: (n: any) => void; ... 5 more ...; lookAhead: () => any; }' is not assignable to type '{ backUp: (n: any) => void; column: () => void; current: () => void; eat: (match: any) => void; eatSpace: () => void; eatWhile: (match: any) => void; eol: () => void; indentation: () => void; match: (pattern: string | RegExp, consume?: boolean, caseInsensitive?: boolean) => void; ... 4 more ...; sol: () => void; }'. + Property 'hideFirstChars' does not exist on type '{ backUp: (n: any) => void; column: () => void; current: () => void; eat: (match: any) => void; eatSpace: () => void; eatWhile: (match: any) => void; eol: () => void; indentation: () => void; match: (pattern: string | RegExp, consume?: boolean, caseInsensitive?: boolean) => void; ... 4 more ...; sol: () => void; }'. node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(87,12): error TS2339: Property 'resolveMode' does not exist on type 'typeof CodeMirror'. node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(97,21): error TS2339: Property 'resolveMode' does not exist on type 'typeof CodeMirror'. node_modules/chrome-devtools-frontend/front_end/cm_headless/headlesscodemirror.js(102,12): error TS2339: Property 'registerHelper' does not exist on type 'typeof CodeMirror'. @@ -3525,13 +3554,9 @@ node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js( node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(39,42): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(42,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(58,47): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(61,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(63,43): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(76,39): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(82,30): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(85,37): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(125,27): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(136,28): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/color_picker/ContrastDetails.js(178,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -3547,20 +3572,14 @@ node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(48,25): node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(51,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(58,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(60,52): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(64,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(84,18): error TS2339: Property 'maxLength' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(97,20): error TS2339: Property 'maxLength' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(126,52): error TS2694: Namespace 'ColorPicker.Spectrum' has no exported member 'Palette'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(128,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(130,57): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(133,49): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(144,47): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(146,39): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(150,47): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(152,45): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(166,12): error TS2339: Property '_hueAlphaLeft' does not exist on type 'Spectrum'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(167,12): error TS2339: Property '_colorOffset' does not exist on type 'Spectrum'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(178,24): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. @@ -3576,15 +3595,13 @@ node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(200,24) node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(200,45): error TS2339: Property 'y' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(200,54): error TS2339: Property '_colorOffset' does not exist on type 'Spectrum'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(217,25): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(221,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(241,27): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(251,13): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(251,39): error TS2339: Property 'sprintf' does not exist on type 'StringConstructor'. -node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(253,23): error TS2345: Argument of type '{ opacity: number; }[]' is not assignable to parameter of type 'PropertyIndexedKeyframes | Keyframe[]'. - Type '{ opacity: number; }[]' is not assignable to type 'Keyframe[]'. - Type '{ opacity: number; }' is not assignable to type 'Keyframe'. - Property 'alignContent' is missing in type '{ opacity: number; }'. +node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(253,24): error TS2322: Type '{ opacity: number; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ opacity: number; }' is not assignable to type 'string'. +node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(253,38): error TS2322: Type '{ opacity: number; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ opacity: number; }' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(254,13): error TS2339: Property 'title' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(259,36): error TS2694: Namespace 'ColorPicker.Spectrum' has no exported member 'Palette'. node_modules/chrome-devtools-frontend/front_end/color_picker/Spectrum.js(272,22): error TS2339: Property '__mutable' does not exist on type 'Element'. @@ -3711,9 +3728,8 @@ node_modules/chrome-devtools-frontend/front_end/common/Settings.js(277,41): erro node_modules/chrome-devtools-frontend/front_end/common/Settings.js(281,31): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/common/Settings.js(285,44): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. node_modules/chrome-devtools-frontend/front_end/common/Settings.js(350,49): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. -node_modules/chrome-devtools-frontend/front_end/common/Settings.js(424,21): error TS2345: Argument of type '{ pattern: string; }[]' is not assignable to parameter of type '{ pattern: string; disabled: boolean; }[]'. - Type '{ pattern: string; }' is not assignable to type '{ pattern: string; disabled: boolean; }'. - Property 'disabled' is missing in type '{ pattern: string; }'. +node_modules/chrome-devtools-frontend/front_end/common/Settings.js(424,22): error TS2322: Type '{ pattern: string; }' is not assignable to type '{ pattern: string; disabled: boolean; }'. + Property 'disabled' is missing in type '{ pattern: string; }'. node_modules/chrome-devtools-frontend/front_end/common/Settings.js(534,18): error TS2339: Property 'vertical' does not exist on type '{}'. node_modules/chrome-devtools-frontend/front_end/common/Settings.js(535,18): error TS2339: Property 'vertical' does not exist on type '{}'. node_modules/chrome-devtools-frontend/front_end/common/Settings.js(541,18): error TS2339: Property 'horizontal' does not exist on type '{}'. @@ -3788,9 +3804,6 @@ node_modules/chrome-devtools-frontend/front_end/components/DockController.js(70, node_modules/chrome-devtools-frontend/front_end/components/DockController.js(70,76): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/components/DockController.js(71,7): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/components/DockController.js(116,33): error TS2339: Property 'deepActiveElement' does not exist on type 'Document'. -node_modules/chrome-devtools-frontend/front_end/components/DockController.js(193,5): error TS2322: Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(62,24): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(125,94): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(127,41): error TS2339: Property 'remove' does not exist on type 'Map'. @@ -3841,9 +3854,12 @@ node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(732,19): node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(739,30): error TS2339: Property 'value' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/components/Linkifier.js(748,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(8,9): error TS2339: Property 'ConsoleContextSelector' does not exist on type '{ new (): Console; prototype: Console; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(45,5): error TS2322: Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(36,55): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ConsoleContextSelector' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(runtimeModel: RuntimeModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'runtimeModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'RuntimeModel'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(162,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(170,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleContextSelector.js(192,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -3925,7 +3941,7 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(111,9) node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(119,47): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(122,25): error TS2345: Argument of type 'Element' is not assignable to parameter of type 'Icon'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(133,9): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(147,26): error TS2345: Argument of type 'Element[]' is not assignable to parameter of type 'Icon[]'. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(147,27): error TS2322: Type 'Element' is not assignable to type 'Icon'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(177,60): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(179,61): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleSidebar.js(209,41): error TS2339: Property 'asParsedURL' does not exist on type 'string'. @@ -3957,23 +3973,10 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(42,41): e node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(45,33): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(46,44): error TS2339: Property 'ConsoleSidebar' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(48,32): error TS2339: Property 'ConsoleViewFilter' does not exist on type '{ new (): Console; prototype: Console; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(63,33): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(88,44): error TS2694: Namespace 'Console.ConsoleView' has no exported member 'RegexMatchRange'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(92,48): error TS2339: Property 'ConsoleContextSelector' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(98,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(102,87): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(104,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(111,31): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(112,31): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(114,31): error TS2345: Argument of type 'ToolbarText' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(116,31): error TS2345: Argument of type 'ToolbarSettingToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(119,53): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(120,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(123,9): error TS2555: Expected at least 2 arguments, but got 1. @@ -3981,20 +3984,6 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(126,9): e node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(127,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(129,58): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(130,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(141,43): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(142,43): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(143,43): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(145,45): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(149,44): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(150,44): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(151,44): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(157,34): error TS2339: Property 'ConsoleViewport' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(169,30): error TS2339: Property 'ConsoleGroup' does not exist on type '{ new (): Console; prototype: Console; }'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(185,56): error TS2339: Property 'ConsoleViewMessage' does not exist on type '{ new (): Console; prototype: Console; }'. @@ -4034,6 +4023,7 @@ node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(674,42): node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(675,22): error TS2339: Property 'hasSelection' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(677,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(683,11): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(691,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(692,27): error TS2339: Property 'sprintf' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(696,32): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/console/ConsoleView.js(757,22): error TS2339: Property 'window' does not exist on type 'Element'. @@ -4317,9 +4307,6 @@ node_modules/chrome-devtools-frontend/front_end/console_counters/WarningErrorCou node_modules/chrome-devtools-frontend/front_end/console_counters/WarningErrorCounter.js(42,21): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/console_counters/WarningErrorCounter.js(58,5): error TS2322: Type 'number' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/console_counters/WarningErrorCounter.js(84,19): error TS2339: Property 'title' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/console_counters/WarningErrorCounter.js(96,5): error TS2322: Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/console_model/ConsoleModel.js(173,9): error TS2339: Property '_pageLoadSequenceNumber' does not exist on type 'ConsoleMessage'. node_modules/chrome-devtools-frontend/front_end/console_model/ConsoleModel.js(193,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/console_model/ConsoleModel.js(196,70): error TS2694: Namespace 'Protocol' has no exported member 'Log'. @@ -4384,9 +4371,8 @@ node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(65, node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(67,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(74,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(81,16): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(116,27): error TS2345: Argument of type '{ cookies: Cookie[]; }[]' is not assignable to parameter of type '{ folderName: string; cookies: Cookie[]; }[]'. - Type '{ cookies: Cookie[]; }' is not assignable to type '{ folderName: string; cookies: Cookie[]; }'. - Property 'folderName' is missing in type '{ cookies: Cookie[]; }'. +node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(116,28): error TS2322: Type '{ cookies: Cookie[]; }' is not assignable to type '{ folderName: string; cookies: Cookie[]; }'. + Property 'folderName' is missing in type '{ cookies: Cookie[]; }'. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(320,33): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(320,52): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. node_modules/chrome-devtools-frontend/front_end/cookie_table/CookiesTable.js(346,21): error TS2555: Expected at least 2 arguments, but got 1. @@ -4457,20 +4443,10 @@ node_modules/chrome-devtools-frontend/front_end/coverage/CoverageModel.js(427,31 node_modules/chrome-devtools-frontend/front_end/coverage/CoverageModel.js(428,31): error TS2694: Namespace 'Coverage' has no exported member 'CoverageSegment'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageModel.js(441,25): error TS2339: Property 'peekLast' does not exist on type '{ end: number; count: any; }[]'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(20,48): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(26,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(31,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(32,46): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(34,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(40,45): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(43,31): error TS2345: Argument of type 'ToolbarInput' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarInput' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(49,42): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(50,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(51,31): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(53,56): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(57,54): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/coverage/CoverageView.js(141,5): error TS2322: Type 'Timer' is not assignable to type 'number'. @@ -4760,10 +4736,9 @@ node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(25 node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(257,47): error TS2339: Property 'offsetHeight' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(272,1): error TS8022: JSDoc '@extends' is not attached to a class. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(320,22): error TS2352: Conversion of type 'NODE_TYPE' to type 'ViewportDataGridNode' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. -node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(334,9): error TS2322: Type 'NODE_TYPE[][]' is not assignable to type 'ViewportDataGridNode[][]'. -node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(334,9): error TS2322: Type 'NODE_TYPE[][]' is not assignable to type 'ViewportDataGridNode[][]'. - Type 'NODE_TYPE[]' is not assignable to type 'ViewportDataGridNode[]'. - Type 'NODE_TYPE' is not assignable to type 'ViewportDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(334,21): error TS2322: Type 'NODE_TYPE[]' is not assignable to type 'ViewportDataGridNode[]'. +node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(334,21): error TS2322: Type 'NODE_TYPE[]' is not assignable to type 'ViewportDataGridNode[]'. + Type 'NODE_TYPE' is not assignable to type 'ViewportDataGridNode'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(363,15): error TS2339: Property 'parent' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(372,11): error TS2339: Property 'remove' does not exist on type 'NODE_TYPE'. node_modules/chrome-devtools-frontend/front_end/data_grid/ViewportDataGrid.js(373,11): error TS2339: Property 'parent' does not exist on type 'NODE_TYPE'. @@ -4833,9 +4808,6 @@ node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(279,45): node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(280,60): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(283,88): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(285,36): error TS2694: Namespace 'Adb' has no exported member 'PortForwardingRule'. -node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(286,5): error TS2322: Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; } & { ...; }'. - Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; }'. - Property 'renderItem' is missing in type 'ListWidget'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(290,31): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(293,43): error TS2694: Namespace 'Adb' has no exported member 'PortForwardingRule'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(297,29): error TS2555: Expected at least 2 arguments, but got 1. @@ -4862,9 +4834,6 @@ node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(461,11): node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(463,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(466,64): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(469,36): error TS2694: Namespace 'Adb' has no exported member 'PortForwardingRule'. -node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(470,5): error TS2322: Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; } & { ...; }'. - Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; }'. - Property 'renderItem' is missing in type 'ListWidget'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(475,24): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(475,70): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(478,43): error TS2694: Namespace 'Adb' has no exported member 'PortForwardingRule'. @@ -4911,8 +4880,6 @@ node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(745,44): node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(783,36): error TS2694: Namespace 'Devices.DevicesView' has no exported member 'PageSection'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(788,28): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(790,39): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(794,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(797,23): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(805,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/devices/DevicesView.js(806,47): error TS2555: Expected at least 2 arguments, but got 1. @@ -5155,9 +5122,6 @@ node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(13 node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(152,32): error TS2339: Property 'checked' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(203,36): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(241,41): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(257,5): error TS2322: Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(291,94): error TS2339: Property 'addAll' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(297,55): error TS2339: Property 'addAll' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/elements/ClassesPaneWidget.js(299,57): error TS2339: Property 'valuesArray' does not exist on type 'Set'. @@ -5193,8 +5157,6 @@ node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleModel.js(1 node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(48,36): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(51,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(52,49): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(57,31): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(58,71): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(73,12): error TS2339: Property '_filterRegex' does not exist on type 'ComputedStyleWidget'. node_modules/chrome-devtools-frontend/front_end/elements/ComputedStyleWidget.js(91,24): error TS2345: Argument of type '(Promise | Promise)[]' is not assignable to parameter of type 'Iterable>'. @@ -5235,18 +5197,21 @@ node_modules/chrome-devtools-frontend/front_end/elements/ElementStatePaneWidget. node_modules/chrome-devtools-frontend/front_end/elements/ElementStatePaneWidget.js(51,16): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementStatePaneWidget.js(108,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/ElementStatePaneWidget.js(109,26): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/elements/ElementStatePaneWidget.js(124,5): error TS2322: Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsBreadcrumbs.js(12,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsBreadcrumbs.js(86,37): error TS2339: Property 'nextSiblingElement' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsBreadcrumbs.js(104,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/ElementsBreadcrumbs.js(215,38): error TS2339: Property 'offsetWidth' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(49,41): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(83,51): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ElementsPanel' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(domModel: DOMModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'domModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DOMModel'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(90,32): error TS2339: Property 'addEventListener' does not exist on type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(98,57): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(116,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. -node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(116,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(116,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(116,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. Property 'appendApplicableItems' is missing in type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(159,24): error TS2339: Property 'remove' does not exist on type 'ElementsTreeOutline[]'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsPanel.js(180,12): error TS2339: Property 'removeChildren' does not exist on type 'Element'. @@ -5438,6 +5403,10 @@ node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js( node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(566,29): error TS2339: Property 'naturalHeight' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(567,26): error TS2339: Property 'currentSrc' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(594,19): error TS2339: Property 'hovered' does not exist on type 'TreeElement'. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(608,30): error TS2345: Argument of type '{ mode: string; showInfo: boolean; }' is not assignable to parameter of type '{ mode: string; showInfo: boolean; selectors: string; }'. + Property 'selectors' is missing in type '{ mode: string; showInfo: boolean; }'. +node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(614,22): error TS2345: Argument of type '{ mode: string; showInfo: boolean; }' is not assignable to parameter of type '{ mode: string; showInfo: boolean; selectors: string; }'. + Property 'selectors' is missing in type '{ mode: string; showInfo: boolean; }'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(755,33): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(758,36): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/elements/ElementsTreeOutline.js(813,22): error TS2339: Property 'index' does not exist on type 'DOMNode'. @@ -5488,7 +5457,12 @@ node_modules/chrome-devtools-frontend/front_end/elements/EventListenersWidget.js node_modules/chrome-devtools-frontend/front_end/elements/EventListenersWidget.js(73,15): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/EventListenersWidget.js(77,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/EventListenersWidget.js(129,52): error TS2339: Property 'value' does not exist on type 'EventTarget'. -node_modules/chrome-devtools-frontend/front_end/elements/InspectElementModeController.js(52,5): error TS2554: Expected 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/elements/InspectElementModeController.js(40,55): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'InspectElementModeController' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(overlayModel: OverlayModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'overlayModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'OverlayModel'. node_modules/chrome-devtools-frontend/front_end/elements/InspectElementModeController.js(91,24): error TS2694: Namespace 'Protocol' has no exported member 'Overlay'. node_modules/chrome-devtools-frontend/front_end/elements/MetricsSidebarPane.js(56,27): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/MetricsSidebarPane.js(82,24): error TS2345: Argument of type '(Promise> | Promise)[]' is not assignable to parameter of type 'Iterable | PromiseLike>>'. @@ -5550,10 +5524,12 @@ node_modules/chrome-devtools-frontend/front_end/elements/PropertiesWidget.js(153 node_modules/chrome-devtools-frontend/front_end/elements/PropertiesWidget.js(162,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(29,25): error TS2339: Property 'property' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(43,42): error TS2339: Property 'scrollIntoViewIfNeeded' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(45,9): error TS2345: Argument of type '{ offset: number; backgroundColor: string; }[]' is not assignable to parameter of type 'PropertyIndexedKeyframes | Keyframe[]'. - Type '{ offset: number; backgroundColor: string; }[]' is not assignable to type 'Keyframe[]'. - Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'Keyframe'. - Property 'alignContent' is missing in type '{ offset: number; backgroundColor: string; }'. +node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(46,11): error TS2322: Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string'. +node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(47,11): error TS2322: Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string'. +node_modules/chrome-devtools-frontend/front_end/elements/StylePropertyHighlighter.js(47,69): error TS2322: Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string | string[] | Keyframe'. + Type '{ offset: number; backgroundColor: string; }' is not assignable to type 'string'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(35,18): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(50,51): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(69,32): error TS2339: Property '_instance' does not exist on type 'typeof StylesSidebarPane'. @@ -5619,12 +5595,8 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(95 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(957,30): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(962,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(964,29): error TS2339: Property 'tabIndex' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(970,40): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(972,43): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(973,24): error TS2339: Property 'tabIndex' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(974,38): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1019,61): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1021,51): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(1022,35): error TS2339: Property 'selectorText' does not exist on type 'CSSRule'. @@ -5782,9 +5754,6 @@ node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(32 node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(3302,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(3305,32): error TS2339: Property '_instance' does not exist on type 'typeof StylesSidebarPane'. node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(3312,32): error TS2339: Property '_instance' does not exist on type 'typeof StylesSidebarPane'. -node_modules/chrome-devtools-frontend/front_end/elements/StylesSidebarPane.js(3320,5): error TS2322: Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/elements_test_runner/EditDOMTestRunner.js(15,5): error TS2304: Cannot find name 'eventSender'. node_modules/chrome-devtools-frontend/front_end/elements_test_runner/EditDOMTestRunner.js(19,37): error TS2339: Property 'elements' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/elements_test_runner/ElementsTestRunner.js(112,55): error TS2339: Property 'eventListener' does not exist on type 'TreeElement'. @@ -5817,6 +5786,12 @@ node_modules/chrome-devtools-frontend/front_end/emulation/AdvancedApp.js(199,5): Property '_rootSplitWidget' does not exist on type '{ presentUI(document: Document): void; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(9,1): error TS8022: JSDoc '@extends' is not attached to a class. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(56,42): error TS2694: Namespace 'Emulation.EmulatedDevice' has no exported member 'Mode'. +node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(67,57): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'DeviceModeModel' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(emulationModel: EmulationModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'emulationModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'EmulationModel'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(75,34): error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(76,9): error TS2365: Operator '<=' cannot be applied to types 'string' and 'number'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(86,59): error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. @@ -5834,8 +5809,6 @@ node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeModel.js(715 node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(25,74): error TS2694: Namespace 'Emulation.EmulatedDevice' has no exported member 'Mode'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(33,39): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(43,40): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(87,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(95,16): error TS2339: Property 'maxLength' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(96,16): error TS2339: Property 'title' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(96,24): error TS2555: Expected at least 2 arguments, but got 1. @@ -5843,21 +5816,9 @@ node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(1 node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(110,17): error TS2339: Property 'title' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(110,25): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(148,30): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(152,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(158,36): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(162,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(168,27): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(172,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(175,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(186,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(194,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(195,31): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(211,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(212,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(213,26): error TS2555: Expected at least 2 arguments, but got 1. @@ -5877,11 +5838,6 @@ node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(3 node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(302,71): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(303,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(305,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(338,5): error TS2322: Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(338,5): error TS2322: Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(392,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(397,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/emulation/DeviceModeToolbar.js(441,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -5970,6 +5926,12 @@ node_modules/chrome-devtools-frontend/front_end/emulation/EmulatedDevices.js(470 node_modules/chrome-devtools-frontend/front_end/emulation/InspectedPagePlaceholder.js(21,20): error TS2339: Property 'window' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/InspectedPagePlaceholder.js(22,35): error TS2339: Property 'window' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/emulation/InspectedPagePlaceholder.js(72,15): error TS2339: Property 'singleton' does not exist on type 'Window'. +node_modules/chrome-devtools-frontend/front_end/emulation/MediaQueryInspector.js(25,51): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'MediaQueryInspector' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(cssModel: CSSModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'cssModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'CSSModel'. node_modules/chrome-devtools-frontend/front_end/emulation/MediaQueryInspector.js(74,41): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/emulation/MediaQueryInspector.js(101,41): error TS2339: Property 'enclosingNodeOrSelfWithClass' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/emulation/MediaQueryInspector.js(111,31): error TS2339: Property 'sprintf' does not exist on type 'StringConstructor'. @@ -6094,60 +6056,18 @@ node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersVi node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersView.js(301,29): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersView.js(311,13): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/event_listeners/EventListenersView.js(321,13): error TS2339: Property 'consume' does not exist on type 'Event'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(130,25): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(132,23): error TS2339: Property 'registerHandler' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(132,68): error TS2339: Property '_dispatch' does not exist on type 'EventSinkImpl'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(145,25): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(149,19): error TS1110: Type expected. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(161,14): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(186,12): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(203,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(207,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(224,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(241,12): error TS2339: Property '__defineGetter__' does not exist on type 'Panels'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(243,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(249,53): error TS2339: Property 'nextObjectId' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(251,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(255,40): error TS2339: Property 'hasHandler' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(268,25): error TS2339: Property 'unregisterHandler' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(270,25): error TS2339: Property 'registerHandler' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(274,25): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(278,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(298,14): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(300,14): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(314,12): error TS8022: JSDoc '@extends' is not attached to a class. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(322,55): error TS2339: Property 'nextObjectId' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(327,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(371,12): error TS8022: JSDoc '@extends' is not attached to a class. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(381,12): error TS8022: JSDoc '@extends' is not attached to a class. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(391,12): error TS8022: JSDoc '@extends' is not attached to a class. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(401,44): error TS2339: Property 'nextObjectId' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(404,21): error TS2339: Property '_id' does not exist on type 'ExtensionPanelImpl'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(410,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(418,60): error TS2339: Property '_id' does not exist on type 'ExtensionPanelImpl'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(419,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(429,12): error TS8022: JSDoc '@extends' is not attached to a class. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(435,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(448,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(452,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(457,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(475,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(492,62): error TS2339: Property 'nextObjectId' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(493,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(515,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(529,12): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(544,12): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(551,12): error TS2339: Property '_fire' does not exist on type 'EventSinkImpl'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(569,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(586,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(597,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(623,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(627,23): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(662,21): error TS2339: Property 'sendRequest' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(678,10): error TS2339: Property 'registerHandler' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(678,43): error TS2551: Property '_onCallback' does not exist on type 'ExtensionServerClient'. Did you mean '_callbacks'? -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(682,49): error TS2339: Property '_onMessage' does not exist on type 'ExtensionServerClient'. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(695,34): error TS2339: Property '_registerCallback' does not exist on type 'ExtensionServerClient'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(789,21): error TS2339: Property 'exposeWebInspectorNamespace' does not exist on type 'ExtensionDescriptor'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionAPI.js(790,12): error TS2339: Property 'webInspector' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionPanel.js(232,23): error TS2339: Property 'style' does not exist on type 'Element'. @@ -6160,9 +6080,6 @@ node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(16 node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(219,43): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(244,54): error TS2339: Property 'traverseNextNode' does not exist on type 'HTMLElement'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(245,27): error TS2693: 'ShadowRoot' only refers to a type, but is being used as a value here. -node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(290,77): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(463,53): error TS2345: Argument of type '{ url: string; type: string; }' is not assignable to parameter of type '{ contentURL(): string; contentType(): ResourceType; contentEncoded(): Promise; requestContent(): Promise; searchInContent(query: string, caseSensitive: boolean, isRegex: boolean): Promise<...>; }'. Property 'contentURL' is missing in type '{ url: string; type: string; }'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(471,22): error TS2339: Property 'valuesArray' does not exist on type 'Map; requestContent(): Promise; searchInContent(query: string, caseSensitive: boolean, isRegex: boolean): Promise<...>; }>'. @@ -6181,6 +6098,16 @@ node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(71 node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(765,31): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(777,31): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(839,43): error TS2694: Namespace 'Extensions.ExtensionStatus' has no exported member 'Record'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(881,30): error TS2339: Property 'resourceTreeModel' does not exist on type 'true | ResourceTreeFrame'. + Property 'resourceTreeModel' does not exist on type 'true'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(886,48): error TS2339: Property 'id' does not exist on type 'true | ResourceTreeFrame'. + Property 'id' does not exist on type 'true'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(891,113): error TS2339: Property 'url' does not exist on type 'true | ResourceTreeFrame'. + Property 'url' does not exist on type 'true'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(897,48): error TS2339: Property 'id' does not exist on type 'true | ResourceTreeFrame'. + Property 'id' does not exist on type 'true'. +node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(901,44): error TS2339: Property 'url' does not exist on type 'true | ResourceTreeFrame'. + Property 'url' does not exist on type 'true'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(918,34): error TS2694: Namespace 'SDK.RuntimeModel' has no exported member 'EvaluationResult'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(976,45): error TS2694: Namespace 'Extensions.ExtensionStatus' has no exported member 'Record'. node_modules/chrome-devtools-frontend/front_end/extensions/ExtensionServer.js(983,59): error TS2339: Property 'vsprintf' does not exist on type 'StringConstructor'. @@ -6858,7 +6785,6 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerViewHost.js(13 node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerViewHost.js(149,34): error TS2339: Property '_snapshot' does not exist on type 'Selection'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerViewHost.js(153,20): error TS2694: Namespace 'SDK' has no exported member 'SnapshotWithRect'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerViewHost.js(231,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/LayerViewHost.js(235,7): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(44,30): error TS2339: Property 'createTextChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(44,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(54,47): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -6897,8 +6823,6 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(626 node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(641,21): error TS2339: Property 'clientX' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(642,22): error TS2339: Property 'clientY' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(670,22): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(672,31): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(693,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(697,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/layer_viewer/Layers3DView.js(708,15): error TS2339: Property 'which' does not exist on type 'Event'. @@ -6954,14 +6878,8 @@ node_modules/chrome-devtools-frontend/front_end/layer_viewer/PaintProfilerView.j node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(19,22): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(20,20): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(35,48): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(39,51): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(40,51): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(44,51): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(48,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(50,49): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(128,18): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(144,18): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/layer_viewer/TransformController.js(154,26): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. @@ -7018,11 +6936,6 @@ node_modules/chrome-devtools-frontend/front_end/main/Main.js(192,32): error TS25 node_modules/chrome-devtools-frontend/front_end/main/Main.js(193,32): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(194,32): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(195,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(204,5): error TS2322: Type 'CSSWorkspaceBinding' is not assignable to type '{ rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; } & { rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; }'. - Type 'CSSWorkspaceBinding' is not assignable to type '{ rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; }'. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(204,5): error TS2322: Type 'CSSWorkspaceBinding' is not assignable to type '{ rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; } & { rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; }'. - Type 'CSSWorkspaceBinding' is not assignable to type '{ rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; }'. - Property '_workspace' does not exist on type '{ rawLocationToUILocation(rawLocation: CSSLocation): UILocation; uiLocationToRawLocations(uiLocation: UILocation): CSSLocation[]; }'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(208,5): error TS2322: Type 'ExtensionServer' is not assignable to type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(208,5): error TS2322: Type 'ExtensionServer' is not assignable to type 'typeof extensionServer'. Property '_extensionAPITestHook' is missing in type 'ExtensionServer'. @@ -7050,23 +6963,12 @@ node_modules/chrome-devtools-frontend/front_end/main/Main.js(472,12): error TS23 node_modules/chrome-devtools-frontend/front_end/main/Main.js(473,12): error TS2339: Property 'inspectorAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(567,65): error TS2339: Property 'deepActiveElement' does not exist on type 'Document'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(591,25): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(599,5): error TS2322: Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarMenuButton'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(608,42): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(609,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(616,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(617,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(618,40): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(619,39): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(636,41): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(637,41): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(638,41): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(639,41): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(653,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(654,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(656,68): error TS2555: Expected at least 2 arguments, but got 1. @@ -7074,9 +6976,6 @@ node_modules/chrome-devtools-frontend/front_end/main/Main.js(657,27): error TS23 node_modules/chrome-devtools-frontend/front_end/main/Main.js(668,69): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(682,32): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(685,27): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/main/Main.js(702,5): error TS2322: Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/main/Main.js(721,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(724,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/Main.js(727,22): error TS2555: Expected at least 2 arguments, but got 1. @@ -7108,6 +7007,7 @@ node_modules/chrome-devtools-frontend/front_end/main/RenderingOptions.js(52,25): node_modules/chrome-devtools-frontend/front_end/main/RenderingOptions.js(57,42): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/main/RenderingOptions.js(58,51): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/main/RenderingOptions.js(59,47): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/main/RequestAppBannerActionDelegate.js(18,14): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/MobileThrottlingSelector.js(7,48): error TS2694: Namespace 'MobileThrottling' has no exported member 'MobileThrottlingConditionsGroup'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/MobileThrottlingSelector.js(7,100): error TS2694: Namespace 'MobileThrottling' has no exported member 'ConditionsList'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/MobileThrottlingSelector.js(17,34): error TS2694: Namespace 'MobileThrottling' has no exported member 'ConditionsList'. @@ -7128,6 +7028,12 @@ node_modules/chrome-devtools-frontend/front_end/mobile_throttling/NetworkThrottl node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(16,59): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'Conditions'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(18,36): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'Conditions'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(20,36): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'Conditions'. +node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(28,57): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ThrottlingManager' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(emulationModel: EmulationModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'emulationModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'EmulationModel'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(44,42): error TS2694: Namespace 'MobileThrottling' has no exported member 'NetworkThrottlingConditionsGroup'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(45,44): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'Conditions'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingManager.js(48,21): error TS2339: Property 'removeChildren' does not exist on type 'HTMLSelectElement'. @@ -7200,18 +7106,9 @@ node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingSett node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingSettingsTab.js(197,50): error TS2365: Operator '>=' cannot be applied to types 'string' and 'number'. node_modules/chrome-devtools-frontend/front_end/mobile_throttling/ThrottlingSettingsTab.js(197,64): error TS2365: Operator '<=' cannot be applied to types 'string' and 'number'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(18,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(19,37): error TS2345: Argument of type 'ToolbarCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(21,42): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(23,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(24,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(26,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(28,51): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'BlockedPattern'. -node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(29,5): error TS2322: Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; } & { ...; }'. - Type 'ListWidget' is not assignable to type '{ renderItem(item: T, editable: boolean): Element; removeItemRequested(item: T, index: number): void; beginEdit(item: T): Editor; commitEdit(item: T, editor: Editor, isNew: boolean): void; }'. - Property 'renderItem' is missing in type 'ListWidget'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(35,58): error TS2694: Namespace 'SDK.NetworkManager' has no exported member 'BlockedPattern'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(52,39): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/network/BlockedURLsPane.js(53,47): error TS2555: Expected at least 2 arguments, but got 1. @@ -7356,6 +7253,12 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(114,37 node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(124,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(144,44): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(147,50): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(152,57): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'NetworkLogView' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(networkManager: NetworkManager) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'networkManager' and 'model' are incompatible. + Type 'T' is not assignable to type 'NetworkManager'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(174,46): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(175,46): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(184,38): error TS2694: Namespace 'Network.NetworkLogView' has no exported member 'Filter'. @@ -7384,7 +7287,6 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(905,5) node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(916,20): error TS2339: Property 'window' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(938,41): error TS2339: Property 'firstValue' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1074,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1149,5): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1150,69): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1157,13): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1162,13): error TS2555: Expected at least 2 arguments, but got 1. @@ -7405,6 +7307,7 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1194,9 node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1204,13): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1214,13): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1223,13): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1294,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1309,17): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1314,17): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkLogView.js(1501,39): error TS2694: Namespace 'Network.NetworkLogView' has no exported member 'Filter'. @@ -7496,42 +7399,18 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(67,53): node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(79,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(140,55): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(158,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(167,42): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(169,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(171,42): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(174,66): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(175,42): error TS2345: Argument of type 'ToolbarSettingToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(177,42): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(180,35): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(183,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(184,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(185,42): error TS2345: Argument of type 'ToolbarSettingToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(188,69): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(189,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(190,42): error TS2345: Argument of type 'ToolbarSettingToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(192,42): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(193,61): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(196,42): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(197,35): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(198,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(201,48): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(202,9): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(203,42): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(206,42): error TS2345: Argument of type 'ToolbarCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(207,42): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(209,42): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(274,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(287,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(291,7): error TS2322: Type 'Timer' is not assignable to type 'number'. @@ -7540,8 +7419,6 @@ node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(397,22): node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(404,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(412,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(420,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(438,61): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(520,46): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(523,22): error TS2339: Property 'isSelfOrDescendant' does not exist on type 'EventTarget'. node_modules/chrome-devtools-frontend/front_end/network/NetworkPanel.js(550,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -7694,13 +7571,7 @@ node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameVi node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(38,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(43,27): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(63,49): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(65,41): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(72,41): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(76,49): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(78,41): error TS2345: Argument of type 'ToolbarInput' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarInput' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(86,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(99,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameView.js(100,46): error TS2555: Expected at least 2 arguments, but got 1. @@ -7724,6 +7595,17 @@ node_modules/chrome-devtools-frontend/front_end/network/ResourceWebSocketFrameVi node_modules/chrome-devtools-frontend/front_end/network_log/HAREntry.js(130,29): error TS2339: Property 'localizedFailDescription' does not exist on type 'NetworkRequest'. node_modules/chrome-devtools-frontend/front_end/network_log/HAREntry.js(150,36): error TS2694: Namespace 'NetworkLog.HAREntry' has no exported member 'Timing'. node_modules/chrome-devtools-frontend/front_end/network_log/HAREntry.js(319,21): error TS2339: Property 'Timing' does not exist on type 'typeof HAREntry'. +node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(44,57): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'NetworkLog' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(networkManager: NetworkManager) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'networkManager' and 'model' are incompatible. + Type 'T' is not assignable to type 'NetworkManager'. +node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(99,59): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. +node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(101,61): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'NetworkLog' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(networkManager: NetworkManager) => void' is not assignable to type '(model: T) => void'. node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(123,24): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(154,49): error TS2694: Namespace 'NetworkLog.NetworkLog' has no exported member '_InitiatorInfo'. node_modules/chrome-devtools-frontend/front_end/network_log/NetworkLog.js(165,38): error TS2694: Namespace 'NetworkLog.NetworkLog' has no exported member '_InitiatorInfo'. @@ -7764,11 +7646,8 @@ node_modules/chrome-devtools-frontend/front_end/network_test_runner/NetworkTestR node_modules/chrome-devtools-frontend/front_end/network_test_runner/NetworkTestRunner.js(69,15): error TS2304: Cannot find name 'i'. node_modules/chrome-devtools-frontend/front_end/network_test_runner/NetworkTestRunner.js(69,36): error TS2304: Cannot find name 'i'. node_modules/chrome-devtools-frontend/front_end/network_test_runner/NetworkTestRunner.js(70,35): error TS2304: Cannot find name 'i'. -node_modules/chrome-devtools-frontend/front_end/network_test_runner/ProductRegistryTestRunner.js(38,22): error TS2345: Argument of type '{ hash: string; prefixes: {}; }[]' is not assignable to parameter of type '{ hash: string; prefixes: { [x: string]: { product: number; type: number; }; }; }[]'. - Type '{ hash: string; prefixes: {}; }' is not assignable to type '{ hash: string; prefixes: { [x: string]: { product: number; type: number; }; }; }'. - Types of property 'prefixes' are incompatible. - Type '{}' is not assignable to type '{ [x: string]: { product: number; type: number; }; }'. - Index signature is missing in type '{}'. +node_modules/chrome-devtools-frontend/front_end/network_test_runner/ProductRegistryTestRunner.js(38,81): error TS2322: Type '{}' is not assignable to type '{ [x: string]: { product: number; type: number; }; }'. + Index signature is missing in type '{}'. node_modules/chrome-devtools-frontend/front_end/object_ui/CustomPreviewComponent.js(31,20): error TS2339: Property 'classList' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/object_ui/CustomPreviewComponent.js(94,30): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/object_ui/CustomPreviewComponent.js(116,11): error TS2339: Property 'consume' does not exist on type 'Event'. @@ -8257,8 +8136,6 @@ node_modules/chrome-devtools-frontend/front_end/persistence/WorkspaceSettingsTab node_modules/chrome-devtools-frontend/front_end/persistence/WorkspaceSettingsTab.js(61,18): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/persistence/WorkspaceSettingsTab.js(112,26): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/persistence/WorkspaceSettingsTab.js(120,39): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/persistence/WorkspaceSettingsTab.js(122,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(30,30): error TS2304: Cannot find name 'Arguments'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(31,5): error TS2300: Duplicate identifier 'ArrayLike'. node_modules/chrome-devtools-frontend/front_end/platform/utilities.js(46,18): error TS2339: Property 'findAll' does not exist on type 'String'. @@ -8362,25 +8239,427 @@ node_modules/chrome-devtools-frontend/front_end/product_registry/ProductRegistry node_modules/chrome-devtools-frontend/front_end/product_registry/ProductRegistry.js(34,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/product_registry/ProductRegistry.js(55,41): error TS2694: Namespace 'ProductRegistry.Registry' has no exported member 'ProductEntry'. node_modules/chrome-devtools-frontend/front_end/product_registry/ProductRegistry.js(72,26): error TS2339: Property 'ProductEntry' does not exist on type '{ (): void; prototype: { nameForUrl: (parsedUrl: ParsedURL) => string; entryForUrl: (parsedUrl: ParsedURL) => any; typeForUrl: (parsedUrl: ParsedURL) => number; }; }'. -node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1488,1): error TS2345: Argument of type '({ "hash": string; "prefixes": { "": { "product": number; "type": number; }; }; } | { "hash": string; "prefixes": { "*": { "product": number; "type": number; }; }; } | { "hash": string; "prefixes": { "": { "product": number; }; }; } | { "hash": string; "prefixes": { ...; }; } | ... 35 more ... | { ...; })[]' is not assignable to parameter of type '{ hash: string; prefixes: { [x: string]: { product: number; type: number; }; }; }[]'. - Type '{ "hash": string; "prefixes": { "": { "product": number; "type": number; }; }; } | { "hash": string; "prefixes": { "*": { "product": number; "type": number; }; }; } | { "hash": string; "prefixes": { "": { "product": number; }; }; } | { "hash": string; "prefixes": { ...; }; } | ... 35 more ... | { ...; }' is not assignable to type '{ hash: string; prefixes: { [x: string]: { product: number; type: number; }; }; }'. - Type '{ "hash": string; "prefixes": { "": { "product": number; }; }; }' is not assignable to type '{ hash: string; prefixes: { [x: string]: { product: number; type: number; }; }; }'. - Types of property 'prefixes' are incompatible. - Type '{ "": { "product": number; }; }' is not assignable to type '{ [x: string]: { product: number; type: number; }; }'. - Property '""' is incompatible with index signature. - Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. - Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1559,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1563,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1604,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1605,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1606,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(1865,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2136,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2136,64): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2136,86): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2208,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2269,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2270,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2322,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2323,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2503,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2856,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2857,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2858,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2859,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2860,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2861,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2862,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2863,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2864,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(2865,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3126,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3572,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3573,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3574,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3575,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3576,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3747,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3748,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3770,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3771,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3772,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3773,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3774,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3775,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3776,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3780,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3819,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3826,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3873,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3874,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3957,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(3958,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4068,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4069,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4138,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4139,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4203,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4230,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4260,104): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4264,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4265,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4266,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4312,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4480,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4832,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4833,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4834,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(4835,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5127,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5137,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5159,70): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5175,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5186,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5202,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5249,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5522,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5523,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5524,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5525,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5539,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5565,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5612,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5613,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5614,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5615,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5616,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5617,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5618,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5619,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5684,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5789,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5820,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5852,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5858,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5859,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5860,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5970,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5971,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(5972,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6145,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6151,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6152,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6153,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6154,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6180,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6181,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6182,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6183,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6184,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6185,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6186,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6187,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6193,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6194,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6195,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6196,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6197,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6198,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6199,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6217,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6218,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6225,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6227,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6228,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6229,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6230,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6231,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6232,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6233,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6243,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6270,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6272,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6276,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6294,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6296,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6297,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6298,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6299,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6300,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6303,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6305,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6323,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6324,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6325,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6326,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6327,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6333,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6334,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6335,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6336,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6337,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6338,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6339,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6340,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6341,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6342,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6343,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6344,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6345,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6346,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6347,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6348,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6349,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6350,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6351,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6360,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6361,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6362,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6363,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6364,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6365,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6369,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6382,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6388,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6389,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6404,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6405,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6406,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6425,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6441,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6442,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6445,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6481,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6521,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6560,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6573,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6574,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6575,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6576,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6577,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6578,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6579,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6580,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6581,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6582,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6583,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6615,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6620,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6629,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6637,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6661,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6668,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6675,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6689,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6690,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6699,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6726,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6735,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6737,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6738,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. +node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryData.js(6741,42): error TS2322: Type '{ "product": number; }' is not assignable to type '{ product: number; type: number; }'. + Property 'type' is missing in type '{ "product": number; }'. node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryImpl.js(27,41): error TS2694: Namespace 'ProductRegistry.Registry' has no exported member 'ProductEntry'. node_modules/chrome-devtools-frontend/front_end/product_registry_impl/ProductRegistryImpl.js(103,67): error TS2694: Namespace 'ProductRegistry.Registry' has no exported member 'ProductEntry'. -node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(68,9): error TS2322: Type 'BottomUpProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'BottomUpProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(68,9): error TS2322: Type 'BottomUpProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'BottomUpProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'BottomUpProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(83,15): error TS2339: Property '_remainingNodeInfos' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(196,26): error TS2339: Property 'UID' does not exist on type 'ProfileNode'. node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(197,23): error TS2339: Property 'UID' does not exist on type 'ProfileNode'. node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(212,68): error TS2339: Property 'UID' does not exist on type 'ProfileNode'. node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(219,40): error TS2339: Property 'UID' does not exist on type 'ProfileNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(253,19): error TS2339: Property '_takePropertiesFromProfileDataGridNode' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/BottomUpProfileDataGrid.js(259,21): error TS2339: Property '_keepOnlyChild' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileFlameChart.js(45,49): error TS2551: Property '_colorGenerator' does not exist on type 'typeof ProfileFlameChartDataProvider'. Did you mean 'colorGenerator'? node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileFlameChart.js(52,46): error TS2551: Property '_colorGenerator' does not exist on type 'typeof ProfileFlameChartDataProvider'. Did you mean 'colorGenerator'? node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileFlameChart.js(54,51): error TS2551: Property '_colorGenerator' does not exist on type 'typeof ProfileFlameChartDataProvider'. Did you mean 'colorGenerator'? @@ -8413,9 +8692,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(141,2 node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(144,49): error TS2694: Namespace 'SDK.CPUProfilerModel' has no exported member 'EventData'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(145,43): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(159,26): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(212,65): error TS2345: Argument of type 'CPUProfileType' is not assignable to parameter of type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'CPUProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Property 'showProfile' is missing in type 'CPUProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(225,25): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(240,24): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. node_modules/chrome-devtools-frontend/front_end/profiler/CPUProfileView.js(390,21): error TS2339: Property 'secondsToString' does not exist on type 'NumberConstructor'. @@ -8440,9 +8716,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(82,7 node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(99,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(103,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(114,26): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(167,65): error TS2345: Argument of type 'SamplingHeapProfileType' is not assignable to parameter of type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'SamplingHeapProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Property 'showProfile' is missing in type 'SamplingHeapProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(181,25): error TS2694: Namespace 'Protocol' has no exported member 'HeapProfiler'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(193,24): error TS2694: Namespace 'Protocol' has no exported member 'HeapProfiler'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(196,60): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. @@ -8456,11 +8729,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(389, node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(390,22): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(390,60): error TS2339: Property 'bytesToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfileView.js(395,24): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfilerPanel.js(14,9): error TS2345: Argument of type '(HeapSnapshotProfileType | SamplingHeapProfileType)[]' is not assignable to parameter of type '({ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; })[]'. - Type 'HeapSnapshotProfileType | SamplingHeapProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'HeapSnapshotProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'HeapSnapshotProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Property 'showProfile' is missing in type 'HeapSnapshotProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfilerPanel.js(56,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfilerPanel.js(88,24): error TS2694: Namespace 'Protocol' has no exported member 'HeapProfiler'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapProfilerPanel.js(100,14): error TS2339: Property 'selectLiveObject' does not exist on type 'Widget'. @@ -8478,18 +8746,17 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.j node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(191,27): error TS2339: Property '_sortFields' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(295,41): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(329,72): error TS2339: Property 'offsetHeight' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(394,41): error TS2345: Argument of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }' is not assignable to parameter of type 'DataGridNode'. - Property '_element' is missing in type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(419,37): error TS2345: Argument of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }' is not assignable to parameter of type 'DataGridNode'. - Property '_element' is missing in type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(431,76): error TS2339: Property 'peekLast' does not exist on type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(375,36): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(375,57): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(387,36): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(387,57): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(401,36): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(401,57): error TS2339: Property 'filteredOut' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(431,76): error TS2339: Property 'peekLast' does not exist on type 'HeapSnapshotGridNode[]'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(433,57): error TS2339: Property 'offsetHeight' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(465,34): error TS2339: Property 'peekLast' does not exist on type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(465,34): error TS2339: Property 'peekLast' does not exist on type 'HeapSnapshotGridNode[]'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(474,19): error TS2551: Property '_allChildren' does not exist on type 'DataGridNode'. Did you mean '_hasChildren'? node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(474,43): error TS2551: Property '_allChildren' does not exist on type 'DataGridNode'. Did you mean '_hasChildren'? -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(492,51): error TS2352: Conversion of type 'DataGridNode' to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'DataGridNode' is not comparable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'dispose' is missing in type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(522,27): error TS2339: Property 'offsetTop' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(523,40): error TS2339: Property 'offsetHeight' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(554,41): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. @@ -8517,9 +8784,12 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.j node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(673,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(675,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(700,24): error TS2694: Namespace 'Protocol' has no exported member 'HeapProfiler'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(776,11): error TS2345: Argument of type 'HeapSnapshotConstructorNode' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotConstructorNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'HeapSnapshotConstructorNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(713,67): error TS2339: Property '_name' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(717,30): error TS2339: Property 'populateNodeBySnapshotObjectId' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(776,11): error TS2345: Argument of type 'HeapSnapshotConstructorNode' is not assignable to parameter of type 'HeapSnapshotGridNode'. + Types of property 'createProvider' are incompatible. + Type '() => HeapSnapshotProviderProxy' is not assignable to type '() => { dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. + Type 'HeapSnapshotProviderProxy' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(822,56): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(823,29): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(824,33): error TS2555: Expected at least 2 arguments, but got 1. @@ -8528,45 +8798,31 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.j node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(828,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(834,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(835,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(887,40): error TS2345: Argument of type 'HeapSnapshotDiffNode' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotDiffNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'HeapSnapshotDiffNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(887,40): error TS2345: Argument of type 'HeapSnapshotDiffNode' is not assignable to parameter of type 'HeapSnapshotGridNode'. + Types of property 'createProvider' are incompatible. + Type '() => HeapSnapshotDiffNodesProvider' is not assignable to type '() => { dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. + Type 'HeapSnapshotDiffNodesProvider' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(902,56): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(903,32): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(904,28): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(905,31): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(908,16): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(914,27): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotDataGrids.js(946,29): error TS2345: Argument of type 'AllocationGridNode' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'AllocationGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'AllocationGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(63,16): error TS2352: Conversion of type '{ fieldName1: string; ascending1: string; fieldName2: string; ascending2: string; }' to type 'ComparatorConfig' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Types of property 'ascending1' are incompatible. Type 'string' is not comparable to type 'boolean'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(104,14): error TS2339: Property '_searchMatched' does not exist on type 'HeapSnapshotGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(137,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(156,95): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(163,5): error TS2322: Type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]' is not assignable to type 'DataGridNode[]'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(163,5): error TS2322: Type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]' is not assignable to type 'DataGridNode[]'. - Type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }' is not assignable to type 'DataGridNode'. - Property '_element' is missing in type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(170,39): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'this' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'HeapSnapshotGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(197,23): error TS2339: Property 'snapshot' does not exist on type 'DataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(222,41): error TS2339: Property 'comparator' does not exist on type 'HeapSnapshotGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(232,48): error TS2339: Property 'comparator' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(265,25): error TS2339: Property '_childHashForEntity' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(271,45): error TS2339: Property '_createChildNode' does not exist on type 'HeapSnapshotGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(322,50): error TS2339: Property 'setEndPosition' does not exist on type 'DataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(365,50): error TS2339: Property 'setStartPosition' does not exist on type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(393,32): error TS2339: Property '_childHashForNode' does not exist on type 'HeapSnapshotGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(400,47): error TS2339: Property 'comparator' does not exist on type 'HeapSnapshotGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(403,38): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'this' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'HeapSnapshotGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'HeapSnapshotGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(412,15): error TS2339: Property 'sort' does not exist on type 'DataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(433,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(438,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -8604,18 +8860,14 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.j Type '() => HeapSnapshotProviderProxy' is not assignable to type '() => { dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. Type 'HeapSnapshotProviderProxy' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(981,27): error TS2339: Property 'snapshot' does not exist on type 'HeapSnapshotSortableDataGrid'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1000,20): error TS2352: Conversion of type 'DataGridNode' to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'DataGridNode' is not comparable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'dispose' is missing in type 'DataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1001,5): error TS2322: Type '(this | ({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }))[]' is not assignable to type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1001,5): error TS2322: Type '(this | ({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }))[]' is not assignable to type '({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })[]'. - Type 'this | ({ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; })' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'this' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotConstructorNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'HeapSnapshotConstructorNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'this' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Type 'HeapSnapshotConstructorNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. - Property 'nodePosition' is missing in type 'HeapSnapshotConstructorNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1001,5): error TS2322: Type '(HeapSnapshotGridNode | this)[]' is not assignable to type 'HeapSnapshotGridNode[]'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1001,5): error TS2322: Type '(HeapSnapshotGridNode | this)[]' is not assignable to type 'HeapSnapshotGridNode[]'. + Type 'HeapSnapshotGridNode | this' is not assignable to type 'HeapSnapshotGridNode'. + Type 'this' is not assignable to type 'HeapSnapshotGridNode'. + Type 'HeapSnapshotConstructorNode' is not assignable to type 'HeapSnapshotGridNode'. + Types of property 'createProvider' are incompatible. + Type '() => HeapSnapshotProviderProxy' is not assignable to type '() => { dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. + Type 'HeapSnapshotProviderProxy' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1019,14): error TS2339: Property '_searchMatched' does not exist on type 'HeapSnapshotConstructorNode'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1029,81): error TS2339: Property 'snapshot' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1140,22): error TS2339: Property 'pushAll' does not exist on type 'any[]'. @@ -8642,12 +8894,8 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.j node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1288,26): error TS2339: Property 'withThousandsSeparator' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1289,22): error TS2339: Property 'withThousandsSeparator' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1306,40): error TS2339: Property 'snapshot' does not exist on type 'HeapSnapshotSortableDataGrid'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1313,39): error TS2345: Argument of type 'AllocationGridNode' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'AllocationGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1314,7): error TS2322: Type 'AllocationGridNode' is not assignable to type 'this'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1321,39): error TS2339: Property '_createComparator' does not exist on type 'HeapSnapshotSortableDataGrid'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1323,39): error TS2345: Argument of type 'AllocationGridNode' is not assignable to parameter of type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; } & { ...; }'. - Type 'AllocationGridNode' is not assignable to type '{ dispose(): void; nodePosition(snapshotObjectId: number): Promise; isEmpty(): Promise; serializeItemsRange(startPosition: number, endPosition: number): Promise<...>; sortAndRewind(comparator: ComparatorConfig): Promise<...>; }'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1347,44): error TS2339: Property 'heapProfilerModel' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotGridNodes.js(1349,38): error TS2339: Property '_linkifier' does not exist on type 'HeapSnapshotSortableDataGrid'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotProxy.js(161,40): error TS2339: Property 'keysArray' does not exist on type 'Map any>'. @@ -8660,11 +8908,11 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotProxy.js(45 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotProxy.js(457,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotProxy.js(507,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(42,11): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(48,9): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(106,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(107,54): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(113,57): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(115,41): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(132,9): error TS2367: This condition will always return 'true' since the types '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }' and 'TrackingHeapSnapshotProfileType' have no overlap. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(192,24): error TS2694: Namespace 'Protocol' has no exported member 'HeapProfiler'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(228,53): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(229,56): error TS2555: Expected at least 2 arguments, but got 1. @@ -8674,16 +8922,9 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(232 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(233,54): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(238,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(243,80): error TS2339: Property 'bytesToString' does not exist on type 'NumberConstructor'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(254,9): error TS2367: This condition will always return 'true' since the types '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }' and 'TrackingHeapSnapshotProfileType' have no overlap. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(256,17): error TS2345: Argument of type 'ToolbarText' is not assignable to parameter of type 'ToolbarComboBox | ToolbarInput'. Type 'ToolbarText' is not assignable to type 'ToolbarInput'. Property '_prompt' is missing in type 'ToolbarText'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(257,5): error TS2322: Type '(ToolbarComboBox | ToolbarInput)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(257,5): error TS2322: Type '(ToolbarComboBox | ToolbarInput)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarComboBox | ToolbarInput' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarComboBox'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(344,50): error TS2551: Property 'jumpBackwards' does not exist on type 'SearchConfig'. Did you mean 'jumpBackward'? node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(397,25): error TS2339: Property '_loadPromise' does not exist on type 'ProfileHeader'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(405,24): error TS2345: Argument of type 'SearchConfig' is not assignable to parameter of type 'SearchConfig'. @@ -8704,6 +8945,7 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(576 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(628,37): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(649,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(658,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(667,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(749,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(793,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(831,11): error TS2555: Expected at least 2 arguments, but got 1. @@ -8712,6 +8954,12 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(875 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(876,25): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(915,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(946,67): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(947,60): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'HeapSnapshotProfileType' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(heapProfilerModel: HeapProfilerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'heapProfilerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'HeapProfilerModel'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(989,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1011,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1015,12): error TS2555: Expected at least 2 arguments, but got 1. @@ -8741,15 +8989,17 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(122 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1248,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1252,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1258,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1313,11): error TS2345: Argument of type 'HeapSnapshotProfileType' is not assignable to parameter of type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'HeapSnapshotProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Property 'showProfile' is missing in type 'HeapSnapshotProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1358,23): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1430,30): error TS2339: Property 'bytesToString' does not exist on type 'NumberConstructor'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1458,24): error TS2339: Property '_snapshotReceived' does not exist on type 'ProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1476,61): error TS2339: Property 'toISO8601Compact' does not exist on type 'Date'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1525,23): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1547,44): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1557,77): error TS2339: Property '_profileSamples' does not exist on type 'HeapProfileHeader'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1561,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1563,11): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1578,9): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. +node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1580,9): error TS2345: Argument of type 'string' is not assignable to parameter of type 'symbol'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1584,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1604,79): error TS2339: Property 'peekLast' does not exist on type 'number[]'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1719,26): error TS2339: Property 'bytesToString' does not exist on type 'NumberConstructor'. @@ -8762,97 +9012,43 @@ node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(196 node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1972,33): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/HeapSnapshotView.js(1987,18): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(48,37): error TS2339: Property 'deoptReason' does not exist on type 'ProfileNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(97,15): error TS2339: Property 'self' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(97,15): error TS2339: Property 'self' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'. Property 'self' does not exist on type 'ProfileDataGridTree'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(100,17): error TS2339: Property 'total' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'total' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(102,30): error TS2339: Property 'children' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'children' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(104,15): error TS2339: Property 'removeChildren' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'removeChildren' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(110,19): error TS2339: Property 'appendChild' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'appendChild' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(118,37): error TS2339: Property 'childrenByCallUID' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'childrenByCallUID' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(123,19): error TS2339: Property 'appendChild' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'appendChild' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(131,19): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property '_populated' does not exist on type 'ProfileDataGridTree'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(133,15): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property '_populated' does not exist on type 'ProfileDataGridTree'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(135,15): error TS2339: Property 'populateChildren' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'populateChildren' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(137,39): error TS2339: Property 'tree' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'tree' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(140,17): error TS2339: Property 'sort' does not exist on type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Property 'sort' does not exist on type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(118,27): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((key: any) => any) | ((key: string) => ProfileDataGridNode)' has no compatible call signatures. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(131,19): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'. + Property '_populated' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(133,15): error TS2339: Property '_populated' does not exist on type 'ProfileDataGridNode | ProfileDataGridTree'. + Property '_populated' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(140,7): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((comparator: (arg0: T, arg1: T) => any, force: boolean) => any) | ((comparator: (arg0: T, arg1: T) => any, force: boolean) => void)' has no compatible call signatures. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(153,49): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(158,49): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(163,49): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(170,14): error TS2339: Property 'createTextChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(173,59): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(176,20): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(194,20): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(195,83): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(196,105): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(206,46): error TS2345: Argument of type 'this[][]' is not assignable to parameter of type '({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; })[][]'. - Type 'this[]' is not assignable to type '({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; })[]'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(218,29): error TS2339: Property 'callUID' does not exist on type 'DataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(218,42): error TS2352: Conversion of type 'DataGridNode' to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'DataGridNode' is not comparable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'DataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(228,40): error TS2352: Conversion of type 'DataGridNode' to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'DataGridNode' is not comparable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'DataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(262,43): error TS2345: Argument of type 'this' is not assignable to parameter of type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'ProfileDataGridNode' is not assignable to type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(312,40): error TS2345: Argument of type 'this' is not assignable to parameter of type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'ProfileDataGridNode' is not assignable to type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridNode'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(412,46): error TS2345: Argument of type 'this[][]' is not assignable to parameter of type '({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; })[][]'. - Type 'this[]' is not assignable to type '({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; })[]'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridTree' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridTree' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'this' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'ProfileDataGridTree' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'ProfileDataGridTree'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(412,48): error TS2322: Type 'this' is not assignable to type 'ProfileDataGridNode'. + Type 'ProfileDataGridTree' is not assignable to type 'ProfileDataGridNode'. + Property 'profileNode' is missing in type 'ProfileDataGridTree'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(479,34): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(480,34): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(481,34): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(486,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(488,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(491,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(493,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(498,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(500,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(505,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(507,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(510,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(512,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(517,33): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(519,33): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(525,29): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(527,31): error TS2339: Property '_searchMatchedSelfColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(527,79): error TS2339: Property '_searchMatchedTotalColumn' does not exist on type 'ProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(528,31): error TS2339: Property '_searchMatchedFunctionColumn' does not exist on type 'ProfileDataGridNode'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(640,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(647,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileDataGrid.js(653,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -8886,12 +9082,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(80,45): node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(84,17): error TS2345: Argument of type '(string | Element)[][]' is not assignable to parameter of type 'ReadonlyArray<[any, any]>'. Type '(string | Element)[]' is not assignable to type '[any, any]'. Property '0' is missing in type '(string | Element)[]'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(127,5): error TS2322: Type '(ToolbarButton | ToolbarComboBox)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(127,5): error TS2322: Type '(ToolbarButton | ToolbarComboBox)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarButton | ToolbarComboBox' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(136,59): error TS2339: Property 'profile' does not exist on type 'ProfileView'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(136,78): error TS2339: Property 'adjustedTotal' does not exist on type 'ProfileView'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(147,59): error TS2339: Property 'profile' does not exist on type 'ProfileView'. @@ -8914,13 +9104,7 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(485,23): node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(488,44): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(490,25): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/profiler/ProfileView.js(503,24): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(72,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(74,52): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(76,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(78,31): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(109,15): error TS2339: Property 'key' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(109,45): error TS2339: Property 'altKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(111,20): error TS2339: Property 'key' does not exist on type 'Event'. @@ -8958,10 +9142,6 @@ node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(776,26 node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(807,26): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(808,26): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(811,24): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/profiler/ProfilesPanel.js(821,26): error TS2345: Argument of type 'CPUProfileType[]' is not assignable to parameter of type '({ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; })[]'. - Type 'CPUProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; } & { showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Type 'CPUProfileType' is not assignable to type '{ showProfile(profile: ProfileHeader): Widget; showObject(snapshotObjectId: any, perspectiveName: string): void; }'. - Property 'showProfile' is missing in type 'CPUProfileType'. node_modules/chrome-devtools-frontend/front_end/profiler/TargetsComboBoxController.js(31,38): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/TargetsComboBoxController.js(36,27): error TS2339: Property 'selectedIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/TargetsComboBoxController.js(49,39): error TS2339: Property 'remove' does not exist on type 'Map'. @@ -8972,12 +9152,7 @@ node_modules/chrome-devtools-frontend/front_end/profiler/TargetsComboBoxControll node_modules/chrome-devtools-frontend/front_end/profiler/TargetsComboBoxController.js(97,25): error TS2339: Property 'selectedIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/profiler/TopDownProfileDataGrid.js(63,17): error TS2339: Property 'populate' does not exist on type 'TopDownProfileDataGridTree | TopDownProfileDataGridNode'. Property 'populate' does not exist on type 'TopDownProfileDataGridTree'. -node_modules/chrome-devtools-frontend/front_end/profiler/TopDownProfileDataGrid.js(73,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((key: any) => any) | ((key: string) => { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })' has no compatible call signatures. -node_modules/chrome-devtools-frontend/front_end/profiler/TopDownProfileDataGrid.js(76,42): error TS2345: Argument of type 'TopDownProfileDataGridTree | TopDownProfileDataGridNode' is not assignable to parameter of type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'TopDownProfileDataGridNode' is not assignable to type 'ProfileDataGridTree | ({ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { ...; })'. - Type 'TopDownProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; } & { formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Type 'TopDownProfileDataGridNode' is not assignable to type '{ formatValue(value: number, node: any & any): string; formatPercent(value: number, node: any & any): string; linkifyNode(node: any & any): Element; }'. - Property 'formatValue' is missing in type 'TopDownProfileDataGridNode'. +node_modules/chrome-devtools-frontend/front_end/profiler/TopDownProfileDataGrid.js(73,17): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '((key: any) => any) | ((key: string) => ProfileDataGridNode)' has no compatible call signatures. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(168,40): error TS2345: Argument of type 'S' is not assignable to parameter of type 'S'. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(170,24): error TS2345: Argument of type 'S' is not assignable to parameter of type 'T'. node_modules/chrome-devtools-frontend/front_end/protocol/InspectorBackend.js(194,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -9050,8 +9225,6 @@ node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(27, node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(28,60): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(32,30): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(32,79): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(34,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(36,64): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(37,57): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(39,57): error TS2555: Expected at least 2 arguments, but got 1. @@ -9061,20 +9234,23 @@ node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(44, node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(48,70): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(52,68): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(53,64): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(55,60): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'AppManifestView' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(resourceTreeModel: ResourceTreeModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'resourceTreeModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'ResourceTreeModel'. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(88,31): error TS2694: Namespace 'Protocol' has no exported member 'Page'. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(116,25): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(139,32): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(158,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/resources/AppManifestView.js(163,14): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(31,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(37,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(42,28): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(44,22): error TS2339: Property 'style' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(48,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(59,32): error TS2339: Property 'style' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(67,5): error TS2322: Type 'ToolbarItem[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(117,22): error TS2339: Property 'type' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(131,30): error TS2339: Property 'type' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ApplicationCacheItemsView.js(132,44): error TS2555: Expected at least 2 arguments, but got 1. @@ -9213,12 +9389,6 @@ node_modules/chrome-devtools-frontend/front_end/resources/DatabaseQueryView.js(1 node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(31,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(40,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(42,53): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(58,5): error TS2322: Type '(ToolbarButton | ToolbarInput)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(58,5): error TS2322: Type '(ToolbarButton | ToolbarInput)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarButton | ToolbarInput' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(77,18): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(114,37): error TS2339: Property 'valuesArray' does not exist on type 'Set'. node_modules/chrome-devtools-frontend/front_end/resources/DatabaseTableView.js(124,40): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ [x: string]: boolean; }'. @@ -9264,26 +9434,10 @@ node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(191, node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(201,27): error TS2339: Property 'createTextChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(202,45): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(204,27): error TS2339: Property 'createTextChild' does not exist on type 'DocumentFragment'. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(211,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(212,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(213,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(215,37): error TS2345: Argument of type 'ToolbarSeparator' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(217,49): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(219,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(221,52): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(224,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(227,37): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(228,27): error TS2339: Property 'placeholder' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(228,41): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(234,37): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(238,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(246,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/resources/IndexedDBViews.js(295,52): error TS2339: Property 'value' does not exist on type 'Element'. @@ -9301,17 +9455,9 @@ node_modules/chrome-devtools-frontend/front_end/resources/ResourcesSection.js(32 node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(11,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(25,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(41,49): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(43,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(45,52): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(48,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(50,48): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(52,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(54,55): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(56,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(90,36): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(99,56): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheViews.js(100,27): error TS2555: Expected at least 2 arguments, but got 1. @@ -9331,19 +9477,17 @@ node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkerCacheView node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(12,50): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(31,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(42,31): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(48,31): error TS2345: Argument of type 'ToolbarInput' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarInput' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(57,37): error TS2345: Argument of type 'ToolbarCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(59,36): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(61,32): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(62,37): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(64,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(66,37): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(67,37): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(69,75): error TS2694: Namespace 'Common.EventTarget' has no exported member 'EventDescriptor'. +node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(71,63): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ServiceWorkersView' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(serviceWorkerManager: ServiceWorkerManager) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'serviceWorkerManager' and 'model' are incompatible. + Type 'T' is not assignable to type 'ServiceWorkerManager'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(120,7): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(121,7): error TS2447: The '|=' operator is not allowed for boolean types. Consider using '||' instead. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(150,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -9353,12 +9497,8 @@ node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js( node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(293,56): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(298,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(298,85): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(300,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(302,30): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(302,87): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(304,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(307,68): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(308,68): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/ServiceWorkersView.js(309,69): error TS2555: Expected at least 2 arguments, but got 1. @@ -9409,9 +9549,6 @@ node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(15 node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(17,25): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(18,43): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(22,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(27,43): error TS2345: Argument of type 'ToolbarButton | ToolbarInput' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(40,60): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(arg0: any) => any'. Type 'Function' provides no match for the signature '(arg0: any): any'. node_modules/chrome-devtools-frontend/front_end/resources/StorageItemsView.js(49,45): error TS2555: Expected at least 2 arguments, but got 1. @@ -9435,10 +9572,13 @@ node_modules/chrome-devtools-frontend/front_end/screencast/InputModel.js(112,44) node_modules/chrome-devtools-frontend/front_end/screencast/InputModel.js(112,70): error TS2339: Property 'metaKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/screencast/InputModel.js(112,96): error TS2339: Property 'shiftKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastApp.js(12,47): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastApp.js(16,61): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ScreencastApp' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(screenCaptureModel: ScreenCaptureModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'screenCaptureModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'ScreenCaptureModel'. node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastApp.js(85,35): error TS2345: Argument of type 'ScreencastView' is not assignable to parameter of type 'boolean'. -node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastApp.js(107,5): error TS2322: Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastApp.js(121,5): error TS2322: Type 'ScreencastApp' is not assignable to type '{ presentUI(document: Document): void; }'. Property '_enabledSetting' does not exist on type '{ presentUI(document: Document): void; }'. node_modules/chrome-devtools-frontend/front_end/screencast/ScreencastView.js(56,42): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -9669,6 +9809,12 @@ node_modules/chrome-devtools-frontend/front_end/sdk/DOMDebuggerModel.js(659,9): node_modules/chrome-devtools-frontend/front_end/sdk/DOMDebuggerModel.js(661,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sdk/DOMDebuggerModel.js(663,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sdk/DOMDebuggerModel.js(665,9): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/sdk/DOMDebuggerModel.js(673,59): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'DOMDebuggerManager' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(domDebuggerModel: DOMDebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'domDebuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DOMDebuggerModel'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(47,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(59,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(136,53): error TS2339: Property 'documentElement' does not exist on type 'DOMDocument'. @@ -9697,9 +9843,6 @@ node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(970,13): error T node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1042,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1062,26): error TS2339: Property 'domAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1070,12): error TS2339: Property 'registerDOMDispatcher' does not exist on type 'Target'. -node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1096,16): error TS2352: Conversion of type 'OverlayModel' to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; } & { ...; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'OverlayModel' is not comparable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. - Property '_domModel' does not exist on type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1165,24): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1176,34): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/DOMModel.js(1188,46): error TS2339: Property 'valuesArray' does not exist on type 'Set'. @@ -9839,11 +9982,6 @@ node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(11,35): er node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(12,30): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(13,43): error TS2339: Property 'deviceOrientationAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(51,24): error TS2694: Namespace 'Protocol' has no exported member 'PageAgent'. -node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(65,5): error TS2322: Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; } & { ...; }'. - Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. -node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(65,5): error TS2322: Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; } & { ...; }'. - Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. - Property '_domModel' does not exist on type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(148,5): error TS2322: Type '{ enabled: boolean; configuration: string; }' is not assignable to type '{ enabled: boolean; configuration: string; scriptId: string; }'. node_modules/chrome-devtools-frontend/front_end/sdk/EmulationModel.js(148,5): error TS2322: Type '{ enabled: boolean; configuration: string; }' is not assignable to type '{ enabled: boolean; configuration: string; scriptId: string; }'. Property 'scriptId' is missing in type '{ enabled: boolean; configuration: string; }'. @@ -9999,6 +10137,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1025,37): node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1027,39): error TS2339: Property 'set' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1050,82): error TS2339: Property 'valuesArray' does not exist on type 'Multimap'. node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1059,68): error TS2339: Property 'keysArray' does not exist on type 'Multimap'. +node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1084,19): error TS2339: Property 'networkAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1101,35): error TS2345: Argument of type '{}' is not assignable to parameter of type '{ [x: string]: string; }'. Index signature is missing in type '{}'. node_modules/chrome-devtools-frontend/front_end/sdk/NetworkManager.js(1115,24): error TS2694: Namespace 'Protocol' has no exported member 'NetworkAgent'. @@ -10076,15 +10215,12 @@ node_modules/chrome-devtools-frontend/front_end/sdk/NetworkRequest.js(1131,20): node_modules/chrome-devtools-frontend/front_end/sdk/NetworkRequest.js(1134,20): error TS2339: Property 'ContentData' does not exist on type 'typeof NetworkRequest'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(16,12): error TS2339: Property 'registerOverlayDispatcher' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(17,33): error TS2339: Property 'overlayAgent' does not exist on type 'Target'. -node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(35,72): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; } & { ...; }'. - Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; } & { ...; }'. - Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. - Type 'this' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. - Type 'OverlayModel' is not assignable to type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. - Property '_domModel' does not exist on type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(81,22): error TS2339: Property '_highlightDisabled' does not exist on type 'typeof OverlayModel'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(85,22): error TS2339: Property '_highlightDisabled' does not exist on type 'typeof OverlayModel'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(110,9): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(119,5): error TS2322: Type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }' is not assignable to type 'DefaultHighlighter'. +node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(119,5): error TS2322: Type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }' is not assignable to type 'DefaultHighlighter'. + Property '_model' is missing in type '{ highlightDOMNode(node: DOMNode, config: any, backendNodeId?: any, objectId?: any): void; setInspectMode(mode: any, config: any): Promise; highlightFrame(frameId: any): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(123,24): error TS2694: Namespace 'Protocol' has no exported member 'Overlay'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(141,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. node_modules/chrome-devtools-frontend/front_end/sdk/OverlayModel.js(143,24): error TS2694: Namespace 'Protocol' has no exported member 'DOM'. @@ -10211,6 +10347,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/Resource.js(241,13): error T node_modules/chrome-devtools-frontend/front_end/sdk/Resource.js(263,61): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(44,26): error TS2339: Property 'pageAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(48,12): error TS2339: Property 'registerPageDispatcher' does not exist on type 'Target'. +node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(80,56): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(117,24): error TS2694: Namespace 'Protocol' has no exported member 'Page'. node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(161,24): error TS2694: Namespace 'Protocol' has no exported member 'Page'. node_modules/chrome-devtools-frontend/front_end/sdk/ResourceTreeModel.js(162,24): error TS2694: Namespace 'Protocol' has no exported member 'Page'. @@ -10427,6 +10564,8 @@ node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(16,52): error TS26 node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(148,48): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(159,53): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. Type 'T' is not assignable to type 'SDKModel'. +node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(166,48): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. + Type 'T' is not assignable to type 'SDKModel'. node_modules/chrome-devtools-frontend/front_end/sdk/Target.js(191,34): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(15,120): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(104,35): error TS2345: Argument of type 'new (arg1: Target) => T' is not assignable to parameter of type 'new (arg1: Target) => SDKModel'. @@ -10448,26 +10587,12 @@ node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(169,31): er node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(177,42): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'new (arg1: Target) => any'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(209,21): error TS2339: Property 'remove' does not exist on type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }[]'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(216,52): error TS2694: Namespace 'Protocol.InspectorBackend.Connection' has no exported member 'Factory'. -node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(221,33): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'this' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Property 'targetAdded' is missing in type 'TargetManager'. -node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(224,72): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'this' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Property 'targetAdded' is missing in type 'TargetManager'. +node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(237,34): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'new (arg1: Target) => any'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(267,19): error TS2339: Property 'remove' does not exist on type 'Target[]'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(279,34): error TS2345: Argument of type 'Function' is not assignable to parameter of type 'new (arg1: Target) => any'. -node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(329,11): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'this' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(329,25): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(332,72): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'this' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(351,35): error TS2555: Expected at least 2 arguments, but got 1. +node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(352,12): error TS2339: Property 'runtimeAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(356,52): error TS2694: Namespace 'Protocol.InspectorBackend.Connection' has no exported member 'Params'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(364,7): error TS2322: Type 'WebSocketConnection' is not assignable to type '{ sendMessage(message: string): void; disconnect(): Promise; }'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(364,7): error TS2322: Type 'WebSocketConnection' is not assignable to type '{ sendMessage(message: string): void; disconnect(): Promise; }'. @@ -10485,6 +10610,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(427,34): er node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(483,24): error TS2694: Namespace 'Protocol' has no exported member 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(501,24): error TS2694: Namespace 'Protocol' has no exported member 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(530,24): error TS2694: Namespace 'Protocol' has no exported member 'Target'. +node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(552,12): error TS2339: Property 'runtimeAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(581,24): error TS2694: Namespace 'Protocol' has no exported member 'TargetAgent'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(583,52): error TS2694: Namespace 'Protocol.InspectorBackend.Connection' has no exported member 'Params'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(589,5): error TS2322: Type 'ChildConnection' is not assignable to type '{ sendMessage(message: string): void; disconnect(): Promise; }'. @@ -10492,9 +10618,6 @@ node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(589,5): err Property '_agent' does not exist on type '{ sendMessage(message: string): void; disconnect(): Promise; }'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(598,24): error TS2694: Namespace 'Protocol' has no exported member 'TargetAgent'. node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(600,52): error TS2694: Namespace 'Protocol.InspectorBackend.Connection' has no exported member 'Params'. -node_modules/chrome-devtools-frontend/front_end/sdk/TargetManager.js(672,1): error TS2322: Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; } & { targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Type 'TargetManager' is not assignable to type '{ targetAdded(target: Target): void; targetRemoved(target: Target): void; }'. - Property 'targetAdded' is missing in type 'TargetManager'. node_modules/chrome-devtools-frontend/front_end/sdk/TracingManager.js(13,42): error TS2694: Namespace 'SDK.TracingManager' has no exported member 'EventPayload'. node_modules/chrome-devtools-frontend/front_end/sdk/TracingManager.js(36,33): error TS2339: Property 'tracingAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/sdk/TracingManager.js(37,12): error TS2339: Property 'registerTracingDispatcher' does not exist on type 'Target'. @@ -10534,6 +10657,7 @@ node_modules/chrome-devtools-frontend/front_end/sdk/TracingModel.js(888,23): err node_modules/chrome-devtools-frontend/front_end/sdk/TracingModel.js(889,18): error TS2339: Property 'stableSort' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/sdk/TracingModel.js(917,18): error TS2339: Property 'remove' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/sdk/TracingModel.js(921,34): error TS2694: Namespace 'SDK.TracingManager' has no exported member 'EventPayload'. +node_modules/chrome-devtools-frontend/front_end/sdk_test_runner/PageMockTestRunner.js(17,20): error TS2554: Expected 5 arguments, but got 4. node_modules/chrome-devtools-frontend/front_end/sdk_test_runner/PageMockTestRunner.js(88,20): error TS2339: Property 'hashCode' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/security/SecurityModel.js(14,34): error TS2339: Property 'securityAgent' does not exist on type 'Target'. node_modules/chrome-devtools-frontend/front_end/security/SecurityModel.js(15,12): error TS2339: Property 'registerSecurityDispatcher' does not exist on type 'Target'. @@ -10552,6 +10676,12 @@ node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(15,25) node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(21,31): error TS2694: Namespace 'Protocol' has no exported member 'Network'. node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(24,45): error TS2694: Namespace 'Security.SecurityPanel' has no exported member 'Origin'. node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(24,77): error TS2694: Namespace 'Security.SecurityPanel' has no exported member 'OriginState'. +node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(30,61): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'SecurityPanel' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(securityModel: SecurityModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'securityModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'SecurityModel'. node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(37,57): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(47,9): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/security/SecurityPanel.js(60,9): error TS2339: Property 'consume' does not exist on type 'Event'. @@ -10697,11 +10827,9 @@ node_modules/chrome-devtools-frontend/front_end/settings/FrameworkBlackboxSettin node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(39,25): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(45,10): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(46,24): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(51,48): error TS2345: Argument of type 'ToolbarItem' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarItem' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(54,43): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(69,55): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(85,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(85,5): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. Property 'appendApplicableItems' is missing in type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(100,15): error TS2339: Property 'keyCode' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(119,31): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -10722,6 +10850,12 @@ node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(289,5 node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(311,10): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(312,10): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/settings/SettingsScreen.js(313,10): error TS2339: Property 'runtime' does not exist on type 'Window'. +node_modules/chrome-devtools-frontend/front_end/snippets/ScriptSnippetModel.js(53,56): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ScriptSnippetModel' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/snippets/ScriptSnippetModel.js(70,35): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/snippets/ScriptSnippetModel.js(113,5): error TS2322: Type 'SnippetsProject' is not assignable to type '{ workspace(): Workspace; id(): string; type(): string; isServiceProject(): boolean; displayName(): string; requestMetadata(uiSourceCode: UISourceCode): Promise; ... 17 more ...; uiSourceCodes(): UISourceCode[]; }'. node_modules/chrome-devtools-frontend/front_end/snippets/ScriptSnippetModel.js(113,5): error TS2322: Type 'SnippetsProject' is not assignable to type '{ workspace(): Workspace; id(): string; type(): string; isServiceProject(): boolean; displayName(): string; requestMetadata(uiSourceCode: UISourceCode): Promise; ... 17 more ...; uiSourceCodes(): UISourceCode[]; }'. @@ -10739,11 +10873,6 @@ node_modules/chrome-devtools-frontend/front_end/snippets/ScriptSnippetModel.js(3 node_modules/chrome-devtools-frontend/front_end/snippets/SnippetStorage.js(62,27): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/snippets/SnippetsQuickOpen.js(30,12): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(38,11): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(52,5): error TS2322: Type 'ToolbarText[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(52,5): error TS2322: Type 'ToolbarText[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarText'. node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(62,16): error TS2339: Property 'sprintf' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(78,21): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(79,19): error TS2339: Property 'createTextChild' does not exist on type 'Element'. @@ -10766,12 +10895,6 @@ node_modules/chrome-devtools-frontend/front_end/source_frame/FontView.js(152,29) node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(38,11): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(52,81): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(58,36): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(68,5): error TS2322: Type '(ToolbarSeparator | ToolbarText)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(68,5): error TS2322: Type '(ToolbarSeparator | ToolbarText)[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarSeparator | ToolbarText' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSeparator'. node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(105,36): error TS2339: Property 'bytesToString' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(128,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/ImageView.js(131,11): error TS2555: Expected at least 2 arguments, but got 1. @@ -10786,7 +10909,6 @@ node_modules/chrome-devtools-frontend/front_end/source_frame/JSONView.js(165,28) node_modules/chrome-devtools-frontend/front_end/source_frame/JSONView.js(170,23): error TS2339: Property 'setSearchRegex' does not exist on type 'TreeElement'. node_modules/chrome-devtools-frontend/front_end/source_frame/PreviewFactory.js(14,33): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/ResourceSourceFrame.js(51,35): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/source_frame/ResourceSourceFrame.js(69,5): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(15,22): error TS2339: Property 'installGutter' does not exist on type 'CodeMirrorTextEditor'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(89,28): error TS2339: Property 'toggleLineClass' does not exist on type 'CodeMirrorTextEditor'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(110,25): error TS2694: Namespace 'Diff.Diff' has no exported member 'DiffArray'. @@ -10798,11 +10920,6 @@ node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(2 node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(283,22): error TS2339: Property 'setGutterDecoration' does not exist on type 'CodeMirrorTextEditor'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceCodeDiff.js(284,22): error TS2339: Property 'toggleLineClass' does not exist on type 'CodeMirrorTextEditor'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(41,11): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(115,5): error TS2322: Type 'ToolbarText[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(115,5): error TS2322: Type 'ToolbarText[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarText'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(371,32): error TS2339: Property 'lowerBound' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(435,15): error TS2339: Property '__fromRegExpQuery' does not exist on type 'RegExp'. node_modules/chrome-devtools-frontend/front_end/source_frame/SourceFrame.js(459,15): error TS2339: Property '__fromRegExpQuery' does not exist on type 'RegExp'. @@ -11008,6 +11125,7 @@ node_modules/chrome-devtools-frontend/front_end/sources/InplaceFormatterEditorAc node_modules/chrome-devtools-frontend/front_end/sources/InplaceFormatterEditorAction.js(18,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/InplaceFormatterEditorAction.js(46,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/InplaceFormatterEditorAction.js(68,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/sources/InplaceFormatterEditorAction.js(100,37): error TS2339: Property 'selection' does not exist on type 'Widget'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(32,27): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(33,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptBreakpointsSidebarPane.js(34,34): error TS2555: Expected at least 2 arguments, but got 1. @@ -11037,9 +11155,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptCompilerPlugin node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(60,50): error TS2345: Argument of type 'Event' is not assignable to parameter of type 'MouseEvent | KeyboardEvent'. Type 'Event' is not assignable to type 'KeyboardEvent'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(107,33): error TS2339: Property 'asParsedURL' does not exist on type 'string'. -node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(109,21): error TS2345: Argument of type 'ToolbarText' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarText'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(128,59): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(132,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(134,95): error TS2339: Property 'valuesArray' does not exist on type 'Map'. @@ -11107,8 +11222,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1403,54): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1425,56): error TS2339: Property 'valuesArray' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1442,31): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1450,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1463,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/JavaScriptSourceFrame.js(1469,63): error TS2694: Namespace 'SourceFrame.SourcesTextEditor' has no exported member 'GutterClickEventData'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(87,21): error TS2339: Property '_boostOrder' does not exist on type 'TreeElement'. @@ -11165,9 +11278,8 @@ node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(876,22) node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(951,23): error TS2339: Property '_title' does not exist on type 'NavigatorTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(952,19): error TS2339: Property 'parent' does not exist on type 'NavigatorTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1023,17): error TS2339: Property 'title' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1024,28): error TS2345: Argument of type 'Element[]' is not assignable to parameter of type 'Icon[]'. - Type 'Element' is not assignable to type 'Icon'. - Property 'createdCallback' is missing in type 'Element'. +node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1024,29): error TS2322: Type 'Element' is not assignable to type 'Icon'. + Property 'createdCallback' is missing in type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1045,26): error TS2339: Property 'draggable' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1055,51): error TS2339: Property 'hasFocus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1190,14): error TS2339: Property 'parent' does not exist on type 'NavigatorTreeNode'. @@ -11198,10 +11310,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1614,14 node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1616,40): error TS2339: Property '_treeElement' does not exist on type 'NavigatorTreeNode'. node_modules/chrome-devtools-frontend/front_end/sources/NavigatorView.js(1679,47): error TS2339: Property 'hasFocus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/ObjectEventListenersSidebarPane.js(11,48): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/ObjectEventListenersSidebarPane.js(24,5): error TS2322: Type 'ToolbarButton[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/sources/ObjectEventListenersSidebarPane.js(84,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/OutlineQuickOpen.js(32,52): error TS2694: Namespace 'Formatter.FormatterWorkerPool' has no exported member 'OutlineItem'. node_modules/chrome-devtools-frontend/front_end/sources/OutlineQuickOpen.js(118,14): error TS2555: Expected at least 2 arguments, but got 1. @@ -11220,14 +11328,10 @@ node_modules/chrome-devtools-frontend/front_end/sources/ScriptFormatterEditorAct node_modules/chrome-devtools-frontend/front_end/sources/ScriptFormatterEditorAction.js(28,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/ScriptFormatterEditorAction.js(61,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/ScriptFormatterEditorAction.js(85,22): error TS2694: Namespace 'Common' has no exported member 'Event'. +node_modules/chrome-devtools-frontend/front_end/sources/ScriptFormatterEditorAction.js(105,35): error TS2339: Property 'selection' does not exist on type 'Widget'. node_modules/chrome-devtools-frontend/front_end/sources/SimpleHistoryManager.js(37,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/sources/SnippetsPlugin.js(41,39): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SnippetsPlugin.js(41,73): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SnippetsPlugin.js(43,5): error TS2322: Type 'ToolbarToggle[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. -node_modules/chrome-devtools-frontend/front_end/sources/SnippetsPlugin.js(43,5): error TS2322: Type 'ToolbarToggle[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(48,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(55,32): error TS2339: Property 'remove' does not exist on type 'Map; formatData: SourceFormatData; }>'. node_modules/chrome-devtools-frontend/front_end/sources/SourceFormatter.js(67,32): error TS2339: Property 'remove' does not exist on type 'Map; formatData: SourceFormatData; }>'. @@ -11249,23 +11353,11 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourceMapNamesResolver.j node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(51,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(109,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(145,17): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(149,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(189,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(211,19): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(214,39): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(216,39): error TS2345: Argument of type 'ToolbarSeparator' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(217,46): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(221,39): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(224,17): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(227,37): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(272,63): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(274,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(293,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(307,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesNavigator.js(308,41): error TS2555: Expected at least 2 arguments, but got 1. @@ -11276,24 +11368,16 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(35,26): node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(38,52): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(68,29): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(78,34): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(79,49): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(92,32): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(122,32): error TS2339: Property 'addEventListener' does not exist on type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(131,30): error TS2551: Property '_instance' does not exist on type 'typeof SourcesPanel'. Did you mean 'instance'? node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(132,35): error TS2551: Property '_instance' does not exist on type 'typeof SourcesPanel'. Did you mean 'instance'? node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(133,55): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(149,58): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(151,61): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(153,62): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(208,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(227,52): error TS2339: Property '_instance' does not exist on type 'typeof WrapperView'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(242,40): error TS2339: Property '_instance' does not exist on type 'typeof WrapperView'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(257,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(257,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(257,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. +node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(257,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. Property 'appendApplicableItems' is missing in type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(277,20): error TS2339: Property 'window' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(289,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -11308,26 +11392,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(465,9): node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(550,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(596,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(689,30): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(691,36): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(694,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(695,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(696,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(697,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(699,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(700,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(701,38): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(705,36): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(709,36): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(717,17): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(795,13): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(798,13): error TS2555: Expected at least 2 arguments, but got 1. @@ -11342,11 +11406,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(963,21): node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1011,45): error TS2339: Property 'offsetWidth' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1078,60): error TS2339: Property 'sidebarPanes' does not exist on type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1093,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1112,5): error TS2322: Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; } & { button(sourcesView: any & any): ToolbarButton; }'. - Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; }'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1112,5): error TS2322: Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; } & { button(sourcesView: any & any): ToolbarButton; }'. - Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; }'. - Property 'button' is missing in type 'SourcesView'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1290,38): error TS2339: Property '_instance' does not exist on type 'typeof WrapperView'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1298,47): error TS2339: Property '_instance' does not exist on type 'typeof WrapperView'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesPanel.js(1298,93): error TS2339: Property '_instance' does not exist on type 'typeof WrapperView'. @@ -11358,12 +11417,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(16 node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(163,19): error TS2339: Property 'mergeOrdered' does not exist on type 'string[]'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(163,51): error TS2339: Property 'naturalOrderComparator' does not exist on type 'StringConstructor'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesSearchScope.js(257,29): error TS2339: Property 'mergeOrdered' does not exist on type 'any[]'. -node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(36,70): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ button(sourcesView: any & any): ToolbarButton; } & { button(sourcesView: any & any): ToolbarButton; }'. - Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; } & { button(sourcesView: any & any): ToolbarButton; }'. - Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; }'. - Type 'this' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; }'. - Type 'SourcesView' is not assignable to type '{ button(sourcesView: any & any): ToolbarButton; }'. - Property 'button' is missing in type 'SourcesView'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(38,50): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(41,10): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/sources/SourcesView.js(55,36): error TS2694: Namespace 'Common.EventTarget' has no exported member 'EventDescriptor'. @@ -11395,7 +11448,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(219,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(237,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(244,32): error TS2339: Property 'sourceSelectionChanged' does not exist on type 'typeof extensionServer'. -node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(342,7): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(473,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(485,18): error TS2339: Property 'remove' does not exist on type 'Map'. node_modules/chrome-devtools-frontend/front_end/sources/TabbedEditorContainer.js(497,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -11409,6 +11461,12 @@ node_modules/chrome-devtools-frontend/front_end/sources/ThreadsSidebarPane.js(16 Type '(debuggerModel: DebuggerModel) => Element' is not assignable to type '(item: T) => Element'. Types of parameters 'debuggerModel' and 'item' are incompatible. Type 'T' is not assignable to type 'DebuggerModel'. +node_modules/chrome-devtools-frontend/front_end/sources/ThreadsSidebarPane.js(20,56): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'ThreadsSidebarPane' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(debuggerModel: DebuggerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'debuggerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'DebuggerModel'. node_modules/chrome-devtools-frontend/front_end/sources/ThreadsSidebarPane.js(38,25): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/ThreadsSidebarPane.js(39,31): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/ThreadsSidebarPane.js(49,33): error TS2555: Expected at least 2 arguments, but got 1. @@ -11429,7 +11487,7 @@ node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(469 node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(483,10): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(488,40): error TS2339: Property 'operation' does not exist on type 'CodeMirror'. node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(496,32): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(511,24): error TS2339: Property 'pushAll' does not exist on type '({ item(): any & any; } & { item(): any & any; })[]'. +node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(511,24): error TS2339: Property 'pushAll' does not exist on type 'ToolbarItem[]'. node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(512,25): error TS2339: Property 'pushAll' does not exist on type 'any[]'. node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(547,31): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(550,22): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -11445,10 +11503,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(761 node_modules/chrome-devtools-frontend/front_end/sources/UISourceCodeFrame.js(767,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(46,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(48,48): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(66,5): error TS2322: Type 'ToolbarButton[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(97,25): error TS2339: Property 'removeChildren' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(99,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(100,38): error TS2555: Expected at least 2 arguments, but got 1. @@ -11478,7 +11532,6 @@ node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarP node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(426,49): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(428,24): error TS2339: Property 'deepElementFromPoint' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(429,38): error TS2339: Property 'isSelfOrAncestor' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/sources/WatchExpressionsSidebarPane.js(430,7): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(28,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(39,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(107,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. @@ -11492,14 +11545,11 @@ node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(1 node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(171,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(173,63): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(174,16): error TS2339: Property 'createTextChild' does not exist on type 'Element'. +node_modules/chrome-devtools-frontend/front_end/sources/WorkspaceMappingTip.js(176,23): error TS2339: Property 'attachInfobars' does not exist on type 'Widget'. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(14,45): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(15,46): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(16,38): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(21,44): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(34,5): error TS2322: Type 'ToolbarButton[]' is not assignable to type '({ item(): any & any; } & { item(): any & any; })[]'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(39,45): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(47,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/sources/XHRBreakpointsSidebarPane.js(49,46): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -11694,8 +11744,8 @@ node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(363,62 node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(368,34): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(372,42): error TS2339: Property 'result' does not exist on type '{ response: RemoteObject; exceptionDetails: any; }'. node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(381,35): error TS2694: Namespace 'Protocol' has no exported member 'Runtime'. -node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(503,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(value: [any, any, any, any, any, any, any, any, any, any]) => [any, any, any, any, any, any, any, any, any, any] | PromiseLike<[any, any, any, any, any, any, any, any, any, any]>'. - Type 'Function' provides no match for the signature '(value: [any, any, any, any, any, any, any, any, any, any]): [any, any, any, any, any, any, any, any, any, any] | PromiseLike<[any, any, any, any, any, any, any, any, any, any]>'. +node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(503,30): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(value: any[]) => any[] | PromiseLike'. + Type 'Function' provides no match for the signature '(value: any[]): any[] | PromiseLike'. node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(641,59): error TS2339: Property 'testRunner' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(641,92): error TS2339: Property 'testRunner' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/test_runner/TestRunner.js(642,3): error TS2322: Type '1' is not assignable to type 'boolean'. @@ -11875,9 +11925,6 @@ node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(334,54 node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(371,43): error TS2339: Property 'withThousandsSeparator' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(379,28): error TS2339: Property 'backgroundColor' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(380,28): error TS2339: Property 'borderColor' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(383,45): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSettingCheckbox'. node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(384,40): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(394,50): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/CountersGraph.js(414,22): error TS2694: Namespace 'Common' has no exported member 'Event'. @@ -11889,11 +11936,6 @@ node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(95,34): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(158,73): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(160,24): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(163,31): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(176,33): error TS2345: Argument of type 'ToolbarCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarCheckbox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarCheckbox'. node_modules/chrome-devtools-frontend/front_end/timeline/EventsTimelineTreeView.js(183,56): error TS2339: Property 'value' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceModel.js(157,25): error TS2304: Cannot find name 'FileError'. node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceMonitor.js(26,46): error TS2339: Property 'createChild' does not exist on type 'Element'. @@ -11931,6 +11973,12 @@ node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceMonitor.js(4 node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceMonitor.js(517,43): error TS2694: Namespace 'Timeline.PerformanceMonitor' has no exported member 'ChartInfo'. node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceMonitor.js(526,27): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/PerformanceMonitor.js(539,43): error TS2694: Namespace 'Timeline.PerformanceMonitor' has no exported member 'ChartInfo'. +node_modules/chrome-devtools-frontend/front_end/timeline/TimelineController.js(28,59): error TS2345: Argument of type 'this' is not assignable to parameter of type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Type 'TimelineController' is not assignable to type '{ modelAdded(model: T): void; modelRemoved(model: T): void; }'. + Types of property 'modelAdded' are incompatible. + Type '(cpuProfilerModel: CPUProfilerModel) => void' is not assignable to type '(model: T) => void'. + Types of parameters 'cpuProfilerModel' and 'model' are incompatible. + Type 'T' is not assignable to type 'CPUProfilerModel'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineController.js(39,43): error TS2694: Namespace 'Timeline.TimelineController' has no exported member 'RecordingOptions'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineController.js(44,64): error TS2339: Property 'traceProviders' does not exist on type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineController.js(137,24): error TS2694: Namespace 'Protocol' has no exported member 'Profiler'. @@ -12071,16 +12119,6 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineHistoryManager.js(432,39): error TS2339: Property 'createChild' does not exist on type 'DocumentFragment'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLayersView.js(66,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(43,14): error TS2339: Property '_reportErrorAndCancelLoading' does not exist on type 'typeof TimelineLoader'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(45,5): error TS2322: Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; } & { loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(45,5): error TS2322: Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; } & { loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Property 'loadingStarted' is missing in type 'TimelineLoader'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(56,5): error TS2322: Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; } & { loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(56,5): error TS2322: Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; } & { loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Type 'TimelineLoader' is not assignable to type '{ loadingStarted(): void; loadingProgress(progress?: number): void; processingStarted(): void; loadingComplete(tracingModel: TracingModel): void; }'. - Property 'loadingStarted' is missing in type 'TimelineLoader'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(91,43): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(118,41): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineLoader.js(137,54): error TS2694: Namespace 'SDK.TracingManager' has no exported member 'EventPayload'. @@ -12099,46 +12137,16 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(111,60 node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(131,32): error TS2339: Property 'addEventListener' does not exist on type 'typeof extensionServer'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(140,57): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(168,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(206,42): error TS2345: Argument of type 'ToolbarSettingCheckbox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSettingCheckbox'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(207,5): error TS2322: Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(207,5): error TS2322: Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingCheckbox' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSettingCheckbox'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(212,42): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(213,42): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(214,46): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(216,42): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(219,45): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(221,45): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(224,42): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(225,42): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(230,44): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(237,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(241,62): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(245,42): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(251,42): error TS2345: Argument of type 'ToolbarSettingToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSettingToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSettingToggle'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(257,67): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(274,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(277,9): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(284,41): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(286,48): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(289,37): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(291,44): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(298,23): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(340,33): error TS2339: Property 'remove' does not exist on type 'Node'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(362,37): error TS2339: Property 'toISO8601Compact' does not exist on type 'Date'. @@ -12167,7 +12175,6 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(732,42 node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(739,35): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(773,35): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(800,22): error TS2694: Namespace 'Common' has no exported member 'Event'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(814,11): error TS2367: This condition will always return 'true' since the types '{ recordingProgress(usage: number): void; } & { recordingProgress(usage: number): void; }' and 'TimelineController' have no overlap. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(850,20): error TS2339: Property 'constrain' does not exist on type 'NumberConstructor'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(878,29): error TS2339: Property 'upperBound' does not exist on type 'Event[]'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(1029,24): error TS2339: Property 'ModelSelectionData' does not exist on type 'typeof TimelinePanel'. @@ -12186,12 +12193,7 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(1224,2 node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(1234,22): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelinePanel.js(1291,61): error TS2339: Property 'decodeURIComponent' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(65,58): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(133,31): error TS2345: Argument of type 'ToolbarComboBox' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarComboBox' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(134,46): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(136,31): error TS2345: Argument of type 'ToolbarInput' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarInput' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarInput'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(162,76): error TS2339: Property 'value' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(173,52): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(280,5): error TS2322: Type 'TopDownRootNode' is not assignable to type 'Node'. @@ -12240,13 +12242,10 @@ node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(777 node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(779,61): error TS2345: Argument of type '{ label: any; value: string; }[]' is not assignable to parameter of type '{ value: string; label: string; title: string; default: boolean; }[]'. Type '{ label: any; value: string; }' is not assignable to type '{ value: string; label: string; title: string; default: boolean; }'. Property 'title' is missing in type '{ label: any; value: string; }'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(781,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(781,77): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(871,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(896,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(910,25): error TS2339: Property 'asParsedURL' does not exist on type 'string'. -node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(931,5): error TS2554: Expected 3 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(1019,31): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(1020,26): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/timeline/TimelineTreeView.js(1022,56): error TS2694: Namespace 'DataGrid.DataGrid' has no exported member 'ColumnDescriptor'. @@ -12745,7 +12744,6 @@ node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(453,57): error node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(457,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(483,37): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(491,32): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/ui/ContextMenu.js(519,32): error TS2502: 'contextMenu' is referenced directly or indirectly in its own type annotation. node_modules/chrome-devtools-frontend/front_end/ui/Dialog.js(35,25): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/Dialog.js(42,13): error TS2339: Property 'consume' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/Dialog.js(55,24): error TS2339: Property '_instance' does not exist on type 'typeof Dialog'. @@ -12883,17 +12881,14 @@ node_modules/chrome-devtools-frontend/front_end/ui/InplaceEditor.js(133,22): err node_modules/chrome-devtools-frontend/front_end/ui/InplaceEditor.js(134,33): error TS2339: Property 'shiftKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/InplaceEditor.js(185,18): error TS2339: Property 'Controller' does not exist on type 'typeof InplaceEditor'. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(53,50): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(55,61): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarButton'. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(69,40): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(80,24): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(92,51): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(116,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. -node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(116,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(116,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. +node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(116,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. Property 'appendApplicableItems' is missing in type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. -node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(118,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. -node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(118,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(118,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. +node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(118,7): error TS2322: Type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. Property 'appendApplicableItems' is missing in type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(247,73): error TS2339: Property 'altKey' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/InspectorView.js(247,89): error TS2339: Property 'shiftKey' does not exist on type 'Event'. @@ -12954,11 +12949,8 @@ node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(17,18): error T node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(127,14): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(129,28): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(133,43): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(135,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(137,45): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(139,31): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. +node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(157,20): error TS2339: Property 'focus' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(203,32): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(203,58): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/ListWidget.js(241,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -13002,18 +12994,11 @@ node_modules/chrome-devtools-frontend/front_end/ui/RootView.js(36,20): error TS2 node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(49,25): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(50,56): error TS2339: Property 'createChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(55,54): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(57,44): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(65,44): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(76,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(81,47): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(89,45): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(97,56): error TS2555: Expected at least 2 arguments, but got 1. -node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(100,33): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(107,33): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(111,29): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(117,29): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/SearchableView.js(118,32): error TS2339: Property 'disabled' does not exist on type 'Element'. @@ -13305,28 +13290,10 @@ node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(48,45): error TS23 node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(75,24): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(115,26): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(134,47): error TS2339: Property 'boxInWindow' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(151,38): error TS2345: Argument of type 'ToolbarButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarButton' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(257,28): error TS2345: Argument of type 'ToolbarSeparator' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSeparator'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(261,28): error TS2345: Argument of type 'ToolbarSeparator' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarSeparator' is not assignable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(268,28): error TS2345: Argument of type 'ToolbarText' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarText' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarText'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(318,56): error TS2339: Property 'peekLast' does not exist on type '({ item(): any & any; } & { item(): any & any; })[]'. +node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(246,10): error TS2339: Property '_toolbar' does not exist on type 'ToolbarItem'. +node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(273,19): error TS2339: Property '_toolbar' does not exist on type 'ToolbarItem'. +node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(318,56): error TS2339: Property 'peekLast' does not exist on type 'ToolbarItem[]'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(328,27): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(343,36): error TS2352: Conversion of type 'ToolbarSeparator' to type '{ item(): any & any; } & { item(): any & any; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'ToolbarSeparator' is not comparable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(343,36): error TS2352: Conversion of type 'ToolbarSeparator' to type '{ item(): any & any; } & { item(): any & any; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'ToolbarSeparator' is not comparable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarSeparator'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(346,17): error TS2352: Conversion of type 'ToolbarToggle' to type '{ item(): any & any; } & { item(): any & any; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'ToolbarToggle' is not comparable to type '{ item(): any & any; }'. -node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(346,17): error TS2352: Conversion of type 'ToolbarToggle' to type '{ item(): any & any; } & { item(): any & any; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. - Type 'ToolbarToggle' is not comparable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarToggle'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(405,53): error TS2339: Property '_toolbar' does not exist on type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(405,70): error TS2339: Property '_toolbar' does not exist on type 'ToolbarItem'. node_modules/chrome-devtools-frontend/front_end/ui/Toolbar.js(412,18): error TS2339: Property 'disabled' does not exist on type 'Element'. @@ -13520,15 +13487,13 @@ node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(2020,30): error TS node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(2024,50): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(2025,50): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(2027,15): error TS2339: Property 'consume' does not exist on type 'Event'. -node_modules/chrome-devtools-frontend/front_end/ui/UIUtils.js(2046,29): error TS2345: Argument of type 'ToolbarToggle' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarToggle' is not assignable to type '{ item(): any & any; }'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(11,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(16,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(21,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(26,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(31,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(36,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(195,47): error TS2352: Conversion of type 'Widget' to type '{ toolbarItems(): ({ item(): any & any; } & { item(): any & any; })[]; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(195,47): error TS2352: Conversion of type 'Widget' to type '{ toolbarItems(): ToolbarItem[]; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. Property 'toolbarItems' is missing in type 'Widget'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(244,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(254,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. @@ -13536,44 +13501,41 @@ node_modules/chrome-devtools-frontend/front_end/ui/View.js(263,1): error TS8022: node_modules/chrome-devtools-frontend/front_end/ui/View.js(267,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(282,15): error TS2355: A function whose declared type is neither 'void' nor 'any' must return a value. node_modules/chrome-devtools-frontend/front_end/ui/View.js(297,32): error TS2339: Property 'runtime' does not exist on type 'Window'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(299,41): error TS2345: Argument of type 'ProvidedView' is not assignable to parameter of type '{ viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { item(): any & any; })[]>; widget(): Promise; disposeView(): void; }'. - Property '_extension' does not exist on type '{ viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { item(): any & any; })[]>; widget(): Promise; disposeView(): void; }'. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(299,41): error TS2345: Argument of type 'ProvidedView' is not assignable to parameter of type '{ viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise; disposeView(): void; }'. + Property '_extension' does not exist on type '{ viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise; disposeView(): void; }'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(326,21): error TS2339: Property 'showView' does not exist on type '_Location'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(371,23): error TS2339: Property 'showView' does not exist on type '_Location'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(383,35): error TS2339: Property 'runtime' does not exist on type 'Window'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(401,5): error TS2322: Type '_TabbedLocation' is not assignable to type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(401,5): error TS2322: Type '_TabbedLocation' is not assignable to type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. Property '_tabbedPane' does not exist on type '{ tabbedPane(): TabbedPane; enableMoreTabsButton(): void; }'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(411,5): error TS2322: Type '_StackLocation' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(411,5): error TS2322: Type '_StackLocation' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. - Property '_vbox' does not exist on type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise<({ item(): any & any; } & { ...; })[]>; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ....'. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(411,5): error TS2322: Type '_StackLocation' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(411,5): error TS2322: Type '_StackLocation' is not assignable to type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. + Property '_vbox' does not exist on type '{ appendApplicableItems(locationName: string): void; appendView(view: { viewId(): string; title(): string; isCloseable(): boolean; isTransient(): boolean; toolbarItems(): Promise; widget(): Promise<...>; disposeView(): void; }, insertBefore?: { ...; }): void; showView(view: { ...; }, insertBefore?: { ...'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(440,18): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(454,38): error TS2339: Property 'hasFocus' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(461,44): error TS2345: Argument of type '(Promise | Promise<({ item(): any & any; } & { item(): any & any; })[]>)[]' is not assignable to parameter of type 'Iterable>'. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(461,44): error TS2345: Argument of type '(Promise | Promise)[]' is not assignable to parameter of type 'Iterable>'. Types of property '[Symbol.iterator]' are incompatible. - Type '() => IterableIterator | Promise<({ item(): any & any; } & { item(): any & any; })[]>>' is not assignable to type '() => Iterator>'. - Type 'IterableIterator | Promise<({ item(): any & any; } & { item(): any & any; })[]>>' is not assignable to type 'Iterator>'. + Type '() => IterableIterator | Promise>' is not assignable to type '() => Iterator>'. + Type 'IterableIterator | Promise>' is not assignable to type 'Iterator>'. Types of property 'next' are incompatible. - Type '{ (value?: any): IteratorResult | Promise<({ item(): any & any; } & { item(): any & any; })[]>>; (value?: any): IteratorResult | Promise<({ item(): any & any; } & { item(): any & any; })[]>>; }' is not assignable to type '{ (value?: any): IteratorResult>; (value?: any): IteratorResult>; }'. - Type 'IteratorResult | Promise<({ item(): any & any; } & { item(): any & any; })[]>>' is not assignable to type 'IteratorResult>'. - Type 'Promise | Promise<({ item(): any & any; } & { item(): any & any; })[]>' is not assignable to type 'void | PromiseLike'. - Type 'Promise<({ item(): any & any; } & { item(): any & any; })[]>' is not assignable to type 'void | PromiseLike'. - Type 'Promise<({ item(): any & any; } & { item(): any & any; })[]>' is not assignable to type 'PromiseLike'. + Type '{ (value?: any): IteratorResult | Promise>; (value?: any): IteratorResult | Promise>; }' is not assignable to type '{ (value?: any): IteratorResult>; (value?: any): IteratorResult>; }'. + Type 'IteratorResult | Promise>' is not assignable to type 'IteratorResult>'. + Type 'Promise | Promise' is not assignable to type 'void | PromiseLike'. + Type 'Promise' is not assignable to type 'void | PromiseLike'. + Type 'Promise' is not assignable to type 'PromiseLike'. Types of property 'then' are incompatible. - Type '(onfulfilled?: (value: ({ item(): any & any; } & { item(): any & any; })[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike<...>) => Promise<...>' is not assignable to type '(onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. + Type '(onfulfilled?: (value: ToolbarItem[]) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => Promise' is not assignable to type '(onfulfilled?: (value: void) => TResult1 | PromiseLike, onrejected?: (reason: any) => TResult2 | PromiseLike) => PromiseLike'. Types of parameters 'onfulfilled' and 'onfulfilled' are incompatible. Types of parameters 'value' and 'value' are incompatible. - Type '({ item(): any & any; } & { item(): any & any; })[]' is not assignable to type 'void'. + Type 'ToolbarItem[]' is not assignable to type 'void'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(495,24): error TS2339: Property 'createTextChild' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(496,24): error TS2339: Property 'tabIndex' does not exist on type 'Element'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(501,25): error TS2339: Property 'createChild' does not exist on type 'Element'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(520,44): error TS2345: Argument of type '(Promise | Promise<({ item(): any & any; } & { item(): any & any; })[]>)[]' is not assignable to parameter of type 'Iterable>'. +node_modules/chrome-devtools-frontend/front_end/ui/View.js(520,44): error TS2345: Argument of type '(Promise | Promise)[]' is not assignable to parameter of type 'Iterable>'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(556,36): error TS2339: Property 'keyCode' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(558,22): error TS2339: Property 'key' does not exist on type 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(560,22): error TS2339: Property 'key' does not exist on type 'Event'. -node_modules/chrome-devtools-frontend/front_end/ui/View.js(659,54): error TS2345: Argument of type 'ToolbarMenuButton' is not assignable to parameter of type '{ item(): any & any; } & { item(): any & any; }'. - Type 'ToolbarMenuButton' is not assignable to type '{ item(): any & any; }'. - Property 'item' is missing in type 'ToolbarMenuButton'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(702,19): error TS2555: Expected at least 2 arguments, but got 1. node_modules/chrome-devtools-frontend/front_end/ui/View.js(793,22): error TS2694: Namespace 'Common' has no exported member 'Event'. node_modules/chrome-devtools-frontend/front_end/ui/View.js(802,22): error TS2694: Namespace 'Common' has no exported member 'Event'. diff --git a/tests/baselines/reference/user/debug.log b/tests/baselines/reference/user/debug.log index dba95024e7c..da4e47f9207 100644 --- a/tests/baselines/reference/user/debug.log +++ b/tests/baselines/reference/user/debug.log @@ -41,6 +41,8 @@ node_modules/debug/dist/debug.js(733,74): error TS2339: Property 'process' does node_modules/debug/dist/debug.js(733,112): error TS2339: Property 'process' does not exist on type 'Window'. node_modules/debug/dist/debug.js(744,146): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'? node_modules/debug/dist/debug.js(745,78): error TS2339: Property 'firebug' does not exist on type 'Console'. +node_modules/debug/dist/debug.js(799,156): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. + Property 'pop' is missing in type 'IArguments'. node_modules/debug/dist/debug.js(851,21): error TS2304: Cannot find name 'LocalStorage'. node_modules/debug/src/browser.js(3,100): error TS2539: Cannot assign to '_typeof' because it is not a variable. node_modules/debug/src/browser.js(3,165): error TS2539: Cannot assign to '_typeof' because it is not a variable. @@ -49,6 +51,7 @@ node_modules/debug/src/browser.js(34,66): error TS2339: Property 'process' does node_modules/debug/src/browser.js(34,104): error TS2339: Property 'process' does not exist on type 'Window'. node_modules/debug/src/browser.js(45,138): error TS2551: Property 'WebkitAppearance' does not exist on type 'CSSStyleDeclaration'. Did you mean 'webkitAppearance'? node_modules/debug/src/browser.js(46,70): error TS2339: Property 'firebug' does not exist on type 'Console'. +node_modules/debug/src/browser.js(100,148): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. node_modules/debug/src/browser.js(152,13): error TS2304: Cannot find name 'LocalStorage'. node_modules/debug/src/common.js(51,24): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: any; default: any; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. node_modules/debug/src/common.js(51,60): error TS2339: Property 'colors' does not exist on type '{ (namespace: string): Function; debug: any; default: any; coerce: (val: any) => any; disable: () => void; enable: (namespaces: string) => void; enabled: (name: string) => boolean; humanize: any; ... 4 more ...; selectColor: (namespace: string) => string | number; }'. @@ -79,6 +82,8 @@ node_modules/debug/src/node.js(56,5): error TS2322: Type 'false' is not assignab node_modules/debug/src/node.js(58,5): error TS2322: Type 'null' is not assignable to type 'string | undefined'. node_modules/debug/src/node.js(60,5): error TS2322: Type 'number' is not assignable to type 'string | undefined'. node_modules/debug/src/node.js(71,108): error TS2339: Property 'fd' does not exist on type 'WriteStream'. +node_modules/debug/src/node.js(108,55): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'. + Property '0' is missing in type 'IArguments'. node_modules/debug/src/node.js(136,3): error TS2322: Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. diff --git a/tests/baselines/reference/user/graceful-fs.log b/tests/baselines/reference/user/graceful-fs.log index a0721706f16..ef5a4e24f37 100644 --- a/tests/baselines/reference/user/graceful-fs.log +++ b/tests/baselines/reference/user/graceful-fs.log @@ -5,11 +5,18 @@ node_modules/graceful-fs/fs.js(17,38): error TS2345: Argument of type 'PropertyD Type 'undefined' is not assignable to type 'PropertyDescriptor & ThisType'. Type 'undefined' is not assignable to type 'PropertyDescriptor'. node_modules/graceful-fs/graceful-fs.js(12,3): error TS2322: Type '(msg: string, ...param: any[]) => void' is not assignable to type '() => void'. +node_modules/graceful-fs/graceful-fs.js(15,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any, ...any[]]'. + Property '0' is missing in type 'IArguments'. node_modules/graceful-fs/graceful-fs.js(22,5): error TS2554: Expected 0 arguments, but got 1. -node_modules/graceful-fs/graceful-fs.js(37,1): error TS2322: Type '(fd: any, cb: any) => any' is not assignable to type 'typeof close'. - Property '__promisify__' is missing in type '(fd: any, cb: any) => any'. +node_modules/graceful-fs/graceful-fs.js(37,1): error TS2322: Type '(fd: any, cb: any) => void' is not assignable to type 'typeof close'. + Property '__promisify__' is missing in type '(fd: any, cb: any) => void'. +node_modules/graceful-fs/graceful-fs.js(51,37): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[number]'. + Property '0' is missing in type 'IArguments'. node_modules/graceful-fs/graceful-fs.js(161,5): error TS2539: Cannot assign to 'ReadStream' because it is not a variable. node_modules/graceful-fs/graceful-fs.js(162,5): error TS2539: Cannot assign to 'WriteStream' because it is not a variable. +node_modules/graceful-fs/graceful-fs.js(180,68): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'. + Property 'pop' is missing in type 'IArguments'. +node_modules/graceful-fs/graceful-fs.js(203,70): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, ...any[]]'. node_modules/graceful-fs/graceful-fs.js(252,3): error TS2554: Expected 0 arguments, but got 3. node_modules/graceful-fs/graceful-fs.js(259,5): error TS2554: Expected 0 arguments, but got 3. diff --git a/tests/baselines/reference/user/jimp.log b/tests/baselines/reference/user/jimp.log index 40b0797489e..0498af334c2 100644 --- a/tests/baselines/reference/user/jimp.log +++ b/tests/baselines/reference/user/jimp.log @@ -1,8 +1,9 @@ Exit Code: 1 Standard output: -node_modules/jimp/jimp.d.ts(497,12): error TS7010: 'appendConstructorOption', which lacks return-type annotation, implicitly has an 'any' return type. -node_modules/jimp/jimp.d.ts(539,12): error TS7010: 'measureText', which lacks return-type annotation, implicitly has an 'any' return type. -node_modules/jimp/jimp.d.ts(540,12): error TS7010: 'measureTextHeight', which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/jimp/jimp.d.ts(248,5): error TS7010: 'parseBitmap', which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/jimp/jimp.d.ts(505,12): error TS7010: 'appendConstructorOption', which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/jimp/jimp.d.ts(555,12): error TS7010: 'measureText', which lacks return-type annotation, implicitly has an 'any' return type. +node_modules/jimp/jimp.d.ts(556,12): error TS7010: 'measureTextHeight', which lacks return-type annotation, implicitly has an 'any' return type. diff --git a/tests/baselines/reference/user/lodash.log b/tests/baselines/reference/user/lodash.log index 383dcf9fe6f..ff3d4e7cabf 100644 --- a/tests/baselines/reference/user/lodash.log +++ b/tests/baselines/reference/user/lodash.log @@ -41,6 +41,9 @@ node_modules/lodash/_baseFlatten.js(19,29): error TS2322: Type '(value: any) => node_modules/lodash/_baseFlatten.js(24,22): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'Boolean' has no compatible call signatures. node_modules/lodash/_baseFlatten.js(24,22): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_baseFlatten.js(24,22): error TS2722: Cannot invoke an object which is possibly 'undefined'. +node_modules/lodash/_baseHas.js(16,56): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'. + Type 'any[]' is not assignable to type 'string | number | symbol'. + Type 'any[]' is not assignable to type 'symbol'. node_modules/lodash/_baseIntersection.js(53,40): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'. Type 'undefined' is not assignable to type 'Function'. node_modules/lodash/_baseIntersection.js(60,54): error TS2345: Argument of type 'Function | undefined' is not assignable to parameter of type 'Function'. @@ -126,6 +129,8 @@ node_modules/lodash/_createWrap.js(96,26): error TS2345: Argument of type 'Timer node_modules/lodash/_createWrap.js(97,100): error TS2532: Object is possibly 'undefined'. node_modules/lodash/_createWrap.js(98,28): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. +node_modules/lodash/_createWrap.js(100,44): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[TimerHandler, number, any?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (any[] | undefined)?, (number | undefined)?, (number | undefined)?]'. + Property '0' is missing in type 'any[]'. node_modules/lodash/_createWrap.js(103,51): error TS2345: Argument of type 'TimerHandler' is not assignable to parameter of type 'Function'. Type 'string' is not assignable to type 'Function'. node_modules/lodash/_customDefaultsMerge.js(22,35): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'. @@ -227,6 +232,9 @@ node_modules/lodash/core.js(2183,41): error TS8024: JSDoc '@param' tag has name node_modules/lodash/core.js(2473,21): error TS2554: Expected 0 arguments, but got 1. node_modules/lodash/core.js(2609,39): error TS2554: Expected 0 arguments, but got 1. node_modules/lodash/core.js(2644,12): error TS2554: Expected 3-5 arguments, but got 2. +node_modules/lodash/core.js(3245,58): error TS2345: Argument of type 'string | any[]' is not assignable to parameter of type 'string | number | symbol'. + Type 'any[]' is not assignable to type 'string | number | symbol'. + Type 'any[]' is not assignable to type 'symbol'. node_modules/lodash/core.js(3354,53): error TS2538: Type 'any[]' cannot be used as an index type. node_modules/lodash/core.js(3424,41): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. Type 'Function' provides no match for the signature '(substring: string, ...args: any[]): string'. diff --git a/tests/baselines/reference/user/npm.log b/tests/baselines/reference/user/npm.log index c9262f0f89a..3bdb3b1b9ec 100644 --- a/tests/baselines/reference/user/npm.log +++ b/tests/baselines/reference/user/npm.log @@ -29,6 +29,8 @@ node_modules/npm/bin/npm-cli.js(128,13): error TS2339: Property 'command' does n node_modules/npm/bin/npm-cli.js(132,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/bin/npm-cli.js(134,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/bin/npm-cli.js(136,17): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/bin/npm-cli.js(140,32): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?]'. + Property 'pop' is missing in type 'IArguments'. node_modules/npm/html/static/toc.js(3,40): error TS2531: Object is possibly 'null'. node_modules/npm/lib/access.js(58,46): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/access.js(65,18): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. @@ -58,7 +60,10 @@ node_modules/npm/lib/auth/legacy.js(12,30): error TS2339: Property 'config' does node_modules/npm/lib/auth/legacy.js(35,16): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/auth/legacy.js(69,33): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/auth/oauth.js(5,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/auth/oauth.js(6,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, any?, any?]'. + Property 'pop' is missing in type 'IArguments'. node_modules/npm/lib/auth/saml.js(5,7): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/auth/saml.js(6,29): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, any?, any?, any?]'. node_modules/npm/lib/auth/sso.js(7,21): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/auth/sso.js(20,7): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/auth/sso.js(28,36): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -147,6 +152,8 @@ node_modules/npm/lib/config/core.js(333,10): error TS2339: Property 'emit' does node_modules/npm/lib/config/core.js(409,29): error TS2345: Argument of type '(orig: string, esc: any, name: any) => string | undefined' is not assignable to parameter of type '(substring: string, ...args: any[]) => string'. Type 'string | undefined' is not assignable to type 'string'. Type 'undefined' is not assignable to type 'string'. +node_modules/npm/lib/config/defaults.js(20,52): error TS2345: Argument of type 'never[]' is not assignable to parameter of type '[any, ...any[]]'. + Property '0' is missing in type 'never[]'. node_modules/npm/lib/config/gentle-fs.js(16,11): error TS2339: Property 'prefix' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config/gentle-fs.js(17,11): error TS2339: Property 'globalPrefix' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/config/gentle-fs.js(18,11): error TS2339: Property 'dir' does not exist on type 'typeof EventEmitter'. @@ -324,7 +331,8 @@ node_modules/npm/lib/help.js(186,11): error TS2339: Property 'argv' does not exi node_modules/npm/lib/help.js(187,20): error TS2339: Property 'argv' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/help.js(196,26): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/help.js(197,22): error TS2339: Property 'deref' does not exist on type 'typeof EventEmitter'. -node_modules/npm/lib/help.js(199,14): error TS2345: Argument of type 'any[]' is not assignable to parameter of type 'never'. +node_modules/npm/lib/help.js(199,15): error TS2322: Type 'string' is not assignable to type 'never'. +node_modules/npm/lib/help.js(199,18): error TS2322: Type 'any' is not assignable to type 'never'. node_modules/npm/lib/help.js(199,22): error TS2339: Property 'commands' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/help.js(206,33): error TS2339: Property 'length' does not exist on type 'never'. node_modules/npm/lib/help.js(207,14): error TS2339: Property 'split' does not exist on type 'never'. @@ -429,8 +437,8 @@ node_modules/npm/lib/install.js(268,26): error TS2339: Property 'config' does no node_modules/npm/lib/install.js(269,9): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install.js(272,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/install.js(273,7): error TS2532: Object is possibly 'undefined'. -node_modules/npm/lib/install.js(273,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type 'Function'. - Type 'undefined' is not assignable to type 'Function'. +node_modules/npm/lib/install.js(273,7): error TS2684: The 'this' context of type '((err: any, ...args: any[]) => any) | undefined' is not assignable to method's 'this' of type '(this: null, err?: any, ...args: any[]) => any'. + Type 'undefined' is not assignable to type '(this: null, err?: any, ...args: any[]) => any'. node_modules/npm/lib/install.js(340,25): error TS2339: Property 'failing' does not exist on type 'Installer'. node_modules/npm/lib/install.js(369,18): error TS2345: Argument of type '"time"' is not assignable to parameter of type 'Signals'. node_modules/npm/lib/install.js(376,16): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type 'Signals'. @@ -676,11 +684,9 @@ node_modules/npm/lib/run-script.js(35,22): error TS2339: Property 'localPrefix' node_modules/npm/lib/run-script.js(46,26): error TS2339: Property 'localPrefix' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/run-script.js(56,20): error TS2339: Property 'localPrefix' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/run-script.js(66,28): error TS2339: Property 'localPrefix' does not exist on type 'typeof EventEmitter'. -node_modules/npm/lib/run-script.js(77,21): error TS2345: Argument of type 'string[]' is not assignable to parameter of type 'ConcatArray'. - Types of property 'slice' are incompatible. - Type '(start?: number | undefined, end?: number | undefined) => string[]' is not assignable to type '(start?: number | undefined, end?: number | undefined) => never[]'. - Type 'string[]' is not assignable to type 'never[]'. - Type 'string' is not assignable to type 'never'. +node_modules/npm/lib/run-script.js(77,22): error TS2322: Type 'string' is not assignable to type 'never'. +node_modules/npm/lib/run-script.js(77,33): error TS2322: Type 'string' is not assignable to type 'never'. +node_modules/npm/lib/run-script.js(77,36): error TS2322: Type 'string' is not assignable to type 'never'. node_modules/npm/lib/run-script.js(94,13): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/run-script.js(99,13): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/run-script.js(148,22): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -838,6 +844,8 @@ node_modules/npm/lib/utils/metrics.js(61,31): error TS2345: Argument of type 'Bu node_modules/npm/lib/utils/metrics.js(62,7): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/metrics.js(64,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. node_modules/npm/lib/utils/metrics.js(65,9): error TS2339: Property 'registry' does not exist on type 'typeof EventEmitter'. +node_modules/npm/lib/utils/output.js(6,30): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. + Property 'pop' is missing in type 'IArguments'. node_modules/npm/lib/utils/perf.js(9,12): error TS2345: Argument of type '"time"' is not assignable to parameter of type 'Signals'. node_modules/npm/lib/utils/perf.js(10,12): error TS2345: Argument of type '"timeEnd"' is not assignable to parameter of type 'Signals'. node_modules/npm/lib/utils/read-local-package.js(7,11): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -910,6 +918,8 @@ node_modules/npm/test/broken-under-nyc-and-travis/whoami.js(7,20): error TS2307: node_modules/npm/test/common-tap.js(5,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. node_modules/npm/test/common-tap.js(10,3): error TS2322: Type '(...args: any[]) => void' is not assignable to type 'typeof setImmediate'. Property '__promisify__' is missing in type '(...args: any[]) => void'. +node_modules/npm/test/common-tap.js(12,28): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[(...args: any[]) => void, number, ...any[]]'. + Property '0' is missing in type 'any[]'. node_modules/npm/test/common-tap.js(175,17): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(181,31): error TS2339: Property '_storage' does not exist on type 'Environment'. node_modules/npm/test/common-tap.js(192,12): error TS2339: Property '_storage' does not exist on type 'Environment'. @@ -928,6 +938,8 @@ node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(2,20): error TS2307: Ca node_modules/npm/test/need-npm5-update/legacy-dir-bin.js(11,21): error TS2307: Cannot find module 'tacks'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(2,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(12,47): error TS2339: Property '_extend' does not exist on type 'typeof import("util")'. +node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(34,42): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'. + Property 'pop' is missing in type 'IArguments'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(48,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'. node_modules/npm/test/need-npm5-update/legacy-npm-self-install.js(49,3): error TS2322: Type 'null' is not assignable to type 'string | undefined'. node_modules/npm/test/need-npm5-update/legacy-optional-deps.js(4,20): error TS2307: Cannot find module 'tap'. @@ -937,6 +949,7 @@ node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(2,20): error TS2307: node_modules/npm/test/need-npm5-update/legacy-shrinkwrap.js(6,21): error TS2307: Cannot find module 'tacks'. node_modules/npm/test/need-npm5-update/lifecycle-signal.js(8,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(3,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/need-npm5-update/move-no-clobber-dest-node-modules.js(11,48): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'string[]'. node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(8,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/need-npm5-update/need-only-update-save-optional/update-save.js(10,22): error TS2307: Cannot find module '../common-tap.js'. @@ -945,13 +958,7 @@ node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(6,20): er node_modules/npm/test/need-npm5-update/need-outdated/update-symlink.js(8,22): error TS2307: Cannot find module '../common-tap.js'. node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. -node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(69,28): error TS2345: Argument of type '(string | number)[]' is not assignable to parameter of type 'string | ConcatArray'. - Type '(string | number)[]' is not assignable to type 'ConcatArray'. - Types of property 'slice' are incompatible. - Type '(start?: number | undefined, end?: number | undefined) => (string | number)[]' is not assignable to type '(start?: number | undefined, end?: number | undefined) => string[]'. - Type '(string | number)[]' is not assignable to type 'string[]'. - Type 'string | number' is not assignable to type 'string'. - Type 'number' is not assignable to type 'string'. +node_modules/npm/test/need-npm5-update/outdated-depth-deep.js(69,52): error TS2322: Type 'number' is not assignable to type 'string'. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(2,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/need-npm5-update/outdated-depth-integer.js(55,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. @@ -1443,6 +1450,8 @@ node_modules/npm/test/tap/outdated-json.js(5,18): error TS2307: Cannot find modu node_modules/npm/test/tap/outdated-json.js(8,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/outdated-long.js(5,18): error TS2307: Cannot find module 'npm-registry-mock'. node_modules/npm/test/tap/outdated-long.js(7,20): error TS2307: Cannot find module 'tap'. +node_modules/npm/test/tap/outdated-long.js(63,31): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. + Property 'pop' is missing in type 'IArguments'. node_modules/npm/test/tap/outdated-long.js(66,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-long.js(74,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated-long.js(76,15): error TS2339: Property 'config' does not exist on type 'typeof EventEmitter'. @@ -1451,6 +1460,7 @@ node_modules/npm/test/tap/outdated.js(5,18): error TS2307: Cannot find module 'n node_modules/npm/test/tap/outdated.js(7,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/outdated.js(92,9): error TS2339: Property 'load' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/outdated.js(100,13): error TS2339: Property 'install' does not exist on type 'typeof EventEmitter'. +node_modules/npm/test/tap/outdated.js(103,39): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type 'any[]'. node_modules/npm/test/tap/outdated.js(105,15): error TS2339: Property 'outdated' does not exist on type 'typeof EventEmitter'. node_modules/npm/test/tap/override-bundled.js(3,20): error TS2307: Cannot find module 'tap'. node_modules/npm/test/tap/owner.js(1,18): error TS2307: Cannot find module 'npm-registry-mock'. diff --git a/tests/baselines/reference/user/npmlog.log b/tests/baselines/reference/user/npmlog.log index cdd163fa0f1..c9662cd1551 100644 --- a/tests/baselines/reference/user/npmlog.log +++ b/tests/baselines/reference/user/npmlog.log @@ -4,6 +4,8 @@ node_modules/npmlog/log.js(83,12): error TS2551: Property '_pause' does not exis node_modules/npmlog/log.js(149,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(154,13): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(155,8): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? +node_modules/npmlog/log.js(194,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[any, ...any[]]'. + Property '0' is missing in type 'any[]'. node_modules/npmlog/log.js(218,12): error TS2551: Property '_paused' does not exist on type 'typeof EventEmitter'. Did you mean 'pause'? node_modules/npmlog/log.js(271,16): error TS2345: Argument of type 'string | undefined' is not assignable to parameter of type 'string'. Type 'undefined' is not assignable to type 'string'. diff --git a/tests/baselines/reference/user/prettier.log b/tests/baselines/reference/user/prettier.log index 0fd19e0d9a7..ae8f5cee3f1 100644 --- a/tests/baselines/reference/user/prettier.log +++ b/tests/baselines/reference/user/prettier.log @@ -6,6 +6,9 @@ src/cli/util.js(262,64): error TS2339: Property 'length' does not exist on type src/cli/util.js(335,52): error TS2339: Property 'length' does not exist on type 'Ignore'. src/cli/util.js(396,46): error TS2345: Argument of type 'null' is not assignable to parameter of type 'number | undefined'. src/cli/util.js(403,39): error TS2339: Property 'grey' does not exist on type 'typeof import("../../../node_modules/chalk/types/index")'. +src/cli/util.js(454,16): error TS2339: Property 'type' does not exist on type 'never'. +src/cli/util.js(455,16): error TS2339: Property 'oppositeDescription' does not exist on type 'never'. +src/cli/util.js(456,17): error TS2339: Property 'name' does not exist on type 'never'. src/common/parser-create-error.js(8,9): error TS2339: Property 'loc' does not exist on type 'SyntaxError'. src/config/resolve-config.js(75,32): error TS2345: Argument of type '{ sync: false; }' is not assignable to parameter of type '{ cache: boolean; sync: boolean; }'. Property 'cache' is missing in type '{ sync: false; }'. @@ -14,6 +17,8 @@ src/config/resolve-config.js(82,32): error TS2345: Argument of type '{ sync: tru src/doc/doc-printer.js(213,17): error TS2532: Object is possibly 'undefined'. src/doc/doc-printer.js(214,18): error TS2532: Object is possibly 'undefined'. src/doc/doc-printer.js(215,17): error TS2532: Object is possibly 'undefined'. +src/doc/doc-printer.js(447,37): error TS2345: Argument of type 'any[][]' is not assignable to parameter of type 'never[]'. + Type 'any[]' is not assignable to type 'never'. src/language-css/clean.js(3,30): error TS2307: Cannot find module 'html-tag-names'. src/language-css/parser-postcss.js(78,32): error TS2345: Argument of type '{ groups: never[]; type: string; }' is not assignable to parameter of type 'never'. src/language-css/parser-postcss.js(88,30): error TS2345: Argument of type '{ open: null; close: null; groups: never[]; type: string; }' is not assignable to parameter of type 'never'. diff --git a/tests/baselines/reference/user/puppeteer.log b/tests/baselines/reference/user/puppeteer.log index 5e11f2261fc..305b1ab31eb 100644 --- a/tests/baselines/reference/user/puppeteer.log +++ b/tests/baselines/reference/user/puppeteer.log @@ -1,17 +1,16 @@ Exit Code: 1 Standard output: -lib/Browser.js(71,43): error TS2345: Argument of type '() => Promise' is not assignable to parameter of type '() => Promise'. - Type 'Promise' is not assignable to type 'Promise'. - Type 'CDPSession' is not assignable to 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'. - Types of parameters 'event' and 'event' are incompatible. - Type 'T' is not assignable to type 'string | symbol'. - Type 'string | number | symbol' is not assignable to type 'string | symbol'. - Type 'number' is not assignable to type 'string | symbol'. - Type 'T' is not assignable to type 'symbol'. - Type 'string | number | symbol' is not assignable to type 'symbol'. - Type 'string' is not assignable to type 'symbol'. +lib/Browser.js(71,49): error TS2322: Type 'Promise' is not assignable to type 'Promise'. + Type 'CDPSession' is not assignable to 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'. + Types of parameters 'event' and 'event' are incompatible. + Type 'T' is not assignable to type 'string | symbol'. + Type 'string | number | symbol' is not assignable to type 'string | symbol'. + Type 'number' is not assignable to type 'string | symbol'. + Type 'T' is not assignable to type 'symbol'. + Type 'string | number | symbol' is not assignable to type 'symbol'. + Type 'string' is not assignable to type 'symbol'. lib/Coverage.js(109,15): error TS2503: Cannot find namespace 'Protocol'. lib/Coverage.js(196,15): error TS2503: Cannot find namespace 'Protocol'. lib/ElementHandle.js(24,15): error TS2503: Cannot find namespace 'Protocol'. diff --git a/tests/baselines/reference/user/uglify-js.log b/tests/baselines/reference/user/uglify-js.log index edb65213e6e..5bd01b81213 100644 --- a/tests/baselines/reference/user/uglify-js.log +++ b/tests/baselines/reference/user/uglify-js.log @@ -22,7 +22,11 @@ node_modules/uglify-js/lib/compress.js(1316,38): error TS2554: Expected 0 argume node_modules/uglify-js/lib/compress.js(1411,38): error TS2339: Property 'parent' does not exist on type 'TreeTransformer'. node_modules/uglify-js/lib/compress.js(1519,27): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(1551,26): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(1652,49): error TS2345: Argument of type 'number[]' is not assignable to parameter of type '[number, number, ...never[]]'. + Property '0' is missing in type 'number[]'. node_modules/uglify-js/lib/compress.js(1975,44): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(2013,53): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[number, number, ...never[]]'. + Property '0' is missing in type 'any[]'. node_modules/uglify-js/lib/compress.js(2161,19): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(3214,23): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(3227,33): error TS2322: Type '"f"' is not assignable to type 'boolean'. @@ -39,6 +43,8 @@ node_modules/uglify-js/lib/compress.js(3988,30): error TS2554: Expected 0 argume node_modules/uglify-js/lib/compress.js(4097,18): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(4396,17): error TS2403: Subsequent variable declarations must have the same type. Variable 'body' must be of type 'any[]', but here has type 'any'. node_modules/uglify-js/lib/compress.js(4480,22): error TS2554: Expected 0 arguments, but got 1. +node_modules/uglify-js/lib/compress.js(4672,57): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[RegExp, (string | undefined)?]'. + Property '0' is missing in type 'any[]'. node_modules/uglify-js/lib/compress.js(4830,30): error TS2554: Expected 0 arguments, but got 1. node_modules/uglify-js/lib/compress.js(4837,25): error TS2403: Subsequent variable declarations must have the same type. Variable 'code' must be of type 'string', but here has type '{ get: () => string; toString: () => string; indent: () => void; indentation: () => number; current_width: () => number; should_break: () => boolean; has_parens: () => boolean; newline: () => void; print: (str: any) => void; ... 24 more ...; parent: (n: any) => any; }'. node_modules/uglify-js/lib/compress.js(4841,36): error TS2532: Object is possibly 'undefined'. @@ -104,6 +110,9 @@ node_modules/uglify-js/lib/sourcemap.js(55,25): error TS2304: Cannot find name ' node_modules/uglify-js/lib/sourcemap.js(61,23): error TS2304: Cannot find name 'MOZ_SourceMap'. node_modules/uglify-js/tools/exit.js(7,32): error TS2339: Property 'bufferSize' does not exist on type 'WriteStream'. node_modules/uglify-js/tools/exit.js(7,61): error TS2339: Property 'bufferSize' does not exist on type 'WriteStream'. +node_modules/uglify-js/tools/exit.js(10,37): error TS2345: Argument of type 'any[]' is not assignable to parameter of type '[(number | undefined)?]'. + Types of property 'length' are incompatible. + Type 'number' is not assignable to type '0 | 1'. node_modules/uglify-js/tools/node.js(64,26): error TS2339: Property 'minify' does not exist on type 'typeof import("/uglify-js/node_modules/uglify-js/tools/node")'. diff --git a/tests/baselines/reference/user/util.log b/tests/baselines/reference/user/util.log index 743d8d5e332..6440d2f326b 100644 --- a/tests/baselines/reference/user/util.log +++ b/tests/baselines/reference/user/util.log @@ -8,6 +8,9 @@ node_modules/util/util.js(55,20): error TS2555: Expected at least 2 arguments, b node_modules/util/util.js(73,15): error TS2339: Property 'noDeprecation' does not exist on type 'Process'. node_modules/util/util.js(80,19): error TS2339: Property 'throwDeprecation' does not exist on type 'Process'. node_modules/util/util.js(82,26): error TS2339: Property 'traceDeprecation' does not exist on type 'Process'. +node_modules/util/util.js(106,49): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. +node_modules/util/util.js(553,69): error TS2345: Argument of type 'IArguments' is not assignable to parameter of type '[any?, ...any[]]'. + Property 'pop' is missing in type 'IArguments'. diff --git a/tests/cases/compiler/capturedLetConstInLoop1.ts b/tests/cases/compiler/capturedLetConstInLoop1.ts index e4956fd16df..4919429eec7 100644 --- a/tests/cases/compiler/capturedLetConstInLoop1.ts +++ b/tests/cases/compiler/capturedLetConstInLoop1.ts @@ -1,3 +1,5 @@ +declare function use(x: any): any; + //==== let for (let x in {}) { (function() { return x}); @@ -55,6 +57,19 @@ for (let y = 0; y < 1; ++y) { (() => x + y); } +for (let y = (use(() => y), 0); y < 1; ++y) { +} + +for (let y = 0; use(() => y), y < 1; ++y) { +} + +for (let y = 0; y < 1; use(() => y), ++y) { +} + +for (let y = (use(() => y), 0); use(() => y), y < 1; use(() => y), ++y) { + use(() => y); +} + //=========const for (const x in {}) { (function() { return x}); diff --git a/tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts b/tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts new file mode 100644 index 00000000000..2135ed5cb29 --- /dev/null +++ b/tests/cases/compiler/contextualTypeOfIndexedAccessParameter.ts @@ -0,0 +1,15 @@ +// @strict: true +type Keys = "a" | "b"; + +type OptionsForKey = { a: { cb: (p: number) => number } } & { b: {} }; + +declare function f(key: K, options: OptionsForKey[K]): void; + +f("a", { + cb: p => p, +}); + +function g< + K extends "a" | "b">(x: ({ a: string } & { b: string })[K], y: string) { + x = y; +} diff --git a/tests/cases/compiler/jsdocClassMissingTypeArguments.ts b/tests/cases/compiler/jsdocClassMissingTypeArguments.ts new file mode 100644 index 00000000000..7a8606d8237 --- /dev/null +++ b/tests/cases/compiler/jsdocClassMissingTypeArguments.ts @@ -0,0 +1,11 @@ +// @allowJs: true +// @checkJs: true +// @noEmit: true +// @noImplicitAny: true + +// @Filename: /a.js +/** @template T */ +class C {} + +/** @param {C} p */ +function f(p) {} diff --git a/tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts b/tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts new file mode 100644 index 00000000000..56f14dc6b2b --- /dev/null +++ b/tests/cases/compiler/literalFreshnessPropagationOnNarrowing.ts @@ -0,0 +1,61 @@ +function f1() { + let b = true; + let obj = { b }; + // Desired: OK + // 3.0: OK + // 3.1 as-is: OK + // 3.1 minus widening propagation: error + obj.b = false; +} + +function f2() { + type Element = (string | false); + type ElementOrArray = Element | Element[]; + let el: Element = null as any; + let arr: Element[] = null as any; + let elOrA: ElementOrArray = null as any; + + // Desired/actual: All OK + let a1: ElementOrArray = el; + let a2: ElementOrArray = arr; + let a3: ElementOrArray = [el]; + let a4: ElementOrArray = Array.isArray(elOrA) ? elOrA : [elOrA]; + + // Desired: OK + // 3.0: Error + // 3.1: OK + let a5: ElementOrArray = [...Array.isArray(elOrA) ? elOrA : [elOrA]]; +} + +function f3() { + type XY = 'x' | 'y'; + const x: XY = 'x'; + let x2 = x; + // Desired: OK (up for debate?) + // 3.0: Error + // 3.1 as-is: OK + x2 = 'y'; + + // Desired/actual: All OK + let x3: XY = x; + x3 = 'y'; +} + +function f4() { + const x: boolean = true; + let x1 = x; + // Desired: OK + // 3.0: OK + // 3.1: OK + // 3.1 minus widening propagation: error + x1 = false; +} + +function f5() { + type XY = 'x' | 'y'; + let arr: XY[] = ['x']; + arr = ['y']; + // Desired: OK + // Error in all extant branches + arr = [...['y']]; +} \ No newline at end of file diff --git a/tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts b/tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts new file mode 100644 index 00000000000..b5baa1bbe16 --- /dev/null +++ b/tests/cases/compiler/moduleResolution_automaticTypeDirectiveNames.ts @@ -0,0 +1,10 @@ +// @noImplicitReferences: true + +// @Filename: /node_modules/@types/.a/index.d.ts +declare const a: number; + +// @Filename: /node_modules/@types/a/index.d.ts +declare const a: string; + +// @Filename: /a.ts +a; diff --git a/tests/cases/compiler/moduleResolution_noLeadingDot.ts b/tests/cases/compiler/moduleResolution_noLeadingDot.ts new file mode 100644 index 00000000000..eee17136b11 --- /dev/null +++ b/tests/cases/compiler/moduleResolution_noLeadingDot.ts @@ -0,0 +1,7 @@ +// @noImplicitReferences: true + +// @Filename: /node_modules/@types/.svn/README.md +This is a test. + +// @Filename: /a.ts +true; diff --git a/tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx b/tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx index 9de13d119df..d1ee95995b9 100644 --- a/tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx +++ b/tests/cases/compiler/reactDefaultPropsInferenceSuccess.tsx @@ -6,7 +6,8 @@ import React from 'react'; interface BaseProps { - when?: (value: string) => boolean; + when?: ((value: string) => boolean) | "a" | "b"; + error?: boolean; } interface Props extends BaseProps { @@ -28,6 +29,21 @@ const Test1 = () => !!value} />; // Error: Void not assignable to boolean const Test2 = () => console.log(value)} />; +class FieldFeedbackBeta

extends React.Component

{ + static defaultProps: BaseProps = { + when: () => true + }; + + render() { + return

Hello
; + } +} + +// OK +const Test1a = () => !!value} error>Hah; + +// Error: Void not assignable to boolean +const Test2a = () => console.log(value)} error>Hah; interface MyPropsProps extends Props { when: (value: string) => boolean; diff --git a/tests/cases/compiler/strictBooleanMemberAssignability.ts b/tests/cases/compiler/strictBooleanMemberAssignability.ts new file mode 100644 index 00000000000..8b723c1de10 --- /dev/null +++ b/tests/cases/compiler/strictBooleanMemberAssignability.ts @@ -0,0 +1,7 @@ +// @strict: true +class Abc { + def: boolean + constructor() { + this.def = true + } +} \ No newline at end of file diff --git a/tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts b/tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts new file mode 100644 index 00000000000..2b089164676 --- /dev/null +++ b/tests/cases/compiler/undefinedAssignableToGenericMappedIntersection.ts @@ -0,0 +1,7 @@ +// @strict: true +type Errors = { [P in keyof T]: string | undefined } & {all: string | undefined}; +function foo() { + let obj!: Errors + let x!: keyof T; + obj[x] = undefined; +} diff --git a/tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts b/tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts new file mode 100644 index 00000000000..516c6b62774 --- /dev/null +++ b/tests/cases/conformance/controlFlow/controlFlowInstanceOfGuardPrimitives.ts @@ -0,0 +1,13 @@ +function distinguish(thing: string | number | Date) { + if (thing instanceof Object) { + console.log("Aha!! It's a Date in " + thing.getFullYear()); + } else if (typeof thing === 'string') { + console.log("Aha!! It's a string of length " + thing.length); + } else { + console.log("Aha!! It's the number " + thing.toPrecision(3)); + } +} + +distinguish(new Date()); +distinguish("beef"); +distinguish(3.14159265); \ No newline at end of file diff --git a/tests/cases/conformance/functions/strictBindCallApply1.ts b/tests/cases/conformance/functions/strictBindCallApply1.ts new file mode 100644 index 00000000000..5a94d4b5416 --- /dev/null +++ b/tests/cases/conformance/functions/strictBindCallApply1.ts @@ -0,0 +1,59 @@ +// @strict: true + +declare function foo(a: number, b: string): string; + +let f00 = foo.bind(undefined); +let f01 = foo.bind(undefined, 10); +let f02 = foo.bind(undefined, 10, "hello"); +let f03 = foo.bind(undefined, 10, 20); // Error + +let c00 = foo.call(undefined, 10, "hello"); +let c01 = foo.call(undefined, 10); // Error +let c02 = foo.call(undefined, 10, 20); // Error +let c03 = foo.call(undefined, 10, "hello", 30); // Error + +let a00 = foo.apply(undefined, [10, "hello"]); +let a01 = foo.apply(undefined, [10]); // Error +let a02 = foo.apply(undefined, [10, 20]); // Error +let a03 = foo.apply(undefined, [10, "hello", 30]); // Error + +class C { + constructor(a: number, b: string) {} + foo(this: this, a: number, b: string): string { return "" } +} + +declare let c: C; +declare let obj: {}; + +let f10 = c.foo.bind(c); +let f11 = c.foo.bind(c, 10); +let f12 = c.foo.bind(c, 10, "hello"); +let f13 = c.foo.bind(c, 10, 20); // Error +let f14 = c.foo.bind(undefined); // Error + +let c10 = c.foo.call(c, 10, "hello"); +let c11 = c.foo.call(c, 10); // Error +let c12 = c.foo.call(c, 10, 20); // Error +let c13 = c.foo.call(c, 10, "hello", 30); // Error +let c14 = c.foo.call(undefined, 10, "hello"); // Error + +let a10 = c.foo.apply(c, [10, "hello"]); +let a11 = c.foo.apply(c, [10]); // Error +let a12 = c.foo.apply(c, [10, 20]); // Error +let a13 = c.foo.apply(c, [10, "hello", 30]); // Error +let a14 = c.foo.apply(undefined, [10, "hello"]); // Error + +let f20 = C.bind(undefined); +let f21 = C.bind(undefined, 10); +let f22 = C.bind(undefined, 10, "hello"); +let f23 = C.bind(undefined, 10, 20); // Error + +C.call(c, 10, "hello"); +C.call(c, 10); // Error +C.call(c, 10, 20); // Error +C.call(c, 10, "hello", 30); // Error + +C.apply(c, [10, "hello"]); +C.apply(c, [10]); // Error +C.apply(c, [10, 20]); // Error +C.apply(c, [10, "hello", 30]); // Error diff --git a/tests/cases/conformance/jsdoc/enumTagUseBeforeDefCrash.ts b/tests/cases/conformance/jsdoc/enumTagUseBeforeDefCrash.ts new file mode 100644 index 00000000000..f8f92b7bcc1 --- /dev/null +++ b/tests/cases/conformance/jsdoc/enumTagUseBeforeDefCrash.ts @@ -0,0 +1,13 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @Filename: bug27134.js +/** + * @enum {number} + */ +var foo = { }; + +/** + * @type {foo} + */ +var s; diff --git a/tests/cases/conformance/jsdoc/jsdocBindingInUnreachableCode.ts b/tests/cases/conformance/jsdoc/jsdocBindingInUnreachableCode.ts new file mode 100644 index 00000000000..2c4accf993b --- /dev/null +++ b/tests/cases/conformance/jsdoc/jsdocBindingInUnreachableCode.ts @@ -0,0 +1,11 @@ +// @allowJs: true +// @noEmit: true +// @checkJs: true +// @Filename: bug27341.js +if (false) { + /** + * @param {string} s + */ + const x = function (s) { + }; +} diff --git a/tests/cases/conformance/salsa/moduleExportAliasUnknown.ts b/tests/cases/conformance/salsa/moduleExportAliasUnknown.ts new file mode 100644 index 00000000000..f2fdb384e61 --- /dev/null +++ b/tests/cases/conformance/salsa/moduleExportAliasUnknown.ts @@ -0,0 +1,6 @@ +// @allowJs: true +// @noEmit: true +// @checkJs: true +// @Filename: bug27025.js +module.exports = window.nonprop; +exports.foo = bar; diff --git a/tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts b/tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts new file mode 100644 index 00000000000..0e60c78621e --- /dev/null +++ b/tests/cases/conformance/salsa/typeFromPropertyAssignment37.ts @@ -0,0 +1,15 @@ +// @noEmit: true +// @allowJs: true +// @checkJs: true +// @Filename: mod.js +const util = exports = module.exports = {} +if (!!false) { + util.existy = function () { } +} + +// @Filename: use.js +const util = require('./mod') +function n() { + util.existy // no error +} +util.existy // no error diff --git a/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts b/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts new file mode 100644 index 00000000000..81ef725a45b --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionAwaitOperand.ts @@ -0,0 +1,11 @@ +// @target: esnext +// @noImplicitAny: true +// @noEmit: true + +interface Obj { key: "value"; } + +async function fn1(): Promise { + const obj1: Obj = await { key: "value" }; + const obj2: Obj = await new Promise(resolve => resolve({ key: "value" })); + return await { key: "value" }; +} diff --git a/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts b/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts new file mode 100644 index 00000000000..b2239b9bda6 --- /dev/null +++ b/tests/cases/conformance/types/contextualTypes/asyncFunctions/contextuallyTypeAsyncFunctionReturnType.ts @@ -0,0 +1,25 @@ +// @target: esnext +// @noImplicitAny: true +// @noEmit: true + +interface Obj { key: "value"; } + +async function fn1(): Promise { + return { key: "value" }; +} + +async function fn2(): Promise { + return new Promise(resolve => { + resolve({ key: "value" }); + }); +} + +async function fn3(): Promise { + return await { key: "value" }; +} + +async function fn4(): Promise { + return await new Promise(resolve => { + resolve({ key: "value" }); + }); +} \ No newline at end of file diff --git a/tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts b/tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts index 4537e09a048..8b5157250b8 100644 --- a/tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts +++ b/tests/cases/conformance/types/forAwait/types.forAwait.esnext.1.ts @@ -3,16 +3,21 @@ // @noEmit: true declare const asyncIterable: AsyncIterable; declare const iterable: Iterable; +declare const iterableOfPromise: Iterable>; async function f1() { let y: number; for await (const x of asyncIterable) { } for await (const x of iterable) { } + for await (const x of iterableOfPromise) { + } for await (y of asyncIterable) { } for await (y of iterable) { } + for await (y of iterableOfPromise) { + } } async function * f2() { let y: number; @@ -20,8 +25,12 @@ async function * f2() { } for await (const x of iterable) { } + for await (const x of iterableOfPromise) { + } for await (y of asyncIterable) { } for await (y of iterable) { } + for await (y of iterableOfPromise) { + } } \ No newline at end of file diff --git a/tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts b/tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts new file mode 100644 index 00000000000..c0e2ee497d0 --- /dev/null +++ b/tests/cases/conformance/types/typeRelationships/typeInference/bivariantInferences.ts @@ -0,0 +1,12 @@ +// @strict: true + +// Repro from #27337 + +interface Array { + equalsShallow(this: ReadonlyArray, other: ReadonlyArray): boolean; +} + +declare const a: (string | number)[] | null[] | undefined[] | {}[]; +declare const b: (string | number)[] | null[] | undefined[] | {}[]; + +let x = a.equalsShallow(b); diff --git a/tests/cases/fourslash/completionForStringLiteralNonrelativeImport13.ts b/tests/cases/fourslash/completionForStringLiteralNonrelativeImport13.ts index d1e67ae9a90..59b2d7a9539 100644 --- a/tests/cases/fourslash/completionForStringLiteralNonrelativeImport13.ts +++ b/tests/cases/fourslash/completionForStringLiteralNonrelativeImport13.ts @@ -8,7 +8,7 @@ //// "version": "1.0.0", //// "types": "index", //// "typesVersions": { -//// "3.0": { "*" : ["ts3.0/*"] } +//// ">=3.1.0-0": { "*" : ["ts3.1/*"] } //// } //// } @@ -18,10 +18,10 @@ // @Filename: node_modules/ext/aaa.d.ts //// export {}; -// @Filename: node_modules/ext/ts3.0/index.d.ts +// @Filename: node_modules/ext/ts3.1/index.d.ts //// export {}; -// @Filename: node_modules/ext/ts3.0/zzz.d.ts +// @Filename: node_modules/ext/ts3.1/zzz.d.ts //// export {}; // @Filename: main.ts @@ -31,6 +31,6 @@ verify.completions({ marker: test.markerNames(), - exact: ["aaa", "index", "ts3.0", "zzz"], + exact: ["aaa", "index", "ts3.1", "zzz"], isNewIdentifierLocation: true, }); diff --git a/tests/cases/fourslash/completionsAfterAsyncInObjectLiteral.ts b/tests/cases/fourslash/completionsAfterAsyncInObjectLiteral.ts new file mode 100644 index 00000000000..fa1d9a60fc6 --- /dev/null +++ b/tests/cases/fourslash/completionsAfterAsyncInObjectLiteral.ts @@ -0,0 +1,5 @@ +/// + +////const x: { m(): Promise } = { async /**/ }; + +verify.completions({ marker: "", exact: "m" }); diff --git a/tests/cases/fourslash/completionsTriggerCharacter.ts b/tests/cases/fourslash/completionsTriggerCharacter.ts index a58ff2edc5f..ad3d633371f 100644 --- a/tests/cases/fourslash/completionsTriggerCharacter.ts +++ b/tests/cases/fourslash/completionsTriggerCharacter.ts @@ -2,6 +2,7 @@ // @jsx: preserve +/////** @/*tag*/ */ ////// string", ranges: [r1] }, ]); -verify.rangesAreRenameLocations(); +verify.renameLocations(r0, [r0, { range: r1, suffixText: ": bar" }]); +verify.renameLocations(r1, [{ range: r1, prefixText: "bar: " }]) diff --git a/tests/cases/fourslash/findAllRefsDestructureGetter.ts b/tests/cases/fourslash/findAllRefsDestructureGetter.ts index b21e6186eb2..763d3cfb0e5 100644 --- a/tests/cases/fourslash/findAllRefsDestructureGetter.ts +++ b/tests/cases/fourslash/findAllRefsDestructureGetter.ts @@ -9,14 +9,16 @@ ////[|x|]; [|y|]; const [x0, y0, x1, y1, x2, y2] = test.ranges(); -verify.referenceGroups(x0, [{ definition: "(property) Test.x: number", ranges: [x0, x1, x2] }]); -verify.referenceGroups([x1, x2], [ +verify.referenceGroups(x0, [{ definition: "(property) Test.x: number", ranges: [x0, x1] }]); +verify.referenceGroups(x1, [ { definition: "(property) Test.x: number", ranges: [x0] }, { definition: "const x: number", ranges: [x1, x2] }, ]); +verify.referenceGroups(x2, [{ definition: "const x: number", ranges: [x1, x2] }]); -verify.referenceGroups(y0, [{ definition: "(property) Test.y: number", ranges: [y0, y1, y2] }]); -verify.referenceGroups([y1, y2], [ +verify.referenceGroups(y0, [{ definition: "(property) Test.y: number", ranges: [y0, y1] }]); +verify.referenceGroups(y1, [ { definition: "(property) Test.y: number", ranges: [y0] }, { definition: "const y: number", ranges: [y1, y2] }, ]); +verify.referenceGroups(y2, [{ definition: "const y: number", ranges: [y1, y2] }]); diff --git a/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName04.ts b/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName04.ts index fe0d659f0ec..c3bebdb2623 100644 --- a/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName04.ts +++ b/tests/cases/fourslash/findAllRefsObjectBindingElementPropertyName04.ts @@ -14,9 +14,9 @@ const ranges = test.ranges(); const [r0, r1, r2, r3] = ranges; -verify.referenceGroups([r0, r1], [{ definition: "(property) I.property1: number", ranges }]); -verify.referenceGroups([r2, r3], [ +verify.referenceGroups([r0, r1], [{ definition: "(property) I.property1: number", ranges: [r0, r1, r2] }]); +verify.referenceGroups(r2, [ { definition: "(property) I.property1: number", ranges: [r0, r1] }, - { definition: "var property1: number", ranges: [r2, r3] } + { definition: "var property1: number", ranges: [r2, r3] }, ]); - +verify.referenceGroups(r3, [{ definition: "var property1: number", ranges: [r2, r3] }]); diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index e254b2b51db..4603d61a286 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -317,7 +317,7 @@ declare namespace FourSlashInterface { }[]): void; renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string, fileToRename?: string, range?: Range): void; renameInfoFailed(message?: string): void; - renameLocations(startRanges: ArrayOrSingle, options: Range[] | { findInStrings?: boolean, findInComments?: boolean, ranges: Range[] }): void; + renameLocations(startRanges: ArrayOrSingle, options: RenameLocationsOptions): void; /** Verify the quick info available at the current marker. */ quickInfoIs(expectedText: string, expectedDocumentation?: string): void; @@ -648,6 +648,13 @@ declare namespace FourSlashInterface { type ArrayOrSingle = T | ReadonlyArray; type NewFileContent = string | { readonly [fileName: string]: string }; + + type RenameLocationsOptions = ReadonlyArray | { + readonly findInStrings?: boolean; + readonly findInComments?: boolean; + readonly ranges: ReadonlyArray; + } + type RenameLocationOptions = Range | { readonly range: Range, readonly prefixText?: string, readonly suffixText?: string }; } declare function verifyOperationIsCancelled(f: any): void; declare var test: FourSlashInterface.test_; diff --git a/tests/cases/fourslash/getOccurrencesIsDefinitionOfBindingPattern.ts b/tests/cases/fourslash/getOccurrencesIsDefinitionOfBindingPattern.ts index 58814b45e99..32fec74d162 100644 --- a/tests/cases/fourslash/getOccurrencesIsDefinitionOfBindingPattern.ts +++ b/tests/cases/fourslash/getOccurrencesIsDefinitionOfBindingPattern.ts @@ -3,8 +3,8 @@ ////const z = [|x|]; const [r0, r1, r2] = test.ranges(); -verify.referenceGroups([r0, r2], [ - { definition: "const x: number", ranges: [r0, r2] }, - { definition: "(property) x: number", ranges: [r1] }, -]); -verify.referenceGroups(r1, [{ definition: "(property) x: number", ranges: [r0, r1, r2] }]); +const local = { definition: "const x: number", ranges: [r0, r2] }; +const prop = { definition: "(property) x: number", ranges: [r1] }; +verify.referenceGroups(r0, [local, prop]); +verify.referenceGroups(r1, [{ ...prop, ranges: [r0, r1] }]); +verify.referenceGroups(r2, [local]); diff --git a/tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions.ts b/tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions.ts index c0753bc7159..23fe81fe48e 100644 --- a/tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions.ts +++ b/tests/cases/fourslash/navigationBarAnonymousClassAndFunctionExpressions.ts @@ -18,6 +18,8 @@ //// // These will only show up as childItems. //// function z() {} //// console.log(function() {}) +//// describe("this", 'function', () => {}); +//// [].map(() => {}); ////}) ////(function classes() { //// // Classes show up in top-level regardless of whether they have names or inner declarations. @@ -71,7 +73,15 @@ verify.navigationTree({ "kind": "function", "childItems": [ { - "text": "", + "text": "console.log() callback", + "kind": "function" + }, + { + "text": `describe("this", 'function') callback`, + "kind": "function" + }, + { + "text": `map() callback`, "kind": "function" }, { @@ -185,7 +195,15 @@ verify.navigationBar([ "kind": "function", "childItems": [ { - "text": "", + "text": "console.log() callback", + "kind": "function" + }, + { + "text": `describe("this", 'function') callback`, + "kind": "function" + }, + { + "text": `map() callback`, "kind": "function" }, { diff --git a/tests/cases/fourslash/renameDestructuringAssignmentInFor.ts b/tests/cases/fourslash/renameDestructuringAssignmentInFor.ts index 0ef6f672e00..2c8ad51f486 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentInFor.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentInFor.ts @@ -6,13 +6,15 @@ ////} ////var elems: I[]; //// -////var p2: number, property1: number; +////var p2: number, [|property1|]: number; ////for ({ [|property1|] } = elems[0]; p2 < 100; p2++) { -//// p2 = property1++; +//// p2 = [|property1|]++; ////} ////for ({ [|property1|]: p2 } = elems[0]; p2 < 100; p2++) { ////} +verify.noErrors(); const ranges = test.ranges(); -const [r0, , r2] = ranges; -verify.renameLocations([r0, r2], ranges); +const [r0, r1, r2, r3, r4] = ranges; +verify.renameLocations([r0, r4], [r0, { range: r2, suffixText: ": property1" }, r4]); +verify.renameLocations([r1, r2, r3], [r1, { range: r2, prefixText: "property1: " }, r3]); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentInFor2.ts b/tests/cases/fourslash/renameDestructuringAssignmentInFor2.ts deleted file mode 100644 index 17173d0da4d..00000000000 --- a/tests/cases/fourslash/renameDestructuringAssignmentInFor2.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// - -////interface I { -//// [|property1|]: number; -//// property2: string; -////} -////var elems: I[]; -//// -////var p2: number, [|property1|]: number; -////for ({ [|property1|] } = elems[0]; p2 < 100; p2++) { -//// p2 = [|property1|]++; -////} -////for ({ [|property1|]: p2 } = elems[0]; p2 < 100; p2++) { -////} - -const ranges = test.ranges(); -const [r0, r1, r2, r3, r4] = ranges; -verify.renameLocations([r0, r4], [r0, r2, r4]); -verify.renameLocations([r1, r3], [r1, r2, r3]); -verify.renameLocations(r2, ranges); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentInForOf.ts b/tests/cases/fourslash/renameDestructuringAssignmentInForOf.ts index b452ca7c9a7..38703a68b99 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentInForOf.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentInForOf.ts @@ -6,13 +6,15 @@ ////} ////var elems: I[]; //// -////var property1: number, p2: number; +////var [|property1|]: number, p2: number; ////for ({ [|property1|] } of elems) { -//// property1++; +//// [|property1|]++; ////} ////for ({ [|property1|]: p2 } of elems) { ////} +verify.noErrors(); const ranges = test.ranges(); -const [r0, , r2] = ranges; -verify.renameLocations([r0, r2], ranges); +const [r0, r1, r2, r3, r4] = ranges; +verify.renameLocations([r0, r4], [r0, { range: r2, suffixText: ": property1" }, r4]); +verify.renameLocations([r1, r2, r3], [r1, { range: r2, prefixText: "property1: " }, r3]); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentInForOf2.ts b/tests/cases/fourslash/renameDestructuringAssignmentInForOf2.ts deleted file mode 100644 index b7432e08a26..00000000000 --- a/tests/cases/fourslash/renameDestructuringAssignmentInForOf2.ts +++ /dev/null @@ -1,20 +0,0 @@ -/// - -////interface I { -//// [|property1|]: number; -//// property2: string; -////} -////var elems: I[]; -//// -////var [|property1|]: number, p2: number; -////for ({ [|property1|] } of elems) { -//// [|property1|]++; -////} -////for ({ [|property1|]: p2 } of elems) { -////} - -const ranges = test.ranges(); -const [r0, r1, r2, r3, r4] = ranges; -verify.renameLocations([r0, r4], [r0, r2, r4]); -verify.renameLocations([r1, r3], [r1, r2, r3]); -verify.renameLocations(r2, ranges); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral.ts index 57191e6d6ab..292aaf1bf6d 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral.ts @@ -4,10 +4,12 @@ //// [|property1|]: number; //// property2: string; ////} -////var elems: I[], p1: number, property1: number; +////var elems: I[], p1: number, [|property1|]: number; ////[{ [|property1|]: p1 }] = elems; ////[{ [|property1|] }] = elems; const ranges = test.ranges(); -const [r0, r1] = ranges; -verify.renameLocations([r0, r1], ranges); +const [r0, r1, r2, r3] = ranges; +verify.renameLocations([r0, r2], [r0, r2, { range: r3, suffixText: ": property1" }]); +verify.renameLocations([r1, r3], [r1, { range: r3, prefixText: "property1: " }]); + diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral2.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral2.ts deleted file mode 100644 index 1f18c443ca6..00000000000 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInArrayLiteral2.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// - -////interface I { -//// [|property1|]: number; -//// property2: string; -////} -////var elems: I[], p1: number, [|property1|]: number; -////[{ [|property1|]: p1 }] = elems; -////[{ [|property1|] }] = elems; - -const ranges = test.ranges(); -const [r0, r1, r2, r3] = ranges; -verify.renameLocations([r0, r2], [r0, r2, r3]); -verify.renameLocations(r1, [r1, r3]); -verify.renameLocations(r3, ranges); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor.ts index fe8961aa18c..e83487d15d2 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor.ts @@ -7,14 +7,16 @@ //// secondary: string; //// }; ////} -////let multiRobot: MultiRobot; +////let multiRobot: MultiRobot, [|primary|]: string, secondary: string, primaryA: string, secondaryA: string, i: number; ////for ({ skills: { [|primary|]: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { -//// console.log(primaryA); +//// primaryA; ////} ////for ({ skills: { [|primary|], secondary } } = multiRobot, i = 0; i < 1; i++) { -//// console.log(primary); +//// [|primary|]; ////} +verify.noErrors(); const ranges = test.ranges(); -const [r0, r1] = ranges; -verify.renameLocations([r0, r1], ranges); +const [r0, r1, r2, r3, r4] = ranges; +verify.renameLocations([r0, r2], [r0, r2, { range: r3, suffixText: ": primary" }]); +verify.renameLocations([r1, r3, r4], [r1, { range: r3, prefixText: "primary: " }, r4]); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor2.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor2.ts index c5e7212c99b..e83487d15d2 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor2.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentNestedInFor2.ts @@ -7,16 +7,16 @@ //// secondary: string; //// }; ////} -////let multiRobot: MultiRobot, [|primary|]: string; +////let multiRobot: MultiRobot, [|primary|]: string, secondary: string, primaryA: string, secondaryA: string, i: number; ////for ({ skills: { [|primary|]: primaryA, secondary: secondaryA } } = multiRobot, i = 0; i < 1; i++) { -//// console.log(primaryA); +//// primaryA; ////} ////for ({ skills: { [|primary|], secondary } } = multiRobot, i = 0; i < 1; i++) { -//// console.log([|primary|]); +//// [|primary|]; ////} +verify.noErrors(); const ranges = test.ranges(); const [r0, r1, r2, r3, r4] = ranges; -verify.renameLocations([r0, r2], [r0, r2, r3]); -verify.renameLocations([r1, r4], [r1, r3, r4]); -verify.renameLocations(r3, ranges); +verify.renameLocations([r0, r2], [r0, r2, { range: r3, suffixText: ": primary" }]); +verify.renameLocations([r1, r3, r4], [r1, { range: r3, prefixText: "primary: " }, r4]); diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf.ts index 7d057600748..6a9eb6235b7 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf.ts @@ -8,13 +8,15 @@ //// }; ////} ////let multiRobots: MultiRobot[]; +////let [|primary|]: string, secondary: string, primaryA: string, secondaryA: string; ////for ({ skills: { [|primary|]: primaryA, secondary: secondaryA } } of multiRobots) { -//// console.log(primaryA); +//// primaryA; ////} ////for ({ skills: { [|primary|], secondary } } of multiRobots) { -//// console.log(primary); +//// [|primary|]; ////} -const ranges = test.ranges(); -const [r0, r1] = ranges; -verify.renameLocations([r0, r1], ranges); +verify.noErrors(); +const [r0, r1, r2, r3, r4] = test.ranges(); +verify.renameLocations([r0, r2], [r0, r2, { range: r3, suffixText: ": primary" }]); +verify.renameLocations([r1, r3, r4], [r1, { range: r3, prefixText: "primary: " }, r4]) diff --git a/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf2.ts b/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf2.ts index 74dfda39bc2..7c5c288ea78 100644 --- a/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf2.ts +++ b/tests/cases/fourslash/renameDestructuringAssignmentNestedInForOf2.ts @@ -17,6 +17,5 @@ const ranges = test.ranges(); const [r0, r1, r2, r3, r4] = ranges; -verify.renameLocations([r0, r2], [r0, r2, r3]); -verify.renameLocations([r1, r4], [r1, r3, r4]); -verify.renameLocations(r3, ranges); +verify.renameLocations([r0, r2], [r0, r2, { range: r3, suffixText: ": primary" }]); +verify.renameLocations([r1, r3, r4], [r1, { range: r3, prefixText: "primary: " }, r4]); diff --git a/tests/cases/fourslash/renameDestructuringClassProperty.ts b/tests/cases/fourslash/renameDestructuringClassProperty.ts index 11261a4df78..ac708e55471 100644 --- a/tests/cases/fourslash/renameDestructuringClassProperty.ts +++ b/tests/cases/fourslash/renameDestructuringClassProperty.ts @@ -16,4 +16,7 @@ //// } ////} -verify.rangesAreRenameLocations(); +const [r0, r1, r2, r3, r4] = test.ranges(); +verify.renameLocations([r0, r2], [r0, { range: r1, suffixText: ": foo" }, r2, { range: r3, suffixText: ": foo" }]); +verify.renameLocations(r1, [{ range: r1, prefixText: "foo: " }]); +verify.renameLocations([r3, r4], [{ range: r3, prefixText: "foo: " }, r4]); diff --git a/tests/cases/fourslash/renameDestructuringDeclarationInFor.ts b/tests/cases/fourslash/renameDestructuringDeclarationInFor.ts index 0338433ae72..02bc0f50826 100644 --- a/tests/cases/fourslash/renameDestructuringDeclarationInFor.ts +++ b/tests/cases/fourslash/renameDestructuringDeclarationInFor.ts @@ -13,4 +13,6 @@ //// [|property1|] = p2; ////} -verify.rangesAreRenameLocations(); +const [r0, r1, r2, r3] = test.ranges(); +verify.renameLocations([r0, r1], [r0, r1, { range: r2, suffixText: ": property1" }]); +verify.renameLocations([r2, r3], [{ range: r2, prefixText: "property1: " }, r3]); diff --git a/tests/cases/fourslash/renameDestructuringDeclarationInForOf.ts b/tests/cases/fourslash/renameDestructuringDeclarationInForOf.ts index fcd55a5bc20..a8e21c83cf3 100644 --- a/tests/cases/fourslash/renameDestructuringDeclarationInForOf.ts +++ b/tests/cases/fourslash/renameDestructuringDeclarationInForOf.ts @@ -12,4 +12,6 @@ ////for (let { [|property1|]: p2 } of elems) { ////} -verify.rangesAreRenameLocations(); +const [r0, r1, r2, r3] = test.ranges(); +verify.renameLocations([r0, r3], [r0, { range: r1, suffixText: ": property1" }, r3]); +verify.renameLocations([r1, r2], [{ range: r1, prefixText: "property1: " }, r2]); diff --git a/tests/cases/fourslash/renameDestructuringFunctionParameter.ts b/tests/cases/fourslash/renameDestructuringFunctionParameter.ts index 4abbabc3723..d6a732176d2 100644 --- a/tests/cases/fourslash/renameDestructuringFunctionParameter.ts +++ b/tests/cases/fourslash/renameDestructuringFunctionParameter.ts @@ -4,4 +4,8 @@ //// f({[|a|]}); ////} -verify.rangesAreRenameLocations(); +const [r0, r1, r2] = test.ranges(); +// renames the local +verify.renameLocations([r0, r2], [{ range: r0, prefixText: "a: " }, { range: r2, prefixText: "a: " }]); +// renames the property +verify.renameLocations(r1, [{ range: r0, suffixText: ": a" }, r1, { range: r2, suffixText: ": a" }]); diff --git a/tests/cases/fourslash/renameDestructuringNestedBindingElement.ts b/tests/cases/fourslash/renameDestructuringNestedBindingElement.ts index 7557744ecee..6643382f6c9 100644 --- a/tests/cases/fourslash/renameDestructuringNestedBindingElement.ts +++ b/tests/cases/fourslash/renameDestructuringNestedBindingElement.ts @@ -15,4 +15,6 @@ //// console.log([|primary|]); ////} -verify.rangesAreRenameLocations(); +const [r0, r1, r2, r3] = test.ranges(); +verify.renameLocations([r0, r1], [r0, r1, { range: r2, suffixText: ": primary" }]); +verify.renameLocations([r2, r3], [{ range: r2, prefixText: "primary: " }, r3]); diff --git a/tests/cases/fourslash/renameImportAndShorthand.ts b/tests/cases/fourslash/renameImportAndShorthand.ts index 4836d8c14fe..01be6650b3b 100644 --- a/tests/cases/fourslash/renameImportAndShorthand.ts +++ b/tests/cases/fourslash/renameImportAndShorthand.ts @@ -3,4 +3,5 @@ ////import [|foo|] from 'bar'; ////const bar = { [|foo|] }; -verify.rangesAreRenameLocations(); +const [r0, r1] = test.ranges(); +verify.renameLocations([r0, r1], [r0, { range: r1, prefixText: "foo: " }]); diff --git a/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts b/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts index 21cdc0fa820..e577d82d3ae 100644 --- a/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts +++ b/tests/cases/fourslash/renameImportNamespaceAndShorthand.ts @@ -3,4 +3,5 @@ ////import * as [|foo|] from 'bar'; ////const bar = { [|foo|] }; -verify.rangesAreRenameLocations(); +const [r0, r1] = test.ranges(); +verify.renameLocations([r0, r1], [r0, { range: r1, prefixText: "foo: " }]); diff --git a/tests/cases/fourslash/renameImportRequire.ts b/tests/cases/fourslash/renameImportRequire.ts index 8a9aeebc328..bf29a0999b1 100644 --- a/tests/cases/fourslash/renameImportRequire.ts +++ b/tests/cases/fourslash/renameImportRequire.ts @@ -5,4 +5,6 @@ ////a = { [|e|] }; ////export { [|e|] }; -verify.rangesAreRenameLocations(); +const [r0, r1, r2, r3] = test.ranges(); +//TODO: export should have prefix/suffix too +verify.renameLocations([r0, r1, r2, r3], [r0, r1, { range: r2, prefixText: "e: " }, r3]); diff --git a/tests/cases/fourslash/renameParameterPropertyDeclaration4.ts b/tests/cases/fourslash/renameParameterPropertyDeclaration4.ts index ca201d28b2c..292c82a2d52 100644 --- a/tests/cases/fourslash/renameParameterPropertyDeclaration4.ts +++ b/tests/cases/fourslash/renameParameterPropertyDeclaration4.ts @@ -6,4 +6,5 @@ //// } //// } -verify.rangesAreRenameLocations(); +const [r0, r1] = test.ranges(); +verify.renameLocations([r0, r1], [{ range: r0, prefixText: "protectedParam: " }, r1]); diff --git a/tests/projects/empty-files/core/tsconfig.json b/tests/projects/empty-files/core/tsconfig.json index 0e8205977dd..bbbd3aa889f 100644 --- a/tests/projects/empty-files/core/tsconfig.json +++ b/tests/projects/empty-files/core/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "composite": true, "declaration": true, - "declarationMap": true + "declarationMap": true, + "skipDefaultLibCheck": true } } diff --git a/tests/projects/empty-files/no-references/tsconfig.json b/tests/projects/empty-files/no-references/tsconfig.json index c6b8f1a43d7..719a64cff48 100644 --- a/tests/projects/empty-files/no-references/tsconfig.json +++ b/tests/projects/empty-files/no-references/tsconfig.json @@ -4,6 +4,7 @@ "compilerOptions": { "composite": true, "declaration": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true } } diff --git a/tests/projects/empty-files/with-references/tsconfig.json b/tests/projects/empty-files/with-references/tsconfig.json index 3a55cad1b1c..d4179967205 100644 --- a/tests/projects/empty-files/with-references/tsconfig.json +++ b/tests/projects/empty-files/with-references/tsconfig.json @@ -6,6 +6,7 @@ "compilerOptions": { "composite": true, "declaration": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true } } diff --git a/tests/projects/outfile-concat/first/tsconfig.json b/tests/projects/outfile-concat/first/tsconfig.json index 8d63a0c4a06..625e7a7d038 100644 --- a/tests/projects/outfile-concat/first/tsconfig.json +++ b/tests/projects/outfile-concat/first/tsconfig.json @@ -6,7 +6,8 @@ "strict": false, "sourceMap": true, "declarationMap": true, - "outFile": "./bin/first-output.js" + "outFile": "./bin/first-output.js", + "skipDefaultLibCheck": true }, "files": [ "first_PART1.ts", diff --git a/tests/projects/outfile-concat/second/tsconfig.json b/tests/projects/outfile-concat/second/tsconfig.json index d835cff6d66..7ea38db3486 100644 --- a/tests/projects/outfile-concat/second/tsconfig.json +++ b/tests/projects/outfile-concat/second/tsconfig.json @@ -7,7 +7,8 @@ "sourceMap": true, "declarationMap": true, "declaration": true, - "outFile": "../2/second-output.js" + "outFile": "../2/second-output.js", + "skipDefaultLibCheck": true }, "references": [ ] diff --git a/tests/projects/outfile-concat/third/tsconfig.json b/tests/projects/outfile-concat/third/tsconfig.json index fef85ce8927..efaea2dc603 100644 --- a/tests/projects/outfile-concat/third/tsconfig.json +++ b/tests/projects/outfile-concat/third/tsconfig.json @@ -7,7 +7,8 @@ "sourceMap": true, "declarationMap": true, "declaration": true, - "outFile": "./thirdjs/output/third-output.js" + "outFile": "./thirdjs/output/third-output.js", + "skipDefaultLibCheck": true }, "files": [ "third_part1.ts" diff --git a/tests/projects/projectReferenceWithRootDirInParent/src/main/a.ts b/tests/projects/projectReferenceWithRootDirInParent/src/main/a.ts new file mode 100644 index 00000000000..bacd116a1bb --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/src/main/a.ts @@ -0,0 +1,2 @@ +import { b } from './b'; +const a = b; \ No newline at end of file diff --git a/tests/projects/projectReferenceWithRootDirInParent/src/main/b.ts b/tests/projects/projectReferenceWithRootDirInParent/src/main/b.ts new file mode 100644 index 00000000000..8ff56d7eca4 --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/src/main/b.ts @@ -0,0 +1 @@ +export const b = 0; diff --git a/tests/projects/projectReferenceWithRootDirInParent/src/main/tsconfig.json b/tests/projects/projectReferenceWithRootDirInParent/src/main/tsconfig.json new file mode 100644 index 00000000000..deb6cd7b9ba --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/src/main/tsconfig.json @@ -0,0 +1,6 @@ +{ + "extends": "../../tsconfig.base.json", + "references": [ + { "path": "../other" } + ] +} \ No newline at end of file diff --git a/tests/projects/projectReferenceWithRootDirInParent/src/other/other.ts b/tests/projects/projectReferenceWithRootDirInParent/src/other/other.ts new file mode 100644 index 00000000000..002e06d5821 --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/src/other/other.ts @@ -0,0 +1 @@ +export const Other = 0; diff --git a/tests/projects/projectReferenceWithRootDirInParent/src/other/tsconfig.json b/tests/projects/projectReferenceWithRootDirInParent/src/other/tsconfig.json new file mode 100644 index 00000000000..fdf102617fa --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/src/other/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.base.json" +} \ No newline at end of file diff --git a/tests/projects/projectReferenceWithRootDirInParent/tsconfig.base.json b/tests/projects/projectReferenceWithRootDirInParent/tsconfig.base.json new file mode 100644 index 00000000000..be7756d8bc2 --- /dev/null +++ b/tests/projects/projectReferenceWithRootDirInParent/tsconfig.base.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "rootDir": "./src/", + "outDir": "./dist/", + "skipDefaultLibCheck": true + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withFiles.json b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withFiles.json index 14a0614cb35..71097850dbf 100644 --- a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withFiles.json +++ b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withFiles.json @@ -7,7 +7,8 @@ "resolveJsonModule": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "outDir": "dist" + "outDir": "dist", + "skipDefaultLibCheck": true }, "files": [ "src/index.ts", "src/hello.json" diff --git a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withInclude.json b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withInclude.json index b65aa324446..5efdbe28ac4 100644 --- a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withInclude.json +++ b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withInclude.json @@ -7,7 +7,8 @@ "resolveJsonModule": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "outDir": "dist" + "outDir": "dist", + "skipDefaultLibCheck": true }, "include": [ "src/**/*" diff --git a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withIncludeAndFiles.json b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withIncludeAndFiles.json index c9819ed3ca1..f50c629bac5 100644 --- a/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withIncludeAndFiles.json +++ b/tests/projects/resolveJsonModuleAndComposite/tests/tsconfig_withIncludeAndFiles.json @@ -7,7 +7,8 @@ "resolveJsonModule": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "outDir": "dist" + "outDir": "dist", + "skipDefaultLibCheck": true }, "files": [ "src/hello.json" diff --git a/tests/projects/sample1/core/tsconfig.json b/tests/projects/sample1/core/tsconfig.json index 24b64bc7b2c..316de7dfdee 100644 --- a/tests/projects/sample1/core/tsconfig.json +++ b/tests/projects/sample1/core/tsconfig.json @@ -2,6 +2,7 @@ "compilerOptions": { "composite": true, "declaration": true, - "declarationMap": true + "declarationMap": true, + "skipDefaultLibCheck": true } } \ No newline at end of file diff --git a/tests/projects/sample1/logic/tsconfig.json b/tests/projects/sample1/logic/tsconfig.json index 939e6f5659b..13d6bb3a188 100644 --- a/tests/projects/sample1/logic/tsconfig.json +++ b/tests/projects/sample1/logic/tsconfig.json @@ -3,7 +3,8 @@ "composite": true, "declaration": true, "sourceMap": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true }, "references": [ { "path": "../core" } diff --git a/tests/projects/sample1/tests/tsconfig.json b/tests/projects/sample1/tests/tsconfig.json index c686b3824ab..c49e3a30e2d 100644 --- a/tests/projects/sample1/tests/tsconfig.json +++ b/tests/projects/sample1/tests/tsconfig.json @@ -7,6 +7,7 @@ "compilerOptions": { "composite": true, "declaration": true, - "forceConsistentCasingInFileNames": true + "forceConsistentCasingInFileNames": true, + "skipDefaultLibCheck": true } } \ No newline at end of file diff --git a/tests/projects/sample1/ui/tsconfig.json b/tests/projects/sample1/ui/tsconfig.json index d843e35c549..0894bd94ade 100644 --- a/tests/projects/sample1/ui/tsconfig.json +++ b/tests/projects/sample1/ui/tsconfig.json @@ -1,4 +1,7 @@ { + "compilerOptions": { + "skipDefaultLibCheck": true + }, "references": [ { "path": "../logic/index" } ]