diff --git a/Jakefile.js b/Jakefile.js index 5779d75022f..ea8dc5e0328 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -11,11 +11,7 @@ var ts = require("./lib/typescript"); // Variables var compilerDirectory = "src/compiler/"; -var servicesDirectory = "src/services/"; var serverDirectory = "src/server/"; -var typingsInstallerDirectory = "src/server/typingsInstaller"; -var cancellationTokenDirectory = "src/server/cancellationToken"; -var watchGuardDirectory = "src/server/watchGuard"; var harnessDirectory = "src/harness/"; var libraryDirectory = "src/lib/"; var scriptsDirectory = "scripts/"; @@ -131,6 +127,7 @@ var harnessSources = harnessCoreSources.concat([ "matchFiles.ts", "initializeTSConfig.ts", "printer.ts", + "textChanges.ts", "transform.ts", "customTransforms.ts", ].map(function (f) { diff --git a/README.md b/README.md index 2f631439eb0..d21e558360c 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ with any additional questions or comments. ## Documentation -* [Quick tutorial](http://www.typescriptlang.org/Tutorial) -* [Programming handbook](http://www.typescriptlang.org/Handbook) +* [Quick tutorial](http://www.typescriptlang.org/docs/tutorial.html) +* [Programming handbook](http://www.typescriptlang.org/docs/handbook/basic-types.html) * [Language specification](https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md) * [Homepage](http://www.typescriptlang.org/) @@ -95,4 +95,4 @@ node built/local/tsc.js hello.ts ## Roadmap -For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap). \ No newline at end of file +For details on our planned features and future direction please refer to our [roadmap](https://github.com/Microsoft/TypeScript/wiki/Roadmap). diff --git a/issue_template.md b/issue_template.md index 4d397a0afd6..29190e79763 100644 --- a/issue_template.md +++ b/issue_template.md @@ -2,7 +2,7 @@ -**TypeScript Version:** 2.1.1 / nightly (2.2.0-dev.201xxxxx) +**TypeScript Version:** 2.2.1 / nightly (2.2.0-dev.201xxxxx) **Code** diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 418905e604c..650797c6dba 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -2332,6 +2332,7 @@ namespace ts { function bindThisPropertyAssignment(node: BinaryExpression) { Debug.assert(isInJavaScriptFile(node)); + const container = getThisContainer(node, /*includeArrowFunctions*/false); switch (container.kind) { case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: @@ -2342,6 +2343,7 @@ namespace ts { break; case SyntaxKind.Constructor: + case SyntaxKind.PropertyDeclaration: case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index f36f471ee75..00498191f28 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3973,7 +3973,7 @@ namespace ts { return true; } if (type.flags & TypeFlags.TypeVariable) { - const constraint = getBaseConstraintOfType(type); + const constraint = getBaseConstraintOfType(type); return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint); } return false; @@ -4989,16 +4989,32 @@ namespace ts { } function getConstraintOfType(type: TypeVariable | UnionOrIntersectionType): Type { - return type.flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(type) : getBaseConstraintOfType(type); + return type.flags & TypeFlags.TypeParameter ? getConstraintOfTypeParameter(type) : + type.flags & TypeFlags.IndexedAccess ? getConstraintOfIndexedAccess(type) : + getBaseConstraintOfType(type); } function getConstraintOfTypeParameter(typeParameter: TypeParameter): Type { return hasNonCircularBaseConstraint(typeParameter) ? getConstraintFromTypeParameter(typeParameter) : undefined; } - function getBaseConstraintOfType(type: TypeVariable | UnionOrIntersectionType): Type { - const constraint = getResolvedBaseConstraint(type); - return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : undefined; + function getConstraintOfIndexedAccess(type: IndexedAccessType) { + const baseObjectType = getBaseConstraintOfType(type.objectType); + const baseIndexType = getBaseConstraintOfType(type.indexType); + return baseObjectType || baseIndexType ? getIndexedAccessType(baseObjectType || type.objectType, baseIndexType || type.indexType) : undefined; + } + + function getBaseConstraintOfType(type: Type): Type { + if (type.flags & (TypeFlags.TypeVariable | TypeFlags.UnionOrIntersection)) { + const constraint = getResolvedBaseConstraint(type); + if (constraint !== noConstraintType && constraint !== circularConstraintType) { + return constraint; + } + } + else if (type.flags & TypeFlags.Index) { + return stringType; + } + return undefined; } function hasNonCircularBaseConstraint(type: TypeVariable): boolean { @@ -5096,7 +5112,7 @@ namespace ts { * type itself. Note that the apparent type of a union type is the union type itself. */ function getApparentType(type: Type): Type { - const t = type.flags & TypeFlags.TypeVariable ? getBaseConstraintOfType(type) || emptyObjectType : type; + const t = type.flags & TypeFlags.TypeVariable ? getBaseConstraintOfType(type) || emptyObjectType : type; return t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t) : t.flags & TypeFlags.StringLike ? globalStringType : t.flags & TypeFlags.NumberLike ? globalNumberType : @@ -7921,7 +7937,7 @@ namespace ts { } // A type S is related to a type T[K] if S is related to A[K], where K is string-like and // A is the apparent type of S. - const constraint = getBaseConstraintOfType(target); + const constraint = getBaseConstraintOfType(target); if (constraint) { if (result = isRelatedTo(source, constraint, reportErrors)) { errorInfo = saveErrorInfo; @@ -7961,7 +7977,7 @@ namespace ts { else if (source.flags & TypeFlags.IndexedAccess) { // A type S[K] is related to a type T if A[K] is related to T, where K is string-like and // A is the apparent type of S. - const constraint = getBaseConstraintOfType(source); + const constraint = getConstraintOfType(source); if (constraint) { if (result = isRelatedTo(constraint, target, reportErrors)) { errorInfo = saveErrorInfo; @@ -9874,7 +9890,7 @@ namespace ts { return strictNullChecks ? TypeFacts.ObjectStrictFacts : TypeFacts.ObjectFacts; } if (flags & TypeFlags.TypeVariable) { - return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType); + return getTypeFacts(getBaseConstraintOfType(type) || emptyObjectType); } if (flags & TypeFlags.UnionOrIntersection) { return getTypeFactsOfTypes((type).types); @@ -10686,7 +10702,7 @@ namespace ts { return targetType; } if (type.flags & TypeFlags.TypeVariable) { - const constraint = getBaseConstraintOfType(type) || anyType; + const constraint = getBaseConstraintOfType(type) || anyType; if (isTypeSubtypeOf(targetType, constraint)) { return getIntersectionType([type, targetType]); } @@ -16234,7 +16250,7 @@ namespace ts { function isLiteralContextualType(contextualType: Type) { if (contextualType) { if (contextualType.flags & TypeFlags.TypeVariable) { - const constraint = getBaseConstraintOfType(contextualType) || emptyObjectType; + const constraint = getBaseConstraintOfType(contextualType) || emptyObjectType; // If the type parameter is constrained to the base primitive type we're checking for, // consider this a literal context. For example, given a type parameter 'T extends string', // this causes us to infer string literal types for T. @@ -17124,7 +17140,7 @@ namespace ts { // Check if we're indexing with a numeric type and the object type is a generic // type with a constraint that has a numeric index signature. if (maybeTypeOfKind(objectType, TypeFlags.TypeVariable) && isTypeOfKind(indexType, TypeFlags.NumberLike)) { - const constraint = getBaseConstraintOfType(objectType); + const constraint = getBaseConstraintOfType(objectType); if (constraint && getIndexInfoOfType(constraint, IndexKind.Number)) { return type; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index b10f2e7cb17..616be35270e 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -199,6 +199,8 @@ namespace ts { onEmitHelpers, onSetSourceFile, substituteNode, + onBeforeEmitNodeArray, + onAfterEmitNodeArray } = handlers; const newLine = getNewLineCharacter(printerOptions); @@ -631,6 +633,11 @@ namespace ts { if (isExpression(node)) { return pipelineEmitExpression(trySubstituteNode(EmitHint.Expression, node)); } + + if (isToken(node)) { + writeTokenText(kind); + return; + } } function pipelineEmitExpression(node: Node): void { @@ -1553,6 +1560,10 @@ namespace ts { emitSignatureAndBody(node, emitSignatureHead); } + function emitBlockCallback(_hint: EmitHint, body: Node): void { + emitBlockFunctionBody(body); + } + function emitSignatureAndBody(node: FunctionLikeDeclaration, emitSignatureHead: (node: SignatureDeclaration) => void) { const body = node.body; if (body) { @@ -1564,12 +1575,22 @@ namespace ts { if (getEmitFlags(node) & EmitFlags.ReuseTempVariableScope) { emitSignatureHead(node); - emitBlockFunctionBody(body); + if (onEmitNode) { + onEmitNode(EmitHint.Unspecified, body, emitBlockCallback); + } + else { + emitBlockFunctionBody(body); + } } else { pushNameGenerationScope(); emitSignatureHead(node); - emitBlockFunctionBody(body); + if (onEmitNode) { + onEmitNode(EmitHint.Unspecified, body, emitBlockCallback); + } + else { + emitBlockFunctionBody(body); + } popNameGenerationScope(); } @@ -2200,6 +2221,10 @@ namespace ts { write(getOpeningBracket(format)); } + if (onBeforeEmitNodeArray) { + onBeforeEmitNodeArray(children); + } + if (isEmpty) { // Write a line terminator if the parent node was multi-line if (format & ListFormat.MultiLine) { @@ -2315,6 +2340,10 @@ namespace ts { } } + if (onAfterEmitNodeArray) { + onAfterEmitNodeArray(children); + } + if (format & ListFormat.BracketsMask) { write(getClosingBracket(format)); } diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 3ff3bc2782f..669c66c4337 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1099,6 +1099,10 @@ namespace ts { : node; } + export function createKeywordTypeNode(kind: KeywordTypeNode["kind"]): KeywordTypeNode { + return createSynthesizedNode(kind); + } + export function createFunctionDeclaration(decorators: Decorator[] | undefined, modifiers: Modifier[] | undefined, asteriskToken: AsteriskToken | undefined, name: string | Identifier | undefined, typeParameters: TypeParameterDeclaration[] | undefined, parameters: ParameterDeclaration[], type: TypeNode | undefined, body: Block | undefined) { const node = createSynthesizedNode(SyntaxKind.FunctionDeclaration); node.decorators = asNodeArray(decorators); diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index fb91b0ff5b7..b7a3f35d728 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -333,7 +333,7 @@ namespace ts { } /* @internal */ - export function getLineStarts(sourceFile: SourceFile): number[] { + export function getLineStarts(sourceFile: SourceFileLike): number[] { return sourceFile.lineMap || (sourceFile.lineMap = computeLineStarts(sourceFile.text)); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 2d9bd9c8033..63753a31923 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2209,6 +2209,16 @@ namespace ts { name: string; } + /* @internal */ + /** + * Subset of properties from SourceFile that are used in multiple utility functions + */ + export interface SourceFileLike { + readonly text: string; + lineMap: number[]; + } + + // Source files are declarations when they are external modules. export interface SourceFile extends Declaration { kind: SyntaxKind.SourceFile; @@ -4138,6 +4148,8 @@ namespace ts { /*@internal*/ onEmitSourceMapOfPosition?: (pos: number) => void; /*@internal*/ onEmitHelpers?: (node: Node, writeLines: (text: string) => void) => void; /*@internal*/ onSetSourceFile?: (node: SourceFile) => void; + /*@internal*/ onBeforeEmitNodeArray?: (nodes: NodeArray) => void; + /*@internal*/ onAfterEmitNodeArray?: (nodes: NodeArray) => void; } export interface PrinterOptions { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index a5229b614be..030b66813a5 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -184,7 +184,7 @@ namespace ts { return false; } - export function getStartPositionOfLine(line: number, sourceFile: SourceFile): number { + export function getStartPositionOfLine(line: number, sourceFile: SourceFileLike): number { Debug.assert(line >= 0); return getLineStarts(sourceFile)[line]; } @@ -204,7 +204,7 @@ namespace ts { return value !== undefined; } - export function getEndLinePosition(line: number, sourceFile: SourceFile): number { + export function getEndLinePosition(line: number, sourceFile: SourceFileLike): number { Debug.assert(line >= 0); const lineStarts = getLineStarts(sourceFile); @@ -255,7 +255,11 @@ namespace ts { return !nodeIsMissing(node); } - export function getTokenPosOfNode(node: Node, sourceFile?: SourceFile, includeJsDoc?: boolean): number { + export function isToken(n: Node): boolean { + return n.kind >= SyntaxKind.FirstToken && n.kind <= SyntaxKind.LastToken; + } + + export function getTokenPosOfNode(node: Node, sourceFile?: SourceFileLike, includeJsDoc?: boolean): number { // With nodes that have no width (i.e. 'Missing' nodes), we actually *don't* // want to skip trivia because this will launch us forward to the next token. if (nodeIsMissing(node)) { @@ -289,7 +293,7 @@ namespace ts { return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode; } - export function getNonDecoratorTokenPosOfNode(node: Node, sourceFile?: SourceFile): number { + export function getNonDecoratorTokenPosOfNode(node: Node, sourceFile?: SourceFileLike): number { if (nodeIsMissing(node) || !node.decorators) { return getTokenPosOfNode(node, sourceFile); } @@ -2491,7 +2495,7 @@ namespace ts { return indentStrings[1].length; } - export function createTextWriter(newLine: String): EmitTextWriter { + export function createTextWriter(newLine: string): EmitTextWriter { let output: string; let indent: number; let lineStart: boolean; diff --git a/src/compiler/visitor.ts b/src/compiler/visitor.ts index 0f4a4ed6561..133c62e1926 100644 --- a/src/compiler/visitor.ts +++ b/src/compiler/visitor.ts @@ -154,9 +154,9 @@ namespace ts { * Starts a new lexical environment and visits a parameter list, suspending the lexical * environment upon completion. */ - export function visitParameterList(nodes: NodeArray, visitor: Visitor, context: TransformationContext) { + export function visitParameterList(nodes: NodeArray, visitor: Visitor, context: TransformationContext, nodesVisitor = visitNodes) { context.startLexicalEnvironment(); - const updated = visitNodes(nodes, visitor, isParameterDeclaration); + const updated = nodesVisitor(nodes, visitor, isParameterDeclaration); context.suspendLexicalEnvironment(); return updated; } @@ -204,9 +204,9 @@ namespace ts { * @param visitor The callback used to visit each child. * @param context A lexical environment context for the visitor. */ - export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext): T | undefined; + export function visitEachChild(node: T | undefined, visitor: Visitor, context: TransformationContext, nodesVisitor?: typeof visitNodes): T | undefined; - export function visitEachChild(node: Node, visitor: Visitor, context: TransformationContext): Node { + export function visitEachChild(node: Node, visitor: Visitor, context: TransformationContext, nodesVisitor = visitNodes): Node { if (node === undefined) { return undefined; } @@ -243,8 +243,8 @@ namespace ts { // Signature elements case SyntaxKind.Parameter: return updateParameter(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), (node).dotDotDotToken, visitNode((node).name, visitor, isBindingName), visitNode((node).type, visitor, isTypeNode), @@ -257,55 +257,55 @@ namespace ts { // Type member case SyntaxKind.PropertyDeclaration: return updateProperty(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isPropertyName), visitNode((node).type, visitor, isTypeNode), visitNode((node).initializer, visitor, isExpression)); case SyntaxKind.MethodDeclaration: return updateMethod(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), (node).asteriskToken, visitNode((node).name, visitor, isPropertyName), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitParameterList((node).parameters, visitor, context), + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitNode((node).type, visitor, isTypeNode), visitFunctionBody((node).body, visitor, context)); case SyntaxKind.Constructor: return updateConstructor(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), - visitParameterList((node).parameters, visitor, context), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitFunctionBody((node).body, visitor, context)); case SyntaxKind.GetAccessor: return updateGetAccessor(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isPropertyName), - visitParameterList((node).parameters, visitor, context), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitNode((node).type, visitor, isTypeNode), visitFunctionBody((node).body, visitor, context)); case SyntaxKind.SetAccessor: return updateSetAccessor(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isPropertyName), - visitParameterList((node).parameters, visitor, context), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitFunctionBody((node).body, visitor, context)); // Binding patterns case SyntaxKind.ObjectBindingPattern: return updateObjectBindingPattern(node, - visitNodes((node).elements, visitor, isBindingElement)); + nodesVisitor((node).elements, visitor, isBindingElement)); case SyntaxKind.ArrayBindingPattern: return updateArrayBindingPattern(node, - visitNodes((node).elements, visitor, isArrayBindingElement)); + nodesVisitor((node).elements, visitor, isArrayBindingElement)); case SyntaxKind.BindingElement: return updateBindingElement(node, @@ -317,11 +317,11 @@ namespace ts { // Expression case SyntaxKind.ArrayLiteralExpression: return updateArrayLiteral(node, - visitNodes((node).elements, visitor, isExpression)); + nodesVisitor((node).elements, visitor, isExpression)); case SyntaxKind.ObjectLiteralExpression: return updateObjectLiteral(node, - visitNodes((node).properties, visitor, isObjectLiteralElementLike)); + nodesVisitor((node).properties, visitor, isObjectLiteralElementLike)); case SyntaxKind.PropertyAccessExpression: return updatePropertyAccess(node, @@ -336,14 +336,14 @@ namespace ts { case SyntaxKind.CallExpression: return updateCall(node, visitNode((node).expression, visitor, isExpression), - visitNodes((node).typeArguments, visitor, isTypeNode), - visitNodes((node).arguments, visitor, isExpression)); + nodesVisitor((node).typeArguments, visitor, isTypeNode), + nodesVisitor((node).arguments, visitor, isExpression)); case SyntaxKind.NewExpression: return updateNew(node, visitNode((node).expression, visitor, isExpression), - visitNodes((node).typeArguments, visitor, isTypeNode), - visitNodes((node).arguments, visitor, isExpression)); + nodesVisitor((node).typeArguments, visitor, isTypeNode), + nodesVisitor((node).arguments, visitor, isExpression)); case SyntaxKind.TaggedTemplateExpression: return updateTaggedTemplate(node, @@ -361,19 +361,19 @@ namespace ts { case SyntaxKind.FunctionExpression: return updateFunctionExpression(node, - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).modifiers, visitor, isModifier), (node).asteriskToken, visitNode((node).name, visitor, isIdentifier), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitParameterList((node).parameters, visitor, context), + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitNode((node).type, visitor, isTypeNode), visitFunctionBody((node).body, visitor, context)); case SyntaxKind.ArrowFunction: return updateArrowFunction(node, - visitNodes((node).modifiers, visitor, isModifier), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitParameterList((node).parameters, visitor, context), + nodesVisitor((node).modifiers, visitor, isModifier), + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitNode((node).type, visitor, isTypeNode), visitFunctionBody((node).body, visitor, context)); @@ -415,7 +415,7 @@ namespace ts { case SyntaxKind.TemplateExpression: return updateTemplateExpression(node, visitNode((node).head, visitor, isTemplateHead), - visitNodes((node).templateSpans, visitor, isTemplateSpan)); + nodesVisitor((node).templateSpans, visitor, isTemplateSpan)); case SyntaxKind.YieldExpression: return updateYield(node, @@ -428,15 +428,15 @@ namespace ts { case SyntaxKind.ClassExpression: return updateClassExpression(node, - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isIdentifier), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitNodes((node).heritageClauses, visitor, isHeritageClause), - visitNodes((node).members, visitor, isClassElement)); + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + nodesVisitor((node).heritageClauses, visitor, isHeritageClause), + nodesVisitor((node).members, visitor, isClassElement)); case SyntaxKind.ExpressionWithTypeArguments: return updateExpressionWithTypeArguments(node, - visitNodes((node).typeArguments, visitor, isTypeNode), + nodesVisitor((node).typeArguments, visitor, isTypeNode), visitNode((node).expression, visitor, isExpression)); case SyntaxKind.AsExpression: @@ -457,11 +457,11 @@ namespace ts { // Element case SyntaxKind.Block: return updateBlock(node, - visitNodes((node).statements, visitor, isStatement)); + nodesVisitor((node).statements, visitor, isStatement)); case SyntaxKind.VariableStatement: return updateVariableStatement(node, - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).declarationList, visitor, isVariableDeclarationList)); case SyntaxKind.ExpressionStatement: @@ -549,61 +549,61 @@ namespace ts { case SyntaxKind.VariableDeclarationList: return updateVariableDeclarationList(node, - visitNodes((node).declarations, visitor, isVariableDeclaration)); + nodesVisitor((node).declarations, visitor, isVariableDeclaration)); case SyntaxKind.FunctionDeclaration: return updateFunctionDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), (node).asteriskToken, visitNode((node).name, visitor, isIdentifier), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitParameterList((node).parameters, visitor, context), + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + visitParameterList((node).parameters, visitor, context, nodesVisitor), visitNode((node).type, visitor, isTypeNode), visitFunctionBody((node).body, visitor, context)); case SyntaxKind.ClassDeclaration: return updateClassDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isIdentifier), - visitNodes((node).typeParameters, visitor, isTypeParameter), - visitNodes((node).heritageClauses, visitor, isHeritageClause), - visitNodes((node).members, visitor, isClassElement)); + nodesVisitor((node).typeParameters, visitor, isTypeParameter), + nodesVisitor((node).heritageClauses, visitor, isHeritageClause), + nodesVisitor((node).members, visitor, isClassElement)); case SyntaxKind.EnumDeclaration: return updateEnumDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isIdentifier), - visitNodes((node).members, visitor, isEnumMember)); + nodesVisitor((node).members, visitor, isEnumMember)); case SyntaxKind.ModuleDeclaration: return updateModuleDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isIdentifier), visitNode((node).body, visitor, isModuleBody)); case SyntaxKind.ModuleBlock: return updateModuleBlock(node, - visitNodes((node).statements, visitor, isStatement)); + nodesVisitor((node).statements, visitor, isStatement)); case SyntaxKind.CaseBlock: return updateCaseBlock(node, - visitNodes((node).clauses, visitor, isCaseOrDefaultClause)); + nodesVisitor((node).clauses, visitor, isCaseOrDefaultClause)); case SyntaxKind.ImportEqualsDeclaration: return updateImportEqualsDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).name, visitor, isIdentifier), visitNode((node).moduleReference, visitor, isModuleReference)); case SyntaxKind.ImportDeclaration: return updateImportDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).importClause, visitor, isImportClause), visitNode((node).moduleSpecifier, visitor, isExpression)); @@ -618,7 +618,7 @@ namespace ts { case SyntaxKind.NamedImports: return updateNamedImports(node, - visitNodes((node).elements, visitor, isImportSpecifier)); + nodesVisitor((node).elements, visitor, isImportSpecifier)); case SyntaxKind.ImportSpecifier: return updateImportSpecifier(node, @@ -627,20 +627,20 @@ namespace ts { case SyntaxKind.ExportAssignment: return updateExportAssignment(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).expression, visitor, isExpression)); case SyntaxKind.ExportDeclaration: return updateExportDeclaration(node, - visitNodes((node).decorators, visitor, isDecorator), - visitNodes((node).modifiers, visitor, isModifier), + nodesVisitor((node).decorators, visitor, isDecorator), + nodesVisitor((node).modifiers, visitor, isModifier), visitNode((node).exportClause, visitor, isNamedExports), visitNode((node).moduleSpecifier, visitor, isExpression)); case SyntaxKind.NamedExports: return updateNamedExports(node, - visitNodes((node).elements, visitor, isExportSpecifier)); + nodesVisitor((node).elements, visitor, isExportSpecifier)); case SyntaxKind.ExportSpecifier: return updateExportSpecifier(node, @@ -656,12 +656,12 @@ namespace ts { case SyntaxKind.JsxElement: return updateJsxElement(node, visitNode((node).openingElement, visitor, isJsxOpeningElement), - visitNodes((node).children, visitor, isJsxChild), + nodesVisitor((node).children, visitor, isJsxChild), visitNode((node).closingElement, visitor, isJsxClosingElement)); case SyntaxKind.JsxAttributes: return updateJsxAttributes(node, - visitNodes((node).properties, visitor, isJsxAttributeLike)); + nodesVisitor((node).properties, visitor, isJsxAttributeLike)); case SyntaxKind.JsxSelfClosingElement: return updateJsxSelfClosingElement(node, @@ -694,15 +694,15 @@ namespace ts { case SyntaxKind.CaseClause: return updateCaseClause(node, visitNode((node).expression, visitor, isExpression), - visitNodes((node).statements, visitor, isStatement)); + nodesVisitor((node).statements, visitor, isStatement)); case SyntaxKind.DefaultClause: return updateDefaultClause(node, - visitNodes((node).statements, visitor, isStatement)); + nodesVisitor((node).statements, visitor, isStatement)); case SyntaxKind.HeritageClause: return updateHeritageClause(node, - visitNodes((node).types, visitor, isExpressionWithTypeArguments)); + nodesVisitor((node).types, visitor, isExpressionWithTypeArguments)); case SyntaxKind.CatchClause: return updateCatchClause(node, diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 11103bf6e2d..e105553e2a7 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -22,6 +22,10 @@ namespace FourSlash { ts.disableIncrementalParsing = false; + function normalizeNewLines(s: string) { + return s.replace(/\r\n/g, "\n"); + } + // Represents a parsed source file with metadata export interface FourSlashFile { // The contents of the file (with markers, etc stripped out) @@ -1958,8 +1962,7 @@ namespace FourSlash { public verifyCurrentFileContent(text: string) { const actual = this.getFileContent(this.activeFile.fileName); - const replaceNewlines = (str: string) => str.replace(/\r\n/g, "\n"); - if (replaceNewlines(actual) !== replaceNewlines(text)) { + if (normalizeNewLines(actual) !== normalizeNewLines(text)) { throw new Error("verifyCurrentFileContent\n" + "\tExpected: \"" + text + "\"\n" + "\t Actual: \"" + actual + "\""); @@ -2135,7 +2138,7 @@ namespace FourSlash { const actualText = this.rangeText(ranges[0]); const result = includeWhiteSpace - ? actualText === expectedText + ? normalizeNewLines(actualText) === normalizeNewLines(expectedText) : this.removeWhitespace(actualText) === this.removeWhitespace(expectedText); if (!result) { @@ -2185,7 +2188,7 @@ namespace FourSlash { continue; } - const newActions = this.languageService.getCodeFixesAtPosition(fileName, diagnostic.start, diagnostic.length, [diagnostic.code]); + const newActions = this.languageService.getCodeFixesAtPosition(fileName, diagnostic.start, diagnostic.length, [diagnostic.code], this.formatCodeSettings); if (newActions && newActions.length) { actions = actions ? actions.concat(newActions) : newActions; } @@ -2248,22 +2251,23 @@ namespace FourSlash { if (expected === undefined) { if (actual) { - this.raiseError(name + " failed - expected no template but got {newText: \"" + actual.newText + "\" caretOffset: " + actual.caretOffset + "}"); + this.raiseError(`${name} failed - expected no template but got {newText: "${actual.newText}", caretOffset: ${actual.caretOffset}}`); } return; } else { if (actual === undefined) { - this.raiseError(name + " failed - expected the template {newText: \"" + actual.newText + "\" caretOffset: " + actual.caretOffset + "} but got nothing instead"); + this.raiseError(`${name} failed - expected the template {newText: "${expected.newText}", caretOffset: "${expected.caretOffset}"} but got nothing instead`); + } if (actual.newText !== expected.newText) { - this.raiseError(name + " failed - expected insertion:\n" + this.clarifyNewlines(expected.newText) + "\nactual insertion:\n" + this.clarifyNewlines(actual.newText)); + this.raiseError(`${name} failed - expected insertion:\n"${this.clarifyNewlines(expected.newText)}"\nactual insertion:\n"${this.clarifyNewlines(actual.newText)}"`); } if (actual.caretOffset !== expected.caretOffset) { - this.raiseError(name + " failed - expected caretOffset: " + expected.caretOffset + ",\nactual caretOffset:" + actual.caretOffset); + this.raiseError(`${name} failed - expected caretOffset: ${expected.caretOffset}\nactual caretOffset:${actual.caretOffset}`); } } } diff --git a/src/harness/tsconfig.json b/src/harness/tsconfig.json index 9f0e30baa1c..4fded517e19 100644 --- a/src/harness/tsconfig.json +++ b/src/harness/tsconfig.json @@ -126,6 +126,7 @@ "./unittests/projectErrors.ts", "./unittests/printer.ts", "./unittests/transform.ts", - "./unittests/customTransforms.ts" + "./unittests/customTransforms.ts", + "./unittests/textChanges.ts" ] } diff --git a/src/harness/unittests/textChanges.ts b/src/harness/unittests/textChanges.ts new file mode 100644 index 00000000000..8269b6de6be --- /dev/null +++ b/src/harness/unittests/textChanges.ts @@ -0,0 +1,791 @@ +/// +/// +/// + +namespace ts { + describe("textChanges", () => { + function findChild(name: string, n: Node) { + return find(n); + + function find(node: Node): Node { + if (isDeclaration(node) && node.name && isIdentifier(node.name) && node.name.text === name) { + return node; + } + else { + return forEachChild(node, find); + } + } + } + + const printerOptions = { newLine: NewLineKind.LineFeed }; + const newLineCharacter = getNewLineCharacter(printerOptions); + + function getRuleProvider(action?: (opts: FormatCodeSettings) => void) { + const options = { + indentSize: 4, + tabSize: 4, + newLineCharacter, + convertTabsToSpaces: true, + indentStyle: ts.IndentStyle.Smart, + insertSpaceAfterConstructor: false, + insertSpaceAfterCommaDelimiter: true, + insertSpaceAfterSemicolonInForStatements: true, + insertSpaceBeforeAndAfterBinaryOperators: true, + insertSpaceAfterKeywordsInControlFlowStatements: true, + insertSpaceAfterFunctionKeywordForAnonymousFunctions: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: false, + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: true, + insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: false, + insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces: false, + insertSpaceBeforeFunctionParenthesis: false, + placeOpenBraceOnNewLineForFunctions: false, + placeOpenBraceOnNewLineForControlBlocks: false, + }; + if (action) { + action(options); + } + const rulesProvider = new formatting.RulesProvider(); + rulesProvider.ensureUpToDate(options); + return rulesProvider; + } + + // validate that positions that were recovered from the printed text actually match positions that will be created if the same text is parsed. + function verifyPositions({ text, node }: textChanges.NonFormattedText): void { + const nodeList = flattenNodes(node); + const sourceFile = createSourceFile("f.ts", text, ScriptTarget.ES2015); + const parsedNodeList = flattenNodes(sourceFile.statements[0]); + Debug.assert(nodeList.length === parsedNodeList.length); + for (let i = 0; i < nodeList.length; i++) { + const left = nodeList[i]; + const right = parsedNodeList[i]; + Debug.assert(left.pos === right.pos); + Debug.assert(left.end === right.end); + } + + function flattenNodes(n: Node) { + const data: (Node | NodeArray)[] = []; + walk(n); + return data; + + function walk(n: Node | Node[]): void { + data.push(n); + return isArray(n) ? forEach(n, walk) : forEachChild(n, walk, walk); + } + } + } + + function runSingleFileTest(caption: string, setupFormatOptions: (opts: FormatCodeSettings) => void, text: string, validateNodes: boolean, testBlock: (sourceFile: SourceFile, changeTracker: textChanges.ChangeTracker) => void) { + it(caption, () => { + Harness.Baseline.runBaseline(`textChanges/${caption}.js`, () => { + const sourceFile = createSourceFile("source.ts", text, ScriptTarget.ES2015, /*setParentNodes*/ true); + const rulesProvider = getRuleProvider(setupFormatOptions); + const changeTracker = new textChanges.ChangeTracker(printerOptions.newLine, rulesProvider, validateNodes ? verifyPositions : undefined); + testBlock(sourceFile, changeTracker); + const changes = changeTracker.getChanges(); + assert.equal(changes.length, 1); + assert.equal(changes[0].fileName, sourceFile.fileName); + const modified = textChanges.applyChanges(sourceFile.text, changes[0].textChanges); + return `===ORIGINAL===${newLineCharacter}${text}${newLineCharacter}===MODIFIED===${newLineCharacter}${modified}`; + }); + }); + } + + function setNewLineForOpenBraceInFunctions(opts: FormatCodeSettings) { + opts.placeOpenBraceOnNewLineForFunctions = true; + } + + { + const text = ` +namespace M +{ + namespace M2 + { + function foo() { + // comment 1 + const x = 1; + + /** + * comment 2 line 1 + * comment 2 line 2 + */ + function f() { + return 100; + } + const y = 2; // comment 3 + return 1; + } + } +}`; + runSingleFileTest("extractMethodLike", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + const statements = ((findChild("foo", sourceFile)).body).statements.slice(1); + const newFunction = createFunctionDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*asteriskToken*/ undefined, + /*name*/ "bar", + /*typeParameters*/ undefined, + /*parameters*/ emptyArray, + /*type*/ createKeywordTypeNode(SyntaxKind.AnyKeyword), + /*body */ createBlock(statements) + ); + + changeTracker.insertNodeBefore(sourceFile, /*before*/findChild("M2", sourceFile), newFunction, { suffix: newLineCharacter }); + + // replace statements with return statement + const newStatement = createReturn( + createCall( + /*expression*/ newFunction.name, + /*typeArguments*/ undefined, + /*argumentsArray*/ emptyArray + )); + changeTracker.replaceNodeRange(sourceFile, statements[0], lastOrUndefined(statements), newStatement, { suffix: newLineCharacter }); + }); + } + { + const text = ` +function foo() { + return 1; +} + +function bar() { + return 2; +} +`; + runSingleFileTest("deleteRange1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteRange(sourceFile, { pos: text.indexOf("function foo"), end: text.indexOf("function bar") }); + }); + } + function findVariableStatementContaining(name: string, sourceFile: SourceFile) { + const varDecl = findChild(name, sourceFile); + assert.equal(varDecl.kind, SyntaxKind.VariableDeclaration); + const varStatement = varDecl.parent.parent; + assert.equal(varStatement.kind, SyntaxKind.VariableStatement); + return varStatement; + } + { + const text = ` +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 +`; + runSingleFileTest("deleteNode1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findVariableStatementContaining("y", sourceFile)); + }); + runSingleFileTest("deleteNode2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findVariableStatementContaining("y", sourceFile), { useNonAdjustedStartPosition: true }); + }); + runSingleFileTest("deleteNode3", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findVariableStatementContaining("y", sourceFile), { useNonAdjustedEndPosition: true }); + }); + runSingleFileTest("deleteNode4", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findVariableStatementContaining("y", sourceFile), { useNonAdjustedStartPosition: true, useNonAdjustedEndPosition: true }); + }); + runSingleFileTest("deleteNode5", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findVariableStatementContaining("x", sourceFile)); + }); + } + { + const text = ` +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +`; + runSingleFileTest("deleteNodeRange1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile)); + }); + runSingleFileTest("deleteNodeRange2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), + { useNonAdjustedStartPosition: true }); + }); + runSingleFileTest("deleteNodeRange3", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), + { useNonAdjustedEndPosition: true }); + }); + runSingleFileTest("deleteNodeRange4", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), + { useNonAdjustedStartPosition: true, useNonAdjustedEndPosition: true }); + }); + } + function createTestVariableDeclaration(name: string) { + return createVariableDeclaration(name, /*type*/ undefined, createObjectLiteral([createPropertyAssignment("p1", createLiteral(1))], /*multiline*/ true)); + } + function createTestClass() { + return createClassDeclaration( + /*decorators*/ undefined, + [ + createToken(SyntaxKind.PublicKeyword) + ], + "class1", + /*typeParameters*/ undefined, + [ + createHeritageClause( + SyntaxKind.ImplementsKeyword, + [ + createExpressionWithTypeArguments(/*typeArguments*/ undefined, createIdentifier("interface1")) + ] + ) + ], + [ + createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, + "property1", + /*questionToken*/ undefined, + createKeywordTypeNode(SyntaxKind.BooleanKeyword), + /*initializer*/ undefined + ) + ] + ); + } + { + const text = ` +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7`; + runSingleFileTest("replaceRange", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceRange(sourceFile, { pos: text.indexOf("var y"), end: text.indexOf("var a") }, createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("replaceRangeWithForcedIndentation", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceRange(sourceFile, { pos: text.indexOf("var y"), end: text.indexOf("var a") }, createTestClass(), { suffix: newLineCharacter, indentation: 8, delta: 0 }); + }); + + runSingleFileTest("replaceRangeNoLineBreakBefore", setNewLineForOpenBraceInFunctions, `const x = 1, y = "2";`, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createTestVariableDeclaration("z1"); + changeTracker.replaceRange(sourceFile, { pos: sourceFile.text.indexOf("y"), end: sourceFile.text.indexOf(";") }, newNode); + }); + } + { + const text = ` +namespace A { + const x = 1, y = "2"; +} +`; + runSingleFileTest("replaceNode1NoLineBreakBefore", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createTestVariableDeclaration("z1"); + changeTracker.replaceNode(sourceFile, findChild("y", sourceFile), newNode); + }); + } + { + const text = ` +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7`; + runSingleFileTest("replaceNode1", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("replaceNode2", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { useNonAdjustedStartPosition: true, suffix: newLineCharacter, prefix: newLineCharacter }); + }); + runSingleFileTest("replaceNode3", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { useNonAdjustedEndPosition: true, suffix: newLineCharacter }); + }); + runSingleFileTest("replaceNode4", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNode(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { useNonAdjustedStartPosition: true, useNonAdjustedEndPosition: true }); + }); + runSingleFileTest("replaceNode5", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNode(sourceFile, findVariableStatementContaining("x", sourceFile), createTestClass(), { useNonAdjustedStartPosition: true, useNonAdjustedEndPosition: true }); + }); + } + { + const text = ` +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7`; + runSingleFileTest("replaceNodeRange1", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("replaceNodeRange2", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), createTestClass(), { useNonAdjustedStartPosition: true, suffix: newLineCharacter, prefix: newLineCharacter }); + }); + runSingleFileTest("replaceNodeRange3", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), createTestClass(), { useNonAdjustedEndPosition: true, suffix: newLineCharacter }); + }); + runSingleFileTest("replaceNodeRange4", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.replaceNodeRange(sourceFile, findVariableStatementContaining("y", sourceFile), findVariableStatementContaining("z", sourceFile), createTestClass(), { useNonAdjustedStartPosition: true, useNonAdjustedEndPosition: true }); + }); + } + { + const text = ` +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7`; + runSingleFileTest("insertNodeAt1", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.insertNodeAt(sourceFile, text.indexOf("var y"), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("insertNodeAt2", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAt(sourceFile, text.indexOf("; // comment 4"), createTestVariableDeclaration("z1")); + }); + } + { + const text = ` +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +}`; + runSingleFileTest("insertNodeBefore1", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.insertNodeBefore(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("insertNodeBefore2", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.insertNodeBefore(sourceFile, findChild("M", sourceFile), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("insertNodeAfter1", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("y", sourceFile), createTestClass(), { suffix: newLineCharacter }); + }); + runSingleFileTest("insertNodeAfter2", setNewLineForOpenBraceInFunctions, text, /*validateNodes*/ true, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findChild("M", sourceFile), createTestClass(), { prefix: newLineCharacter }); + }); + } + { + function findOpenBraceForConstructor(sourceFile: SourceFile) { + const classDecl = sourceFile.statements[0]; + const constructorDecl = forEach(classDecl.members, m => m.kind === SyntaxKind.Constructor && (m).body && m); + return constructorDecl.body.getFirstToken(); + } + function createTestSuperCall() { + const superCall = createCall( + createSuper(), + /*typeArguments*/ undefined, + /*argumentsArray*/ emptyArray + ); + return createStatement(superCall); + } + const text1 = ` +class A { + constructor() { + } +} +`; + runSingleFileTest("insertNodeAfter3", noop, text1, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findOpenBraceForConstructor(sourceFile), createTestSuperCall(), { suffix: newLineCharacter }); + }); + const text2 = ` +class A { + constructor() { + var x = 1; + } +} +`; + runSingleFileTest("insertNodeAfter4", noop, text2, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), createTestSuperCall(), { suffix: newLineCharacter }); + }); + const text3 = ` +class A { + constructor() { + + } +} +`; + runSingleFileTest("insertNodeAfter3-block with newline", noop, text3, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findOpenBraceForConstructor(sourceFile), createTestSuperCall(), { suffix: newLineCharacter }); + }); + } + { + const text = `var a = 1, b = 2, c = 3;`; + runSingleFileTest("deleteNodeInList1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList3", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = `var a = 1,b = 2,c = 3;`; + runSingleFileTest("deleteNodeInList1_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList2_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList3_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +namespace M { + var a = 1, + b = 2, + c = 3; +}`; + runSingleFileTest("deleteNodeInList4", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList5", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList6", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +namespace M { + var a = 1, // comment 1 + // comment 2 + b = 2, // comment 3 + // comment 4 + c = 3; // comment 5 +}`; + runSingleFileTest("deleteNodeInList4_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList5_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList6_1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +function foo(a: number, b: string, c = true) { + return 1; +}`; + runSingleFileTest("deleteNodeInList7", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList8", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList9", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +function foo(a: number,b: string,c = true) { + return 1; +}`; + runSingleFileTest("deleteNodeInList10", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList11", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList12", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +function foo( + a: number, + b: string, + c = true) { + return 1; +}`; + runSingleFileTest("deleteNodeInList13", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("a", sourceFile)); + }); + runSingleFileTest("deleteNodeInList14", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("b", sourceFile)); + }); + runSingleFileTest("deleteNodeInList15", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNodeInList(sourceFile, findChild("c", sourceFile)); + }); + } + { + const text = ` +const x = 1, y = 2;`; + runSingleFileTest("insertNodeInListAfter1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + runSingleFileTest("insertNodeInListAfter2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("y", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + } + { + const text = ` +const /*x*/ x = 1, /*y*/ y = 2;`; + runSingleFileTest("insertNodeInListAfter3", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + runSingleFileTest("insertNodeInListAfter4", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("y", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + } + { + const text = ` +const x = 1;`; + runSingleFileTest("insertNodeInListAfter5", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + } + { + const text = ` +const x = 1, + y = 2;`; + runSingleFileTest("insertNodeInListAfter6", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + runSingleFileTest("insertNodeInListAfter7", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("y", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + } + { + const text = ` +const /*x*/ x = 1, + /*y*/ y = 2;`; + runSingleFileTest("insertNodeInListAfter8", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + runSingleFileTest("insertNodeInListAfter9", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("y", sourceFile), createVariableDeclaration("z", /*type*/ undefined, createLiteral(1))); + }); + } + { + const text = ` +import { + x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter10", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(createIdentifier("b"), createIdentifier("a"))); + }) + } + { + const text = ` +import { + x // this is x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter11", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(createIdentifier("b"), createIdentifier("a"))); + }) + } + { + const text = ` +import { + x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter12", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(undefined, createIdentifier("a"))); + }) + } + { + const text = ` +import { + x // this is x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter13", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(undefined, createIdentifier("a"))); + }) + } + { + const text = ` +import { + x0, + x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter14", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(createIdentifier("b"), createIdentifier("a"))); + }) + } + { + const text = ` +import { + x0, + x // this is x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter15", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(createIdentifier("b"), createIdentifier("a"))); + }) + } + { + const text = ` +import { + x0, + x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter16", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(undefined, createIdentifier("a"))); + }) + } + { + const text = ` +import { + x0, + x // this is x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter17", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(undefined, createIdentifier("a"))); + }) + } + { + const text = ` +import { + x0, x +} from "bar"`; + runSingleFileTest("insertNodeInListAfter18", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), createImportSpecifier(undefined, createIdentifier("a"))); + }) + } + { + const text = ` +class A { + x; +}`; + runSingleFileTest("insertNodeAfterMultipleNodes", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + let newNodes = []; + for (let i = 0; i < 11 /*error doesn't occur with fewer nodes*/; ++i) { + newNodes.push( + createProperty(undefined, undefined, i + "", undefined, undefined, undefined)); + } + const insertAfter = findChild("x", sourceFile); + for (const newNode of newNodes) { + changeTracker.insertNodeAfter(sourceFile, insertAfter, newNode, { suffix: newLineCharacter }); + } + }); + } + { + const text = ` +class A { + x +} +`; + runSingleFileTest("insertNodeAfterInClass1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined), { suffix: newLineCharacter }); + }); + } + { + const text = ` +class A { + x; +} +`; + runSingleFileTest("insertNodeAfterInClass2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), createProperty(undefined, undefined, "a", undefined, createKeywordTypeNode(SyntaxKind.BooleanKeyword), undefined), { suffix: newLineCharacter }); + }); + } + { + const text = ` +class A { + x; + y = 1; +} +`; + runSingleFileTest("deleteNodeAfterInClass1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findChild("x", sourceFile)); + }); + } + { + const text = ` +class A { + x + y = 1; +} +`; + runSingleFileTest("deleteNodeAfterInClass2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + changeTracker.deleteNode(sourceFile, findChild("x", sourceFile)); + }); + } + { + const text = ` +class A { + x = foo +} +` + runSingleFileTest("insertNodeInClassAfterNodeWithoutSeparator1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, + createComputedPropertyName(createLiteral(1)), + /*questionToken*/ undefined, + createKeywordTypeNode(SyntaxKind.AnyKeyword), + /*initializer*/ undefined); + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter }); + }); + } + { + const text = ` +class A { + x() { + } +} +` + runSingleFileTest("insertNodeInClassAfterNodeWithoutSeparator2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, + createComputedPropertyName(createLiteral(1)), + /*questionToken*/ undefined, + createKeywordTypeNode(SyntaxKind.AnyKeyword), + /*initializer*/ undefined); + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter }); + }); + } + { + const text = ` +interface A { + x +} +` + runSingleFileTest("insertNodeInInterfaceAfterNodeWithoutSeparator1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, + createComputedPropertyName(createLiteral(1)), + /*questionToken*/ undefined, + createKeywordTypeNode(SyntaxKind.AnyKeyword), + /*initializer*/ undefined); + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter }); + }); + } + { + const text = ` +interface A { + x() +} +` + runSingleFileTest("insertNodeInInterfaceAfterNodeWithoutSeparator2", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createProperty( + /*decorators*/ undefined, + /*modifiers*/ undefined, + createComputedPropertyName(createLiteral(1)), + /*questionToken*/ undefined, + createKeywordTypeNode(SyntaxKind.AnyKeyword), + /*initializer*/ undefined); + changeTracker.insertNodeAfter(sourceFile, findChild("x", sourceFile), newNode, { suffix: newLineCharacter }); + }); + } + { + const text = ` +let x = foo +` + runSingleFileTest("insertNodeInStatementListAfterNodeWithoutSeparator1", noop, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + const newNode = createStatement(createParen(createLiteral(1))); + changeTracker.insertNodeAfter(sourceFile, findVariableStatementContaining("x", sourceFile), newNode, { suffix: newLineCharacter }); + }); + } + }); +} \ No newline at end of file diff --git a/src/lib/dom.iterable.d.ts b/src/lib/dom.iterable.d.ts index 7f653dc8e0c..e4da7a62763 100644 --- a/src/lib/dom.iterable.d.ts +++ b/src/lib/dom.iterable.d.ts @@ -5,9 +5,53 @@ interface DOMTokenList { } interface NodeList { + + + /** + * Returns an array of key, value pairs for every entry in the list + */ + entries(): IterableIterator<[number, Node]>; + /** + * Performs the specified action for each node in an list. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: Node, index: number, listObj: NodeList) => void, thisArg?: any): void; + /** + * Returns an list of keys in the list + */ + keys(): IterableIterator; + + /** + * Returns an list of values in the list + */ + values(): IterableIterator; + + [Symbol.iterator](): IterableIterator } interface NodeListOf { + + /** + * Returns an array of key, value pairs for every entry in the list + */ + entries(): IterableIterator<[number, TNode]>; + + /** + * Performs the specified action for each node in an list. + * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the list. + * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. + */ + forEach(callbackfn: (value: TNode, index: number, listObj: NodeListOf) => void, thisArg?: any): void; + /** + * Returns an list of keys in the list + */ + keys(): IterableIterator; + /** + * Returns an list of values in the list + */ + values(): IterableIterator; + [Symbol.iterator](): IterableIterator } diff --git a/src/lib/es2015.core.d.ts b/src/lib/es2015.core.d.ts index eb23ce7901f..88f70758e5a 100644 --- a/src/lib/es2015.core.d.ts +++ b/src/lib/es2015.core.d.ts @@ -10,7 +10,9 @@ interface Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): T | undefined; + find(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean): T | undefined; + find(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean, thisArg: undefined): T | undefined; + find(predicate: (this: Z, value: T, index: number, obj: Array) => boolean, thisArg: Z): T | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -21,7 +23,9 @@ interface Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: T, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Returns the this object after filling the section identified by start and end with value @@ -52,7 +56,9 @@ interface ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array; /** @@ -357,7 +363,9 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: T, index: number, obj: ReadonlyArray) => boolean, thisArg?: any): T | undefined; + find(predicate: (this: undefined, value: T, index: number, obj: ReadonlyArray) => boolean): T | undefined; + find(predicate: (this: undefined, value: T, index: number, obj: ReadonlyArray) => boolean, thisArg: undefined): T | undefined; + find(predicate: (this: Z, value: T, index: number, obj: ReadonlyArray) => boolean, thisArg: Z): T | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -368,7 +376,9 @@ interface ReadonlyArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: T, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: T, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: T, index: number, obj: Array) => boolean, thisArg: Z): number; } interface RegExp { diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index 247017bae7d..fe56c6e8bfb 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -54,7 +54,9 @@ interface ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): Array; + from(iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): Array; + from(iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): Array; + from(iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): Array; /** * Creates an array from an iterable object. @@ -180,7 +182,11 @@ interface Int8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; + + from(arrayLike: Iterable): Int8Array; } /** @@ -212,7 +218,11 @@ interface Uint8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; + + from(arrayLike: Iterable): Uint8Array; } /** @@ -247,7 +257,11 @@ interface Uint8ClampedArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; + + from(arrayLike: Iterable): Uint8ClampedArray; } /** @@ -281,7 +295,11 @@ interface Int16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; + + from(arrayLike: Iterable): Int16Array; } /** @@ -313,7 +331,11 @@ interface Uint16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; + + from(arrayLike: Iterable): Uint16Array; } /** @@ -345,7 +367,11 @@ interface Int32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; + + from(arrayLike: Iterable): Int32Array; } /** @@ -377,7 +403,11 @@ interface Uint32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; + + from(arrayLike: Iterable): Uint32Array; } /** @@ -409,7 +439,11 @@ interface Float32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; + + from(arrayLike: Iterable): Float32Array; } /** @@ -441,5 +475,9 @@ interface Float64ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; + from(arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; + from(arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; + + from(arrayLike: Iterable): Float64Array; } diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index 04743f7d77f..7d3a2179a38 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -325,53 +325,27 @@ interface String { * Matches a string with a regular expression, and returns an array containing the results of that search. * @param regexp A variable name or string literal containing the regular expression pattern and flags. */ - match(regexp: string): RegExpMatchArray | null; - - /** - * Matches a string with a regular expression, and returns an array containing the results of that search. - * @param regexp A regular expression object that contains the regular expression pattern and applicable flags. - */ - match(regexp: RegExp): RegExpMatchArray | null; + match(regexp: string | RegExp): RegExpMatchArray | null; /** * Replaces text in a string, using a regular expression or search string. * @param searchValue A string to search for. * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. */ - replace(searchValue: string, replaceValue: string): string; + replace(searchValue: string | RegExp, replaceValue: string): string; /** * Replaces text in a string, using a regular expression or search string. * @param searchValue A string to search for. * @param replacer A function that returns the replacement text. */ - replace(searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags. - * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string. - */ - replace(searchValue: RegExp, replaceValue: string): string; - - /** - * Replaces text in a string, using a regular expression or search string. - * @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags - * @param replacer A function that returns the replacement text. - */ - replace(searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; + replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; /** * Finds the first substring match in a regular expression search. * @param regexp The regular expression pattern and applicable flags. */ - search(regexp: string): number; - - /** - * Finds the first substring match in a regular expression search. - * @param regexp The regular expression pattern and applicable flags. - */ - search(regexp: RegExp): number; + search(regexp: string | RegExp): number; /** * Returns a section of a string. @@ -386,14 +360,7 @@ interface String { * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. * @param limit A value used to limit the number of elements returned in the array. */ - split(separator: string, limit?: number): string[]; - - /** - * Split a string into substrings using the specified separator and return them as an array. - * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned. - * @param limit A value used to limit the number of elements returned in the array. - */ - split(separator: RegExp, limit?: number): string[]; + split(separator: string | RegExp, limit?: number): string[]; /** * Returns the substring at the specified location within a String object. @@ -861,9 +828,9 @@ interface RegExp { } interface RegExpConstructor { - new (pattern: RegExp): RegExp; + new (pattern: RegExp | string): RegExp; new (pattern: string, flags?: string): RegExp; - (pattern: RegExp): RegExp; + (pattern: RegExp | string): RegExp; (pattern: string, flags?: string): RegExp; readonly prototype: RegExp; @@ -1050,37 +1017,49 @@ interface ReadonlyArray { * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => boolean): boolean; + every(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: Z): boolean; /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: T, index: number, array: ReadonlyArray) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => boolean): boolean; + some(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => boolean, thisArg: Z): boolean; /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: T, index: number, array: ReadonlyArray) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => void): void; + forEach(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => void, thisArg: Z): void; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: T, index: number, array: ReadonlyArray) => U, thisArg?: any): U[]; + map(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => U): U[]; + map(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => U, thisArg: undefined): U[]; + map(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => U, thisArg: Z): U[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => value is S, thisArg?: any): S[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => value is S): S[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => value is S, thisArg: undefined): S[]; + filter(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => value is S, thisArg: Z): S[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: T, index: number, array: ReadonlyArray) => any, thisArg?: any): T[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => any): T[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: ReadonlyArray) => any, thisArg: undefined): T[]; + filter(callbackfn: (this: Z, value: T, index: number, array: ReadonlyArray) => any, thisArg: Z): T[]; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1197,55 +1176,73 @@ interface Array { * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: T, index: number, array: T[]) => boolean): boolean; + every(callbackfn: (this: undefined, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean; /** * Determines whether the specified callback function returns true for any element of an array. * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: T, index: number, array: T[]) => boolean): boolean; + some(callbackfn: (this: undefined, value: T, index: number, array: T[]) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: T, index: number, array: T[]) => boolean, thisArg: Z): boolean; /** * Performs the specified action for each element in an array. * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void): void; + forEach(callbackfn: (this: undefined, value: T, index: number, array: T[]) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: T, index: number, array: T[]) => void, thisArg: Z): void; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; + map(this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; + map(this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; + map(this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; + map(this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; + map(this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; + map(this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; + map(this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; + map(this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; + map(this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; + map(this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; + map(this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; + map(this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; /** * Calls a defined callback function on each element of an array, and returns an array that contains the results. * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; + map(callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; + map(callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; + map(callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; /** * Returns the elements of an array that meet the condition specified in a callback function. * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array. * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: T[]) => any): T[]; + filter(callbackfn: (this: undefined, value: T, index: number, array: T[]) => any, thisArg: undefined): T[]; + filter(callbackfn: (this: Z, value: T, index: number, array: T[]) => any, thisArg: Z): T[]; /** * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function. * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array. @@ -1590,7 +1587,9 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -1609,7 +1608,9 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => any): Int8Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => any, thisArg: undefined): Int8Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => any, thisArg: Z): Int8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -1620,7 +1621,9 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -1631,7 +1634,9 @@ interface Int8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -1640,7 +1645,9 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -1678,7 +1685,9 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => number): Int8Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => number, thisArg: undefined): Int8Array; + map(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => number, thisArg: Z): Int8Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -1762,7 +1771,9 @@ interface Int8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int8Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Int8Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -1814,7 +1825,11 @@ interface Int8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; + + from(arrayLike: ArrayLike): Int8Array; } declare const Int8Array: Int8ArrayConstructor; @@ -1863,7 +1878,9 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -1882,7 +1899,9 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => any): Uint8Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => any, thisArg: undefined): Uint8Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => any, thisArg: Z): Uint8Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -1893,7 +1912,9 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -1904,7 +1925,9 @@ interface Uint8Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -1913,7 +1936,9 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -1951,7 +1976,9 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => number): Uint8Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => number, thisArg: undefined): Uint8Array; + map(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => number, thisArg: Z): Uint8Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2035,7 +2062,9 @@ interface Uint8Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint8Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Uint8Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -2088,7 +2117,11 @@ interface Uint8ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; + + from(arrayLike: ArrayLike): Uint8Array; } declare const Uint8Array: Uint8ArrayConstructor; @@ -2137,7 +2170,9 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2156,7 +2191,9 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => any): Uint8ClampedArray; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: undefined): Uint8ClampedArray; + filter(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => any, thisArg: Z): Uint8ClampedArray; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2167,7 +2204,9 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2178,7 +2217,9 @@ interface Uint8ClampedArray { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -2187,7 +2228,9 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -2225,7 +2268,9 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => number): Uint8ClampedArray; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: undefined): Uint8ClampedArray; + map(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => number, thisArg: Z): Uint8ClampedArray; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2309,7 +2354,9 @@ interface Uint8ClampedArray { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -2362,7 +2409,11 @@ interface Uint8ClampedArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; + + from(arrayLike: ArrayLike): Uint8ClampedArray; } declare const Uint8ClampedArray: Uint8ClampedArrayConstructor; @@ -2410,7 +2461,9 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2429,7 +2482,9 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => any): Int16Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => any, thisArg: undefined): Int16Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => any, thisArg: Z): Int16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2440,7 +2495,9 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2451,7 +2508,9 @@ interface Int16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -2460,7 +2519,9 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -2498,7 +2559,9 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => number): Int16Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => number, thisArg: undefined): Int16Array; + map(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => number, thisArg: Z): Int16Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2582,7 +2645,9 @@ interface Int16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int16Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Int16Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -2635,7 +2700,11 @@ interface Int16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; + + from(arrayLike: ArrayLike): Int16Array; } declare const Int16Array: Int16ArrayConstructor; @@ -2684,7 +2753,9 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2703,7 +2774,9 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => any): Uint16Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => any, thisArg: undefined): Uint16Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => any, thisArg: Z): Uint16Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2714,7 +2787,9 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2725,7 +2800,9 @@ interface Uint16Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -2734,7 +2811,9 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -2772,7 +2851,9 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => number): Uint16Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => number, thisArg: undefined): Uint16Array; + map(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => number, thisArg: Z): Uint16Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -2856,7 +2937,9 @@ interface Uint16Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint16Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Uint16Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -2909,7 +2992,11 @@ interface Uint16ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; + + from(arrayLike: ArrayLike): Uint16Array; } declare const Uint16Array: Uint16ArrayConstructor; @@ -2957,7 +3044,9 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -2976,7 +3065,9 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => any): Int32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => any, thisArg: undefined): Int32Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => any, thisArg: Z): Int32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -2987,7 +3078,9 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -2998,7 +3091,9 @@ interface Int32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -3007,7 +3102,9 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3045,7 +3142,9 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => number): Int32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => number, thisArg: undefined): Int32Array; + map(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => number, thisArg: Z): Int32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3129,7 +3228,9 @@ interface Int32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Int32Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Int32Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -3182,7 +3283,11 @@ interface Int32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; + + from(arrayLike: ArrayLike): Int32Array; } declare const Int32Array: Int32ArrayConstructor; @@ -3230,7 +3335,9 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3249,7 +3356,9 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => any): Uint32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => any, thisArg: undefined): Uint32Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => any, thisArg: Z): Uint32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3260,7 +3369,9 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3271,7 +3382,9 @@ interface Uint32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -3280,7 +3393,9 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3318,7 +3433,9 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => number): Uint32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => number, thisArg: undefined): Uint32Array; + map(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => number, thisArg: Z): Uint32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3402,7 +3519,9 @@ interface Uint32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Uint32Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Uint32Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -3455,7 +3574,11 @@ interface Uint32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; + + from(arrayLike: ArrayLike): Uint32Array; } declare const Uint32Array: Uint32ArrayConstructor; @@ -3503,7 +3626,9 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3522,7 +3647,9 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => any): Float32Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => any, thisArg: undefined): Float32Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => any, thisArg: Z): Float32Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3533,7 +3660,9 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3544,7 +3673,9 @@ interface Float32Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -3553,7 +3684,9 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3591,7 +3724,9 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => number): Float32Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => number, thisArg: undefined): Float32Array; + map(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => number, thisArg: Z): Float32Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3675,7 +3810,9 @@ interface Float32Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Float32Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Float32Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -3728,7 +3865,11 @@ interface Float32ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; + + from(arrayLike: ArrayLike): Float32Array; } declare const Float32Array: Float32ArrayConstructor; @@ -3777,7 +3918,9 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - every(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => boolean): boolean; + every(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean; + every(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean; /** * Returns the this object after filling the section identified by start and end with value @@ -3796,7 +3939,9 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => any): Float64Array; + filter(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => any, thisArg: undefined): Float64Array; + filter(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => any, thisArg: Z): Float64Array; /** * Returns the value of the first element in the array where predicate is true, and undefined @@ -3807,7 +3952,9 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - find(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number | undefined; + find(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number | undefined; + find(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number | undefined; /** * Returns the index of the first element in the array where predicate is true, and -1 @@ -3818,7 +3965,9 @@ interface Float64Array { * @param thisArg If provided, it will be used as the this value for each invocation of * predicate. If it is not provided, undefined is used instead. */ - findIndex(predicate: (value: number, index: number, obj: Array) => boolean, thisArg?: any): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean): number; + findIndex(predicate: (this: undefined, value: number, index: number, obj: Array) => boolean, thisArg: undefined): number; + findIndex(predicate: (this: Z, value: number, index: number, obj: Array) => boolean, thisArg: Z): number; /** * Performs the specified action for each element in an array. @@ -3827,7 +3976,9 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => void): void; + forEach(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => void, thisArg: undefined): void; + forEach(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => void, thisArg: Z): void; /** * Returns the index of the first occurrence of a value in an array. @@ -3865,7 +4016,9 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => number): Float64Array; + map(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => number, thisArg: undefined): Float64Array; + map(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => number, thisArg: Z): Float64Array; /** * Calls the specified callback function for all the elements in an array. The return value of @@ -3949,7 +4102,9 @@ interface Float64Array { * @param thisArg An object to which the this keyword can refer in the callbackfn function. * If thisArg is omitted, undefined is used as the this value. */ - some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => boolean): boolean; + some(callbackfn: (this: undefined, value: number, index: number, array: Float64Array) => boolean, thisArg: undefined): boolean; + some(callbackfn: (this: Z, value: number, index: number, array: Float64Array) => boolean, thisArg: Z): boolean; /** * Sorts an array. @@ -4002,7 +4157,11 @@ interface Float64ArrayConstructor { * @param mapfn A mapping function to call on every element of the array. * @param thisArg Value of 'this' used to invoke the mapfn. */ - from(arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; + from(arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; + from(arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; + + from(arrayLike: ArrayLike): Float64Array; } declare const Float64Array: Float64ArrayConstructor; diff --git a/src/server/cancellationToken/cancellationToken.ts b/src/server/cancellationToken/cancellationToken.ts index 0e7969c1e45..6f2f4a8897c 100644 --- a/src/server/cancellationToken/cancellationToken.ts +++ b/src/server/cancellationToken/cancellationToken.ts @@ -48,7 +48,7 @@ function createCancellationToken(args: string[]): ServerCancellationToken { return { isCancellationRequested: () => perRequestPipeName !== undefined && pipeExists(perRequestPipeName), setRequest(requestId: number) { - currentRequestId = currentRequestId; + currentRequestId = requestId; perRequestPipeName = namePrefix + requestId; }, resetRequest(requestId: number) { @@ -67,4 +67,4 @@ function createCancellationToken(args: string[]): ServerCancellationToken { }; } } -export = createCancellationToken; \ No newline at end of file +export = createCancellationToken; diff --git a/src/server/protocol.ts b/src/server/protocol.ts index d054867cd1c..d12aa2e0a48 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2127,6 +2127,17 @@ namespace ts.server.protocol { payload: any; } + export type TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed"; + + export interface TypesInstallerInitializationFailedEvent extends Event { + event: TypesInstallerInitializationFailedEventName; + body: TypesInstallerInitializationFailedEventBody; + } + + export interface TypesInstallerInitializationFailedEventBody { + message: string; + } + export type TypingsInstalledTelemetryEventName = "typingsInstalled"; export interface TypingsInstalledTelemetryEventBody extends TelemetryEventBody { diff --git a/src/server/server.ts b/src/server/server.ts index 2c68963ec5c..bfd4e422047 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -131,6 +131,14 @@ namespace ts.server { constructor(private readonly logFilename: string, private readonly traceToConsole: boolean, private readonly level: LogLevel) { + if (this.logFilename) { + try { + this.fd = fs.openSync(this.logFilename, "w"); + } + catch(_) { + // swallow the error and keep logging disabled if file cannot be opened + } + } } static padStringRight(str: string, padding: string) { @@ -175,11 +183,6 @@ namespace ts.server { } msg(s: string, type: Msg.Types = Msg.Err) { - if (this.fd < 0) { - if (this.logFilename) { - this.fd = fs.openSync(this.logFilename, "w"); - } - } if (this.fd >= 0 || this.traceToConsole) { s = s + "\n"; const prefix = Logger.padStringRight(type + " " + this.seq.toString(), " "); @@ -301,11 +304,23 @@ namespace ts.server { }); } - private handleMessage(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes) { + private handleMessage(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | InitializationFailedResponse) { if (this.logger.hasLevel(LogLevel.verbose)) { this.logger.info(`Received response: ${JSON.stringify(response)}`); } + if (response.kind === EventInitializationFailed) { + if (!this.eventSender) { + return; + } + const body: protocol.TypesInstallerInitializationFailedEventBody = { + message: response.message + } + const eventName: protocol.TypesInstallerInitializationFailedEventName = "typesInstallerInitializationFailed"; + this.eventSender.event(body, eventName); + return; + } + if (response.kind === EventBeginInstallTypes) { if (!this.eventSender) { return; @@ -410,6 +425,9 @@ namespace ts.server { } function parseLoggingEnvironmentString(logEnvStr: string): LogOptions { + if (!logEnvStr) { + return {}; + } const logEnv: LogOptions = { logToFile: true }; const args = logEnvStr.split(" "); const len = args.length - 1; @@ -422,8 +440,8 @@ namespace ts.server { logEnv.file = stripQuotes(value); break; case "-level": - const level: LogLevel = (LogLevel)[value]; - logEnv.detailLevel = typeof level === "number" ? level : LogLevel.normal; + const level = getLogLevel(value); + logEnv.detailLevel = level !== undefined ? level : LogLevel.normal; break; case "-traceToConsole": logEnv.traceToConsole = value.toLowerCase() === "true"; @@ -437,28 +455,32 @@ namespace ts.server { return logEnv; } - // TSS_LOG "{ level: "normal | verbose | terse", file?: string}" - function createLoggerFromEnv() { - let fileName: string = undefined; - let detailLevel = LogLevel.normal; - let traceToConsole = false; - const logEnvStr = process.env["TSS_LOG"]; - if (logEnvStr) { - const logEnv = parseLoggingEnvironmentString(logEnvStr); - if (logEnv.logToFile) { - if (logEnv.file) { - fileName = logEnv.file; - } - else { - fileName = __dirname + "/.log" + process.pid.toString(); + function getLogLevel(level: string) { + if (level) { + const l = level.toLowerCase(); + for (const name in LogLevel) { + if (isNaN(+name) && l === name.toLowerCase()) { + return LogLevel[name]; } } - if (logEnv.detailLevel) { - detailLevel = logEnv.detailLevel; - } - traceToConsole = logEnv.traceToConsole; } - return new Logger(fileName, traceToConsole, detailLevel); + return undefined; + } + + // TSS_LOG "{ level: "normal | verbose | terse", file?: string}" + function createLogger() { + const cmdLineLogFileName = findArgument("--logFile"); + const cmdLineVerbosity = getLogLevel(findArgument("--logVerbosity")); + const envLogOptions = parseLoggingEnvironmentString(process.env["TSS_LOG"]); + + const logFileName = cmdLineLogFileName + ? stripQuotes(cmdLineLogFileName) + : envLogOptions.logToFile + ? envLogOptions.file || (__dirname + "/.log" + process.pid.toString()) + : undefined; + + const logVerbosity = cmdLineVerbosity || envLogOptions.detailLevel; + return new Logger(logFileName, envLogOptions.traceToConsole, logVerbosity) } // This places log file in the directory containing editorServices.js // TODO: check that this location is writable @@ -555,7 +577,6 @@ namespace ts.server { // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? const pollingWatchedFileSet = createPollingWatchedFileSet(); - const logger = createLoggerFromEnv(); const pending: Buffer[] = []; let canWrite = true; @@ -607,6 +628,8 @@ namespace ts.server { return s.length > 2 && s.charCodeAt(0) === CharacterCodes.slash && s.charCodeAt(1) === CharacterCodes.slash; } + const logger = createLogger(); + const sys = ts.sys; // use watchGuard process on Windows when node version is 4 or later const useWatchGuard = process.platform === "win32" && getNodeMajorVersion() >= 4; diff --git a/src/server/session.ts b/src/server/session.ts index b5e7e44970d..64fce61a095 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -1420,8 +1420,9 @@ namespace ts.server { const scriptInfo = project.getScriptInfoForNormalizedPath(file); const startPosition = getStartPosition(); const endPosition = getEndPosition(); + const formatOptions = this.projectService.getFormatCodeOptions(file); - const codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes); + const codeActions = project.getLanguageService().getCodeFixesAtPosition(file, startPosition, endPosition, args.errorCodes, formatOptions); if (!codeActions) { return undefined; } diff --git a/src/server/shared.ts b/src/server/shared.ts index 77f66fc5a2d..5d65f8c90e9 100644 --- a/src/server/shared.ts +++ b/src/server/shared.ts @@ -5,6 +5,7 @@ namespace ts.server { export const ActionInvalidate: ActionInvalidate = "action::invalidate"; export const EventBeginInstallTypes: EventBeginInstallTypes = "event::beginInstallTypes"; export const EventEndInstallTypes: EventEndInstallTypes = "event::endInstallTypes"; + export const EventInitializationFailed: EventInitializationFailed = "event::initializationFailed"; export namespace Arguments { export const GlobalCacheLocation = "--globalTypingsCacheLocation"; diff --git a/src/server/types.ts b/src/server/types.ts index 6edf424cbe6..81e1f09639f 100644 --- a/src/server/types.ts +++ b/src/server/types.ts @@ -47,9 +47,15 @@ declare namespace ts.server { export type ActionInvalidate = "action::invalidate"; export type EventBeginInstallTypes = "event::beginInstallTypes"; export type EventEndInstallTypes = "event::endInstallTypes"; + export type EventInitializationFailed = "event::initializationFailed"; export interface TypingInstallerResponse { - readonly kind: ActionSet | ActionInvalidate | EventBeginInstallTypes | EventEndInstallTypes; + readonly kind: ActionSet | ActionInvalidate | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed; + } + + export interface InitializationFailedResponse extends TypingInstallerResponse { + readonly kind: EventInitializationFailed; + readonly message: string; } export interface ProjectResponse extends TypingInstallerResponse { diff --git a/src/server/typingsInstaller/nodeTypingsInstaller.ts b/src/server/typingsInstaller/nodeTypingsInstaller.ts index 0a69d701953..74497504ba3 100644 --- a/src/server/typingsInstaller/nodeTypingsInstaller.ts +++ b/src/server/typingsInstaller/nodeTypingsInstaller.ts @@ -13,14 +13,20 @@ namespace ts.server.typingsInstaller { } = require("path"); class FileLog implements Log { + private logEnabled = true; constructor(private readonly logFile?: string) { } isEnabled() { - return this.logFile !== undefined; + return this.logEnabled && this.logFile !== undefined; } writeLine(text: string) { - fs.appendFileSync(this.logFile, text + sys.newLine); + try { + fs.appendFileSync(this.logFile, text + sys.newLine); + } + catch(e) { + this.logEnabled = false; + } } } @@ -68,6 +74,8 @@ namespace ts.server.typingsInstaller { private readonly npmPath: string; readonly typesRegistry: Map; + private delayedInitializationError: InitializationFailedResponse; + constructor(globalTypingsCacheLocation: string, throttleLimit: number, log: Log) { super( sys, @@ -93,6 +101,11 @@ namespace ts.server.typingsInstaller { if (this.log.isEnabled()) { this.log.writeLine(`Error updating ${TypesRegistryPackageName} package: ${(e).message}`); } + // store error info to report it later when it is known that server is already listening to events from typings installer + this.delayedInitializationError = { + kind: "event::initializationFailed", + message: (e).message + }; } this.typesRegistry = loadTypesRegistryFile(getTypesRegistryFileLocation(globalTypingsCacheLocation), this.installTypingHost, this.log); @@ -100,6 +113,11 @@ namespace ts.server.typingsInstaller { listen() { process.on("message", (req: DiscoverTypings | CloseProject) => { + if (this.delayedInitializationError) { + // report initializationFailed error + this.sendResponse(this.delayedInitializationError); + this.delayedInitializationError = undefined; + } switch (req.kind) { case "discover": this.install(req); @@ -110,7 +128,7 @@ namespace ts.server.typingsInstaller { }); } - protected sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes) { + protected sendResponse(response: SetTypings | InvalidateCachedTypings | BeginInstallTypes | EndInstallTypes | InitializationFailedResponse) { if (this.log.isEnabled()) { this.log.writeLine(`Sending response: ${JSON.stringify(response)}`); } diff --git a/src/services/codeFixProvider.ts b/src/services/codeFixProvider.ts index c22ba779d19..bab5356e99c 100644 --- a/src/services/codeFixProvider.ts +++ b/src/services/codeFixProvider.ts @@ -13,6 +13,7 @@ namespace ts { newLineCharacter: string; host: LanguageServiceHost; cancellationToken: CancellationToken; + rulesProvider: formatting.RulesProvider; } export namespace codefix { diff --git a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts index 4528c48774d..6d7efb64c6f 100644 --- a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts +++ b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts @@ -26,22 +26,13 @@ namespace ts.codefix { } } } - - const newPosition = getOpenBraceEnd(constructor, sourceFile); - const changes = [{ - fileName: sourceFile.fileName, textChanges: [{ - newText: superCall.getText(sourceFile), - span: { start: newPosition, length: 0 } - }, - { - newText: "", - span: { start: superCall.getStart(sourceFile), length: superCall.getWidth(sourceFile) } - }] - }]; + const changeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + changeTracker.insertNodeAfter(sourceFile, getOpenBrace(constructor, sourceFile), superCall, { suffix: context.newLineCharacter }); + changeTracker.deleteNode(sourceFile, superCall); return [{ description: getLocaleSpecificMessage(Diagnostics.Make_super_call_the_first_statement_in_the_constructor), - changes + changes: changeTracker.getChanges() }]; function findSuperCall(n: Node): ExpressionStatement { diff --git a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts index 0dede87cf28..822c34842fd 100644 --- a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts +++ b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts @@ -10,10 +10,13 @@ namespace ts.codefix { return undefined; } - const newPosition = getOpenBraceEnd(token.parent, sourceFile); + const changeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + const superCall = createStatement(createCall(createSuper(), /*typeArguments*/ undefined, /*argumentsArray*/ emptyArray)); + changeTracker.insertNodeAfter(sourceFile, getOpenBrace(token.parent, sourceFile), superCall, { suffix: context.newLineCharacter }); + return [{ description: getLocaleSpecificMessage(Diagnostics.Add_missing_super_call), - changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "super();", span: { start: newPosition, length: 0 } }] }] + changes: changeTracker.getChanges() }]; } }); diff --git a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts index 1e72700ec01..80d4345a943 100644 --- a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts +++ b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts @@ -21,26 +21,20 @@ namespace ts.codefix { return undefined; } - let changeStart = extendsToken.getStart(sourceFile); - let changeEnd = extendsToken.getEnd(); - const textChanges: TextChange[] = [{ newText: " implements", span: { start: changeStart, length: changeEnd - changeStart } }]; + const changeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + changeTracker.replaceNode(sourceFile, extendsToken, createToken(SyntaxKind.ImplementsKeyword)); // We replace existing keywords with commas. for (let i = 1; i < heritageClauses.length; i++) { const keywordToken = heritageClauses[i].getFirstToken(); if (keywordToken) { - changeStart = keywordToken.getStart(sourceFile); - changeEnd = keywordToken.getEnd(); - textChanges.push({ newText: ",", span: { start: changeStart, length: changeEnd - changeStart } }); + changeTracker.replaceNode(sourceFile, keywordToken, createToken(SyntaxKind.CommaToken)); } } const result = [{ description: getLocaleSpecificMessage(Diagnostics.Change_extends_to_implements), - changes: [{ - fileName: sourceFile.fileName, - textChanges: textChanges - }] + changes: changeTracker.getChanges() }]; return result; diff --git a/src/services/codefixes/fixForgottenThisPropertyAccess.ts b/src/services/codefixes/fixForgottenThisPropertyAccess.ts index c9d59dd8337..711a3289a27 100644 --- a/src/services/codefixes/fixForgottenThisPropertyAccess.ts +++ b/src/services/codefixes/fixForgottenThisPropertyAccess.ts @@ -5,11 +5,15 @@ namespace ts.codefix { getCodeActions: (context: CodeFixContext) => { const sourceFile = context.sourceFile; const token = getTokenAtPosition(sourceFile, context.span.start); - const start = token.getStart(sourceFile); + if (token.kind !== SyntaxKind.Identifier) { + return undefined; + } + const changeTracker = textChanges.ChangeTracker.fromCodeFixContext(context); + changeTracker.replaceNode(sourceFile, token, createPropertyAccess(createThis(), token)); return [{ description: getLocaleSpecificMessage(Diagnostics.Add_this_to_unresolved_variable), - changes: [{ fileName: sourceFile.fileName, textChanges: [{ newText: "this.", span: { start, length: 0 } }] }] + changes: changeTracker.getChanges() }]; } }); diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 3e07efbc3de..743c13ccf38 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -130,7 +130,7 @@ namespace ts.codefix { // this is a module id -> module import declaration map const cachedImportDeclarations: (ImportDeclaration | ImportEqualsDeclaration)[][] = []; - let cachedNewImportInsertPosition: number; + let lastImportDeclaration: Node; const currentTokenMeaning = getMeaningFromLocation(token); if (context.errorCode === Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code) { @@ -138,14 +138,14 @@ namespace ts.codefix { return getCodeActionForImport(symbol, /*isDefault*/ false, /*isNamespaceImport*/ true); } - const allPotentialModules = checker.getAmbientModules(); + const candidateModules = checker.getAmbientModules(); for (const otherSourceFile of allSourceFiles) { if (otherSourceFile !== sourceFile && isExternalOrCommonJsModule(otherSourceFile)) { - allPotentialModules.push(otherSourceFile.symbol); + candidateModules.push(otherSourceFile.symbol); } } - for (const moduleSymbol of allPotentialModules) { + for (const moduleSymbol of candidateModules) { context.cancellationToken.throwIfCancellationRequested(); // check the default export @@ -277,14 +277,12 @@ namespace ts.codefix { * If the existing import declaration already has a named import list, just * insert the identifier into that list. */ - const textChange = getTextChangeForImportClause(namedImportDeclaration.importClause); + const fileTextChanges = getTextChangeForImportClause(namedImportDeclaration.importClause); const moduleSpecifierWithoutQuotes = stripQuotes(namedImportDeclaration.moduleSpecifier.getText()); actions.push(createCodeAction( Diagnostics.Add_0_to_existing_import_declaration_from_1, [name, moduleSpecifierWithoutQuotes], - textChange.newText, - textChange.span, - sourceFile.fileName, + fileTextChanges, "InsertingIntoExistingImport", moduleSpecifierWithoutQuotes )); @@ -302,49 +300,31 @@ namespace ts.codefix { return declaration.moduleReference.getText(); } - function getTextChangeForImportClause(importClause: ImportClause): TextChange { - const newImportText = isDefault ? `default as ${name}` : name; + function getTextChangeForImportClause(importClause: ImportClause): FileTextChanges[] { + //const newImportText = isDefault ? `default as ${name}` : name; const importList = importClause.namedBindings; + const newImportSpecifier = createImportSpecifier(/*propertyName*/ undefined, createIdentifier(name)); // case 1: // original text: import default from "module" // change to: import default, { name } from "module" - if (!importList && importClause.name) { - const start = importClause.name.getEnd(); - return { - newText: `, { ${newImportText} }`, - span: { start, length: 0 } - }; - } - // case 2: // original text: import {} from "module" // change to: import { name } from "module" - if (importList.elements.length === 0) { - const start = importList.getStart(); - return { - newText: `{ ${newImportText} }`, - span: { start, length: importList.getEnd() - start } - }; + if (!importList || importList.elements.length === 0) { + const newImportClause = createImportClause(importClause.name, createNamedImports([newImportSpecifier])); + return createChangeTracker().replaceNode(sourceFile, importClause, newImportClause).getChanges(); } - // case 3: - // original text: import { foo, bar } from "module" - // change to: import { foo, bar, name } from "module" - const insertPoint = importList.elements[importList.elements.length - 1].getEnd(); /** * If the import list has one import per line, preserve that. Otherwise, insert on same line as last element * import { * foo * } from "./module"; */ - const startLine = getLineOfLocalPosition(sourceFile, importList.getStart()); - const endLine = getLineOfLocalPosition(sourceFile, importList.getEnd()); - const oneImportPerLine = endLine - startLine > importList.elements.length; - - return { - newText: `,${oneImportPerLine ? context.newLineCharacter : " "}${newImportText}`, - span: { start: insertPoint, length: 0 } - }; + return createChangeTracker().insertNodeInListAfter( + sourceFile, + importList.elements[importList.elements.length - 1], + newImportSpecifier).getChanges(); } function getCodeActionForNamespaceImport(declaration: ImportDeclaration | ImportEqualsDeclaration): ImportCodeAction { @@ -370,48 +350,47 @@ namespace ts.codefix { return createCodeAction( Diagnostics.Change_0_to_1, [name, `${namespacePrefix}.${name}`], - `${namespacePrefix}.`, - { start: token.getStart(), length: 0 }, - sourceFile.fileName, + createChangeTracker().replaceNode(sourceFile, token, createPropertyAccess(createIdentifier(namespacePrefix), name)).getChanges(), "CodeChange" ); } } function getCodeActionForNewImport(moduleSpecifier?: string): ImportCodeAction { - if (!cachedNewImportInsertPosition) { + if (!lastImportDeclaration) { // insert after any existing imports - let lastModuleSpecifierEnd = -1; - for (const moduleSpecifier of sourceFile.imports) { - const end = moduleSpecifier.getEnd(); - if (!lastModuleSpecifierEnd || end > lastModuleSpecifierEnd) { - lastModuleSpecifierEnd = end; + for (let i = sourceFile.statements.length - 1; i >= 0; i--) { + const statement = sourceFile.statements[i]; + if (statement.kind === SyntaxKind.ImportEqualsDeclaration || statement.kind === SyntaxKind.ImportDeclaration) { + lastImportDeclaration = statement; + break; } } - cachedNewImportInsertPosition = lastModuleSpecifierEnd > 0 ? sourceFile.getLineEndOfPosition(lastModuleSpecifierEnd) : sourceFile.getStart(); } const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames); const moduleSpecifierWithoutQuotes = stripQuotes(moduleSpecifier || getModuleSpecifierForNewImport()); - const importStatementText = isDefault - ? `import ${name} from "${moduleSpecifierWithoutQuotes}"` + const changeTracker = createChangeTracker(); + const importClause = isDefault + ? createImportClause(createIdentifier(name), /*namedBindings*/ undefined) : isNamespaceImport - ? `import * as ${name} from "${moduleSpecifierWithoutQuotes}"` - : `import { ${name} } from "${moduleSpecifierWithoutQuotes}"`; + ? createImportClause(/*name*/ undefined, createNamespaceImport(createIdentifier(name))) + : createImportClause(/*name*/ undefined, createNamedImports([createImportSpecifier(/*propertyName*/ undefined, createIdentifier(name))])); + const importDecl = createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, importClause, createLiteral(moduleSpecifierWithoutQuotes)); + if (!lastImportDeclaration) { + changeTracker.insertNodeAt(sourceFile, sourceFile.getStart(), importDecl, { suffix: `${context.newLineCharacter}${context.newLineCharacter}` }); + } + else { + changeTracker.insertNodeAfter(sourceFile, lastImportDeclaration, importDecl, { suffix: context.newLineCharacter }); + } // if this file doesn't have any import statements, insert an import statement and then insert a new line // between the only import statement and user code. Otherwise just insert the statement because chances // are there are already a new line seperating code and import statements. - const newText = cachedNewImportInsertPosition === sourceFile.getStart() - ? `${importStatementText};${context.newLineCharacter}${context.newLineCharacter}` - : `${context.newLineCharacter}${importStatementText};`; - return createCodeAction( Diagnostics.Import_0_from_1, [name, `"${moduleSpecifierWithoutQuotes}"`], - newText, - { start: cachedNewImportInsertPosition, length: 0 }, - sourceFile.fileName, + changeTracker.getChanges(), "NewImport", moduleSpecifierWithoutQuotes ); @@ -576,17 +555,19 @@ namespace ts.codefix { } + function createChangeTracker() { + return textChanges.ChangeTracker.fromCodeFixContext(context);; + } + function createCodeAction( description: DiagnosticMessage, diagnosticArgs: string[], - newText: string, - span: TextSpan, - fileName: string, + changes: FileTextChanges[], kind: ImportCodeActionKind, moduleSpecifier?: string): ImportCodeAction { return { description: formatMessage.apply(undefined, [undefined, description].concat(diagnosticArgs)), - changes: [{ fileName, textChanges: [{ newText, span }] }], + changes, kind, moduleSpecifier }; diff --git a/src/services/codefixes/unusedIdentifierFixes.ts b/src/services/codefixes/unusedIdentifierFixes.ts index 6c8bd0a9dbe..f77f9723d0f 100644 --- a/src/services/codefixes/unusedIdentifierFixes.ts +++ b/src/services/codefixes/unusedIdentifierFixes.ts @@ -25,17 +25,17 @@ namespace ts.codefix { const forStatement = token.parent.parent.parent; const forInitializer = forStatement.initializer; if (forInitializer.declarations.length === 1) { - return createCodeFixToRemoveNode(forInitializer); + return deleteNode(forInitializer); } else { - return removeSingleItem(forInitializer.declarations, token); + return deleteNodeInList(token.parent); } case SyntaxKind.ForOfStatement: const forOfStatement = token.parent.parent.parent; if (forOfStatement.initializer.kind === SyntaxKind.VariableDeclarationList) { const forOfInitializer = forOfStatement.initializer; - return createCodeFix("{}", forOfInitializer.declarations[0].getStart(), forOfInitializer.declarations[0].getWidth()); + return replaceNode(forOfInitializer.declarations[0], createObjectLiteral()); } break; @@ -47,51 +47,59 @@ namespace ts.codefix { case SyntaxKind.CatchClause: const catchClause = token.parent.parent; const parameter = catchClause.variableDeclaration.getChildren()[0]; - return createCodeFixToRemoveNode(parameter); + return deleteNode(parameter); default: const variableStatement = token.parent.parent.parent; if (variableStatement.declarationList.declarations.length === 1) { - return createCodeFixToRemoveNode(variableStatement); + return deleteNode(variableStatement); } else { - const declarations = variableStatement.declarationList.declarations; - return removeSingleItem(declarations, token); + return deleteNodeInList(token.parent); } } case SyntaxKind.TypeParameter: const typeParameters = (token.parent.parent).typeParameters; if (typeParameters.length === 1) { - return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 2); + const previousToken = getTokenAtPosition(sourceFile, typeParameters.pos - 1); + if (!previousToken || previousToken.kind !== SyntaxKind.LessThanToken) { + return deleteRange(typeParameters); + } + const nextToken = getTokenAtPosition(sourceFile, typeParameters.end); + if (!nextToken || nextToken.kind !== SyntaxKind.GreaterThanToken) { + return deleteRange(typeParameters); + } + return deleteNodeRange(previousToken, nextToken); } else { - return removeSingleItem(typeParameters, token); + return deleteNodeInList(token.parent); } case ts.SyntaxKind.Parameter: const functionDeclaration = token.parent.parent; if (functionDeclaration.parameters.length === 1) { - return createCodeFixToRemoveNode(token.parent); + return deleteNode(token.parent); } else { - return removeSingleItem(functionDeclaration.parameters, token); + return deleteNodeInList(token.parent); } // handle case where 'import a = A;' case SyntaxKind.ImportEqualsDeclaration: - const importEquals = findImportDeclaration(token); - return createCodeFixToRemoveNode(importEquals); + const importEquals = getAncestor(token, SyntaxKind.ImportEqualsDeclaration); + return deleteNode(importEquals); case SyntaxKind.ImportSpecifier: const namedImports = token.parent.parent; if (namedImports.elements.length === 1) { // Only 1 import and it is unused. So the entire declaration should be removed. - const importSpec = findImportDeclaration(token); - return createCodeFixToRemoveNode(importSpec); + const importSpec = getAncestor(token, SyntaxKind.ImportDeclaration); + return deleteNode(importSpec); } else { - return removeSingleItem(namedImports.elements, token); + // delete import specifier + return deleteNodeInList(token.parent); } // handle case where "import d, * as ns from './file'" @@ -99,92 +107,79 @@ namespace ts.codefix { case SyntaxKind.ImportClause: // this covers both 'import |d|' and 'import |d,| *' const importClause = token.parent; if (!importClause.namedBindings) { // |import d from './file'| or |import * as ns from './file'| - const importDecl = findImportDeclaration(importClause); - return createCodeFixToRemoveNode(importDecl); + const importDecl = getAncestor(importClause, SyntaxKind.ImportDeclaration); + return deleteNode(importDecl); } else { // import |d,| * as ns from './file' - const start = importClause.name.getStart(); - const text = sourceFile.text; - let end = getFirstNonSpaceCharacterPosition(text, importClause.name.end); - if (sourceFile.text.charCodeAt(end) === CharacterCodes.comma) { - end = getFirstNonSpaceCharacterPosition(text, end + 1); + const start = importClause.name.getStart(sourceFile); + const nextToken = getTokenAtPosition(sourceFile, importClause.name.end); + if (nextToken && nextToken.kind === SyntaxKind.CommaToken) { + // shift first non-whitespace position after comma to the start position of the node + return deleteRange({ pos: start, end: skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/true) }); + } + else { + return deleteNode(importClause.name); } - - return createCodeFix("", start, end - start); } case SyntaxKind.NamespaceImport: const namespaceImport = token.parent; if (namespaceImport.name == token && !(namespaceImport.parent).name) { - const importDecl = findImportDeclaration(namespaceImport); - return createCodeFixToRemoveNode(importDecl); + const importDecl = getAncestor(namespaceImport, SyntaxKind.ImportDeclaration); + return deleteNode(importDecl); } else { - const start = (namespaceImport.parent).name.end; - return createCodeFix("", start, (namespaceImport.parent).namedBindings.end - start); + const previousToken = getTokenAtPosition(sourceFile, namespaceImport.pos - 1); + if (previousToken && previousToken.kind === SyntaxKind.CommaToken) { + const startPosition = textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, textChanges.Position.FullStart); + return deleteRange({ pos: startPosition, end: namespaceImport.end }); + } + return deleteRange(namespaceImport); } } break; case SyntaxKind.PropertyDeclaration: case SyntaxKind.NamespaceImport: - return createCodeFixToRemoveNode(token.parent); + return deleteNode(token.parent); } if (isDeclarationName(token)) { - return createCodeFixToRemoveNode(token.parent); + return deleteNode(token.parent); } else if (isLiteralComputedPropertyDeclarationName(token)) { - return createCodeFixToRemoveNode(token.parent.parent); + return deleteNode(token.parent.parent); } else { return undefined; } - function findImportDeclaration(token: Node): Node { - let importDecl = token; - while (importDecl.kind != SyntaxKind.ImportDeclaration && importDecl.parent) { - importDecl = importDecl.parent; - } - - return importDecl; + function deleteNode(n: Node) { + return makeChange(textChanges.ChangeTracker.fromCodeFixContext(context).deleteNode(sourceFile, n)); } - function createCodeFixToRemoveNode(node: Node) { - let end = node.getEnd(); - const endCharCode = sourceFile.text.charCodeAt(end); - const afterEndCharCode = sourceFile.text.charCodeAt(end + 1); - if (isLineBreak(endCharCode)) { - end += 1; - } - // in the case of CR LF, you could have two consecutive new line characters for one new line. - // this needs to be differenciated from two LF LF chars that actually mean two new lines. - if (isLineBreak(afterEndCharCode) && endCharCode !== afterEndCharCode) { - end += 1; - } - - const start = node.getStart(); - return createCodeFix("", start, end - start); + function deleteRange(range: TextRange) { + return makeChange(textChanges.ChangeTracker.fromCodeFixContext(context).deleteRange(sourceFile, range)); } - function createCodeFix(newText: string, start: number, length: number): CodeAction[] { + function deleteNodeInList(n: Node) { + return makeChange(textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeInList(sourceFile, n)); + } + + function deleteNodeRange(start: Node, end: Node) { + return makeChange(textChanges.ChangeTracker.fromCodeFixContext(context).deleteNodeRange(sourceFile, start, end)); + } + + function replaceNode(n: Node, newNode: Node) { + return makeChange(textChanges.ChangeTracker.fromCodeFixContext(context).replaceNode(sourceFile, n, newNode)); + } + + function makeChange(changeTracker: textChanges.ChangeTracker) { return [{ description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Remove_declaration_for_Colon_0), { 0: token.getText() }), - changes: [{ - fileName: sourceFile.fileName, - textChanges: [{ newText, span: { start, length } }] - }] + changes: changeTracker.getChanges() }]; } - - function removeSingleItem(elements: NodeArray, token: T): CodeAction[] { - if (elements[0] === token.parent) { - return createCodeFix("", token.parent.pos, token.parent.end - token.parent.pos + 1); - } - else { - return createCodeFix("", token.parent.pos - 1, token.parent.end - token.parent.pos + 1); - } - } } }); } \ No newline at end of file diff --git a/src/services/completions.ts b/src/services/completions.ts index 525f1a8416c..738c8b3b8bd 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -447,8 +447,8 @@ namespace ts.Completions { return undefined; } - const { parent, kind } = contextToken; - if (kind === SyntaxKind.DotToken) { + let parent = contextToken.parent; + if (contextToken.kind === SyntaxKind.DotToken) { if (parent.kind === SyntaxKind.PropertyAccessExpression) { node = (contextToken.parent).expression; isRightOfDot = true; @@ -464,16 +464,24 @@ namespace ts.Completions { } } else if (sourceFile.languageVariant === LanguageVariant.JSX) { - switch (contextToken.parent.kind) { + // + // If the tagname is a property access expression, we will then walk up to the top most of property access expression. + // Then, try to get a JSX container and its associated attributes type. + if (parent && parent.kind === SyntaxKind.PropertyAccessExpression) { + contextToken = parent; + parent = parent.parent; + } + + switch (parent.kind) { case SyntaxKind.JsxClosingElement: - if (kind === SyntaxKind.SlashToken) { + if (contextToken.kind === SyntaxKind.SlashToken) { isStartingCloseTag = true; location = contextToken; } break; case SyntaxKind.BinaryExpression: - if (!((contextToken.parent as BinaryExpression).left.flags & NodeFlags.ThisNodeHasError)) { + if (!((parent as BinaryExpression).left.flags & NodeFlags.ThisNodeHasError)) { // It has a left-hand side, so we're not in an opening JSX tag. break; } @@ -482,7 +490,7 @@ namespace ts.Completions { case SyntaxKind.JsxSelfClosingElement: case SyntaxKind.JsxElement: case SyntaxKind.JsxOpeningElement: - if (kind === SyntaxKind.LessThanToken) { + if (contextToken.kind === SyntaxKind.LessThanToken) { isRightOfOpenTag = true; location = contextToken; } @@ -950,6 +958,7 @@ namespace ts.Completions { case SyntaxKind.LessThanSlashToken: case SyntaxKind.SlashToken: case SyntaxKind.Identifier: + case SyntaxKind.PropertyAccessExpression: case SyntaxKind.JsxAttributes: case SyntaxKind.JsxAttribute: case SyntaxKind.JsxSpreadAttribute: diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 201d64e4d7e..4fa3b71a3a2 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -314,24 +314,55 @@ namespace ts.formatting { return 0; } + /* @internal */ + export function formatNode(node: Node, sourceFileLike: SourceFileLike, languageVariant: LanguageVariant, initialIndentation: number, delta: number, rulesProvider: RulesProvider): TextChange[] { + const range = { pos: 0, end: sourceFileLike.text.length }; + return formatSpanWorker( + range, + node, + initialIndentation, + delta, + getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end), + rulesProvider.getFormatOptions(), + rulesProvider, + FormattingRequestKind.FormatSelection, + _ => false, // assume that node does not have any errors + sourceFileLike); + } + function formatSpan(originalRange: TextRange, sourceFile: SourceFile, options: FormatCodeSettings, rulesProvider: RulesProvider, requestKind: FormattingRequestKind): TextChange[] { + // find the smallest node that fully wraps the range and compute the initial indentation for the node + const enclosingNode = findEnclosingNode(originalRange, sourceFile); + return formatSpanWorker( + originalRange, + enclosingNode, + SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options), + getOwnOrInheritedDelta(enclosingNode, options, sourceFile), + getFormattingScanner(sourceFile.text, sourceFile.languageVariant, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end), + options, + rulesProvider, + requestKind, + prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange), + sourceFile); + } - const rangeContainsError = prepareRangeContainsErrorFunction(sourceFile.parseDiagnostics, originalRange); + function formatSpanWorker(originalRange: TextRange, + enclosingNode: Node, + initialIndentation: number, + delta: number, + formattingScanner: FormattingScanner, + options: FormatCodeSettings, + rulesProvider: RulesProvider, + requestKind: FormattingRequestKind, + rangeContainsError: (r: TextRange) => boolean, + sourceFile: SourceFileLike): TextChange[] { // formatting context is used by rules provider const formattingContext = new FormattingContext(sourceFile, requestKind); - - // find the smallest node that fully wraps the range and compute the initial indentation for the node - const enclosingNode = findEnclosingNode(originalRange, sourceFile); - - const formattingScanner = getFormattingScanner(sourceFile, getScanStartPosition(enclosingNode, originalRange, sourceFile), originalRange.end); - - const initialIndentation = SmartIndenter.getIndentationForNode(enclosingNode, originalRange, sourceFile, options); - let previousRangeHasError: boolean; let previousRange: TextRangeWithKind; let previousParent: Node; @@ -351,7 +382,6 @@ namespace ts.formatting { undecoratedStartLine = sourceFile.getLineAndCharacterOfPosition(getNonDecoratorTokenPosOfNode(enclosingNode, sourceFile)).line; } - const delta = getOwnOrInheritedDelta(enclosingNode, options, sourceFile); processNode(enclosingNode, enclosingNode, startLine, undecoratedStartLine, initialIndentation, delta); } diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index bd5ca352476..26b538dfc5e 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -15,7 +15,7 @@ namespace ts.formatting { private contextNodeBlockIsOnOneLine: boolean; private nextNodeBlockIsOnOneLine: boolean; - constructor(public sourceFile: SourceFile, public formattingRequestKind: FormattingRequestKind) { + constructor(public readonly sourceFile: SourceFileLike, public formattingRequestKind: FormattingRequestKind) { } public updateContext(currentRange: TextRangeWithKind, currentTokenParent: Node, nextRange: TextRangeWithKind, nextTokenParent: Node, commonParent: Node) { diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 2020352f86b..20d190de2f3 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -30,11 +30,11 @@ namespace ts.formatting { RescanJsxText, } - export function getFormattingScanner(sourceFile: SourceFile, startPos: number, endPos: number): FormattingScanner { + export function getFormattingScanner(text: string, languageVariant: LanguageVariant, startPos: number, endPos: number): FormattingScanner { Debug.assert(scanner === undefined, "Scanner should be undefined"); - scanner = sourceFile.languageVariant === LanguageVariant.JSX ? jsxScanner : standardScanner; + scanner = languageVariant === LanguageVariant.JSX ? jsxScanner : standardScanner; - scanner.setText(sourceFile.text); + scanner.setText(text); scanner.setTextPos(startPos); let wasNewLine = true; @@ -276,8 +276,8 @@ namespace ts.formatting { function isOnToken(): boolean { Debug.assert(scanner !== undefined); - const current = (lastTokenInfo && lastTokenInfo.token.kind) || scanner.getToken(); - const startPos = (lastTokenInfo && lastTokenInfo.token.pos) || scanner.getStartPos(); + const current = lastTokenInfo ? lastTokenInfo.token.kind : scanner.getToken(); + const startPos = lastTokenInfo ? lastTokenInfo.token.pos : scanner.getStartPos(); return startPos < endPos && current !== SyntaxKind.EndOfFileToken && !isTrivia(current); } diff --git a/src/services/formatting/rulesProvider.ts b/src/services/formatting/rulesProvider.ts index 14e08e4857a..660d5f34a0e 100644 --- a/src/services/formatting/rulesProvider.ts +++ b/src/services/formatting/rulesProvider.ts @@ -24,6 +24,10 @@ namespace ts.formatting { return this.rulesMap; } + public getFormatOptions(): Readonly { + return this.options; + } + public ensureUpToDate(options: ts.FormatCodeSettings) { if (!this.options || !ts.compareDataObjects(this.options, options)) { const activeRules = this.createActiveRules(options); diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index eb9e1ba04c5..b5c901482a7 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -8,7 +8,19 @@ namespace ts.formatting { Unknown = -1 } - export function getIndentation(position: number, sourceFile: SourceFile, options: EditorSettings): number { + /** + * Computed indentation for a given position in source file + * @param position - position in file + * @param sourceFile - target source file + * @param options - set of editor options that control indentation + * @param assumeNewLineBeforeCloseBrace - false when getIndentation is called on the text from the real source file. + * true - when we need to assume that position is on the newline. This is usefult for codefixes, i.e. + * function f() { + * |} + * when inserting some text after open brace we would like to get the value of indentation as if newline was already there. + * However by default indentation at position | will be 0 so 'assumeNewLineBeforeCloseBrace' allows to override this behavior, + */ + export function getIndentation(position: number, sourceFile: SourceFile, options: EditorSettings, assumeNewLineBeforeCloseBrace = false): number { if (position > sourceFile.text.length) { return getBaseIndentation(options); // past EOF } @@ -71,13 +83,14 @@ namespace ts.formatting { if (positionBelongsToNode(current, position, sourceFile) && shouldIndentChildNode(current, previous)) { currentStart = getStartLineAndCharacterForNode(current, sourceFile); - if (nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile)) { - indentationDelta = 0; + const nextTokenKind = nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken, current, lineAtPosition, sourceFile); + if (nextTokenKind !== NextTokenKind.Unknown) { + // handle cases when codefix is about to be inserted before the close brace + indentationDelta = assumeNewLineBeforeCloseBrace && nextTokenKind === NextTokenKind.CloseBrace ? options.indentSize : 0; } else { indentationDelta = lineAtPosition !== currentStart.line ? options.indentSize : 0; } - break; } @@ -218,15 +231,21 @@ namespace ts.formatting { return findColumnForFirstNonWhitespaceCharacterInLine(currentLineAndChar, sourceFile, options); } - function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): boolean { + const enum NextTokenKind { + Unknown, + OpenBrace, + CloseBrace + } + + function nextTokenIsCurlyBraceOnSameLineAsCursor(precedingToken: Node, current: Node, lineAtPosition: number, sourceFile: SourceFile): NextTokenKind { const nextToken = findNextToken(precedingToken, current); if (!nextToken) { - return false; + return NextTokenKind.Unknown; } if (nextToken.kind === SyntaxKind.OpenBraceToken) { // open braces are always indented at the parent level - return true; + return NextTokenKind.OpenBrace; } else if (nextToken.kind === SyntaxKind.CloseBraceToken) { // close braces are indented at the parent level if they are located on the same line with cursor @@ -239,17 +258,17 @@ namespace ts.formatting { // $} const nextTokenStartLine = getStartLineAndCharacterForNode(nextToken, sourceFile).line; - return lineAtPosition === nextTokenStartLine; + return lineAtPosition === nextTokenStartLine ? NextTokenKind.CloseBrace : NextTokenKind.Unknown; } - return false; + return NextTokenKind.Unknown; } - function getStartLineAndCharacterForNode(n: Node, sourceFile: SourceFile): LineAndCharacter { + function getStartLineAndCharacterForNode(n: Node, sourceFile: SourceFileLike): LineAndCharacter { return sourceFile.getLineAndCharacterOfPosition(n.getStart(sourceFile)); } - export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFile): boolean { + export function childStartsOnTheSameLineWithElseInIfStatement(parent: Node, child: TextRangeWithKind, childStartLine: number, sourceFile: SourceFileLike): boolean { if (parent.kind === SyntaxKind.IfStatement && (parent).elseStatement === child) { const elseKeyword = findChildOfKind(parent, SyntaxKind.ElseKeyword, sourceFile); Debug.assert(elseKeyword !== undefined); @@ -261,15 +280,15 @@ namespace ts.formatting { return false; } - function getContainingList(node: Node, sourceFile: SourceFile): NodeArray { + function getListIfStartEndIsInListRange(list: NodeArray, start: number, end: number) { + return list && rangeContainsStartEnd(list, start, end) ? list : undefined; + } + + export function getContainingList(node: Node, sourceFile: SourceFile): NodeArray { if (node.parent) { switch (node.parent.kind) { case SyntaxKind.TypeReference: - if ((node.parent).typeArguments && - rangeContainsStartEnd((node.parent).typeArguments, node.getStart(sourceFile), node.getEnd())) { - return (node.parent).typeArguments; - } - break; + return getListIfStartEndIsInListRange((node.parent).typeArguments, node.getStart(sourceFile), node.getEnd()); case SyntaxKind.ObjectLiteralExpression: return (node.parent).properties; case SyntaxKind.ArrayLiteralExpression: @@ -280,30 +299,26 @@ namespace ts.formatting { case SyntaxKind.MethodDeclaration: case SyntaxKind.MethodSignature: case SyntaxKind.CallSignature: + case SyntaxKind.Constructor: + case SyntaxKind.ConstructorType: case SyntaxKind.ConstructSignature: { const start = node.getStart(sourceFile); - if ((node.parent).typeParameters && - rangeContainsStartEnd((node.parent).typeParameters, start, node.getEnd())) { - return (node.parent).typeParameters; - } - if (rangeContainsStartEnd((node.parent).parameters, start, node.getEnd())) { - return (node.parent).parameters; - } - break; + return getListIfStartEndIsInListRange((node.parent).typeParameters, start, node.getEnd()) || + getListIfStartEndIsInListRange((node.parent).parameters, start, node.getEnd()); } + case SyntaxKind.ClassDeclaration: + return getListIfStartEndIsInListRange((node.parent).typeParameters, node.getStart(sourceFile), node.getEnd()); case SyntaxKind.NewExpression: case SyntaxKind.CallExpression: { const start = node.getStart(sourceFile); - if ((node.parent).typeArguments && - rangeContainsStartEnd((node.parent).typeArguments, start, node.getEnd())) { - return (node.parent).typeArguments; - } - if ((node.parent).arguments && - rangeContainsStartEnd((node.parent).arguments, start, node.getEnd())) { - return (node.parent).arguments; - } - break; + return getListIfStartEndIsInListRange((node.parent).typeArguments, start, node.getEnd()) || + getListIfStartEndIsInListRange((node.parent).arguments, start, node.getEnd()); } + case SyntaxKind.VariableDeclarationList: + return getListIfStartEndIsInListRange((node.parent).declarations, node.getStart(sourceFile), node.getEnd()); + case SyntaxKind.NamedImports: + case SyntaxKind.NamedExports: + return getListIfStartEndIsInListRange((node.parent).elements, node.getStart(sourceFile), node.getEnd()); } } return undefined; @@ -400,7 +415,7 @@ namespace ts.formatting { value of 'character' for '$' is 3 value of 'column' for '$' is 6 (assuming that tab size is 4) */ - export function findFirstNonWhitespaceCharacterAndColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorSettings) { + export function findFirstNonWhitespaceCharacterAndColumn(startPos: number, endPos: number, sourceFile: SourceFileLike, options: EditorSettings) { let character = 0; let column = 0; for (let pos = startPos; pos < endPos; pos++) { @@ -421,7 +436,7 @@ namespace ts.formatting { return { column, character }; } - export function findFirstNonWhitespaceColumn(startPos: number, endPos: number, sourceFile: SourceFile, options: EditorSettings): number { + export function findFirstNonWhitespaceColumn(startPos: number, endPos: number, sourceFile: SourceFileLike, options: EditorSettings): number { return findFirstNonWhitespaceCharacterAndColumn(startPos, endPos, sourceFile, options).column; } diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index d0cf8c0aec8..d993facbb1d 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -178,7 +178,8 @@ namespace ts.JsDoc { const posLineAndChar = sourceFile.getLineAndCharacterOfPosition(position); const lineStart = sourceFile.getLineStarts()[posLineAndChar.line]; - const indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character); + // replace non-whitespace characters in prefix with spaces. + const indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character).replace(/\S/i, () => " "); const isJavaScriptFile = hasJavaScriptFileExtension(sourceFile.fileName); let docParams = ""; diff --git a/src/services/services.ts b/src/services/services.ts index 24744c0d204..4f51d46a816 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -24,6 +24,7 @@ /// /// /// +/// /// /// @@ -63,7 +64,7 @@ namespace ts { return getSourceFileOfNode(this); } - public getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number { + public getStart(sourceFile?: SourceFileLike, includeJsDocComment?: boolean): number { return getTokenPosOfNode(this, sourceFile, includeJsDocComment); } @@ -129,7 +130,7 @@ namespace ts { return list; } - private createChildren(sourceFile?: SourceFile) { + private createChildren(sourceFile?: SourceFileLike) { let children: Node[]; if (this.kind >= SyntaxKind.FirstNode) { scanner.setText((sourceFile || this.getSourceFile()).text); @@ -182,7 +183,7 @@ namespace ts { return this._children[index]; } - public getChildren(sourceFile?: SourceFile): Node[] { + public getChildren(sourceFile?: SourceFileLike): Node[] { if (!this._children) this.createChildren(sourceFile); return this._children; } @@ -231,7 +232,7 @@ namespace ts { return getSourceFileOfNode(this); } - public getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number { + public getStart(sourceFile?: SourceFileLike, includeJsDocComment?: boolean): number { return getTokenPosOfNode(this, sourceFile, includeJsDocComment); } @@ -1683,7 +1684,7 @@ namespace ts { return []; } - function getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[]): CodeAction[] { + function getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[] { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); const span = { start, length: end - start }; @@ -1701,7 +1702,8 @@ namespace ts { program: program, newLineCharacter: newLineChar, host: host, - cancellationToken: cancellationToken + cancellationToken: cancellationToken, + rulesProvider: getRuleProvider(formatOptions) }; const fixes = codefix.getFixes(context); diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts new file mode 100644 index 00000000000..6f8a67a0535 --- /dev/null +++ b/src/services/textChanges.ts @@ -0,0 +1,666 @@ +/* @internal */ +namespace ts.textChanges { + + /** + * Currently for simplicity we store recovered positions on the node itself. + * It can be changed to side-table later if we decide that current design is too invasive. + */ + function getPos(n: TextRange) { + return (n)["__pos"]; + } + + function setPos(n: TextRange, pos: number) { + (n)["__pos"] = pos; + } + + function getEnd(n: TextRange) { + return (n)["__end"]; + } + + function setEnd(n: TextRange, end: number) { + (n)["__end"] = end; + } + + export interface ConfigurableStart { + useNonAdjustedStartPosition?: boolean; + } + export interface ConfigurableEnd { + useNonAdjustedEndPosition?: boolean; + } + + export enum Position { + FullStart, + Start + } + + function skipWhitespacesAndLineBreaks(text: string, start: number) { + return skipTrivia(text, start, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + } + + function hasCommentsBeforeLineBreak(text: string, start: number) { + let i = start; + while (i < text.length) { + const ch = text.charCodeAt(i); + if (isWhiteSpaceSingleLine(ch)) { + i++; + continue; + } + return ch === CharacterCodes.slash; + } + return false; + } + + /** + * Usually node.pos points to a position immediately after the previous token. + * If this position is used as a beginning of the span to remove - it might lead to removing the trailing trivia of the previous node, i.e: + * const x; // this is x + * ^ - pos for the next variable declaration will point here + * const y; // this is y + * ^ - end for previous variable declaration + * Usually leading trivia of the variable declaration 'y' should not include trailing trivia (whitespace, comment 'this is x' and newline) from the preceding + * variable declaration and trailing trivia for 'y' should include (whitespace, comment 'this is y', newline). + * By default when removing nodes we adjust start and end positions to respect specification of the trivia above. + * If pos\end should be interpreted literally 'useNonAdjustedStartPosition' or 'useNonAdjustedEndPosition' should be set to true + */ + export type ConfigurableStartEnd = ConfigurableStart & ConfigurableEnd; + + export interface InsertNodeOptions { + /** + * Text to be inserted before the new node + */ + prefix?: string; + /** + * Text to be inserted after the new node + */ + suffix?: string; + /** + * Text of inserted node will be formatted with this indentation, otherwise indentation will be inferred from the old node + */ + indentation?: number; + /** + * Text of inserted node will be formatted with this delta, otherwise delta will be inferred from the new node kind + */ + delta?: number; + } + + export type ChangeNodeOptions = ConfigurableStartEnd & InsertNodeOptions; + + interface Change { + readonly sourceFile: SourceFile; + readonly range: TextRange; + readonly useIndentationFromFile?: boolean; + readonly node?: Node; + readonly options?: ChangeNodeOptions; + } + + export function getSeparatorCharacter(separator: Token) { + return tokenToString(separator.kind); + } + + export function getAdjustedStartPosition(sourceFile: SourceFile, node: Node, options: ConfigurableStart, position: Position) { + if (options.useNonAdjustedStartPosition) { + return node.getFullStart(); + } + const fullStart = node.getFullStart(); + const start = node.getStart(sourceFile); + if (fullStart === start) { + return start; + } + const fullStartLine = getLineStartPositionForPosition(fullStart, sourceFile); + const startLine = getLineStartPositionForPosition(start, sourceFile); + if (startLine === fullStartLine) { + // full start and start of the node are on the same line + // a, b; + // ^ ^ + // | start + // fullstart + // when b is replaced - we usually want to keep the leading trvia + // when b is deleted - we delete it + return position === Position.Start ? start : fullStart; + } + // get start position of the line following the line that contains fullstart position + let adjustedStartPosition = getStartPositionOfLine(getLineOfLocalPosition(sourceFile, fullStartLine) + 1, sourceFile); + // skip whitespaces/newlines + adjustedStartPosition = skipWhitespacesAndLineBreaks(sourceFile.text, adjustedStartPosition); + return getStartPositionOfLine(getLineOfLocalPosition(sourceFile, adjustedStartPosition), sourceFile); + } + + export function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd) { + if (options.useNonAdjustedEndPosition) { + return node.getEnd(); + } + const end = node.getEnd(); + const newEnd = skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true); + // check if last character before newPos is linebreak + // if yes - considered all skipped trivia to be trailing trivia of the node + return newEnd !== end && isLineBreak(sourceFile.text.charCodeAt(newEnd - 1)) + ? newEnd + : end; + } + + /** + * Checks if 'candidate' argument is a legal separator in the list that contains 'node' as an element + */ + function isSeparator(node: Node, candidate: Node): candidate is Token { + return candidate && node.parent && (candidate.kind === SyntaxKind.CommaToken || (candidate.kind === SyntaxKind.SemicolonToken && node.parent.kind === SyntaxKind.ObjectLiteralExpression)); + } + + function spaces(count: number) { + let s = ""; + for (let i = 0; i < count; i++) { + s += " "; + } + return s; + } + + export class ChangeTracker { + private changes: Change[] = []; + private readonly newLineCharacter: string; + + public static fromCodeFixContext(context: CodeFixContext) { + return new ChangeTracker(context.newLineCharacter === "\n" ? NewLineKind.LineFeed : NewLineKind.CarriageReturnLineFeed, context.rulesProvider); + } + + constructor( + private readonly newLine: NewLineKind, + private readonly rulesProvider: formatting.RulesProvider, + private readonly validator?: (text: NonFormattedText) => void) { + this.newLineCharacter = getNewLineCharacter({ newLine }); + } + + public deleteNode(sourceFile: SourceFile, node: Node, options: ConfigurableStartEnd = {}) { + const startPosition = getAdjustedStartPosition(sourceFile, node, options, Position.FullStart); + const endPosition = getAdjustedEndPosition(sourceFile, node, options); + this.changes.push({ sourceFile, options, range: { pos: startPosition, end: endPosition } }); + return this; + } + + public deleteRange(sourceFile: SourceFile, range: TextRange) { + this.changes.push({ sourceFile, range }); + return this; + } + + public deleteNodeRange(sourceFile: SourceFile, startNode: Node, endNode: Node, options: ConfigurableStartEnd = {}) { + const startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.FullStart); + const endPosition = getAdjustedEndPosition(sourceFile, endNode, options); + this.changes.push({ sourceFile, options, range: { pos: startPosition, end: endPosition } }); + return this; + } + + public deleteNodeInList(sourceFile: SourceFile, node: Node) { + const containingList = formatting.SmartIndenter.getContainingList(node, sourceFile); + if (!containingList) { + Debug.fail("node is not a list element"); + return this; + } + const index = containingList.indexOf(node); + if (index < 0) { + return this; + } + if (containingList.length === 1) { + this.deleteNode(sourceFile, node); + return this; + } + if (index !== containingList.length - 1) { + const nextToken = getTokenAtPosition(sourceFile, node.end); + if (nextToken && isSeparator(node, nextToken)) { + // find first non-whitespace position in the leading trivia of the node + const startPosition = skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + const nextElement = containingList[index + 1]; + /// find first non-whitespace position in the leading trivia of the next node + const endPosition = skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, nextElement, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); + // shift next node so its first non-whitespace position will be moved to the first non-whitespace position of the deleted node + this.deleteRange(sourceFile, { pos: startPosition, end: endPosition }); + } + } + else { + const previousToken = getTokenAtPosition(sourceFile, containingList[index - 1].end); + if (previousToken && isSeparator(node, previousToken)) { + this.deleteNodeRange(sourceFile, previousToken, node); + } + } + return this; + } + + public replaceRange(sourceFile: SourceFile, range: TextRange, newNode: Node, options: InsertNodeOptions = {}) { + this.changes.push({ sourceFile, range, options, node: newNode }); + return this; + } + + public replaceNode(sourceFile: SourceFile, oldNode: Node, newNode: Node, options: ChangeNodeOptions = {}) { + const startPosition = getAdjustedStartPosition(sourceFile, oldNode, options, Position.Start); + const endPosition = getAdjustedEndPosition(sourceFile, oldNode, options); + this.changes.push({ sourceFile, options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } }); + return this; + } + + public replaceNodeRange(sourceFile: SourceFile, startNode: Node, endNode: Node, newNode: Node, options: ChangeNodeOptions = {}) { + const startPosition = getAdjustedStartPosition(sourceFile, startNode, options, Position.Start); + const endPosition = getAdjustedEndPosition(sourceFile, endNode, options); + this.changes.push({ sourceFile, options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: endPosition } }); + return this; + } + + public insertNodeAt(sourceFile: SourceFile, pos: number, newNode: Node, options: InsertNodeOptions = {}) { + this.changes.push({ sourceFile, options, node: newNode, range: { pos: pos, end: pos } }); + return this; + } + + public insertNodeBefore(sourceFile: SourceFile, before: Node, newNode: Node, options: InsertNodeOptions & ConfigurableStart = {}) { + const startPosition = getAdjustedStartPosition(sourceFile, before, options, Position.Start); + this.changes.push({ sourceFile, options, useIndentationFromFile: true, node: newNode, range: { pos: startPosition, end: startPosition } }); + return this; + } + + public insertNodeAfter(sourceFile: SourceFile, after: Node, newNode: Node, options: InsertNodeOptions & ConfigurableEnd = {}) { + if ((isStatementButNotDeclaration(after)) || + after.kind === SyntaxKind.PropertyDeclaration || + after.kind === SyntaxKind.PropertySignature || + after.kind === SyntaxKind.MethodSignature) { + // check if previous statement ends with semicolon + // if not - insert semicolon to preserve the code from changing the meaning due to ASI + if (sourceFile.text.charCodeAt(after.end - 1) !== CharacterCodes.semicolon) { + this.changes.push({ + sourceFile, + options: {}, + range: { pos: after.end, end: after.end }, + node: createToken(SyntaxKind.SemicolonToken) + }) + } + } + const endPosition = getAdjustedEndPosition(sourceFile, after, options); + this.changes.push({ sourceFile, options, useIndentationFromFile: true, node: newNode, range: { pos: endPosition, end: endPosition } }); + return this; + } + + /** + * This function should be used to insert nodes in lists when nodes don't carry separators as the part of the node range, + * i.e. arguments in arguments lists, parameters in parameter lists etc. Statements or class elements are different in sense that + * for them separators are treated as the part of the node. + */ + public insertNodeInListAfter(sourceFile: SourceFile, after: Node, newNode: Node) { + const containingList = formatting.SmartIndenter.getContainingList(after, sourceFile); + if (!containingList) { + Debug.fail("node is not a list element"); + return this; + } + const index = containingList.indexOf(after); + if (index < 0) { + return this; + } + const end = after.getEnd(); + if (index !== containingList.length - 1) { + // any element except the last one + // use next sibling as an anchor + const nextToken = getTokenAtPosition(sourceFile, after.end); + if (nextToken && isSeparator(after, nextToken)) { + // for list + // a, b, c + // create change for adding 'e' after 'a' as + // - find start of next element after a (it is b) + // - use this start as start and end position in final change + // - build text of change by formatting the text of node + separator + whitespace trivia of b + + // in multiline case it will work as + // a, + // b, + // c, + // result - '*' denotes leading trivia that will be inserted after new text (displayed as '#') + // a,* + //***insertedtext# + //###b, + // c, + // find line and character of the next element + const lineAndCharOfNextElement = getLineAndCharacterOfPosition(sourceFile, skipWhitespacesAndLineBreaks(sourceFile.text, containingList[index + 1].getFullStart())); + // find line and character of the token that precedes next element (usually it is separator) + const lineAndCharOfNextToken = getLineAndCharacterOfPosition(sourceFile, nextToken.end); + let prefix: string; + let startPos: number; + if (lineAndCharOfNextToken.line === lineAndCharOfNextElement.line) { + // next element is located on the same line with separator: + // a,$$$$b + // ^ ^ + // | |-next element + // |-separator + // where $$$ is some leading trivia + // for a newly inserted node we'll maintain the same relative position comparing to separator and replace leading trivia with spaces + // a, x,$$$$b + // ^ ^ ^ + // | | |-next element + // | |-new inserted node padded with spaces + // |-separator + startPos = nextToken.end; + prefix = spaces(lineAndCharOfNextElement.character - lineAndCharOfNextToken.character); + } + else { + // next element is located on different line that separator + // let insert position be the beginning of the line that contains next element + startPos = getStartPositionOfLine(lineAndCharOfNextElement.line, sourceFile); + } + + this.changes.push({ + sourceFile, + range: { pos: startPos, end: containingList[index + 1].getStart(sourceFile) }, + node: newNode, + useIndentationFromFile: true, + options: { + prefix, + // write separator and leading trivia of the next element as suffix + suffix: `${tokenToString(nextToken.kind)}${sourceFile.text.substring(nextToken.end, containingList[index + 1].getStart(sourceFile))}` + } + }); + } + } + else { + const afterStart = after.getStart(sourceFile); + const afterStartLinePosition = getLineStartPositionForPosition(afterStart, sourceFile); + + let separator: SyntaxKind.CommaToken | SyntaxKind.SemicolonToken; + let multilineList = false; + + // insert element after the last element in the list that has more than one item + // pick the element preceding the after element to: + // - pick the separator + // - determine if list is a multiline + if (containingList.length === 1) { + // if list has only one element then we'll format is as multiline if node has comment in trailing trivia, or as singleline otherwise + // i.e. var x = 1 // this is x + // | new element will be inserted at this position + separator = SyntaxKind.CommaToken; + } + else { + // element has more than one element, pick separator from the list + const tokenBeforeInsertPosition = findPrecedingToken(after.pos, sourceFile); + separator = isSeparator(after, tokenBeforeInsertPosition) ? tokenBeforeInsertPosition.kind : SyntaxKind.CommaToken; + // determine if list is multiline by checking lines of after element and element that precedes it. + const afterMinusOneStartLinePosition = getLineStartPositionForPosition(containingList[index - 1].getStart(sourceFile), sourceFile); + multilineList = afterMinusOneStartLinePosition !== afterStartLinePosition; + } + if (hasCommentsBeforeLineBreak(sourceFile.text, after.end)) { + // in this case we'll always treat containing list as multiline + multilineList = true; + } + if (multilineList) { + // insert separator immediately following the 'after' node to preserve comments in trailing trivia + this.changes.push({ + sourceFile, + range: { pos: end, end }, + node: createToken(separator), + options: {} + }); + // use the same indentation as 'after' item + const indentation = formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.rulesProvider.getFormatOptions()); + // insert element before the line break on the line that contains 'after' element + let insertPos = skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true, /*stopAtComments*/ false); + if (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) { + insertPos-- + } + this.changes.push({ + sourceFile, + range: { pos: insertPos, end: insertPos }, + node: newNode, + options: { indentation, prefix: this.newLineCharacter } + }); + } + else { + this.changes.push({ + sourceFile, + range: { pos: end, end }, + node: newNode, + options: { prefix: `${tokenToString(separator)} ` } + }); + } + } + return this; + } + + public getChanges(): FileTextChanges[] { + const changesPerFile = createFileMap(); + // group changes per file + for (const c of this.changes) { + let changesInFile = changesPerFile.get(c.sourceFile.path); + if (!changesInFile) { + changesPerFile.set(c.sourceFile.path, changesInFile = []); + }; + changesInFile.push(c); + } + // convert changes + const fileChangesList: FileTextChanges[] = []; + changesPerFile.forEachValue(path => { + const changesInFile = changesPerFile.get(path); + const sourceFile = changesInFile[0].sourceFile; + const fileTextChanges: FileTextChanges = { fileName: sourceFile.fileName, textChanges: [] }; + for (const c of ChangeTracker.normalize(changesInFile)) { + fileTextChanges.textChanges.push({ + span: this.computeSpan(c, sourceFile), + newText: this.computeNewText(c, sourceFile) + }); + } + fileChangesList.push(fileTextChanges); + }); + + return fileChangesList; + } + + private computeSpan(change: Change, _sourceFile: SourceFile): TextSpan { + return createTextSpanFromBounds(change.range.pos, change.range.end); + } + + private computeNewText(change: Change, sourceFile: SourceFile): string { + if (!change.node) { + // deletion case + return ""; + } + const options = change.options || {}; + const nonFormattedText = getNonformattedText(change.node, sourceFile, this.newLine); + if (this.validator) { + this.validator(nonFormattedText); + } + + const formatOptions = this.rulesProvider.getFormatOptions(); + const pos = change.range.pos; + const posStartsLine = getLineStartPositionForPosition(pos, sourceFile) === pos; + + const initialIndentation = + change.options.indentation !== undefined + ? change.options.indentation + : change.useIndentationFromFile + ? formatting.SmartIndenter.getIndentation(change.range.pos, sourceFile, formatOptions, posStartsLine || (change.options.prefix == this.newLineCharacter)) + : 0; + const delta = + change.options.delta !== undefined + ? change.options.delta + : formatting.SmartIndenter.shouldIndentChildNode(change.node) + ? formatOptions.indentSize + : 0; + + let text = applyFormatting(nonFormattedText, sourceFile, initialIndentation, delta, this.rulesProvider); + // strip initial indentation (spaces or tabs) if text will be inserted in the middle of the line + // however keep indentation if it is was forced + text = posStartsLine || change.options.indentation !== undefined ? text : text.replace(/^\s+/, ""); + return (options.prefix || "") + text + (options.suffix || ""); + } + + private static normalize(changes: Change[]) { + // order changes by start position + const normalized = stableSort(changes, (a, b) => a.range.pos - b.range.pos); + // verify that end position of the change is less than start position of the next change + for (let i = 0; i < normalized.length - 2; i++) { + Debug.assert(normalized[i].range.end <= normalized[i + 1].range.pos); + } + return normalized; + } + } + + export interface NonFormattedText { + readonly text: string; + readonly node: Node; + } + + export function getNonformattedText(node: Node, sourceFile: SourceFile, newLine: NewLineKind): NonFormattedText { + const options = { newLine, target: sourceFile.languageVersion }; + const writer = new Writer(getNewLineCharacter(options)); + const printer = createPrinter(options, writer); + printer.writeNode(EmitHint.Unspecified, node, sourceFile, writer); + return { text: writer.getText(), node: assignPositionsToNode(node) }; + } + + export function applyFormatting(nonFormattedText: NonFormattedText, sourceFile: SourceFile, initialIndentation: number, delta: number, rulesProvider: formatting.RulesProvider) { + const lineMap = computeLineStarts(nonFormattedText.text); + const file: SourceFileLike = { + text: nonFormattedText.text, + lineMap, + getLineAndCharacterOfPosition: pos => computeLineAndCharacterOfPosition(lineMap, pos) + }; + const changes = formatting.formatNode(nonFormattedText.node, file, sourceFile.languageVariant, initialIndentation, delta, rulesProvider); + return applyChanges(nonFormattedText.text, changes); + } + + export function applyChanges(text: string, changes: TextChange[]): string { + for (let i = changes.length - 1; i >= 0; i--) { + const change = changes[i]; + text = `${text.substring(0, change.span.start)}${change.newText}${text.substring(textSpanEnd(change.span))}`; + } + return text; + } + + function isTrivia(s: string) { + return skipTrivia(s, 0) === s.length; + } + + const nullTransformationContext: TransformationContext = { + enableEmitNotification: noop, + enableSubstitution: noop, + endLexicalEnvironment: () => undefined, + getCompilerOptions: notImplemented, + getEmitHost: notImplemented, + getEmitResolver: notImplemented, + hoistFunctionDeclaration: noop, + hoistVariableDeclaration: noop, + isEmitNotificationEnabled: notImplemented, + isSubstitutionEnabled: notImplemented, + onEmitNode: noop, + onSubstituteNode: notImplemented, + readEmitHelpers: notImplemented, + requestEmitHelper: noop, + resumeLexicalEnvironment: noop, + startLexicalEnvironment: noop, + suspendLexicalEnvironment: noop + }; + + function assignPositionsToNode(node: Node): Node { + const visited = visitEachChild(node, assignPositionsToNode, nullTransformationContext, assignPositionsToNodeArray); + // create proxy node for non synthesized nodes + const newNode = nodeIsSynthesized(visited) + ? visited + : (Proxy.prototype = visited, new (Proxy)()); + newNode.pos = getPos(node); + newNode.end = getEnd(node); + return newNode; + + function Proxy() { } + } + + function assignPositionsToNodeArray(nodes: NodeArray, visitor: Visitor, test?: (node: Node) => boolean, start?: number, count?: number) { + const visited = visitNodes(nodes, visitor, test, start, count); + if (!visited) { + return visited; + } + // clone nodearray if necessary + const nodeArray = visited === nodes ? createNodeArray(visited.slice(0)) : visited; + nodeArray.pos = getPos(nodes); + nodeArray.end = getEnd(nodes); + return nodeArray; + } + + class Writer implements EmitTextWriter, PrintHandlers { + private lastNonTriviaPosition = 0; + private readonly writer: EmitTextWriter; + + public readonly onEmitNode: PrintHandlers["onEmitNode"]; + public readonly onBeforeEmitNodeArray: PrintHandlers["onBeforeEmitNodeArray"]; + public readonly onAfterEmitNodeArray: PrintHandlers["onAfterEmitNodeArray"]; + + constructor(newLine: string) { + this.writer = createTextWriter(newLine); + this.onEmitNode = (hint, node, printCallback) => { + if (node) { + setPos(node, this.lastNonTriviaPosition); + } + printCallback(hint, node); + if (node) { + setEnd(node, this.lastNonTriviaPosition); + } + }; + this.onBeforeEmitNodeArray = nodes => { + if (nodes) { + setPos(nodes, this.lastNonTriviaPosition); + } + }; + this.onAfterEmitNodeArray = nodes => { + if (nodes) { + setEnd(nodes, this.lastNonTriviaPosition); + } + }; + } + + private setLastNonTriviaPosition(s: string, force: boolean) { + if (force || !isTrivia(s)) { + this.lastNonTriviaPosition = this.writer.getTextPos(); + let i = 0; + while (isWhiteSpace(s.charCodeAt(s.length - i - 1))) { + i++; + } + // trim trailing whitespaces + this.lastNonTriviaPosition -= i; + } + } + + write(s: string): void { + this.writer.write(s); + this.setLastNonTriviaPosition(s, /*force*/ false); + } + writeTextOfNode(text: string, node: Node): void { + this.writer.writeTextOfNode(text, node); + } + writeLine(): void { + this.writer.writeLine(); + } + increaseIndent(): void { + this.writer.increaseIndent(); + } + decreaseIndent(): void { + this.writer.decreaseIndent(); + } + getText(): string { + return this.writer.getText(); + } + rawWrite(s: string): void { + this.writer.rawWrite(s); + this.setLastNonTriviaPosition(s, /*force*/ false); + } + writeLiteral(s: string): void { + this.writer.writeLiteral(s); + this.setLastNonTriviaPosition(s, /*force*/ true); + } + getTextPos(): number { + return this.writer.getTextPos(); + } + getLine(): number { + return this.writer.getLine(); + } + getColumn(): number { + return this.writer.getColumn(); + } + getIndent(): number { + return this.writer.getIndent(); + } + isAtStartOfLine(): boolean { + return this.writer.isAtStartOfLine(); + } + reset(): void { + this.writer.reset(); + this.lastNonTriviaPosition = 0; + } + } +} \ No newline at end of file diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index b97b3c509f8..6b40c71e204 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -63,6 +63,7 @@ "shims.ts", "signatureHelp.ts", "symbolDisplay.ts", + "textChanges.ts", "formatting/formatting.ts", "formatting/formattingContext.ts", "formatting/formattingRequestKind.ts", diff --git a/src/services/types.ts b/src/services/types.ts index c7852db6d6e..149bb4340dc 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -4,7 +4,11 @@ namespace ts { getChildCount(sourceFile?: SourceFile): number; getChildAt(index: number, sourceFile?: SourceFile): Node; getChildren(sourceFile?: SourceFile): Node[]; + /* @internal */ + getChildren(sourceFile?: SourceFileLike): Node[]; getStart(sourceFile?: SourceFile, includeJsDocComment?: boolean): number; + /* @internal */ + getStart(sourceFile?: SourceFileLike, includeJsDocComment?: boolean): number; getFullStart(): number; getEnd(): number; getWidth(sourceFile?: SourceFile): number; @@ -59,6 +63,10 @@ namespace ts { update(newText: string, textChangeRange: TextChangeRange): SourceFile; } + export interface SourceFileLike { + getLineAndCharacterOfPosition(pos: number): LineAndCharacter; + } + /** * Represents an immutable snapshot of a script at a specified time.Once acquired, the * snapshot is observably immutable. i.e. the same calls with the same parameters will return @@ -248,7 +256,7 @@ namespace ts { isValidBraceCompletionAtPosition(fileName: string, position: number, openingBrace: number): boolean; - getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[]): CodeAction[]; + getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: FormatCodeSettings): CodeAction[]; getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean): EmitOutput; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index c894df121f8..de062d312c9 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -394,8 +394,8 @@ namespace ts { list: Node; } - export function getLineStartPositionForPosition(position: number, sourceFile: SourceFile): number { - const lineStarts = sourceFile.getLineStarts(); + export function getLineStartPositionForPosition(position: number, sourceFile: SourceFileLike): number { + const lineStarts = getLineStarts(sourceFile); const line = sourceFile.getLineAndCharacterOfPosition(position).line; return lineStarts[line]; } @@ -604,7 +604,7 @@ namespace ts { return !!findChildOfKind(n, kind, sourceFile); } - export function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFile): Node | undefined { + export function findChildOfKind(n: Node, kind: SyntaxKind, sourceFile?: SourceFileLike): Node | undefined { return forEach(n.getChildren(sourceFile), c => c.kind === kind && c); } @@ -1003,10 +1003,6 @@ namespace ts { return undefined; } - export function isToken(n: Node): boolean { - return n.kind >= SyntaxKind.FirstToken && n.kind <= SyntaxKind.LastToken; - } - export function isWord(kind: SyntaxKind): boolean { return kind === SyntaxKind.Identifier || isKeyword(kind); } @@ -1384,9 +1380,9 @@ namespace ts { }; } - export function getOpenBraceEnd(constructor: ConstructorDeclaration, sourceFile: SourceFile) { + export function getOpenBrace(constructor: ConstructorDeclaration, sourceFile: SourceFile) { // First token is the open curly, this is where we want to put the 'super' call. - return constructor.body.getFirstToken(sourceFile).getEnd(); + return constructor.body.getFirstToken(sourceFile); } export function getFirstNonSpaceCharacterPosition(text: string, position: number) { diff --git a/tests/baselines/reference/2dArrays.symbols b/tests/baselines/reference/2dArrays.symbols index 8d6b6b167e6..6f02cdcf963 100644 --- a/tests/baselines/reference/2dArrays.symbols +++ b/tests/baselines/reference/2dArrays.symbols @@ -25,11 +25,11 @@ class Board { >allShipsSunk : Symbol(Board.allShipsSunk, Decl(2dArrays.ts, 9, 18)) return this.ships.every(function (val) { return val.isSunk; }); ->this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>this.ships.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >this.ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13)) >this : Symbol(Board, Decl(2dArrays.ts, 5, 1)) >ships : Symbol(Board.ships, Decl(2dArrays.ts, 7, 13)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) >val.isSunk : Symbol(Ship.isSunk, Decl(2dArrays.ts, 3, 12)) >val : Symbol(val, Decl(2dArrays.ts, 12, 42)) diff --git a/tests/baselines/reference/2dArrays.types b/tests/baselines/reference/2dArrays.types index 00805899294..cd5ddc0efa5 100644 --- a/tests/baselines/reference/2dArrays.types +++ b/tests/baselines/reference/2dArrays.types @@ -26,12 +26,12 @@ class Board { return this.ships.every(function (val) { return val.isSunk; }); >this.ships.every(function (val) { return val.isSunk; }) : boolean ->this.ships.every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean +>this.ships.every : { (callbackfn: (this: undefined, value: Ship, index: number, array: Ship[]) => boolean): boolean; (callbackfn: (this: undefined, value: Ship, index: number, array: Ship[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Ship, index: number, array: Ship[]) => boolean, thisArg: Z): boolean; } >this.ships : Ship[] >this : this >ships : Ship[] ->every : (callbackfn: (value: Ship, index: number, array: Ship[]) => boolean, thisArg?: any) => boolean ->function (val) { return val.isSunk; } : (val: Ship) => boolean +>every : { (callbackfn: (this: undefined, value: Ship, index: number, array: Ship[]) => boolean): boolean; (callbackfn: (this: undefined, value: Ship, index: number, array: Ship[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Ship, index: number, array: Ship[]) => boolean, thisArg: Z): boolean; } +>function (val) { return val.isSunk; } : (this: undefined, val: Ship) => boolean >val : Ship >val.isSunk : boolean >val : Ship diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols index ff576a36423..750c7ba85af 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.symbols @@ -35,16 +35,16 @@ paired.reduce((b3, b4) => b3.concat({}), []); >b3 : Symbol(b3, Decl(anyInferenceAnonymousFunctions.ts, 13, 15)) paired.map((c1) => c1.count); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) >c1 : Symbol(c1, Decl(anyInferenceAnonymousFunctions.ts, 15, 12)) paired.map(function (c2) { return c2.count; }); ->paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>paired.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >paired : Symbol(paired, Decl(anyInferenceAnonymousFunctions.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) >c2 : Symbol(c2, Decl(anyInferenceAnonymousFunctions.ts, 16, 21)) diff --git a/tests/baselines/reference/anyInferenceAnonymousFunctions.types b/tests/baselines/reference/anyInferenceAnonymousFunctions.types index 1f3bb78f958..ee176215421 100644 --- a/tests/baselines/reference/anyInferenceAnonymousFunctions.types +++ b/tests/baselines/reference/anyInferenceAnonymousFunctions.types @@ -57,10 +57,10 @@ paired.reduce((b3, b4) => b3.concat({}), []); paired.map((c1) => c1.count); >paired.map((c1) => c1.count) : any[] ->paired.map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>paired.map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >paired : any[] ->map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } ->(c1) => c1.count : (c1: any) => any +>map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>(c1) => c1.count : (this: undefined, c1: any) => any >c1 : any >c1.count : any >c1 : any @@ -68,10 +68,10 @@ paired.map((c1) => c1.count); paired.map(function (c2) { return c2.count; }); >paired.map(function (c2) { return c2.count; }) : any[] ->paired.map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>paired.map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >paired : any[] ->map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } ->function (c2) { return c2.count; } : (c2: any) => any +>map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>function (c2) { return c2.count; } : (this: undefined, c2: any) => any >c2 : any >c2.count : any >c2 : any diff --git a/tests/baselines/reference/argumentsAsPropertyName.symbols b/tests/baselines/reference/argumentsAsPropertyName.symbols index 1e3e41abb6e..a17c660374c 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.symbols +++ b/tests/baselines/reference/argumentsAsPropertyName.symbols @@ -34,8 +34,8 @@ function myFunction(myType: MyType) { >x : Symbol(x, Decl(argumentsAsPropertyName.ts, 11, 13)) [1, 2, 3].forEach(function(j) { use(x); }) ->[1, 2, 3].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>[1, 2, 3].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >j : Symbol(j, Decl(argumentsAsPropertyName.ts, 12, 35)) >use : Symbol(use, Decl(argumentsAsPropertyName.ts, 3, 1)) >x : Symbol(x, Decl(argumentsAsPropertyName.ts, 11, 13)) diff --git a/tests/baselines/reference/argumentsAsPropertyName.types b/tests/baselines/reference/argumentsAsPropertyName.types index d0aaaa1cc72..00773d2a3cf 100644 --- a/tests/baselines/reference/argumentsAsPropertyName.types +++ b/tests/baselines/reference/argumentsAsPropertyName.types @@ -42,13 +42,13 @@ function myFunction(myType: MyType) { [1, 2, 3].forEach(function(j) { use(x); }) >[1, 2, 3].forEach(function(j) { use(x); }) : void ->[1, 2, 3].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>[1, 2, 3].forEach : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->function(j) { use(x); } : (j: number) => void +>forEach : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } +>function(j) { use(x); } : (this: undefined, j: number) => void >j : number >use(x) : any >use : (s: any) => any diff --git a/tests/baselines/reference/arrayConcatMap.symbols b/tests/baselines/reference/arrayConcatMap.symbols index c3df6bed533..1b26708ae94 100644 --- a/tests/baselines/reference/arrayConcatMap.symbols +++ b/tests/baselines/reference/arrayConcatMap.symbols @@ -1,14 +1,14 @@ === tests/cases/compiler/arrayConcatMap.ts === var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : Symbol(x, Decl(arrayConcatMap.ts, 0, 3)) ->[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >[].concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >concat : Symbol(Array.concat, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 20)) >a : Symbol(a, Decl(arrayConcatMap.ts, 0, 32)) .map(b => b.a); ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) >b : Symbol(b, Decl(arrayConcatMap.ts, 1, 15)) diff --git a/tests/baselines/reference/arrayConcatMap.types b/tests/baselines/reference/arrayConcatMap.types index 10e0a74c16d..da4e998f92c 100644 --- a/tests/baselines/reference/arrayConcatMap.types +++ b/tests/baselines/reference/arrayConcatMap.types @@ -2,7 +2,7 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >x : any[] >[].concat([{ a: 1 }], [{ a: 2 }]) .map(b => b.a) : any[] ->[].concat([{ a: 1 }], [{ a: 2 }]) .map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>[].concat([{ a: 1 }], [{ a: 2 }]) .map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >[].concat([{ a: 1 }], [{ a: 2 }]) : any[] >[].concat : { (...items: any[][]): any[]; (...items: any[]): any[]; } >[] : undefined[] @@ -17,8 +17,8 @@ var x = [].concat([{ a: 1 }], [{ a: 2 }]) >2 : 2 .map(b => b.a); ->map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } ->b => b.a : (b: any) => any +>map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>b => b.a : (this: undefined, b: any) => any >b : any >b.a : any >b : any diff --git a/tests/baselines/reference/arrayFilter.symbols b/tests/baselines/reference/arrayFilter.symbols index fcdd39117a7..81d92ba04b6 100644 --- a/tests/baselines/reference/arrayFilter.symbols +++ b/tests/baselines/reference/arrayFilter.symbols @@ -14,9 +14,9 @@ var foo = [ ] foo.filter(x => x.name); //should accepted all possible types not only boolean! ->foo.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) +>foo.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >foo : Symbol(foo, Decl(arrayFilter.ts, 0, 3)) ->filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(arrayFilter.ts, 6, 11)) >x.name : Symbol(name, Decl(arrayFilter.ts, 1, 5)) >x : Symbol(x, Decl(arrayFilter.ts, 6, 11)) diff --git a/tests/baselines/reference/arrayFilter.types b/tests/baselines/reference/arrayFilter.types index 43ef4161a06..de11296f832 100644 --- a/tests/baselines/reference/arrayFilter.types +++ b/tests/baselines/reference/arrayFilter.types @@ -22,10 +22,10 @@ var foo = [ foo.filter(x => x.name); //should accepted all possible types not only boolean! >foo.filter(x => x.name) : { name: string; }[] ->foo.filter : (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any) => { name: string; }[] +>foo.filter : { (callbackfn: (this: undefined, value: { name: string; }, index: number, array: { name: string; }[]) => any): { name: string; }[]; (callbackfn: (this: undefined, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: undefined): { name: string; }[]; (callbackfn: (this: Z, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: Z): { name: string; }[]; } >foo : { name: string; }[] ->filter : (callbackfn: (value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg?: any) => { name: string; }[] ->x => x.name : (x: { name: string; }) => string +>filter : { (callbackfn: (this: undefined, value: { name: string; }, index: number, array: { name: string; }[]) => any): { name: string; }[]; (callbackfn: (this: undefined, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: undefined): { name: string; }[]; (callbackfn: (this: Z, value: { name: string; }, index: number, array: { name: string; }[]) => any, thisArg: Z): { name: string; }[]; } +>x => x.name : (this: undefined, x: { name: string; }) => string >x : { name: string; } >x.name : string >x : { name: string; } diff --git a/tests/baselines/reference/bestChoiceType.symbols b/tests/baselines/reference/bestChoiceType.symbols index 737ba35b520..d6197ad9a6b 100644 --- a/tests/baselines/reference/bestChoiceType.symbols +++ b/tests/baselines/reference/bestChoiceType.symbols @@ -3,10 +3,10 @@ // Repro from #10041 (''.match(/ /) || []).map(s => s.toLowerCase()); ->(''.match(/ /) || []).map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->''.match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>(''.match(/ /) || []).map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>''.match : Symbol(String.match, Decl(lib.d.ts, --, --)) +>match : Symbol(String.match, Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 3, 26)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 3, 26)) @@ -19,8 +19,8 @@ function f1() { let x = ''.match(/ /); >x : Symbol(x, Decl(bestChoiceType.ts, 8, 7)) ->''.match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>''.match : Symbol(String.match, Decl(lib.d.ts, --, --)) +>match : Symbol(String.match, Decl(lib.d.ts, --, --)) let y = x || []; >y : Symbol(y, Decl(bestChoiceType.ts, 9, 7)) @@ -28,9 +28,9 @@ function f1() { let z = y.map(s => s.toLowerCase()); >z : Symbol(z, Decl(bestChoiceType.ts, 10, 7)) ->y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(bestChoiceType.ts, 9, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 10, 18)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 10, 18)) @@ -42,8 +42,8 @@ function f2() { let x = ''.match(/ /); >x : Symbol(x, Decl(bestChoiceType.ts, 14, 7)) ->''.match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>''.match : Symbol(String.match, Decl(lib.d.ts, --, --)) +>match : Symbol(String.match, Decl(lib.d.ts, --, --)) let y = x ? x : []; >y : Symbol(y, Decl(bestChoiceType.ts, 15, 7)) @@ -52,9 +52,9 @@ function f2() { let z = y.map(s => s.toLowerCase()); >z : Symbol(z, Decl(bestChoiceType.ts, 16, 7)) ->y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>y.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >y : Symbol(y, Decl(bestChoiceType.ts, 15, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 16, 18)) >s.toLowerCase : Symbol(String.toLowerCase, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(bestChoiceType.ts, 16, 18)) diff --git a/tests/baselines/reference/bestChoiceType.types b/tests/baselines/reference/bestChoiceType.types index 07b61fc9f84..1aa35c8da9e 100644 --- a/tests/baselines/reference/bestChoiceType.types +++ b/tests/baselines/reference/bestChoiceType.types @@ -4,17 +4,17 @@ (''.match(/ /) || []).map(s => s.toLowerCase()); >(''.match(/ /) || []).map(s => s.toLowerCase()) : string[] ->(''.match(/ /) || []).map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>(''.match(/ /) || []).map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >(''.match(/ /) || []) : RegExpMatchArray >''.match(/ /) || [] : RegExpMatchArray >''.match(/ /) : RegExpMatchArray | null ->''.match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>''.match : (regexp: string | RegExp) => RegExpMatchArray | null >'' : "" ->match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>match : (regexp: string | RegExp) => RegExpMatchArray | null >/ / : RegExp >[] : never[] ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->s => s.toLowerCase() : (s: string) => string +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>s => s.toLowerCase() : (this: undefined, s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string @@ -29,9 +29,9 @@ function f1() { let x = ''.match(/ /); >x : RegExpMatchArray | null >''.match(/ /) : RegExpMatchArray | null ->''.match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>''.match : (regexp: string | RegExp) => RegExpMatchArray | null >'' : "" ->match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>match : (regexp: string | RegExp) => RegExpMatchArray | null >/ / : RegExp let y = x || []; @@ -43,10 +43,10 @@ function f1() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>y.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >y : RegExpMatchArray ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->s => s.toLowerCase() : (s: string) => string +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>s => s.toLowerCase() : (this: undefined, s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string @@ -60,9 +60,9 @@ function f2() { let x = ''.match(/ /); >x : RegExpMatchArray | null >''.match(/ /) : RegExpMatchArray | null ->''.match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>''.match : (regexp: string | RegExp) => RegExpMatchArray | null >'' : "" ->match : { (regexp: string): RegExpMatchArray | null; (regexp: RegExp): RegExpMatchArray | null; } +>match : (regexp: string | RegExp) => RegExpMatchArray | null >/ / : RegExp let y = x ? x : []; @@ -75,10 +75,10 @@ function f2() { let z = y.map(s => s.toLowerCase()); >z : string[] >y.map(s => s.toLowerCase()) : string[] ->y.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>y.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >y : RegExpMatchArray ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->s => s.toLowerCase() : (s: string) => string +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>s => s.toLowerCase() : (this: undefined, s: string) => string >s : string >s.toLowerCase() : string >s.toLowerCase : () => string diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols index 2a6ba238b4b..33f8f88f9e0 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.symbols @@ -12,9 +12,9 @@ class A { >Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) x.forEach((v) => { ->x.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>x.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 3, 9)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(checkSwitchStatementIfCaseTypeIsString.ts, 4, 19)) switch(v) { diff --git a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types index 30f584894fc..7bae17fb922 100644 --- a/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types +++ b/tests/baselines/reference/checkSwitchStatementIfCaseTypeIsString.types @@ -13,10 +13,10 @@ class A { x.forEach((v) => { >x.forEach((v) => { switch(v) { case "test": use(this); } }) : void ->x.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>x.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } >x : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void ->(v) => { switch(v) { case "test": use(this); } } : (v: string) => void +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>(v) => { switch(v) { case "test": use(this); } } : (this: undefined, v: string) => void >v : string switch(v) { diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3.symbols b/tests/baselines/reference/classExpressionWithStaticProperties3.symbols index ff9b7b0d311..4c7750c12a7 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties3.symbols +++ b/tests/baselines/reference/classExpressionWithStaticProperties3.symbols @@ -31,9 +31,9 @@ for (let i = 0; i < 3; i++) { }); } arr.forEach(C => console.log(C.y())); ->arr.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>arr.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >arr : Symbol(arr, Decl(classExpressionWithStaticProperties3.ts, 2, 5)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >C : Symbol(C, Decl(classExpressionWithStaticProperties3.ts, 9, 12)) >console : Symbol(console, Decl(classExpressionWithStaticProperties3.ts, 1, 11)) >C.y : Symbol(y, Decl(classExpressionWithStaticProperties3.ts, 2, 12)) diff --git a/tests/baselines/reference/classExpressionWithStaticProperties3.types b/tests/baselines/reference/classExpressionWithStaticProperties3.types index b7f6102c8b7..dbbb1f378a8 100644 --- a/tests/baselines/reference/classExpressionWithStaticProperties3.types +++ b/tests/baselines/reference/classExpressionWithStaticProperties3.types @@ -42,10 +42,10 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>arr.forEach : { (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } >arr : { y(): number; }[] ->forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void ->C => console.log(C.y()) : (C: { y(): number; }) => any +>forEach : { (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } +>C => console.log(C.y()) : (this: undefined, C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any >console.log : any diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols index f1a7fa807f5..94ea5cfaa8c 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.symbols @@ -31,9 +31,9 @@ for (let i = 0; i < 3; i++) { }); } arr.forEach(C => console.log(C.y())); ->arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>arr.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >arr : Symbol(arr, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 5)) ->forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >C : Symbol(C, Decl(classExpressionWithStaticPropertiesES63.ts, 9, 12)) >console : Symbol(console, Decl(classExpressionWithStaticPropertiesES63.ts, 1, 11)) >C.y : Symbol(y, Decl(classExpressionWithStaticPropertiesES63.ts, 2, 12)) diff --git a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types index 3bc780785aa..b725df6fd74 100644 --- a/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types +++ b/tests/baselines/reference/classExpressionWithStaticPropertiesES63.types @@ -42,10 +42,10 @@ for (let i = 0; i < 3; i++) { } arr.forEach(C => console.log(C.y())); >arr.forEach(C => console.log(C.y())) : void ->arr.forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void +>arr.forEach : { (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } >arr : { y(): number; }[] ->forEach : (callbackfn: (value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg?: any) => void ->C => console.log(C.y()) : (C: { y(): number; }) => any +>forEach : { (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void): void; (callbackfn: (this: undefined, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: { y(): number; }, index: number, array: { y(): number; }[]) => void, thisArg: Z): void; } +>C => console.log(C.y()) : (this: undefined, C: { y(): number; }) => any >C : { y(): number; } >console.log(C.y()) : any >console.log : any diff --git a/tests/baselines/reference/commaOperatorInConditionalExpression.symbols b/tests/baselines/reference/commaOperatorInConditionalExpression.symbols index 18f749c5c5c..cb124f21f15 100644 --- a/tests/baselines/reference/commaOperatorInConditionalExpression.symbols +++ b/tests/baselines/reference/commaOperatorInConditionalExpression.symbols @@ -4,8 +4,8 @@ function f (m: string) { >m : Symbol(m, Decl(commaOperatorInConditionalExpression.ts, 0, 12)) [1, 2, 3].map(i => { ->[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >i : Symbol(i, Decl(commaOperatorInConditionalExpression.ts, 1, 18)) return true? { [m]: i } : { [m]: i + 1 } diff --git a/tests/baselines/reference/commaOperatorInConditionalExpression.types b/tests/baselines/reference/commaOperatorInConditionalExpression.types index f46282f9b6b..de8a95cd6c3 100644 --- a/tests/baselines/reference/commaOperatorInConditionalExpression.types +++ b/tests/baselines/reference/commaOperatorInConditionalExpression.types @@ -5,13 +5,13 @@ function f (m: string) { [1, 2, 3].map(i => { >[1, 2, 3].map(i => { return true? { [m]: i } : { [m]: i + 1 } }) : { [x: string]: number; }[] ->[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->i => { return true? { [m]: i } : { [m]: i + 1 } } : (i: number) => { [x: string]: number; } +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>i => { return true? { [m]: i } : { [m]: i + 1 } } : (this: undefined, i: number) => { [x: string]: number; } >i : number return true? { [m]: i } : { [m]: i + 1 } diff --git a/tests/baselines/reference/commentInMethodCall.symbols b/tests/baselines/reference/commentInMethodCall.symbols index 1ef762da871..e082d24daf3 100644 --- a/tests/baselines/reference/commentInMethodCall.symbols +++ b/tests/baselines/reference/commentInMethodCall.symbols @@ -4,9 +4,9 @@ var s: string[]; >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) s.map(// do something ->s.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>s.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(commentInMethodCall.ts, 1, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) function () { }); diff --git a/tests/baselines/reference/commentInMethodCall.types b/tests/baselines/reference/commentInMethodCall.types index a97b0319777..eebbc15823e 100644 --- a/tests/baselines/reference/commentInMethodCall.types +++ b/tests/baselines/reference/commentInMethodCall.types @@ -5,10 +5,10 @@ var s: string[]; s.map(// do something >s.map(// do something function () { }) : void[] ->s.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>s.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >s : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } function () { }); ->function () { } : () => void +>function () { } : (this: undefined) => void diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.symbols b/tests/baselines/reference/contextualSignatureInstantiation3.symbols index 50dac0b5d67..a9653673ff2 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.symbols +++ b/tests/baselines/reference/contextualSignatureInstantiation3.symbols @@ -12,9 +12,9 @@ function map(items: T[], f: (x: T) => U): U[]{ >U : Symbol(U, Decl(contextualSignatureInstantiation3.ts, 0, 15)) return items.map(f); ->items.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>items.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >items : Symbol(items, Decl(contextualSignatureInstantiation3.ts, 0, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >f : Symbol(f, Decl(contextualSignatureInstantiation3.ts, 0, 30)) } @@ -47,9 +47,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : Symbol(v1, Decl(contextualSignatureInstantiation3.ts, 15, 3), Decl(contextualSignatureInstantiation3.ts, 16, 3), Decl(contextualSignatureInstantiation3.ts, 17, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(contextualSignatureInstantiation3.ts, 2, 1)) var v1 = map(xs, identity); // Error if not number[] @@ -63,9 +63,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : Symbol(v2, Decl(contextualSignatureInstantiation3.ts, 19, 3), Decl(contextualSignatureInstantiation3.ts, 20, 3), Decl(contextualSignatureInstantiation3.ts, 21, 3)) ->xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>xs.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >xs : Symbol(xs, Decl(contextualSignatureInstantiation3.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >singleton : Symbol(singleton, Decl(contextualSignatureInstantiation3.ts, 6, 1)) var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextualSignatureInstantiation3.types b/tests/baselines/reference/contextualSignatureInstantiation3.types index 409c685215d..dcb7284ceaa 100644 --- a/tests/baselines/reference/contextualSignatureInstantiation3.types +++ b/tests/baselines/reference/contextualSignatureInstantiation3.types @@ -13,9 +13,9 @@ function map(items: T[], f: (x: T) => U): U[]{ return items.map(f); >items.map(f) : U[] ->items.map : { (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; } +>items.map : { (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } >items : T[] ->map : { (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; } +>map : { (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } >f : (x: T) => U } @@ -54,9 +54,9 @@ var v1: number[]; var v1 = xs.map(identity); // Error if not number[] >v1 : number[] >xs.map(identity) : number[] ->xs.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>xs.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >xs : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >identity : (x: T) => T var v1 = map(xs, identity); // Error if not number[] @@ -72,9 +72,9 @@ var v2: number[][]; var v2 = xs.map(singleton); // Error if not number[][] >v2 : number[][] >xs.map(singleton) : number[][] ->xs.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>xs.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >xs : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >singleton : (x: T) => T[] var v2 = map(xs, singleton); // Error if not number[][] diff --git a/tests/baselines/reference/contextuallyTypedIife.symbols b/tests/baselines/reference/contextuallyTypedIife.symbols index 7a73beaad16..96e57c1f62f 100644 --- a/tests/baselines/reference/contextuallyTypedIife.symbols +++ b/tests/baselines/reference/contextuallyTypedIife.symbols @@ -47,25 +47,25 @@ // rest parameters ((...numbers) => numbers.every(n => n > 0))(5,6,7); >numbers : Symbol(numbers, Decl(contextuallyTypedIife.ts, 17, 2)) ->numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numbers : Symbol(numbers, Decl(contextuallyTypedIife.ts, 17, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 17, 31)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 17, 31)) ((...mixed) => mixed.every(n => !!n))(5,'oops','oh no'); >mixed : Symbol(mixed, Decl(contextuallyTypedIife.ts, 18, 2)) ->mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >mixed : Symbol(mixed, Decl(contextuallyTypedIife.ts, 18, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 18, 27)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 18, 27)) ((...noNumbers) => noNumbers.some(n => n > 0))(); >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIife.ts, 19, 2)) ->noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --)) +>noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIife.ts, 19, 2)) ->some : Symbol(Array.some, Decl(lib.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 19, 34)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 19, 34)) @@ -73,9 +73,9 @@ >first : Symbol(first, Decl(contextuallyTypedIife.ts, 20, 2)) >rest : Symbol(rest, Decl(contextuallyTypedIife.ts, 20, 8)) >first : Symbol(first, Decl(contextuallyTypedIife.ts, 20, 2)) ->rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >rest : Symbol(rest, Decl(contextuallyTypedIife.ts, 20, 8)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 20, 43)) >n : Symbol(n, Decl(contextuallyTypedIife.ts, 20, 43)) diff --git a/tests/baselines/reference/contextuallyTypedIife.types b/tests/baselines/reference/contextuallyTypedIife.types index 676755fb341..b8c59a618b8 100644 --- a/tests/baselines/reference/contextuallyTypedIife.types +++ b/tests/baselines/reference/contextuallyTypedIife.types @@ -105,10 +105,10 @@ >(...numbers) => numbers.every(n => n > 0) : (...numbers: number[]) => boolean >numbers : number[] >numbers.every(n => n > 0) : boolean ->numbers.every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>numbers.every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } >numbers : number[] ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean ->n => n > 0 : (n: number) => boolean +>every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>n => n > 0 : (this: undefined, n: number) => boolean >n : number >n > 0 : boolean >n : number @@ -123,10 +123,10 @@ >(...mixed) => mixed.every(n => !!n) : (...mixed: (string | number)[]) => boolean >mixed : (string | number)[] >mixed.every(n => !!n) : boolean ->mixed.every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean +>mixed.every : { (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } >mixed : (string | number)[] ->every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean ->n => !!n : (n: string | number) => boolean +>every : { (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } +>n => !!n : (this: undefined, n: string | number) => boolean >n : string | number >!!n : boolean >!n : boolean @@ -141,10 +141,10 @@ >(...noNumbers) => noNumbers.some(n => n > 0) : (...noNumbers: any[]) => boolean >noNumbers : any[] >noNumbers.some(n => n > 0) : boolean ->noNumbers.some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean +>noNumbers.some : { (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } >noNumbers : any[] ->some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean ->n => n > 0 : (n: any) => boolean +>some : { (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } +>n => n > 0 : (this: undefined, n: any) => boolean >n : any >n > 0 : boolean >n : any @@ -160,10 +160,10 @@ >first : number >[] : undefined[] >rest.map(n => n > 0) : boolean[] ->rest.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>rest.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >rest : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n > 0 : (n: number) => boolean +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n > 0 : (this: undefined, n: number) => boolean >n : number >n > 0 : boolean >n : number diff --git a/tests/baselines/reference/contextuallyTypedIifeStrict.symbols b/tests/baselines/reference/contextuallyTypedIifeStrict.symbols index f76c9caa104..62b585122dd 100644 --- a/tests/baselines/reference/contextuallyTypedIifeStrict.symbols +++ b/tests/baselines/reference/contextuallyTypedIifeStrict.symbols @@ -47,25 +47,25 @@ // rest parameters ((...numbers) => numbers.every(n => n > 0))(5,6,7); >numbers : Symbol(numbers, Decl(contextuallyTypedIifeStrict.ts, 17, 2)) ->numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>numbers.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numbers : Symbol(numbers, Decl(contextuallyTypedIifeStrict.ts, 17, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 17, 31)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 17, 31)) ((...mixed) => mixed.every(n => !!n))(5,'oops','oh no'); >mixed : Symbol(mixed, Decl(contextuallyTypedIifeStrict.ts, 18, 2)) ->mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>mixed.every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >mixed : Symbol(mixed, Decl(contextuallyTypedIifeStrict.ts, 18, 2)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 18, 27)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 18, 27)) ((...noNumbers) => noNumbers.some(n => n > 0))(); >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIifeStrict.ts, 19, 2)) ->noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --)) +>noNumbers.some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIifeStrict.ts, 19, 2)) ->some : Symbol(Array.some, Decl(lib.d.ts, --, --)) +>some : Symbol(Array.some, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 19, 34)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 19, 34)) @@ -73,9 +73,9 @@ >first : Symbol(first, Decl(contextuallyTypedIifeStrict.ts, 20, 2)) >rest : Symbol(rest, Decl(contextuallyTypedIifeStrict.ts, 20, 8)) >first : Symbol(first, Decl(contextuallyTypedIifeStrict.ts, 20, 2)) ->rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>rest.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >rest : Symbol(rest, Decl(contextuallyTypedIifeStrict.ts, 20, 8)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 20, 43)) >n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 20, 43)) diff --git a/tests/baselines/reference/contextuallyTypedIifeStrict.types b/tests/baselines/reference/contextuallyTypedIifeStrict.types index cbeee53ec2e..0f888f98277 100644 --- a/tests/baselines/reference/contextuallyTypedIifeStrict.types +++ b/tests/baselines/reference/contextuallyTypedIifeStrict.types @@ -105,10 +105,10 @@ >(...numbers) => numbers.every(n => n > 0) : (...numbers: number[]) => boolean >numbers : number[] >numbers.every(n => n > 0) : boolean ->numbers.every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>numbers.every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } >numbers : number[] ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean ->n => n > 0 : (n: number) => boolean +>every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>n => n > 0 : (this: undefined, n: number) => boolean >n : number >n > 0 : boolean >n : number @@ -123,10 +123,10 @@ >(...mixed) => mixed.every(n => !!n) : (...mixed: (string | number)[]) => boolean >mixed : (string | number)[] >mixed.every(n => !!n) : boolean ->mixed.every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean +>mixed.every : { (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } >mixed : (string | number)[] ->every : (callbackfn: (value: string | number, index: number, array: (string | number)[]) => boolean, thisArg?: any) => boolean ->n => !!n : (n: string | number) => boolean +>every : { (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean): boolean; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => boolean, thisArg: Z): boolean; } +>n => !!n : (this: undefined, n: string | number) => boolean >n : string | number >!!n : boolean >!n : boolean @@ -141,10 +141,10 @@ >(...noNumbers) => noNumbers.some(n => n > 0) : (...noNumbers: any[]) => boolean >noNumbers : any[] >noNumbers.some(n => n > 0) : boolean ->noNumbers.some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean +>noNumbers.some : { (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } >noNumbers : any[] ->some : (callbackfn: (value: any, index: number, array: any[]) => boolean, thisArg?: any) => boolean ->n => n > 0 : (n: any) => boolean +>some : { (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean): boolean; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: any, index: number, array: any[]) => boolean, thisArg: Z): boolean; } +>n => n > 0 : (this: undefined, n: any) => boolean >n : any >n > 0 : boolean >n : any @@ -160,10 +160,10 @@ >first : number >[] : never[] >rest.map(n => n > 0) : boolean[] ->rest.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>rest.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >rest : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n > 0 : (n: number) => boolean +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n > 0 : (this: undefined, n: number) => boolean >n : number >n > 0 : boolean >n : number diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.symbols b/tests/baselines/reference/controlFlowDestructuringParameters.symbols index 58d2edfc12c..1874c16c3d3 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.symbols +++ b/tests/baselines/reference/controlFlowDestructuringParameters.symbols @@ -3,9 +3,9 @@ [{ x: 1 }].map( ->[{ x: 1 }].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[{ x: 1 }].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(controlFlowDestructuringParameters.ts, 3, 2)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ({ x }) => x >x : Symbol(x, Decl(controlFlowDestructuringParameters.ts, 4, 4)) diff --git a/tests/baselines/reference/controlFlowDestructuringParameters.types b/tests/baselines/reference/controlFlowDestructuringParameters.types index c38a8fb1aa4..d1adadfee17 100644 --- a/tests/baselines/reference/controlFlowDestructuringParameters.types +++ b/tests/baselines/reference/controlFlowDestructuringParameters.types @@ -4,15 +4,15 @@ [{ x: 1 }].map( >[{ x: 1 }].map( ({ x }) => x) : number[] ->[{ x: 1 }].map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): U[]; } +>[{ x: 1 }].map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): U[]; (callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): U[]; } >[{ x: 1 }] : { x: number; }[] >{ x: 1 } : { x: number; } >x : number >1 : 1 ->map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg?: any): U[]; } +>map : { (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; }, { x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; }, { x: number; }], callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U): U[]; (callbackfn: (this: undefined, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; }, index: number, array: { x: number; }[]) => U, thisArg: Z): U[]; } ({ x }) => x ->({ x }) => x : ({x}: { x: number; }) => number +>({ x }) => x : (this: undefined, {x}: { x: number; }) => number >x : number >x : number diff --git a/tests/baselines/reference/controlFlowPropertyDeclarations.symbols b/tests/baselines/reference/controlFlowPropertyDeclarations.symbols index 8e87d71ae33..fdaa61c2e2d 100644 --- a/tests/baselines/reference/controlFlowPropertyDeclarations.symbols +++ b/tests/baselines/reference/controlFlowPropertyDeclarations.symbols @@ -220,15 +220,15 @@ export class HTMLtoJSX { // wrapping newlines and sequences of two or more spaces in variables. text = text >text : Symbol(text, Decl(controlFlowPropertyDeclarations.ts, 113, 7)) ->text .replace(/\r/g, '') .replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->text .replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>text .replace(/\r/g, '') .replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>text .replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >text : Symbol(text, Decl(controlFlowPropertyDeclarations.ts, 113, 7)) .replace(/\r/g, '') ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) { ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >whitespace : Symbol(whitespace, Decl(controlFlowPropertyDeclarations.ts, 121, 50)) return '{' + JSON.stringify(whitespace) + '}'; diff --git a/tests/baselines/reference/controlFlowPropertyDeclarations.types b/tests/baselines/reference/controlFlowPropertyDeclarations.types index fae5ed27da2..286124ca346 100644 --- a/tests/baselines/reference/controlFlowPropertyDeclarations.types +++ b/tests/baselines/reference/controlFlowPropertyDeclarations.types @@ -295,18 +295,18 @@ export class HTMLtoJSX { >text = text .replace(/\r/g, '') .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) { return '{' + JSON.stringify(whitespace) + '}'; }) : string >text : string >text .replace(/\r/g, '') .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) { return '{' + JSON.stringify(whitespace) + '}'; }) : string ->text .replace(/\r/g, '') .replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>text .replace(/\r/g, '') .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >text .replace(/\r/g, '') : string ->text .replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>text .replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >text : string .replace(/\r/g, '') ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/\r/g : RegExp >'' : "" .replace(/( {2,}|\n|\t|\{|\})/g, function(whitespace) { ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/( {2,}|\n|\t|\{|\})/g : RegExp >function(whitespace) { return '{' + JSON.stringify(whitespace) + '}'; } : (whitespace: string) => string >whitespace : string diff --git a/tests/baselines/reference/declarationEmitPromise.symbols b/tests/baselines/reference/declarationEmitPromise.symbols index 2c37e1dfa78..23d00ec6386 100644 --- a/tests/baselines/reference/declarationEmitPromise.symbols +++ b/tests/baselines/reference/declarationEmitPromise.symbols @@ -40,13 +40,13 @@ export async function runSampleWorks( >bluebird.all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 1, 26)) >bluebird : Symbol(bluebird, Decl(declarationEmitPromise.ts, 0, 0)) >all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 1, 26)) ->[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --)) +>[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(declarationEmitPromise.ts, 5, 52)) >b : Symbol(b, Decl(declarationEmitPromise.ts, 6, 19)) >c : Symbol(c, Decl(declarationEmitPromise.ts, 6, 36)) >d : Symbol(d, Decl(declarationEmitPromise.ts, 6, 53)) >e : Symbol(e, Decl(declarationEmitPromise.ts, 6, 70)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 7, 68)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 7, 68)) @@ -112,13 +112,13 @@ export async function runSampleBreaks( >bluebird.all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 1, 26)) >bluebird : Symbol(bluebird, Decl(declarationEmitPromise.ts, 0, 0)) >all : Symbol(bluebird.all, Decl(declarationEmitPromise.ts, 1, 26)) ->[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --)) +>[a, b, c, d, e].filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >a : Symbol(a, Decl(declarationEmitPromise.ts, 14, 53)) >b : Symbol(b, Decl(declarationEmitPromise.ts, 15, 19)) >c : Symbol(c, Decl(declarationEmitPromise.ts, 15, 36)) >d : Symbol(d, Decl(declarationEmitPromise.ts, 15, 53)) >e : Symbol(e, Decl(declarationEmitPromise.ts, 15, 70)) ->filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 16, 68)) >el : Symbol(el, Decl(declarationEmitPromise.ts, 16, 68)) diff --git a/tests/baselines/reference/declarationEmitPromise.types b/tests/baselines/reference/declarationEmitPromise.types index 4edaa444326..3cdf63ef478 100644 --- a/tests/baselines/reference/declarationEmitPromise.types +++ b/tests/baselines/reference/declarationEmitPromise.types @@ -45,15 +45,15 @@ export async function runSampleWorks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any) => bluebird[] +>[a, b, c, d, e].filter : { (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any) => bluebird[] ->el => !!el : (el: bluebird) => boolean +>filter : { (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } +>el => !!el : (this: undefined, el: bluebird) => boolean >el : bluebird >!!el : boolean >!el : boolean @@ -130,15 +130,15 @@ export async function runSampleBreaks( >bluebird : typeof bluebird >all : bluebird[] >[a, b, c, d, e].filter(el => !!el) : bluebird[] ->[a, b, c, d, e].filter : (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any) => bluebird[] +>[a, b, c, d, e].filter : { (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } >[a, b, c, d, e] : bluebird[] >a : bluebird >b : bluebird >c : bluebird >d : bluebird >e : bluebird ->filter : (callbackfn: (value: bluebird, index: number, array: bluebird[]) => any, thisArg?: any) => bluebird[] ->el => !!el : (el: bluebird) => boolean +>filter : { (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any): bluebird[]; (callbackfn: (this: undefined, value: bluebird, index: number, array: bluebird[]) => any, thisArg: undefined): bluebird[]; (callbackfn: (this: Z, value: bluebird, index: number, array: bluebird[]) => any, thisArg: Z): bluebird[]; } +>el => !!el : (this: undefined, el: bluebird) => boolean >el : bluebird >!!el : boolean >!el : boolean diff --git a/tests/baselines/reference/enumIndexer.symbols b/tests/baselines/reference/enumIndexer.symbols index 79baee66498..cf87cb106d1 100644 --- a/tests/baselines/reference/enumIndexer.symbols +++ b/tests/baselines/reference/enumIndexer.symbols @@ -19,9 +19,9 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : Symbol(x, Decl(enumIndexer.ts, 5, 3)) ->_arr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>_arr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >_arr : Symbol(_arr, Decl(enumIndexer.ts, 3, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >o : Symbol(o, Decl(enumIndexer.ts, 5, 17)) >MyEnumType : Symbol(MyEnumType, Decl(enumIndexer.ts, 0, 0)) >o.key : Symbol(key, Decl(enumIndexer.ts, 3, 13)) diff --git a/tests/baselines/reference/enumIndexer.types b/tests/baselines/reference/enumIndexer.types index 3abd7eaaa4c..981ad5c8c81 100644 --- a/tests/baselines/reference/enumIndexer.types +++ b/tests/baselines/reference/enumIndexer.types @@ -25,10 +25,10 @@ var enumValue = MyEnumType.foo; var x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type >x : boolean[] >_arr.map(o => MyEnumType[o.key] === enumValue) : boolean[] ->_arr.map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): U[]; } +>_arr.map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): U[]; (callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): U[]; } >_arr : { key: string; }[] ->map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg?: any): U[]; } ->o => MyEnumType[o.key] === enumValue : (o: { key: string; }) => boolean +>map : { (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ key: string; }, { key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ key: string; }, { key: string; }], callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U): U[]; (callbackfn: (this: undefined, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { key: string; }, index: number, array: { key: string; }[]) => U, thisArg: Z): U[]; } +>o => MyEnumType[o.key] === enumValue : (this: undefined, o: { key: string; }) => boolean >o : { key: string; } >MyEnumType[o.key] === enumValue : boolean >MyEnumType[o.key] : any diff --git a/tests/baselines/reference/genericArray1.symbols b/tests/baselines/reference/genericArray1.symbols index a96b487f1d7..f548f34e553 100644 --- a/tests/baselines/reference/genericArray1.symbols +++ b/tests/baselines/reference/genericArray1.symbols @@ -13,8 +13,8 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : Symbol(lengths, Decl(genericArray1.ts, 12, 3)) ->["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>["a", "b", "c"].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) >x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericArray1.ts, 12, 34)) diff --git a/tests/baselines/reference/genericArray1.types b/tests/baselines/reference/genericArray1.types index 68d691a96e3..b893d9778fc 100644 --- a/tests/baselines/reference/genericArray1.types +++ b/tests/baselines/reference/genericArray1.types @@ -14,13 +14,13 @@ interface String{ var lengths = ["a", "b", "c"].map(x => x.length); >lengths : number[] >["a", "b", "c"].map(x => x.length) : number[] ->["a", "b", "c"].map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>["a", "b", "c"].map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >["a", "b", "c"] : string[] >"a" : "a" >"b" : "b" >"c" : "c" ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->x => x.length : (x: string) => number +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>x => x.length : (this: undefined, x: string) => number >x : string >x.length : number >x : string diff --git a/tests/baselines/reference/genericInference1.symbols b/tests/baselines/reference/genericInference1.symbols index 7fc39ac556f..ecc9c811d76 100644 --- a/tests/baselines/reference/genericInference1.symbols +++ b/tests/baselines/reference/genericInference1.symbols @@ -1,7 +1,7 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); ->['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>['a', 'b', 'c'].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) >x.length : Symbol(String.length, Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(genericInference1.ts, 0, 20)) diff --git a/tests/baselines/reference/genericInference1.types b/tests/baselines/reference/genericInference1.types index ddf8d762000..64ff2c399cd 100644 --- a/tests/baselines/reference/genericInference1.types +++ b/tests/baselines/reference/genericInference1.types @@ -1,13 +1,13 @@ === tests/cases/compiler/genericInference1.ts === ['a', 'b', 'c'].map(x => x.length); >['a', 'b', 'c'].map(x => x.length) : number[] ->['a', 'b', 'c'].map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>['a', 'b', 'c'].map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >['a', 'b', 'c'] : string[] >'a' : "a" >'b' : "b" >'c' : "c" ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->x => x.length : (x: string) => number +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>x => x.length : (this: undefined, x: string) => number >x : string >x.length : number >x : string diff --git a/tests/baselines/reference/genericMethodOverspecialization.symbols b/tests/baselines/reference/genericMethodOverspecialization.symbols index 5fd2a0479e6..55ff9cb5afb 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.symbols +++ b/tests/baselines/reference/genericMethodOverspecialization.symbols @@ -27,9 +27,9 @@ interface Document { var elements = names.map(function (name) { >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->names.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>names.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >names : Symbol(names, Decl(genericMethodOverspecialization.ts, 0, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >name : Symbol(name, Decl(genericMethodOverspecialization.ts, 12, 35)) return document.getElementById(name); @@ -43,9 +43,9 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : Symbol(xxx, Decl(genericMethodOverspecialization.ts, 17, 3)) ->elements.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) +>elements.filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->filter : Symbol(Array.filter, Decl(lib.d.ts, --, --)) +>filter : Symbol(Array.filter, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 17, 36)) return !e.isDisabled; @@ -57,9 +57,9 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : Symbol(widths, Decl(genericMethodOverspecialization.ts, 21, 3)) ->elements.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>elements.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >elements : Symbol(elements, Decl(genericMethodOverspecialization.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >e : Symbol(e, Decl(genericMethodOverspecialization.ts, 21, 45)) return e.clientWidth; diff --git a/tests/baselines/reference/genericMethodOverspecialization.types b/tests/baselines/reference/genericMethodOverspecialization.types index 0f90bd34e2e..36b710b742c 100644 --- a/tests/baselines/reference/genericMethodOverspecialization.types +++ b/tests/baselines/reference/genericMethodOverspecialization.types @@ -34,10 +34,10 @@ interface Document { var elements = names.map(function (name) { >elements : HTMLElement[] >names.map(function (name) { return document.getElementById(name);}) : HTMLElement[] ->names.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>names.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >names : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->function (name) { return document.getElementById(name);} : (name: string) => HTMLElement +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>function (name) { return document.getElementById(name);} : (this: undefined, name: string) => HTMLElement >name : string return document.getElementById(name); @@ -53,10 +53,10 @@ var elements = names.map(function (name) { var xxx = elements.filter(function (e) { >xxx : HTMLElement[] >elements.filter(function (e) { return !e.isDisabled;}) : HTMLElement[] ->elements.filter : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any) => HTMLElement[] +>elements.filter : { (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => any): HTMLElement[]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: undefined): HTMLElement[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: Z): HTMLElement[]; } >elements : HTMLElement[] ->filter : (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg?: any) => HTMLElement[] ->function (e) { return !e.isDisabled;} : (e: HTMLElement) => boolean +>filter : { (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => any): HTMLElement[]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: undefined): HTMLElement[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => any, thisArg: Z): HTMLElement[]; } +>function (e) { return !e.isDisabled;} : (this: undefined, e: HTMLElement) => boolean >e : HTMLElement return !e.isDisabled; @@ -70,10 +70,10 @@ var xxx = elements.filter(function (e) { var widths:number[] = elements.map(function (e) { // should not error >widths : number[] >elements.map(function (e) { // should not error return e.clientWidth;}) : number[] ->elements.map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): U[]; } +>elements.map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): U[]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): U[]; } >elements : HTMLElement[] ->map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg?: any): U[]; } ->function (e) { // should not error return e.clientWidth;} : (e: HTMLElement) => number +>map : { (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U, U]; (this: [HTMLElement, HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): [U, U]; (this: [HTMLElement, HTMLElement], callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U): U[]; (callbackfn: (this: undefined, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: HTMLElement, index: number, array: HTMLElement[]) => U, thisArg: Z): U[]; } +>function (e) { // should not error return e.clientWidth;} : (this: undefined, e: HTMLElement) => number >e : HTMLElement return e.clientWidth; diff --git a/tests/baselines/reference/implementArrayInterface.errors.txt b/tests/baselines/reference/implementArrayInterface.errors.txt index 08c438ebaf3..139bb42105d 100644 --- a/tests/baselines/reference/implementArrayInterface.errors.txt +++ b/tests/baselines/reference/implementArrayInterface.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/implementArrayInterface.ts(1,15): error TS2420: Class 'MyArray' incorrectly implements interface 'T[]'. Types of property 'map' are incompatible. - Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; }'. + Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; }'. Type 'any[]' is not assignable to type '[any, any, any, any, any]'. Property '0' is missing in type 'any[]'. @@ -10,7 +10,7 @@ tests/cases/compiler/implementArrayInterface.ts(1,15): error TS2420: Class 'MyAr ~~~~~~~ !!! error TS2420: Class 'MyArray' incorrectly implements interface 'T[]'. !!! error TS2420: Types of property 'map' are incompatible. -!!! error TS2420: Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; }'. +!!! error TS2420: Type '(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any) => U[]' is not assignable to type '{ (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; }'. !!! error TS2420: Type 'any[]' is not assignable to type '[any, any, any, any, any]'. !!! error TS2420: Property '0' is missing in type 'any[]'. toString(): string; diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.js b/tests/baselines/reference/indexedAccessTypeConstraints.js new file mode 100644 index 00000000000..ec9af906e43 --- /dev/null +++ b/tests/baselines/reference/indexedAccessTypeConstraints.js @@ -0,0 +1,86 @@ +//// [indexedAccessTypeConstraints.ts] + +// Repro from #14557 + +interface IData { + content: T; +} + +type Data = { + get: (prop: K) => T[K]; +}; + +class Parent { + private data: Data; + getData(): Data { + return this.data; + } +} + +export class Foo extends Parent> { + getContent(): C { + return this.getData().get('content'); + } +} + +export class Bar> extends Parent { + getContent(): C { + return this.getData().get('content'); + } +} + +// Repro from #14557 + +function foo(x: C, y: T['content']) { + x = y; +} + + +//// [indexedAccessTypeConstraints.js] +// Repro from #14557 +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var Parent = (function () { + function Parent() { + } + Parent.prototype.getData = function () { + return this.data; + }; + return Parent; +}()); +var Foo = (function (_super) { + __extends(Foo, _super); + function Foo() { + return _super !== null && _super.apply(this, arguments) || this; + } + Foo.prototype.getContent = function () { + return this.getData().get('content'); + }; + return Foo; +}(Parent)); +exports.Foo = Foo; +var Bar = (function (_super) { + __extends(Bar, _super); + function Bar() { + return _super !== null && _super.apply(this, arguments) || this; + } + Bar.prototype.getContent = function () { + return this.getData().get('content'); + }; + return Bar; +}(Parent)); +exports.Bar = Bar; +// Repro from #14557 +function foo(x, y) { + x = y; +} diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.symbols b/tests/baselines/reference/indexedAccessTypeConstraints.symbols new file mode 100644 index 00000000000..b2d10c7ee27 --- /dev/null +++ b/tests/baselines/reference/indexedAccessTypeConstraints.symbols @@ -0,0 +1,109 @@ +=== tests/cases/compiler/indexedAccessTypeConstraints.ts === + +// Repro from #14557 + +interface IData { +>IData : Symbol(IData, Decl(indexedAccessTypeConstraints.ts, 0, 0)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 3, 16)) + + content: T; +>content : Symbol(IData.content, Decl(indexedAccessTypeConstraints.ts, 3, 20)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 3, 16)) +} + +type Data = { +>Data : Symbol(Data, Decl(indexedAccessTypeConstraints.ts, 5, 1)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 7, 10)) + + get: (prop: K) => T[K]; +>get : Symbol(get, Decl(indexedAccessTypeConstraints.ts, 7, 16)) +>K : Symbol(K, Decl(indexedAccessTypeConstraints.ts, 8, 10)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 7, 10)) +>prop : Symbol(prop, Decl(indexedAccessTypeConstraints.ts, 8, 29)) +>K : Symbol(K, Decl(indexedAccessTypeConstraints.ts, 8, 10)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 7, 10)) +>K : Symbol(K, Decl(indexedAccessTypeConstraints.ts, 8, 10)) + +}; + +class Parent { +>Parent : Symbol(Parent, Decl(indexedAccessTypeConstraints.ts, 9, 2)) +>M : Symbol(M, Decl(indexedAccessTypeConstraints.ts, 11, 13)) + + private data: Data; +>data : Symbol(Parent.data, Decl(indexedAccessTypeConstraints.ts, 11, 17)) +>Data : Symbol(Data, Decl(indexedAccessTypeConstraints.ts, 5, 1)) +>M : Symbol(M, Decl(indexedAccessTypeConstraints.ts, 11, 13)) + + getData(): Data { +>getData : Symbol(Parent.getData, Decl(indexedAccessTypeConstraints.ts, 12, 26)) +>Data : Symbol(Data, Decl(indexedAccessTypeConstraints.ts, 5, 1)) +>M : Symbol(M, Decl(indexedAccessTypeConstraints.ts, 11, 13)) + + return this.data; +>this.data : Symbol(Parent.data, Decl(indexedAccessTypeConstraints.ts, 11, 17)) +>this : Symbol(Parent, Decl(indexedAccessTypeConstraints.ts, 9, 2)) +>data : Symbol(Parent.data, Decl(indexedAccessTypeConstraints.ts, 11, 17)) + } +} + +export class Foo extends Parent> { +>Foo : Symbol(Foo, Decl(indexedAccessTypeConstraints.ts, 16, 1)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 18, 17)) +>Parent : Symbol(Parent, Decl(indexedAccessTypeConstraints.ts, 9, 2)) +>IData : Symbol(IData, Decl(indexedAccessTypeConstraints.ts, 0, 0)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 18, 17)) + + getContent(): C { +>getContent : Symbol(Foo.getContent, Decl(indexedAccessTypeConstraints.ts, 18, 46)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 18, 17)) + + return this.getData().get('content'); +>this.getData().get : Symbol(get, Decl(indexedAccessTypeConstraints.ts, 7, 16)) +>this.getData : Symbol(Parent.getData, Decl(indexedAccessTypeConstraints.ts, 12, 26)) +>this : Symbol(Foo, Decl(indexedAccessTypeConstraints.ts, 16, 1)) +>getData : Symbol(Parent.getData, Decl(indexedAccessTypeConstraints.ts, 12, 26)) +>get : Symbol(get, Decl(indexedAccessTypeConstraints.ts, 7, 16)) + } +} + +export class Bar> extends Parent { +>Bar : Symbol(Bar, Decl(indexedAccessTypeConstraints.ts, 22, 1)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 24, 17)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 24, 19)) +>IData : Symbol(IData, Decl(indexedAccessTypeConstraints.ts, 0, 0)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 24, 17)) +>Parent : Symbol(Parent, Decl(indexedAccessTypeConstraints.ts, 9, 2)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 24, 19)) + + getContent(): C { +>getContent : Symbol(Bar.getContent, Decl(indexedAccessTypeConstraints.ts, 24, 59)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 24, 17)) + + return this.getData().get('content'); +>this.getData().get : Symbol(get, Decl(indexedAccessTypeConstraints.ts, 7, 16)) +>this.getData : Symbol(Parent.getData, Decl(indexedAccessTypeConstraints.ts, 12, 26)) +>this : Symbol(Bar, Decl(indexedAccessTypeConstraints.ts, 22, 1)) +>getData : Symbol(Parent.getData, Decl(indexedAccessTypeConstraints.ts, 12, 26)) +>get : Symbol(get, Decl(indexedAccessTypeConstraints.ts, 7, 16)) + } +} + +// Repro from #14557 + +function foo(x: C, y: T['content']) { +>foo : Symbol(foo, Decl(indexedAccessTypeConstraints.ts, 28, 1)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 32, 13)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 32, 15)) +>content : Symbol(content, Decl(indexedAccessTypeConstraints.ts, 32, 27)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 32, 13)) +>x : Symbol(x, Decl(indexedAccessTypeConstraints.ts, 32, 42)) +>C : Symbol(C, Decl(indexedAccessTypeConstraints.ts, 32, 13)) +>y : Symbol(y, Decl(indexedAccessTypeConstraints.ts, 32, 47)) +>T : Symbol(T, Decl(indexedAccessTypeConstraints.ts, 32, 15)) + + x = y; +>x : Symbol(x, Decl(indexedAccessTypeConstraints.ts, 32, 42)) +>y : Symbol(y, Decl(indexedAccessTypeConstraints.ts, 32, 47)) +} + diff --git a/tests/baselines/reference/indexedAccessTypeConstraints.types b/tests/baselines/reference/indexedAccessTypeConstraints.types new file mode 100644 index 00000000000..5a2cbc4933f --- /dev/null +++ b/tests/baselines/reference/indexedAccessTypeConstraints.types @@ -0,0 +1,116 @@ +=== tests/cases/compiler/indexedAccessTypeConstraints.ts === + +// Repro from #14557 + +interface IData { +>IData : IData +>T : T + + content: T; +>content : T +>T : T +} + +type Data = { +>Data : { get: (prop: K) => T[K]; } +>T : T + + get: (prop: K) => T[K]; +>get : (prop: K) => T[K] +>K : K +>T : T +>prop : K +>K : K +>T : T +>K : K + +}; + +class Parent { +>Parent : Parent +>M : M + + private data: Data; +>data : { get: (prop: K) => M[K]; } +>Data : { get: (prop: K) => T[K]; } +>M : M + + getData(): Data { +>getData : () => { get: (prop: K) => M[K]; } +>Data : { get: (prop: K) => T[K]; } +>M : M + + return this.data; +>this.data : { get: (prop: K) => M[K]; } +>this : this +>data : { get: (prop: K) => M[K]; } + } +} + +export class Foo extends Parent> { +>Foo : Foo +>C : C +>Parent : Parent> +>IData : IData +>C : C + + getContent(): C { +>getContent : () => C +>C : C + + return this.getData().get('content'); +>this.getData().get('content') : C +>this.getData().get : (prop: K) => IData[K] +>this.getData() : { get: (prop: K) => IData[K]; } +>this.getData : () => { get: (prop: K) => IData[K]; } +>this : this +>getData : () => { get: (prop: K) => IData[K]; } +>get : (prop: K) => IData[K] +>'content' : "content" + } +} + +export class Bar> extends Parent { +>Bar : Bar +>C : C +>T : T +>IData : IData +>C : C +>Parent : Parent +>T : T + + getContent(): C { +>getContent : () => C +>C : C + + return this.getData().get('content'); +>this.getData().get('content') : T["content"] +>this.getData().get : (prop: K) => T[K] +>this.getData() : { get: (prop: K) => T[K]; } +>this.getData : () => { get: (prop: K) => T[K]; } +>this : this +>getData : () => { get: (prop: K) => T[K]; } +>get : (prop: K) => T[K] +>'content' : "content" + } +} + +// Repro from #14557 + +function foo(x: C, y: T['content']) { +>foo : (x: C, y: T["content"]) => void +>C : C +>T : T +>content : C +>C : C +>x : C +>C : C +>y : T["content"] +>T : T + + x = y; +>x = y : T["content"] +>x : C +>y : T["content"] +} + diff --git a/tests/baselines/reference/inferenceLimit.symbols b/tests/baselines/reference/inferenceLimit.symbols index 488838548ad..e471856e448 100644 --- a/tests/baselines/reference/inferenceLimit.symbols +++ b/tests/baselines/reference/inferenceLimit.symbols @@ -64,9 +64,9 @@ export class BrokenClass { >Promise.all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >all : Symbol(PromiseConstructor.all, Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->result.map : Symbol(Array.map, 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, --, --)) +>result.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) >result : Symbol(result, Decl(file1.ts, 10, 7)) ->map : Symbol(Array.map, 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, --, --)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) >populateItems : Symbol(populateItems, Decl(file1.ts, 12, 7)) .then((orders: Array) => { diff --git a/tests/baselines/reference/inferenceLimit.types b/tests/baselines/reference/inferenceLimit.types index bf917e18e93..9f2f11d988f 100644 --- a/tests/baselines/reference/inferenceLimit.types +++ b/tests/baselines/reference/inferenceLimit.types @@ -84,9 +84,9 @@ export class BrokenClass { >Promise : PromiseConstructor >all : { (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike, T10 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike, T9 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike, T8 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike, T7 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6, T7]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike, T6 | PromiseLike]): Promise<[T1, T2, T3, T4, T5, T6]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike, T5 | PromiseLike]): Promise<[T1, T2, T3, T4, T5]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike, T4 | PromiseLike]): Promise<[T1, T2, T3, T4]>; (values: [T1 | PromiseLike, T2 | PromiseLike, T3 | PromiseLike]): Promise<[T1, T2, T3]>; (values: [T1 | PromiseLike, T2 | PromiseLike]): Promise<[T1, T2]>; (values: (T | PromiseLike)[]): Promise; (values: Iterable>): Promise; } >result.map(populateItems) : Promise<{}>[] ->result.map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): U[]; } +>result.map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): U[]; (callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): U[]; } >result : MyModule.MyModel[] ->map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg?: any): U[]; } +>map : { (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): [U, U]; (this: [MyModule.MyModel, MyModule.MyModel], callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U): U[]; (callbackfn: (this: undefined, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: MyModule.MyModel, index: number, array: MyModule.MyModel[]) => U, thisArg: Z): U[]; } >populateItems : (order: any) => Promise<{}> .then((orders: Array) => { diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols index 56d2c2dc87f..fe60a8c1581 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.symbols @@ -11,7 +11,7 @@ function identity(a: A): A { } var x = [1, 2, 3].map(identity)[0]; >x : Symbol(x, Decl(inferentialTypingWithFunctionType2.ts, 3, 3)) ->[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >identity : Symbol(identity, Decl(inferentialTypingWithFunctionType2.ts, 0, 0)) diff --git a/tests/baselines/reference/inferentialTypingWithFunctionType2.types b/tests/baselines/reference/inferentialTypingWithFunctionType2.types index b9208409fe0..55caace2c2c 100644 --- a/tests/baselines/reference/inferentialTypingWithFunctionType2.types +++ b/tests/baselines/reference/inferentialTypingWithFunctionType2.types @@ -13,12 +13,12 @@ var x = [1, 2, 3].map(identity)[0]; >x : number >[1, 2, 3].map(identity)[0] : number >[1, 2, 3].map(identity) : number[] ->[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>[1, 2, 3].map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >[1, 2, 3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >identity : (a: A) => A >0 : 0 diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments.js b/tests/baselines/reference/inferringClassMembersFromAssignments.js index a7b9e4ff8f0..74c47dab565 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments.js +++ b/tests/baselines/reference/inferringClassMembersFromAssignments.js @@ -20,6 +20,15 @@ class C { this.inMethod = "string" } this.inMultiple = "string"; + + var action = () => { + if (Math.random()) { + this.inNestedArrowFunction = 0; + } + else { + this.inNestedArrowFunction = "string" + } + }; } get() { if (Math.random()) { @@ -38,6 +47,14 @@ class C { this.inSetter = "string" } } + prop = () => { + if (Math.random()) { + this.inPropertyDeclaration = 0; + } + else { + this.inPropertyDeclaration = "string" + } + } static method() { if (Math.random()) { this.inStaticMethod = 0; @@ -45,6 +62,15 @@ class C { else { this.inStaticMethod = "string" } + + var action = () => { + if (Math.random()) { + this.inStaticNestedArrowFunction = 0; + } + else { + this.inStaticNestedArrowFunction = "string" + } + }; } static get() { if (Math.random()) { @@ -62,6 +88,14 @@ class C { this.inStaticSetter = "string" } } + static prop = () => { + if (Math.random()) { + this.inStaticPropertyDeclaration = 0; + } + else { + this.inStaticPropertyDeclaration = "string" + } + } } //// [b.ts] @@ -75,6 +109,8 @@ var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; var stringOrNumberOrUndefined = c.inGetter; var stringOrNumberOrUndefined = c.inSetter; +var stringOrNumberOrUndefined = c.inPropertyDeclaration; +var stringOrNumberOrUndefined = c.inNestedArrowFunction var stringOrNumberOrBoolean: string | number | boolean; @@ -84,11 +120,23 @@ var stringOrNumberOrBoolean = c.inMultiple; var stringOrNumberOrUndefined = C.inStaticMethod; var stringOrNumberOrUndefined = C.inStaticGetter; var stringOrNumberOrUndefined = C.inStaticSetter; +var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; +var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; //// [output.js] +var _this = this; var C = (function () { function C() { + var _this = this; + this.prop = function () { + if (Math.random()) { + _this.inPropertyDeclaration = 0; + } + else { + _this.inPropertyDeclaration = "string"; + } + }; if (Math.random()) { this.inConstructor = 0; } @@ -98,6 +146,7 @@ var C = (function () { this.inMultiple = 0; } C.prototype.method = function () { + var _this = this; if (Math.random()) { this.inMethod = 0; } @@ -105,6 +154,14 @@ var C = (function () { this.inMethod = "string"; } this.inMultiple = "string"; + var action = function () { + if (Math.random()) { + _this.inNestedArrowFunction = 0; + } + else { + _this.inNestedArrowFunction = "string"; + } + }; }; C.prototype.get = function () { if (Math.random()) { @@ -124,12 +181,21 @@ var C = (function () { } }; C.method = function () { + var _this = this; if (Math.random()) { this.inStaticMethod = 0; } else { this.inStaticMethod = "string"; } + var action = function () { + if (Math.random()) { + _this.inStaticNestedArrowFunction = 0; + } + else { + _this.inStaticNestedArrowFunction = "string"; + } + }; }; C.get = function () { if (Math.random()) { @@ -149,6 +215,14 @@ var C = (function () { }; return C; }()); +C.prop = function () { + if (Math.random()) { + _this.inStaticPropertyDeclaration = 0; + } + else { + _this.inStaticPropertyDeclaration = "string"; + } +}; var c = new C(); var stringOrNumber; var stringOrNumber = c.inConstructor; @@ -156,8 +230,12 @@ var stringOrNumberOrUndefined; var stringOrNumberOrUndefined = c.inMethod; var stringOrNumberOrUndefined = c.inGetter; var stringOrNumberOrUndefined = c.inSetter; +var stringOrNumberOrUndefined = c.inPropertyDeclaration; +var stringOrNumberOrUndefined = c.inNestedArrowFunction; var stringOrNumberOrBoolean; var stringOrNumberOrBoolean = c.inMultiple; var stringOrNumberOrUndefined = C.inStaticMethod; var stringOrNumberOrUndefined = C.inStaticGetter; var stringOrNumberOrUndefined = C.inStaticSetter; +var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; +var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments.symbols b/tests/baselines/reference/inferringClassMembersFromAssignments.symbols index 9951339f8a8..086c4246697 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments.symbols +++ b/tests/baselines/reference/inferringClassMembersFromAssignments.symbols @@ -21,9 +21,9 @@ class C { >inConstructor : Symbol(C.inConstructor, Decl(a.js, 3, 28), Decl(a.js, 6, 14)) } this.inMultiple = 0; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) } method() { >method : Symbol(C.method, Decl(a.js, 10, 5)) @@ -45,12 +45,33 @@ class C { >inMethod : Symbol(C.inMethod, Decl(a.js, 12, 28), Decl(a.js, 15, 14)) } this.inMultiple = "string"; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) + + var action = () => { +>action : Symbol(action, Decl(a.js, 20, 11)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) + + this.inNestedArrowFunction = 0; +>this.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) + } + else { + this.inNestedArrowFunction = "string" +>this.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) + } + }; } get() { ->get : Symbol(C.get, Decl(a.js, 19, 5)) +>get : Symbol(C.get, Decl(a.js, 28, 5)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) @@ -58,23 +79,23 @@ class C { >random : Symbol(Math.random, Decl(lib.d.ts, --, --)) this.inGetter = 0; ->this.inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>this.inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) } else { this.inGetter = "string" ->this.inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>this.inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) } this.inMultiple = false; ->this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>this.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) } set() { ->set : Symbol(C.set, Decl(a.js, 28, 5)) +>set : Symbol(C.set, Decl(a.js, 37, 5)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) @@ -82,19 +103,39 @@ class C { >random : Symbol(Math.random, Decl(lib.d.ts, --, --)) this.inSetter = 0; ->this.inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>this.inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) } else { this.inSetter = "string" ->this.inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>this.inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) + } + } + prop = () => { +>prop : Symbol(C.prop, Decl(a.js, 45, 5)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) + + this.inPropertyDeclaration = 0; +>this.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) + } + else { + this.inPropertyDeclaration = "string" +>this.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) } } static method() { ->method : Symbol(C.method, Decl(a.js, 36, 5)) +>method : Symbol(C.method, Decl(a.js, 53, 5)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) @@ -102,19 +143,40 @@ class C { >random : Symbol(Math.random, Decl(lib.d.ts, --, --)) this.inStaticMethod = 0; ->this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) } else { this.inStaticMethod = "string" ->this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>this.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) } + + var action = () => { +>action : Symbol(action, Decl(a.js, 62, 11)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) + + this.inStaticNestedArrowFunction = 0; +>this.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) + } + else { + this.inStaticNestedArrowFunction = "string" +>this.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) + } + }; } static get() { ->get : Symbol(C.get, Decl(a.js, 44, 5)) +>get : Symbol(C.get, Decl(a.js, 70, 5)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) @@ -122,19 +184,19 @@ class C { >random : Symbol(Math.random, Decl(lib.d.ts, --, --)) this.inStaticGetter = 0; ->this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) } else { this.inStaticGetter = "string" ->this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>this.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) } } static set() { ->set : Symbol(C.set, Decl(a.js, 52, 5)) +>set : Symbol(C.set, Decl(a.js, 78, 5)) if (Math.random()) { >Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) @@ -142,15 +204,35 @@ class C { >random : Symbol(Math.random, Decl(lib.d.ts, --, --)) this.inStaticSetter = 0; ->this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) } else { this.inStaticSetter = "string" ->this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>this.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) >this : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) + } + } + static prop = () => { +>prop : Symbol(C.prop, Decl(a.js, 86, 5)) + + if (Math.random()) { +>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --)) +>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>random : Symbol(Math.random, Decl(lib.d.ts, --, --)) + + this.inStaticPropertyDeclaration = 0; +>this.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) + } + else { + this.inStaticPropertyDeclaration = "string" +>this.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) +>this : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) } } } @@ -170,51 +252,75 @@ var stringOrNumber = c.inConstructor; >inConstructor : Symbol(C.inConstructor, Decl(a.js, 3, 28), Decl(a.js, 6, 14)) var stringOrNumberOrUndefined: string | number | undefined; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) var stringOrNumberOrUndefined = c.inMethod; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) >c.inMethod : Symbol(C.inMethod, Decl(a.js, 12, 28), Decl(a.js, 15, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) >inMethod : Symbol(C.inMethod, Decl(a.js, 12, 28), Decl(a.js, 15, 14)) var stringOrNumberOrUndefined = c.inGetter; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->c.inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>c.inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inGetter : Symbol(C.inGetter, Decl(a.js, 21, 28), Decl(a.js, 24, 14)) +>inGetter : Symbol(C.inGetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) var stringOrNumberOrUndefined = c.inSetter; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->c.inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>c.inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inSetter : Symbol(C.inSetter, Decl(a.js, 30, 28), Decl(a.js, 33, 14)) +>inSetter : Symbol(C.inSetter, Decl(a.js, 39, 28), Decl(a.js, 42, 14)) + +var stringOrNumberOrUndefined = c.inPropertyDeclaration; +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>c.inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) +>c : Symbol(c, Decl(b.ts, 0, 3)) +>inPropertyDeclaration : Symbol(C.inPropertyDeclaration, Decl(a.js, 47, 28), Decl(a.js, 50, 14)) + +var stringOrNumberOrUndefined = c.inNestedArrowFunction +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>c.inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) +>c : Symbol(c, Decl(b.ts, 0, 3)) +>inNestedArrowFunction : Symbol(C.inNestedArrowFunction, Decl(a.js, 21, 32), Decl(a.js, 24, 18)) var stringOrNumberOrBoolean: string | number | boolean; ->stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 11, 3), Decl(b.ts, 13, 3)) +>stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 13, 3), Decl(b.ts, 15, 3)) var stringOrNumberOrBoolean = c.inMultiple; ->stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 11, 3), Decl(b.ts, 13, 3)) ->c.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>stringOrNumberOrBoolean : Symbol(stringOrNumberOrBoolean, Decl(b.ts, 13, 3), Decl(b.ts, 15, 3)) +>c.inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) >c : Symbol(c, Decl(b.ts, 0, 3)) ->inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 26, 9)) +>inMultiple : Symbol(C.inMultiple, Decl(a.js, 8, 9), Decl(a.js, 17, 9), Decl(a.js, 35, 9)) var stringOrNumberOrUndefined = C.inStaticMethod; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->C.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>C.inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 38, 28), Decl(a.js, 41, 14)) +>inStaticMethod : Symbol(C.inStaticMethod, Decl(a.js, 55, 28), Decl(a.js, 58, 14)) var stringOrNumberOrUndefined = C.inStaticGetter; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->C.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>C.inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 46, 28), Decl(a.js, 49, 14)) +>inStaticGetter : Symbol(C.inStaticGetter, Decl(a.js, 72, 28), Decl(a.js, 75, 14)) var stringOrNumberOrUndefined = C.inStaticSetter; ->stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 16, 3), Decl(b.ts, 17, 3), Decl(b.ts, 18, 3)) ->C.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>C.inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) >C : Symbol(C, Decl(a.js, 0, 0)) ->inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 54, 28), Decl(a.js, 57, 14)) +>inStaticSetter : Symbol(C.inStaticSetter, Decl(a.js, 80, 28), Decl(a.js, 83, 14)) + +var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>C.inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) +>C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticPropertyDeclaration : Symbol(C.inStaticPropertyDeclaration, Decl(a.js, 88, 28), Decl(a.js, 91, 14)) + +var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; +>stringOrNumberOrUndefined : Symbol(stringOrNumberOrUndefined, Decl(b.ts, 5, 3), Decl(b.ts, 7, 3), Decl(b.ts, 8, 3), Decl(b.ts, 9, 3), Decl(b.ts, 10, 3), Decl(b.ts, 11, 3), Decl(b.ts, 18, 3), Decl(b.ts, 19, 3), Decl(b.ts, 20, 3), Decl(b.ts, 21, 3), Decl(b.ts, 22, 3)) +>C.inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) +>C : Symbol(C, Decl(a.js, 0, 0)) +>inStaticNestedArrowFunction : Symbol(C.inStaticNestedArrowFunction, Decl(a.js, 63, 32), Decl(a.js, 66, 18)) diff --git a/tests/baselines/reference/inferringClassMembersFromAssignments.types b/tests/baselines/reference/inferringClassMembersFromAssignments.types index 547cc62ba32..d759009983c 100644 --- a/tests/baselines/reference/inferringClassMembersFromAssignments.types +++ b/tests/baselines/reference/inferringClassMembersFromAssignments.types @@ -62,6 +62,33 @@ class C { >this : this >inMultiple : string | number | boolean >"string" : "string" + + var action = () => { +>action : () => void +>() => { if (Math.random()) { this.inNestedArrowFunction = 0; } else { this.inNestedArrowFunction = "string" } } : () => void + + if (Math.random()) { +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + this.inNestedArrowFunction = 0; +>this.inNestedArrowFunction = 0 : 0 +>this.inNestedArrowFunction : string | number | undefined +>this : this +>inNestedArrowFunction : string | number | undefined +>0 : 0 + } + else { + this.inNestedArrowFunction = "string" +>this.inNestedArrowFunction = "string" : "string" +>this.inNestedArrowFunction : string | number | undefined +>this : this +>inNestedArrowFunction : string | number | undefined +>"string" : "string" + } + }; } get() { >get : () => void @@ -116,6 +143,32 @@ class C { >this.inSetter : string | number | undefined >this : this >inSetter : string | number | undefined +>"string" : "string" + } + } + prop = () => { +>prop : () => void +>() => { if (Math.random()) { this.inPropertyDeclaration = 0; } else { this.inPropertyDeclaration = "string" } } : () => void + + if (Math.random()) { +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + this.inPropertyDeclaration = 0; +>this.inPropertyDeclaration = 0 : 0 +>this.inPropertyDeclaration : string | number | undefined +>this : this +>inPropertyDeclaration : string | number | undefined +>0 : 0 + } + else { + this.inPropertyDeclaration = "string" +>this.inPropertyDeclaration = "string" : "string" +>this.inPropertyDeclaration : string | number | undefined +>this : this +>inPropertyDeclaration : string | number | undefined >"string" : "string" } } @@ -143,6 +196,33 @@ class C { >inStaticMethod : string | number | undefined >"string" : "string" } + + var action = () => { +>action : () => void +>() => { if (Math.random()) { this.inStaticNestedArrowFunction = 0; } else { this.inStaticNestedArrowFunction = "string" } } : () => void + + if (Math.random()) { +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + this.inStaticNestedArrowFunction = 0; +>this.inStaticNestedArrowFunction = 0 : 0 +>this.inStaticNestedArrowFunction : string | number | undefined +>this : typeof C +>inStaticNestedArrowFunction : string | number | undefined +>0 : 0 + } + else { + this.inStaticNestedArrowFunction = "string" +>this.inStaticNestedArrowFunction = "string" : "string" +>this.inStaticNestedArrowFunction : string | number | undefined +>this : typeof C +>inStaticNestedArrowFunction : string | number | undefined +>"string" : "string" + } + }; } static get() { >get : () => void @@ -191,6 +271,32 @@ class C { >this.inStaticSetter : string | number | undefined >this : typeof C >inStaticSetter : string | number | undefined +>"string" : "string" + } + } + static prop = () => { +>prop : () => void +>() => { if (Math.random()) { this.inStaticPropertyDeclaration = 0; } else { this.inStaticPropertyDeclaration = "string" } } : () => void + + if (Math.random()) { +>Math.random() : number +>Math.random : () => number +>Math : Math +>random : () => number + + this.inStaticPropertyDeclaration = 0; +>this.inStaticPropertyDeclaration = 0 : 0 +>this.inStaticPropertyDeclaration : string | number | undefined +>this : typeof C +>inStaticPropertyDeclaration : string | number | undefined +>0 : 0 + } + else { + this.inStaticPropertyDeclaration = "string" +>this.inStaticPropertyDeclaration = "string" : "string" +>this.inStaticPropertyDeclaration : string | number | undefined +>this : typeof C +>inStaticPropertyDeclaration : string | number | undefined >"string" : "string" } } @@ -232,6 +338,18 @@ var stringOrNumberOrUndefined = c.inSetter; >c : C >inSetter : string | number | undefined +var stringOrNumberOrUndefined = c.inPropertyDeclaration; +>stringOrNumberOrUndefined : string | number | undefined +>c.inPropertyDeclaration : string | number | undefined +>c : C +>inPropertyDeclaration : string | number | undefined + +var stringOrNumberOrUndefined = c.inNestedArrowFunction +>stringOrNumberOrUndefined : string | number | undefined +>c.inNestedArrowFunction : string | number | undefined +>c : C +>inNestedArrowFunction : string | number | undefined + var stringOrNumberOrBoolean: string | number | boolean; >stringOrNumberOrBoolean : string | number | boolean @@ -260,3 +378,15 @@ var stringOrNumberOrUndefined = C.inStaticSetter; >C : typeof C >inStaticSetter : string | number | undefined +var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; +>stringOrNumberOrUndefined : string | number | undefined +>C.inStaticPropertyDeclaration : string | number | undefined +>C : typeof C +>inStaticPropertyDeclaration : string | number | undefined + +var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; +>stringOrNumberOrUndefined : string | number | undefined +>C.inStaticNestedArrowFunction : string | number | undefined +>C : typeof C +>inStaticNestedArrowFunction : string | number | undefined + diff --git a/tests/baselines/reference/keyofAndIndexedAccess.symbols b/tests/baselines/reference/keyofAndIndexedAccess.symbols index f6425b5ed0e..d5c4660d474 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.symbols +++ b/tests/baselines/reference/keyofAndIndexedAccess.symbols @@ -454,9 +454,9 @@ function pluck(array: T[], key: K) { >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 132, 17)) return array.map(x => x[key]); ->array.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>array.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >array : Symbol(array, Decl(keyofAndIndexedAccess.ts, 132, 37)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 133, 21)) >x : Symbol(x, Decl(keyofAndIndexedAccess.ts, 133, 21)) >key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 132, 48)) diff --git a/tests/baselines/reference/keyofAndIndexedAccess.types b/tests/baselines/reference/keyofAndIndexedAccess.types index 86469efc284..66605b41b75 100644 --- a/tests/baselines/reference/keyofAndIndexedAccess.types +++ b/tests/baselines/reference/keyofAndIndexedAccess.types @@ -523,10 +523,10 @@ function pluck(array: T[], key: K) { return array.map(x => x[key]); >array.map(x => x[key]) : T[K][] ->array.map : { (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; } +>array.map : { (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } >array : T[] ->map : { (this: [T, T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U, U]; (this: [T, T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U, U]; (this: [T, T], callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; } ->x => x[key] : (x: T) => T[K] +>map : { (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [T, T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U, U]; (this: [T, T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U, U]; (this: [T, T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U, U]; (this: [T, T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): [U, U]; (this: [T, T], callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): [U, U]; (this: [T, T], callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U): U[]; (callbackfn: (this: undefined, value: T, index: number, array: T[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: T, index: number, array: T[]) => U, thisArg: Z): U[]; } +>x => x[key] : (this: undefined, x: T) => T[K] >x : T >x[key] : T[K] >x : T diff --git a/tests/baselines/reference/mapOnTupleTypes01.symbols b/tests/baselines/reference/mapOnTupleTypes01.symbols index 1dbfca4a4c3..0733b1d5b02 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.symbols +++ b/tests/baselines/reference/mapOnTupleTypes01.symbols @@ -2,8 +2,8 @@ export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n); >mapOnLooseArrayLiteral : Symbol(mapOnLooseArrayLiteral, Decl(mapOnTupleTypes01.ts, 1, 10)) ->[1, 2, 3, 4].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1, 2, 3, 4].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 1, 53)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 1, 53)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 1, 53)) @@ -15,9 +15,9 @@ let numTuple: [number] = [1]; export let a = numTuple.map(x => x * x); >a : Symbol(a, Decl(mapOnTupleTypes01.ts, 6, 10)) ->numTuple.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numTuple.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numTuple : Symbol(numTuple, Decl(mapOnTupleTypes01.ts, 5, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 6, 28)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 6, 28)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 6, 28)) @@ -35,18 +35,18 @@ let numStr: [number, string] = [ 100, "hello"]; export let b = numNum.map(n => n * n); >b : Symbol(b, Decl(mapOnTupleTypes01.ts, 14, 10)) ->numNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numNum : Symbol(numNum, Decl(mapOnTupleTypes01.ts, 10, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 14, 26)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 14, 26)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 14, 26)) export let c = strStr.map(s => s.charCodeAt(0)); >c : Symbol(c, Decl(mapOnTupleTypes01.ts, 15, 10)) ->strStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>strStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >strStr : Symbol(strStr, Decl(mapOnTupleTypes01.ts, 11, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(mapOnTupleTypes01.ts, 15, 26)) >s.charCodeAt : Symbol(String.charCodeAt, Decl(lib.d.ts, --, --)) >s : Symbol(s, Decl(mapOnTupleTypes01.ts, 15, 26)) @@ -54,9 +54,9 @@ export let c = strStr.map(s => s.charCodeAt(0)); export let d = numStr.map(x => x); >d : Symbol(d, Decl(mapOnTupleTypes01.ts, 16, 10)) ->numStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numStr.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numStr : Symbol(numStr, Decl(mapOnTupleTypes01.ts, 12, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 16, 26)) >x : Symbol(x, Decl(mapOnTupleTypes01.ts, 16, 26)) @@ -67,9 +67,9 @@ let numNumNum: [number, number, number] = [1, 2, 3]; export let e = numNumNum.map(n => n * n); >e : Symbol(e, Decl(mapOnTupleTypes01.ts, 22, 10)) ->numNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numNumNum : Symbol(numNumNum, Decl(mapOnTupleTypes01.ts, 20, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 22, 29)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 22, 29)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 22, 29)) @@ -81,9 +81,9 @@ let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4]; export let f = numNumNumNum.map(n => n * n); >f : Symbol(f, Decl(mapOnTupleTypes01.ts, 28, 10)) ->numNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numNumNumNum : Symbol(numNumNumNum, Decl(mapOnTupleTypes01.ts, 26, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 28, 32)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 28, 32)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 28, 32)) @@ -95,9 +95,9 @@ let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5]; export let g = numNumNumNumNum.map(n => n * n); >g : Symbol(g, Decl(mapOnTupleTypes01.ts, 34, 10)) ->numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numNumNumNumNum : Symbol(numNumNumNumNum, Decl(mapOnTupleTypes01.ts, 32, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 34, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 34, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 34, 35)) @@ -110,9 +110,9 @@ let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2 export let h = numNumNumNumNum.map(n => n * n); >h : Symbol(h, Decl(mapOnTupleTypes01.ts, 41, 10)) ->numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>numNumNumNumNum.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >numNumNumNumNum : Symbol(numNumNumNumNum, Decl(mapOnTupleTypes01.ts, 32, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 41, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 41, 35)) >n : Symbol(n, Decl(mapOnTupleTypes01.ts, 41, 35)) diff --git a/tests/baselines/reference/mapOnTupleTypes01.types b/tests/baselines/reference/mapOnTupleTypes01.types index 0a01ecfa380..b8230d3fdf5 100644 --- a/tests/baselines/reference/mapOnTupleTypes01.types +++ b/tests/baselines/reference/mapOnTupleTypes01.types @@ -3,14 +3,14 @@ export let mapOnLooseArrayLiteral = [1, 2, 3, 4].map(n => n * n); >mapOnLooseArrayLiteral : number[] >[1, 2, 3, 4].map(n => n * n) : number[] ->[1, 2, 3, 4].map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>[1, 2, 3, 4].map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >[1, 2, 3, 4] : number[] >1 : 1 >2 : 2 >3 : 3 >4 : 4 ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number @@ -26,10 +26,10 @@ let numTuple: [number] = [1]; export let a = numTuple.map(x => x * x); >a : number[] >numTuple.map(x => x * x) : number[] ->numTuple.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numTuple.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numTuple : [number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->x => x * x : (x: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>x => x * x : (this: undefined, x: number) => number >x : number >x * x : number >x : number @@ -58,10 +58,10 @@ let numStr: [number, string] = [ 100, "hello"]; export let b = numNum.map(n => n * n); >b : [number, number] >numNum.map(n => n * n) : [number, number] ->numNum.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numNum.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numNum : [number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number @@ -70,10 +70,10 @@ export let b = numNum.map(n => n * n); export let c = strStr.map(s => s.charCodeAt(0)); >c : [number, number] >strStr.map(s => s.charCodeAt(0)) : [number, number] ->strStr.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>strStr.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >strStr : [string, string] ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->s => s.charCodeAt(0) : (s: string) => number +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>s => s.charCodeAt(0) : (this: undefined, s: string) => number >s : string >s.charCodeAt(0) : number >s.charCodeAt : (index: number) => number @@ -84,10 +84,10 @@ export let c = strStr.map(s => s.charCodeAt(0)); export let d = numStr.map(x => x); >d : [string | number, string | number] >numStr.map(x => x) : [string | number, string | number] ->numStr.map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U]; (this: [string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): U[]; } +>numStr.map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; (this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; (this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; (this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): U[]; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; } >numStr : [number, string] ->map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U, U]; (this: [string | number, string | number], callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string | number, index: number, array: (string | number)[]) => U, thisArg?: any): U[]; } ->x => x : (x: string | number) => string | number +>map : { (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string | number, string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U, U]; (this: [string | number, string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U, U]; (this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): [U, U]; (this: [string | number, string | number], callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): [U, U]; (this: [string | number, string | number], callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U): U[]; (callbackfn: (this: undefined, value: string | number, index: number, array: (string | number)[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string | number, index: number, array: (string | number)[]) => U, thisArg: Z): U[]; } +>x => x : (this: undefined, x: string | number) => string | number >x : string | number >x : string | number @@ -103,10 +103,10 @@ let numNumNum: [number, number, number] = [1, 2, 3]; export let e = numNumNum.map(n => n * n); >e : [number, number, number] >numNumNum.map(n => n * n) : [number, number, number] ->numNumNum.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numNumNum : [number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number @@ -125,10 +125,10 @@ let numNumNumNum: [number, number, number, number] = [1, 2, 3, 4]; export let f = numNumNumNum.map(n => n * n); >f : [number, number, number, number] >numNumNumNum.map(n => n * n) : [number, number, number, number] ->numNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numNumNumNum : [number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number @@ -148,10 +148,10 @@ let numNumNumNumNum: [number, number, number, number, number] = [1, 2, 3, 4, 5]; export let g = numNumNumNumNum.map(n => n * n); >g : [number, number, number, number, number] >numNumNumNumNum.map(n => n * n) : [number, number, number, number, number] ->numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numNumNumNumNum : [number, number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number @@ -173,10 +173,10 @@ let numNumNumNumNumNum: [number, number, number, number, number, number] = [1, 2 export let h = numNumNumNumNum.map(n => n * n); >h : [number, number, number, number, number] >numNumNumNumNum.map(n => n * n) : [number, number, number, number, number] ->numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>numNumNumNumNum.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >numNumNumNumNum : [number, number, number, number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->n => n * n : (n: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>n => n * n : (this: undefined, n: number) => number >n : number >n * n : number >n : number diff --git a/tests/baselines/reference/mapOnTupleTypes02.symbols b/tests/baselines/reference/mapOnTupleTypes02.symbols index da27a13d4f6..6453caace91 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.symbols +++ b/tests/baselines/reference/mapOnTupleTypes02.symbols @@ -9,9 +9,9 @@ export function increment(point: Point) { >Point : Symbol(Point, Decl(mapOnTupleTypes02.ts, 0, 0)) return point.map(d => d + 1); ->point.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>point.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >point : Symbol(point, Decl(mapOnTupleTypes02.ts, 3, 26)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >d : Symbol(d, Decl(mapOnTupleTypes02.ts, 4, 19)) >d : Symbol(d, Decl(mapOnTupleTypes02.ts, 4, 19)) } diff --git a/tests/baselines/reference/mapOnTupleTypes02.types b/tests/baselines/reference/mapOnTupleTypes02.types index 3803e3c319e..5ec555ebf17 100644 --- a/tests/baselines/reference/mapOnTupleTypes02.types +++ b/tests/baselines/reference/mapOnTupleTypes02.types @@ -10,10 +10,10 @@ export function increment(point: Point) { return point.map(d => d + 1); >point.map(d => d + 1) : [number, number] ->point.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>point.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >point : [number, number] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->d => d + 1 : (d: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>d => d + 1 : (this: undefined, d: number) => number >d : number >d + 1 : number >d : number diff --git a/tests/baselines/reference/mappedTypeRelationships.errors.txt b/tests/baselines/reference/mappedTypeRelationships.errors.txt index 22f56dacaf6..bc26bb272f5 100644 --- a/tests/baselines/reference/mappedTypeRelationships.errors.txt +++ b/tests/baselines/reference/mappedTypeRelationships.errors.txt @@ -1,14 +1,18 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(12,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[keyof T]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(17,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[K]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(21,5): error TS2536: Type 'keyof U' cannot be used to index type 'T'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,5): error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[keyof U]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(22,12): error TS2536: Type 'keyof U' cannot be used to index type 'T'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(26,5): error TS2536: Type 'K' cannot be used to index type 'T'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[K]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(27,12): error TS2536: Type 'K' cannot be used to index type 'T'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(31,5): error TS2322: Type 'T[keyof T] | undefined' is not assignable to type 'T[keyof T]'. Type 'undefined' is not assignable to type 'T[keyof T]'. @@ -17,13 +21,19 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(36,5): error TS2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(41,5): error TS2322: Type 'U[keyof T] | undefined' is not assignable to type 'T[keyof T]'. Type 'undefined' is not assignable to type 'T[keyof T]'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(42,5): error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. - Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'. + Type 'T[string]' is not assignable to type 'U[keyof T]'. + Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. + Type 'T[string]' is not assignable to type 'U[keyof T]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(46,5): error TS2322: Type 'U[K] | undefined' is not assignable to type 'T[K]'. Type 'undefined' is not assignable to type 'T[K]'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(47,5): error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. - Type 'T[K]' is not assignable to type 'U[K]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[K] | undefined'. + Type 'T[string]' is not assignable to type 'U[K]'. + Type 'T[K]' is not assignable to type 'U[K]'. + Type 'T[string]' is not assignable to type 'U[K]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(52,5): error TS2542: Index signature in type 'Readonly' only permits reading. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(57,5): error TS2542: Index signature in type 'Readonly' only permits reading. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(62,5): error TS2542: Index signature in type 'Readonly' only permits reading. @@ -33,7 +43,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(76,5): error TS2 tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(126,5): error TS2322: Type 'Partial' is not assignable to type 'Identity'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(142,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'. Type 'T[P]' is not assignable to type 'U[P]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[P]'. + Type 'T' is not assignable to type 'U'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(147,5): error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof U]: U[P]; }'. Type 'keyof U' is not assignable to type 'keyof T'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(152,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in keyof T]: T[P]; }'. @@ -44,7 +55,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(162,5): error TS Type 'keyof T' is not assignable to type 'K'. tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'. Type 'T[P]' is not assignable to type 'U[P]'. - Type 'T' is not assignable to type 'U'. + Type 'T[string]' is not assignable to type 'U[P]'. + Type 'T' is not assignable to type 'U'. ==== tests/cases/conformance/types/mapped/mappedTypeRelationships.ts (27 errors) ==== @@ -62,7 +74,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function f4(x: T, y: U, k: K) { @@ -70,7 +83,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function f5(x: T, y: U, k: keyof U) { @@ -80,7 +94,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[keyof U]' is not assignable to type 'U[keyof U]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof U]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. ~~~~ !!! error TS2536: Type 'keyof U' cannot be used to index type 'T'. } @@ -92,7 +107,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. ~~~~ !!! error TS2536: Type 'K' cannot be used to index type 'T'. } @@ -121,8 +137,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T] | undefined'. -!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T] | undefined'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'. +!!! error TS2322: Type 'T[keyof T]' is not assignable to type 'U[keyof T]'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[keyof T]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function f13(x: T, y: Partial, k: K) { @@ -133,8 +152,11 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS y[k] = x[k]; // Error ~~~~ !!! error TS2322: Type 'T[K]' is not assignable to type 'U[K] | undefined'. -!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K] | undefined'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'. +!!! error TS2322: Type 'T[K]' is not assignable to type 'U[K]'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[K]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function f20(x: T, y: Readonly, k: keyof T) { @@ -247,7 +269,8 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS ~ !!! error TS2322: Type '{ [P in keyof T]: T[P]; }' is not assignable to type '{ [P in keyof T]: U[P]; }'. !!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } function f72(x: { [P in keyof T]: T[P] }, y: { [P in keyof U]: U[P] }) { @@ -288,6 +311,7 @@ tests/cases/conformance/types/mapped/mappedTypeRelationships.ts(167,5): error TS ~ !!! error TS2322: Type '{ [P in K]: T[P]; }' is not assignable to type '{ [P in K]: U[P]; }'. !!! error TS2322: Type 'T[P]' is not assignable to type 'U[P]'. -!!! error TS2322: Type 'T' is not assignable to type 'U'. +!!! error TS2322: Type 'T[string]' is not assignable to type 'U[P]'. +!!! error TS2322: Type 'T' is not assignable to type 'U'. } \ No newline at end of file diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols index 62473581abe..ccee4a59a70 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.symbols @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_NoErrorDuplicateLibOptions1.ts, 2, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types index b259e30172d..532ef5511fa 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions1.types @@ -9,9 +9,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols index ccb78b1c367..97c6852b503 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.symbols @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_NoErrorDuplicateLibOptions2.ts, 2, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types index 4fa4c085bca..304b9411bff 100644 --- a/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types +++ b/tests/baselines/reference/modularizeLibrary_NoErrorDuplicateLibOptions2.types @@ -9,9 +9,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols index 0bbffee6c86..5aae1a6cb2f 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.symbols @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_TargetES5UsingES6Lib.ts, 2, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types index 25cd47601e0..28ceac3ac91 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES5UsingES6Lib.types @@ -9,9 +9,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols index d3d3e3d1ed6..568c87d928f 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.symbols @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_TargetES6UsingES6Lib.ts, 2, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types index 5b96ce987bc..c1005cadca6 100644 --- a/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types +++ b/tests/baselines/reference/modularizeLibrary_TargetES6UsingES6Lib.types @@ -9,9 +9,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (iterable: Iterable, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.symbols b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.symbols index ce03d4cfc59..90a88d4fbaa 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.symbols +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.symbols @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_UsingES5LibAndES6ArrayLib.ts, 2, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types index a097b116186..b7ab82ffb7d 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibAndES6ArrayLib.types @@ -9,9 +9,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.symbols b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.symbols index 0ed5ec38513..83ae1ac5f08 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.symbols +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.symbols @@ -7,9 +7,9 @@ function f(x: number, y: number, z: number) { >z : Symbol(z, Decl(modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.ts, 1, 32)) return Array.from(arguments); ->Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >Array : Symbol(Array, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) ->from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) >arguments : Symbol(arguments) } diff --git a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types index 6accc7e7905..3515b6dc55d 100644 --- a/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types +++ b/tests/baselines/reference/modularizeLibrary_UsingES5LibES6ArrayLibES6WellknownSymbolLib.types @@ -8,9 +8,9 @@ function f(x: number, y: number, z: number) { return Array.from(arguments); >Array.from(arguments) : any[] ->Array.from : { (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >Array : ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; (arrayLike: ArrayLike): T[]; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } >arguments : IArguments } diff --git a/tests/baselines/reference/nestedSelf.symbols b/tests/baselines/reference/nestedSelf.symbols index b9a9e91d36d..6fa6bb1b59f 100644 --- a/tests/baselines/reference/nestedSelf.symbols +++ b/tests/baselines/reference/nestedSelf.symbols @@ -10,8 +10,8 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : Symbol(C.foo, Decl(nestedSelf.ts, 2, 17)) ->[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[1,2,3].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >x : Symbol(x, Decl(nestedSelf.ts, 3, 31)) >this.n : Symbol(C.n, Decl(nestedSelf.ts, 1, 17)) >this : Symbol(C, Decl(nestedSelf.ts, 0, 10)) diff --git a/tests/baselines/reference/nestedSelf.types b/tests/baselines/reference/nestedSelf.types index 1ec95a8d24a..176e0dc28d3 100644 --- a/tests/baselines/reference/nestedSelf.types +++ b/tests/baselines/reference/nestedSelf.types @@ -12,13 +12,13 @@ module M { public foo() { [1,2,3].map((x) => { return this.n * x; })} >foo : () => void >[1,2,3].map((x) => { return this.n * x; }) : number[] ->[1,2,3].map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>[1,2,3].map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >[1,2,3] : number[] >1 : 1 >2 : 2 >3 : 3 ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } ->(x) => { return this.n * x; } : (x: number) => number +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } +>(x) => { return this.n * x; } : (this: undefined, x: number) => number >x : number >this.n * x : number >this.n : number diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols index 6cee1604cf0..45b62e29b8a 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.symbols @@ -4,11 +4,11 @@ var regexMatchList = ['', '']; >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 1, 3)) regexMatchList.forEach(match => ''.replace(match, '')); ->regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>regexMatchList.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >regexMatchList : Symbol(regexMatchList, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 1, 3)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 2, 23)) ->''.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>''.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(noImplicitAnyInContextuallyTypesFunctionParamter.ts, 2, 23)) diff --git a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types index 928185a0953..100d64482ce 100644 --- a/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types +++ b/tests/baselines/reference/noImplicitAnyInContextuallyTypesFunctionParamter.types @@ -8,15 +8,15 @@ var regexMatchList = ['', '']; regexMatchList.forEach(match => ''.replace(match, '')); >regexMatchList.forEach(match => ''.replace(match, '')) : void ->regexMatchList.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>regexMatchList.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } >regexMatchList : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void ->match => ''.replace(match, '') : (match: string) => string +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>match => ''.replace(match, '') : (this: undefined, match: string) => string >match : string >''.replace(match, '') : string ->''.replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>''.replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >'' : "" ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >match : string >'' : "" diff --git a/tests/baselines/reference/objectRestForOf.symbols b/tests/baselines/reference/objectRestForOf.symbols index f3786fed55f..d10b0de4d0e 100644 --- a/tests/baselines/reference/objectRestForOf.symbols +++ b/tests/baselines/reference/objectRestForOf.symbols @@ -32,9 +32,9 @@ for ({ x: xx, ...rrestOff } of array ) { } for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { >norest : Symbol(norest, Decl(objectRestForOf.ts, 9, 10)) ->array.map : Symbol(Array.map, 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, --, --)) +>array.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) >array : Symbol(array, Decl(objectRestForOf.ts, 0, 3)) ->map : Symbol(Array.map, 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, --, --)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) >a : Symbol(a, Decl(objectRestForOf.ts, 9, 31)) >a : Symbol(a, Decl(objectRestForOf.ts, 9, 31)) >x : Symbol(x, Decl(objectRestForOf.ts, 9, 44)) diff --git a/tests/baselines/reference/objectRestForOf.types b/tests/baselines/reference/objectRestForOf.types index 2fde7566c74..b7d1d1ac7be 100644 --- a/tests/baselines/reference/objectRestForOf.types +++ b/tests/baselines/reference/objectRestForOf.types @@ -36,10 +36,10 @@ for ({ x: xx, ...rrestOff } of array ) { for (const norest of array.map(a => ({ ...a, x: 'a string' }))) { >norest : { x: string; y: string; } >array.map(a => ({ ...a, x: 'a string' })) : { x: string; y: string; }[] ->array.map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): U[]; } +>array.map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): U[]; (callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): U[]; } >array : { x: number; y: string; }[] ->map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg?: any): U[]; } ->a => ({ ...a, x: 'a string' }) : (a: { x: number; y: string; }) => { x: string; y: string; } +>map : { (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): [U, U]; (this: [{ x: number; y: string; }, { x: number; y: string; }], callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U): U[]; (callbackfn: (this: undefined, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: { x: number; y: string; }, index: number, array: { x: number; y: string; }[]) => U, thisArg: Z): U[]; } +>a => ({ ...a, x: 'a string' }) : (this: undefined, a: { x: number; y: string; }) => { x: string; y: string; } >a : { x: number; y: string; } >({ ...a, x: 'a string' }) : { x: string; y: string; } >{ ...a, x: 'a string' } : { x: string; y: string; } diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols index 02390079e38..0070954bb1e 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.symbols @@ -14,9 +14,9 @@ module Bugs { var result= message.replace(/\{(\d+)\}/g, function(match, ...rest) { >result : Symbol(result, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 7)) ->message.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>message.replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >message : Symbol(message, Decl(overloadResolutionOverNonCTLambdas.ts, 5, 16)) ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >match : Symbol(match, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 55)) >rest : Symbol(rest, Decl(overloadResolutionOverNonCTLambdas.ts, 6, 61)) diff --git a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types index a4de1666d0b..ce2171f1e9a 100644 --- a/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types +++ b/tests/baselines/reference/overloadResolutionOverNonCTLambdas.types @@ -15,9 +15,9 @@ module Bugs { var result= message.replace(/\{(\d+)\}/g, function(match, ...rest) { >result : string >message.replace(/\{(\d+)\}/g, function(match, ...rest) { var index= rest[0]; return typeof args[index] !== 'undefined' ? args[index] : match; }) : string ->message.replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>message.replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >message : string ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/\{(\d+)\}/g : RegExp >function(match, ...rest) { var index= rest[0]; return typeof args[index] !== 'undefined' ? args[index] : match; } : (match: string, ...rest: any[]) => any >match : string diff --git a/tests/baselines/reference/parser630933.symbols b/tests/baselines/reference/parser630933.symbols index 0f2ac0679e0..8aff3b01ffd 100644 --- a/tests/baselines/reference/parser630933.symbols +++ b/tests/baselines/reference/parser630933.symbols @@ -4,7 +4,7 @@ var a = "Hello"; var b = a.match(/\/ver=([^/]+)/); >b : Symbol(b, Decl(parser630933.ts, 1, 3)) ->a.match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>a.match : Symbol(String.match, Decl(lib.d.ts, --, --)) >a : Symbol(a, Decl(parser630933.ts, 0, 3)) ->match : Symbol(String.match, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>match : Symbol(String.match, Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/parser630933.types b/tests/baselines/reference/parser630933.types index 9a0ba9e7205..7b38c188f2d 100644 --- a/tests/baselines/reference/parser630933.types +++ b/tests/baselines/reference/parser630933.types @@ -6,8 +6,8 @@ var a = "Hello"; var b = a.match(/\/ver=([^/]+)/); >b : RegExpMatchArray >a.match(/\/ver=([^/]+)/) : RegExpMatchArray ->a.match : { (regexp: string): RegExpMatchArray; (regexp: RegExp): RegExpMatchArray; } +>a.match : (regexp: string | RegExp) => RegExpMatchArray >a : string ->match : { (regexp: string): RegExpMatchArray; (regexp: RegExp): RegExpMatchArray; } +>match : (regexp: string | RegExp) => RegExpMatchArray >/\/ver=([^/]+)/ : RegExp diff --git a/tests/baselines/reference/regExpWithSlashInCharClass.symbols b/tests/baselines/reference/regExpWithSlashInCharClass.symbols index 105724b12f1..6ee33e12b45 100644 --- a/tests/baselines/reference/regExpWithSlashInCharClass.symbols +++ b/tests/baselines/reference/regExpWithSlashInCharClass.symbols @@ -1,16 +1,16 @@ === tests/cases/compiler/regExpWithSlashInCharClass.ts === var foo1 = "a/".replace(/.[/]/, ""); >foo1 : Symbol(foo1, Decl(regExpWithSlashInCharClass.ts, 0, 3)) ->"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var foo2 = "a//".replace(/.[//]/g, ""); >foo2 : Symbol(foo2, Decl(regExpWithSlashInCharClass.ts, 1, 3)) ->"a//".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>"a//".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix"); >foo3 : Symbol(foo3, Decl(regExpWithSlashInCharClass.ts, 2, 3)) ->"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>"a/".replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>replace : Symbol(String.replace, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) diff --git a/tests/baselines/reference/regExpWithSlashInCharClass.types b/tests/baselines/reference/regExpWithSlashInCharClass.types index e866f2bc229..1c980ca8d8b 100644 --- a/tests/baselines/reference/regExpWithSlashInCharClass.types +++ b/tests/baselines/reference/regExpWithSlashInCharClass.types @@ -2,27 +2,27 @@ var foo1 = "a/".replace(/.[/]/, ""); >foo1 : string >"a/".replace(/.[/]/, "") : string ->"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>"a/".replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >"a/" : "a/" ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[/]/ : RegExp >"" : "" var foo2 = "a//".replace(/.[//]/g, ""); >foo2 : string >"a//".replace(/.[//]/g, "") : string ->"a//".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>"a//".replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >"a//" : "a//" ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[//]/g : RegExp >"" : "" var foo3 = "a/".replace(/.[/no sleep /till/]/, "bugfix"); >foo3 : string >"a/".replace(/.[/no sleep /till/]/, "bugfix") : string ->"a/".replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>"a/".replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >"a/" : "a/" ->replace : { (searchValue: string, replaceValue: string): string; (searchValue: string, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: RegExp, replaceValue: string): string; (searchValue: RegExp, replacer: (substring: string, ...args: any[]) => string): string; } +>replace : { (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; } >/.[/no sleep /till/]/ : RegExp >"bugfix" : "bugfix" diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols index 23a1df25653..edb2c362fc2 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.symbols @@ -1,9 +1,9 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); ->[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>[].map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) >X : Symbol(X, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 27)) >p : Symbol(p, Decl(simpleArrowFunctionParameterReferencedInObjectLiteral1.ts, 0, 20)) diff --git a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types index ff1640909d9..ad683ef2e15 100644 --- a/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types +++ b/tests/baselines/reference/simpleArrowFunctionParameterReferencedInObjectLiteral1.types @@ -1,15 +1,15 @@ === tests/cases/compiler/simpleArrowFunctionParameterReferencedInObjectLiteral1.ts === [].map(() => [].map(p => ({ X: p }))); >[].map(() => [].map(p => ({ X: p }))) : { X: any; }[][] ->[].map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>[].map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >[] : undefined[] ->map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >() => [].map(p => ({ X: p })) : () => { X: any; }[] >[].map(p => ({ X: p })) : { X: any; }[] ->[].map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } +>[].map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } >[] : undefined[] ->map : { (this: [any, any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U, U]; (this: [any, any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U, U]; (this: [any, any], callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: any, index: number, array: any[]) => U, thisArg?: any): U[]; } ->p => ({ X: p }) : (p: any) => { X: any; } +>map : { (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [any, any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U, U]; (this: [any, any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U, U]; (this: [any, any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U, U]; (this: [any, any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): [U, U]; (this: [any, any], callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): [U, U]; (this: [any, any], callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U): U[]; (callbackfn: (this: undefined, value: any, index: number, array: any[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: any, index: number, array: any[]) => U, thisArg: Z): U[]; } +>p => ({ X: p }) : (this: undefined, p: any) => { X: any; } >p : any >({ X: p }) : { X: any; } >{ X: p } : { X: any; } diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols index 7d5a6d979b3..8c8b372bbc8 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.symbols @@ -23,9 +23,9 @@ function foo() { >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 12, 7)) series2.map(seriesExtent); ->series2.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>series2.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >series2 : Symbol(series2, Decl(specializationsShouldNotAffectEachOther.ts, 12, 7)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >seriesExtent : Symbol(seriesExtent, Decl(specializationsShouldNotAffectEachOther.ts, 10, 7)) return null; @@ -34,11 +34,11 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : Symbol(keyExtent2, Decl(specializationsShouldNotAffectEachOther.ts, 19, 3)) ->series.data.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>series.data.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >series.data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 1, 19)) >series : Symbol(series, Decl(specializationsShouldNotAffectEachOther.ts, 5, 3)) >data : Symbol(Series.data, Decl(specializationsShouldNotAffectEachOther.ts, 1, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 19, 50)) >d : Symbol(d, Decl(specializationsShouldNotAffectEachOther.ts, 19, 50)) diff --git a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types index aa14eca0508..d9c9b7baa20 100644 --- a/tests/baselines/reference/specializationsShouldNotAffectEachOther.types +++ b/tests/baselines/reference/specializationsShouldNotAffectEachOther.types @@ -26,9 +26,9 @@ function foo() { series2.map(seriesExtent); >series2.map(seriesExtent) : any[] ->series2.map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>series2.map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >series2 : number[] ->map : { (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U]; (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U]; (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[]; } +>map : { (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U]; (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U]; (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U]; (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U]; (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U]; (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[]; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[]; } >seriesExtent : (series: any) => any return null; @@ -39,12 +39,12 @@ function foo() { var keyExtent2: any[] = series.data.map(function (d: string) { return d; }); >keyExtent2 : any[] >series.data.map(function (d: string) { return d; }) : string[] ->series.data.map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } +>series.data.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } >series.data : string[] >series : Series >data : string[] ->map : { (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U]; (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U]; (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[]; } ->function (d: string) { return d; } : (d: string) => string +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>function (d: string) { return d; } : (this: undefined, d: string) => string >d : string >d : string diff --git a/tests/baselines/reference/targetTypeArgs.symbols b/tests/baselines/reference/targetTypeArgs.symbols index b0d825ddd50..d7c40a6a609 100644 --- a/tests/baselines/reference/targetTypeArgs.symbols +++ b/tests/baselines/reference/targetTypeArgs.symbols @@ -14,44 +14,44 @@ foo(function(x) { x }); >x : Symbol(x, Decl(targetTypeArgs.ts, 4, 13)) [1].forEach(function(v,i,a) { v }); ->[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>[1].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 6, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 6, 25)) >v : Symbol(v, Decl(targetTypeArgs.ts, 6, 21)) ["hello"].every(function(v,i,a) {return true;}); ->["hello"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>["hello"].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 7, 25)) >i : Symbol(i, Decl(targetTypeArgs.ts, 7, 27)) >a : Symbol(a, Decl(targetTypeArgs.ts, 7, 29)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 8, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 8, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 8, 23)) [1].every(function(v,i,a) {return true;}); ->[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>[1].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 9, 19)) >i : Symbol(i, Decl(targetTypeArgs.ts, 9, 21)) >a : Symbol(a, Decl(targetTypeArgs.ts, 9, 23)) ["s"].every(function(v,i,a) {return true;}); ->["s"].every : Symbol(Array.every, Decl(lib.d.ts, --, --)) ->every : Symbol(Array.every, Decl(lib.d.ts, --, --)) +>["s"].every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>every : Symbol(Array.every, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 10, 21)) >i : Symbol(i, Decl(targetTypeArgs.ts, 10, 23)) >a : Symbol(a, Decl(targetTypeArgs.ts, 10, 25)) ["s"].forEach(function(v,i,a) { v }); ->["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>["s"].forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >v : Symbol(v, Decl(targetTypeArgs.ts, 11, 23)) >i : Symbol(i, Decl(targetTypeArgs.ts, 11, 25)) >a : Symbol(a, Decl(targetTypeArgs.ts, 11, 27)) diff --git a/tests/baselines/reference/targetTypeArgs.types b/tests/baselines/reference/targetTypeArgs.types index 84985316aa2..e1bcb00ba15 100644 --- a/tests/baselines/reference/targetTypeArgs.types +++ b/tests/baselines/reference/targetTypeArgs.types @@ -19,11 +19,11 @@ foo(function(x) { x }); [1].forEach(function(v,i,a) { v }); >[1].forEach(function(v,i,a) { v }) : void ->[1].forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void +>[1].forEach : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } >[1] : number[] >1 : 1 ->forEach : (callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void ->function(v,i,a) { v } : (v: number, i: number, a: number[]) => void +>forEach : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void): void; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: number, index: number, array: number[]) => void, thisArg: Z): void; } +>function(v,i,a) { v } : (this: undefined, v: number, i: number, a: number[]) => void >v : number >i : number >a : number[] @@ -31,11 +31,11 @@ foo(function(x) { x }); ["hello"].every(function(v,i,a) {return true;}); >["hello"].every(function(v,i,a) {return true;}) : boolean ->["hello"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>["hello"].every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } >["hello"] : string[] >"hello" : "hello" ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean ->function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true +>every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function(v,i,a) {return true;} : (this: undefined, v: string, i: number, a: string[]) => true >v : string >i : number >a : string[] @@ -43,11 +43,11 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>[1].every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } >[1] : number[] >1 : 1 ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean ->function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true +>every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>function(v,i,a) {return true;} : (this: undefined, v: number, i: number, a: number[]) => true >v : number >i : number >a : number[] @@ -55,11 +55,11 @@ foo(function(x) { x }); [1].every(function(v,i,a) {return true;}); >[1].every(function(v,i,a) {return true;}) : boolean ->[1].every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean +>[1].every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } >[1] : number[] >1 : 1 ->every : (callbackfn: (value: number, index: number, array: number[]) => boolean, thisArg?: any) => boolean ->function(v,i,a) {return true;} : (v: number, i: number, a: number[]) => true +>every : { (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean): boolean; (callbackfn: (this: undefined, value: number, index: number, array: number[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: number, index: number, array: number[]) => boolean, thisArg: Z): boolean; } +>function(v,i,a) {return true;} : (this: undefined, v: number, i: number, a: number[]) => true >v : number >i : number >a : number[] @@ -67,11 +67,11 @@ foo(function(x) { x }); ["s"].every(function(v,i,a) {return true;}); >["s"].every(function(v,i,a) {return true;}) : boolean ->["s"].every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean +>["s"].every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } >["s"] : string[] >"s" : "s" ->every : (callbackfn: (value: string, index: number, array: string[]) => boolean, thisArg?: any) => boolean ->function(v,i,a) {return true;} : (v: string, i: number, a: string[]) => true +>every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function(v,i,a) {return true;} : (this: undefined, v: string, i: number, a: string[]) => true >v : string >i : number >a : string[] @@ -79,11 +79,11 @@ foo(function(x) { x }); ["s"].forEach(function(v,i,a) { v }); >["s"].forEach(function(v,i,a) { v }) : void ->["s"].forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>["s"].forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } >["s"] : string[] >"s" : "s" ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void ->function(v,i,a) { v } : (v: string, i: number, a: string[]) => void +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function(v,i,a) { v } : (this: undefined, v: string, i: number, a: string[]) => void >v : string >i : number >a : string[] diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols index 6df8d8ac2ad..d7903e3328a 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.symbols @@ -9,9 +9,9 @@ function suggest(){ >result : Symbol(result, Decl(targetTypeObjectLiteralToAny.ts, 2, 4)) TypeScriptKeywords.forEach(function(keyword) { ->TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>TypeScriptKeywords.forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >TypeScriptKeywords : Symbol(TypeScriptKeywords, Decl(targetTypeObjectLiteralToAny.ts, 1, 4)) ->forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --)) +>forEach : Symbol(Array.forEach, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >keyword : Symbol(keyword, Decl(targetTypeObjectLiteralToAny.ts, 4, 37)) result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any diff --git a/tests/baselines/reference/targetTypeObjectLiteralToAny.types b/tests/baselines/reference/targetTypeObjectLiteralToAny.types index 1dd81b33603..1364a5b2a23 100644 --- a/tests/baselines/reference/targetTypeObjectLiteralToAny.types +++ b/tests/baselines/reference/targetTypeObjectLiteralToAny.types @@ -10,10 +10,10 @@ function suggest(){ TypeScriptKeywords.forEach(function(keyword) { >TypeScriptKeywords.forEach(function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any }) : void ->TypeScriptKeywords.forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void +>TypeScriptKeywords.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } >TypeScriptKeywords : string[] ->forEach : (callbackfn: (value: string, index: number, array: string[]) => void, thisArg?: any) => void ->function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (keyword: string) => void +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function(keyword) { result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any } : (this: undefined, keyword: string) => void >keyword : string result.push({text:keyword, type:"keyword"}); // this should not cause a crash - push should be typed to any diff --git a/tests/baselines/reference/textChanges/deleteNode1.js b/tests/baselines/reference/textChanges/deleteNode1.js new file mode 100644 index 00000000000..c73c0eaf9f9 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNode1.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 + +===MODIFIED=== + +var x = 1; // some comment - 1 +var z = 3; // comment 4 diff --git a/tests/baselines/reference/textChanges/deleteNode2.js b/tests/baselines/reference/textChanges/deleteNode2.js new file mode 100644 index 00000000000..828a9b5b8fa --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNode2.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 + +===MODIFIED=== + +var x = 1;var z = 3; // comment 4 diff --git a/tests/baselines/reference/textChanges/deleteNode3.js b/tests/baselines/reference/textChanges/deleteNode3.js new file mode 100644 index 00000000000..acb26c7daa7 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNode3.js @@ -0,0 +1,14 @@ +===ORIGINAL=== + +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 + +===MODIFIED=== + +var x = 1; // some comment - 1 + // comment 3 +var z = 3; // comment 4 diff --git a/tests/baselines/reference/textChanges/deleteNode4.js b/tests/baselines/reference/textChanges/deleteNode4.js new file mode 100644 index 00000000000..b6edb25bc5c --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNode4.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 + +===MODIFIED=== + +var x = 1; // comment 3 +var z = 3; // comment 4 diff --git a/tests/baselines/reference/textChanges/deleteNode5.js b/tests/baselines/reference/textChanges/deleteNode5.js new file mode 100644 index 00000000000..6f896535f0f --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNode5.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +var x = 1; // some comment - 1 +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 + +===MODIFIED=== + +/** + * comment 2 + */ +var y = 2; // comment 3 +var z = 3; // comment 4 diff --git a/tests/baselines/reference/textChanges/deleteNodeAfterInClass1.js b/tests/baselines/reference/textChanges/deleteNodeAfterInClass1.js new file mode 100644 index 00000000000..d8d54153eaa --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeAfterInClass1.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +class A { + x; + y = 1; +} + +===MODIFIED=== + +class A { + y = 1; +} diff --git a/tests/baselines/reference/textChanges/deleteNodeAfterInClass2.js b/tests/baselines/reference/textChanges/deleteNodeAfterInClass2.js new file mode 100644 index 00000000000..8d18d820214 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeAfterInClass2.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +class A { + x + y = 1; +} + +===MODIFIED=== + +class A { + y = 1; +} diff --git a/tests/baselines/reference/textChanges/deleteNodeInList1.js b/tests/baselines/reference/textChanges/deleteNodeInList1.js new file mode 100644 index 00000000000..b603913566d --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList1.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1, b = 2, c = 3; +===MODIFIED=== +var b = 2, c = 3; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList10.js b/tests/baselines/reference/textChanges/deleteNodeInList10.js new file mode 100644 index 00000000000..46da605a71a --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList10.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number,b: string,c = true) { + return 1; +} +===MODIFIED=== + +function foo(b: string,c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList11.js b/tests/baselines/reference/textChanges/deleteNodeInList11.js new file mode 100644 index 00000000000..f5aa666e527 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList11.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number,b: string,c = true) { + return 1; +} +===MODIFIED=== + +function foo(a: number,c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList12.js b/tests/baselines/reference/textChanges/deleteNodeInList12.js new file mode 100644 index 00000000000..db05ef06db9 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList12.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number,b: string,c = true) { + return 1; +} +===MODIFIED=== + +function foo(a: number,b: string) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList13.js b/tests/baselines/reference/textChanges/deleteNodeInList13.js new file mode 100644 index 00000000000..599d3a31d43 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList13.js @@ -0,0 +1,15 @@ +===ORIGINAL=== + +function foo( + a: number, + b: string, + c = true) { + return 1; +} +===MODIFIED=== + +function foo( + b: string, + c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList14.js b/tests/baselines/reference/textChanges/deleteNodeInList14.js new file mode 100644 index 00000000000..da3596b38b2 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList14.js @@ -0,0 +1,15 @@ +===ORIGINAL=== + +function foo( + a: number, + b: string, + c = true) { + return 1; +} +===MODIFIED=== + +function foo( + a: number, + c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList15.js b/tests/baselines/reference/textChanges/deleteNodeInList15.js new file mode 100644 index 00000000000..02f649dabd2 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList15.js @@ -0,0 +1,15 @@ +===ORIGINAL=== + +function foo( + a: number, + b: string, + c = true) { + return 1; +} +===MODIFIED=== + +function foo( + a: number, + b: string) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList1_1.js b/tests/baselines/reference/textChanges/deleteNodeInList1_1.js new file mode 100644 index 00000000000..87709601c42 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList1_1.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1,b = 2,c = 3; +===MODIFIED=== +var b = 2,c = 3; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList2.js b/tests/baselines/reference/textChanges/deleteNodeInList2.js new file mode 100644 index 00000000000..18e4a0cd304 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList2.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1, b = 2, c = 3; +===MODIFIED=== +var a = 1, c = 3; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList2_1.js b/tests/baselines/reference/textChanges/deleteNodeInList2_1.js new file mode 100644 index 00000000000..b4098a89302 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList2_1.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1,b = 2,c = 3; +===MODIFIED=== +var a = 1,c = 3; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList3.js b/tests/baselines/reference/textChanges/deleteNodeInList3.js new file mode 100644 index 00000000000..1c6ff4aa294 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList3.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1, b = 2, c = 3; +===MODIFIED=== +var a = 1, b = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList3_1.js b/tests/baselines/reference/textChanges/deleteNodeInList3_1.js new file mode 100644 index 00000000000..ead2a1a42f8 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList3_1.js @@ -0,0 +1,4 @@ +===ORIGINAL=== +var a = 1,b = 2,c = 3; +===MODIFIED=== +var a = 1,b = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList4.js b/tests/baselines/reference/textChanges/deleteNodeInList4.js new file mode 100644 index 00000000000..61bdf9159cb --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList4.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +namespace M { + var a = 1, + b = 2, + c = 3; +} +===MODIFIED=== + +namespace M { + var b = 2, + c = 3; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList4_1.js b/tests/baselines/reference/textChanges/deleteNodeInList4_1.js new file mode 100644 index 00000000000..19ff5475d1a --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList4_1.js @@ -0,0 +1,17 @@ +===ORIGINAL=== + +namespace M { + var a = 1, // comment 1 + // comment 2 + b = 2, // comment 3 + // comment 4 + c = 3; // comment 5 +} +===MODIFIED=== + +namespace M { + var // comment 2 + b = 2, // comment 3 + // comment 4 + c = 3; // comment 5 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList5.js b/tests/baselines/reference/textChanges/deleteNodeInList5.js new file mode 100644 index 00000000000..0ed65877d27 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList5.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +namespace M { + var a = 1, + b = 2, + c = 3; +} +===MODIFIED=== + +namespace M { + var a = 1, + c = 3; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList5_1.js b/tests/baselines/reference/textChanges/deleteNodeInList5_1.js new file mode 100644 index 00000000000..224b92481d3 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList5_1.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +namespace M { + var a = 1, // comment 1 + // comment 2 + b = 2, // comment 3 + // comment 4 + c = 3; // comment 5 +} +===MODIFIED=== + +namespace M { + var a = 1, // comment 1 + // comment 4 + c = 3; // comment 5 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList6.js b/tests/baselines/reference/textChanges/deleteNodeInList6.js new file mode 100644 index 00000000000..4093329023f --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList6.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +namespace M { + var a = 1, + b = 2, + c = 3; +} +===MODIFIED=== + +namespace M { + var a = 1, + b = 2; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList6_1.js b/tests/baselines/reference/textChanges/deleteNodeInList6_1.js new file mode 100644 index 00000000000..6acc20aa826 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList6_1.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +namespace M { + var a = 1, // comment 1 + // comment 2 + b = 2, // comment 3 + // comment 4 + c = 3; // comment 5 +} +===MODIFIED=== + +namespace M { + var a = 1, // comment 1 + // comment 2 + b = 2; // comment 5 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList7.js b/tests/baselines/reference/textChanges/deleteNodeInList7.js new file mode 100644 index 00000000000..564ff3f86aa --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList7.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number, b: string, c = true) { + return 1; +} +===MODIFIED=== + +function foo(b: string, c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList8.js b/tests/baselines/reference/textChanges/deleteNodeInList8.js new file mode 100644 index 00000000000..b3a0a0f4c47 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList8.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number, b: string, c = true) { + return 1; +} +===MODIFIED=== + +function foo(a: number, c = true) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeInList9.js b/tests/baselines/reference/textChanges/deleteNodeInList9.js new file mode 100644 index 00000000000..96878a6086d --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeInList9.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +function foo(a: number, b: string, c = true) { + return 1; +} +===MODIFIED=== + +function foo(a: number, b: string) { + return 1; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/deleteNodeRange1.js b/tests/baselines/reference/textChanges/deleteNodeRange1.js new file mode 100644 index 00000000000..f9fa45ebb1a --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeRange1.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 + +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +// comment 6 +var a = 4; // comment 7 diff --git a/tests/baselines/reference/textChanges/deleteNodeRange2.js b/tests/baselines/reference/textChanges/deleteNodeRange2.js new file mode 100644 index 00000000000..aacea6ff5ee --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeRange2.js @@ -0,0 +1,15 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 + +===MODIFIED=== + +// comment 1 +var x = 1;// comment 6 +var a = 4; // comment 7 diff --git a/tests/baselines/reference/textChanges/deleteNodeRange3.js b/tests/baselines/reference/textChanges/deleteNodeRange3.js new file mode 100644 index 00000000000..bb2bb36ca2c --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeRange3.js @@ -0,0 +1,17 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 + +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 + // comment 5 +// comment 6 +var a = 4; // comment 7 diff --git a/tests/baselines/reference/textChanges/deleteNodeRange4.js b/tests/baselines/reference/textChanges/deleteNodeRange4.js new file mode 100644 index 00000000000..3e9ad960b13 --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteNodeRange4.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 + +===MODIFIED=== + +// comment 1 +var x = 1; // comment 5 +// comment 6 +var a = 4; // comment 7 diff --git a/tests/baselines/reference/textChanges/deleteRange1.js b/tests/baselines/reference/textChanges/deleteRange1.js new file mode 100644 index 00000000000..362e678452e --- /dev/null +++ b/tests/baselines/reference/textChanges/deleteRange1.js @@ -0,0 +1,15 @@ +===ORIGINAL=== + +function foo() { + return 1; +} + +function bar() { + return 2; +} + +===MODIFIED=== + +function bar() { + return 2; +} diff --git a/tests/baselines/reference/textChanges/extractMethodLike.js b/tests/baselines/reference/textChanges/extractMethodLike.js new file mode 100644 index 00000000000..fa1d625dc4d --- /dev/null +++ b/tests/baselines/reference/textChanges/extractMethodLike.js @@ -0,0 +1,49 @@ +===ORIGINAL=== + +namespace M +{ + namespace M2 + { + function foo() { + // comment 1 + const x = 1; + + /** + * comment 2 line 1 + * comment 2 line 2 + */ + function f() { + return 100; + } + const y = 2; // comment 3 + return 1; + } + } +} +===MODIFIED=== + +namespace M +{ + function bar(): any + { + /** + * comment 2 line 1 + * comment 2 line 2 + */ + function f() + { + return 100; + } + const y = 2; // comment 3 + return 1; + } + namespace M2 + { + function foo() { + // comment 1 + const x = 1; + + return bar(); + } + } +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeAfter1.js b/tests/baselines/reference/textChanges/insertNodeAfter1.js new file mode 100644 index 00000000000..e6d7387f6bc --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfter1.js @@ -0,0 +1,26 @@ +===ORIGINAL=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} +===MODIFIED=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + public class class1 implements interface1 + { + property1: boolean; + } + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeAfter2.js b/tests/baselines/reference/textChanges/insertNodeAfter2.js new file mode 100644 index 00000000000..7c027e35b50 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfter2.js @@ -0,0 +1,26 @@ +===ORIGINAL=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} +===MODIFIED=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} +public class class1 implements interface1 +{ + property1: boolean; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeAfter3-block with newline.js b/tests/baselines/reference/textChanges/insertNodeAfter3-block with newline.js new file mode 100644 index 00000000000..41bfb72b574 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfter3-block with newline.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +class A { + constructor() { + + } +} + +===MODIFIED=== + +class A { + constructor() { + super(); + + } +} diff --git a/tests/baselines/reference/textChanges/insertNodeAfter3.js b/tests/baselines/reference/textChanges/insertNodeAfter3.js new file mode 100644 index 00000000000..3765bbaf032 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfter3.js @@ -0,0 +1,14 @@ +===ORIGINAL=== + +class A { + constructor() { + } +} + +===MODIFIED=== + +class A { + constructor() { + super(); + } +} diff --git a/tests/baselines/reference/textChanges/insertNodeAfter4.js b/tests/baselines/reference/textChanges/insertNodeAfter4.js new file mode 100644 index 00000000000..3ca51db4989 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfter4.js @@ -0,0 +1,16 @@ +===ORIGINAL=== + +class A { + constructor() { + var x = 1; + } +} + +===MODIFIED=== + +class A { + constructor() { + var x = 1; + super(); + } +} diff --git a/tests/baselines/reference/textChanges/insertNodeAfterInClass1.js b/tests/baselines/reference/textChanges/insertNodeAfterInClass1.js new file mode 100644 index 00000000000..841d43fef97 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfterInClass1.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +class A { + x +} + +===MODIFIED=== + +class A { + x; + a: boolean; +} diff --git a/tests/baselines/reference/textChanges/insertNodeAfterInClass2.js b/tests/baselines/reference/textChanges/insertNodeAfterInClass2.js new file mode 100644 index 00000000000..1d583d8ac90 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfterInClass2.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +class A { + x; +} + +===MODIFIED=== + +class A { + x; + a: boolean; +} diff --git a/tests/baselines/reference/textChanges/insertNodeAfterMultipleNodes.js b/tests/baselines/reference/textChanges/insertNodeAfterMultipleNodes.js new file mode 100644 index 00000000000..1c3bbe4d3e2 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAfterMultipleNodes.js @@ -0,0 +1,21 @@ +===ORIGINAL=== + +class A { + x; +} +===MODIFIED=== + +class A { + x; + 0; + 1; + 2; + 3; + 4; + 5; + 6; + 7; + 8; + 9; + 10; +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeAt1.js b/tests/baselines/reference/textChanges/insertNodeAt1.js new file mode 100644 index 00000000000..9c7ac46f8a8 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAt1.js @@ -0,0 +1,22 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +public class class1 implements interface1 +{ + property1: boolean; +} +var y; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeAt2.js b/tests/baselines/reference/textChanges/insertNodeAt2.js new file mode 100644 index 00000000000..81c3e2afc35 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeAt2.js @@ -0,0 +1,20 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var yz1 = { + p1: 1 +}; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeBefore1.js b/tests/baselines/reference/textChanges/insertNodeBefore1.js new file mode 100644 index 00000000000..deebe10b694 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeBefore1.js @@ -0,0 +1,26 @@ +===ORIGINAL=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} +===MODIFIED=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + public class class1 implements interface1 + { + property1: boolean; + } + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeBefore2.js b/tests/baselines/reference/textChanges/insertNodeBefore2.js new file mode 100644 index 00000000000..1792cd5e69c --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeBefore2.js @@ -0,0 +1,26 @@ +===ORIGINAL=== + +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} +===MODIFIED=== + +public class class1 implements interface1 +{ + property1: boolean; +} +namespace M { + // comment 1 + var x = 1; // comment 2 + // comment 3 + var y; // comment 4 + var z = 3; // comment 5 + // comment 6 + var a = 4; // comment 7 +} \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator1.js b/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator1.js new file mode 100644 index 00000000000..0c47c26221f --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator1.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +class A { + x = foo +} + +===MODIFIED=== + +class A { + x = foo; + [1]: any; +} diff --git a/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator2.js b/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator2.js new file mode 100644 index 00000000000..bd6302b29a6 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInClassAfterNodeWithoutSeparator2.js @@ -0,0 +1,14 @@ +===ORIGINAL=== + +class A { + x() { + } +} + +===MODIFIED=== + +class A { + x() { + } + [1]: any; +} diff --git a/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator1.js b/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator1.js new file mode 100644 index 00000000000..61910e64dd5 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator1.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +interface A { + x +} + +===MODIFIED=== + +interface A { + x; + [1]: any; +} diff --git a/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator2.js b/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator2.js new file mode 100644 index 00000000000..6e88a371eb6 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInInterfaceAfterNodeWithoutSeparator2.js @@ -0,0 +1,12 @@ +===ORIGINAL=== + +interface A { + x() +} + +===MODIFIED=== + +interface A { + x(); + [1]: any; +} diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter1.js b/tests/baselines/reference/textChanges/insertNodeInListAfter1.js new file mode 100644 index 00000000000..9b0ed7b819d --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter1.js @@ -0,0 +1,6 @@ +===ORIGINAL=== + +const x = 1, y = 2; +===MODIFIED=== + +const x = 1, z = 1, y = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter10.js b/tests/baselines/reference/textChanges/insertNodeInListAfter10.js new file mode 100644 index 00000000000..300230bf51c --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter10.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +import { + x +} from "bar" +===MODIFIED=== + +import { + x, b as a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter11.js b/tests/baselines/reference/textChanges/insertNodeInListAfter11.js new file mode 100644 index 00000000000..f0ba43a0f3a --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter11.js @@ -0,0 +1,11 @@ +===ORIGINAL=== + +import { + x // this is x +} from "bar" +===MODIFIED=== + +import { + x, // this is x + b as a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter12.js b/tests/baselines/reference/textChanges/insertNodeInListAfter12.js new file mode 100644 index 00000000000..79e7bb2c8b6 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter12.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +import { + x +} from "bar" +===MODIFIED=== + +import { + x, a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter13.js b/tests/baselines/reference/textChanges/insertNodeInListAfter13.js new file mode 100644 index 00000000000..a7ac7179ab6 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter13.js @@ -0,0 +1,11 @@ +===ORIGINAL=== + +import { + x // this is x +} from "bar" +===MODIFIED=== + +import { + x, // this is x + a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter14.js b/tests/baselines/reference/textChanges/insertNodeInListAfter14.js new file mode 100644 index 00000000000..e44a21723be --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter14.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +import { + x0, + x +} from "bar" +===MODIFIED=== + +import { + x0, + x, + b as a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter15.js b/tests/baselines/reference/textChanges/insertNodeInListAfter15.js new file mode 100644 index 00000000000..a80bdc2db5e --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter15.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +import { + x0, + x // this is x +} from "bar" +===MODIFIED=== + +import { + x0, + x, // this is x + b as a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter16.js b/tests/baselines/reference/textChanges/insertNodeInListAfter16.js new file mode 100644 index 00000000000..07f8db919f8 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter16.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +import { + x0, + x +} from "bar" +===MODIFIED=== + +import { + x0, + x, + a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter17.js b/tests/baselines/reference/textChanges/insertNodeInListAfter17.js new file mode 100644 index 00000000000..990139408ee --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter17.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +import { + x0, + x // this is x +} from "bar" +===MODIFIED=== + +import { + x0, + x, // this is x + a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter18.js b/tests/baselines/reference/textChanges/insertNodeInListAfter18.js new file mode 100644 index 00000000000..b25a3f46346 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter18.js @@ -0,0 +1,10 @@ +===ORIGINAL=== + +import { + x0, x +} from "bar" +===MODIFIED=== + +import { + x0, x, a +} from "bar" \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter2.js b/tests/baselines/reference/textChanges/insertNodeInListAfter2.js new file mode 100644 index 00000000000..32e8e63c0f6 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter2.js @@ -0,0 +1,6 @@ +===ORIGINAL=== + +const x = 1, y = 2; +===MODIFIED=== + +const x = 1, y = 2, z = 1; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter3.js b/tests/baselines/reference/textChanges/insertNodeInListAfter3.js new file mode 100644 index 00000000000..70a0b0bddcb --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter3.js @@ -0,0 +1,6 @@ +===ORIGINAL=== + +const /*x*/ x = 1, /*y*/ y = 2; +===MODIFIED=== + +const /*x*/ x = 1, z = 1, /*y*/ y = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter4.js b/tests/baselines/reference/textChanges/insertNodeInListAfter4.js new file mode 100644 index 00000000000..4a30acd7071 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter4.js @@ -0,0 +1,6 @@ +===ORIGINAL=== + +const /*x*/ x = 1, /*y*/ y = 2; +===MODIFIED=== + +const /*x*/ x = 1, /*y*/ y = 2, z = 1; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter5.js b/tests/baselines/reference/textChanges/insertNodeInListAfter5.js new file mode 100644 index 00000000000..42d5fe2ca40 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter5.js @@ -0,0 +1,6 @@ +===ORIGINAL=== + +const x = 1; +===MODIFIED=== + +const x = 1, z = 1; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter6.js b/tests/baselines/reference/textChanges/insertNodeInListAfter6.js new file mode 100644 index 00000000000..06eae7372a9 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter6.js @@ -0,0 +1,9 @@ +===ORIGINAL=== + +const x = 1, + y = 2; +===MODIFIED=== + +const x = 1, + z = 1, + y = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter7.js b/tests/baselines/reference/textChanges/insertNodeInListAfter7.js new file mode 100644 index 00000000000..bef01503683 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter7.js @@ -0,0 +1,9 @@ +===ORIGINAL=== + +const x = 1, + y = 2; +===MODIFIED=== + +const x = 1, + y = 2, + z = 1; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter8.js b/tests/baselines/reference/textChanges/insertNodeInListAfter8.js new file mode 100644 index 00000000000..e3c44b14274 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter8.js @@ -0,0 +1,9 @@ +===ORIGINAL=== + +const /*x*/ x = 1, + /*y*/ y = 2; +===MODIFIED=== + +const /*x*/ x = 1, + z = 1, + /*y*/ y = 2; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInListAfter9.js b/tests/baselines/reference/textChanges/insertNodeInListAfter9.js new file mode 100644 index 00000000000..510984b7574 --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInListAfter9.js @@ -0,0 +1,9 @@ +===ORIGINAL=== + +const /*x*/ x = 1, + /*y*/ y = 2; +===MODIFIED=== + +const /*x*/ x = 1, + /*y*/ y = 2, + z = 1; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/insertNodeInStatementListAfterNodeWithoutSeparator1.js b/tests/baselines/reference/textChanges/insertNodeInStatementListAfterNodeWithoutSeparator1.js new file mode 100644 index 00000000000..b28b1579dfc --- /dev/null +++ b/tests/baselines/reference/textChanges/insertNodeInStatementListAfterNodeWithoutSeparator1.js @@ -0,0 +1,8 @@ +===ORIGINAL=== + +let x = foo + +===MODIFIED=== + +let x = foo; +(1); diff --git a/tests/baselines/reference/textChanges/replaceNode1.js b/tests/baselines/reference/textChanges/replaceNode1.js new file mode 100644 index 00000000000..8511d510385 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode1.js @@ -0,0 +1,20 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +public class class1 implements interface1 +{ + property1: boolean; +} +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNode1NoLineBreakBefore.js b/tests/baselines/reference/textChanges/replaceNode1NoLineBreakBefore.js new file mode 100644 index 00000000000..44183d402ab --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode1NoLineBreakBefore.js @@ -0,0 +1,13 @@ +===ORIGINAL=== + +namespace A { + const x = 1, y = "2"; +} + +===MODIFIED=== + +namespace A { + const x = 1, z1 = { + p1: 1 + }; +} diff --git a/tests/baselines/reference/textChanges/replaceNode2.js b/tests/baselines/reference/textChanges/replaceNode2.js new file mode 100644 index 00000000000..66a17f7c910 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode2.js @@ -0,0 +1,20 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; +public class class1 implements interface1 +{ + property1: boolean; +} +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNode3.js b/tests/baselines/reference/textChanges/replaceNode3.js new file mode 100644 index 00000000000..9f321a97431 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode3.js @@ -0,0 +1,21 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +public class class1 implements interface1 +{ + property1: boolean; +} + // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNode4.js b/tests/baselines/reference/textChanges/replaceNode4.js new file mode 100644 index 00000000000..e5bbf0e306d --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode4.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1;public class class1 implements interface1 +{ + property1: boolean; +} // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNode5.js b/tests/baselines/reference/textChanges/replaceNode5.js new file mode 100644 index 00000000000..ad3ec0ab0ea --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNode5.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== +public class class1 implements interface1 +{ + property1: boolean; +} // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNodeRange1.js b/tests/baselines/reference/textChanges/replaceNodeRange1.js new file mode 100644 index 00000000000..5fc16960a8a --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNodeRange1.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +public class class1 implements interface1 +{ + property1: boolean; +} +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNodeRange2.js b/tests/baselines/reference/textChanges/replaceNodeRange2.js new file mode 100644 index 00000000000..e8f9506d608 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNodeRange2.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; +public class class1 implements interface1 +{ + property1: boolean; +} +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNodeRange3.js b/tests/baselines/reference/textChanges/replaceNodeRange3.js new file mode 100644 index 00000000000..a20dddc53fe --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNodeRange3.js @@ -0,0 +1,20 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +public class class1 implements interface1 +{ + property1: boolean; +} + // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceNodeRange4.js b/tests/baselines/reference/textChanges/replaceNodeRange4.js new file mode 100644 index 00000000000..ad50a1f01fc --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceNodeRange4.js @@ -0,0 +1,18 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1;public class class1 implements interface1 +{ + property1: boolean; +} // comment 5 +// comment 6 +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceRange.js b/tests/baselines/reference/textChanges/replaceRange.js new file mode 100644 index 00000000000..8cb83286169 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceRange.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +public class class1 implements interface1 +{ + property1: boolean; +} +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceRangeNoLineBreakBefore.js b/tests/baselines/reference/textChanges/replaceRangeNoLineBreakBefore.js new file mode 100644 index 00000000000..72a45ee56e2 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceRangeNoLineBreakBefore.js @@ -0,0 +1,6 @@ +===ORIGINAL=== +const x = 1, y = "2"; +===MODIFIED=== +const x = 1, z1 = { + p1: 1 +}; \ No newline at end of file diff --git a/tests/baselines/reference/textChanges/replaceRangeWithForcedIndentation.js b/tests/baselines/reference/textChanges/replaceRangeWithForcedIndentation.js new file mode 100644 index 00000000000..304b81b1359 --- /dev/null +++ b/tests/baselines/reference/textChanges/replaceRangeWithForcedIndentation.js @@ -0,0 +1,19 @@ +===ORIGINAL=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 +var y = 2; // comment 4 +var z = 3; // comment 5 +// comment 6 +var a = 4; // comment 7 +===MODIFIED=== + +// comment 1 +var x = 1; // comment 2 +// comment 3 + public class class1 implements interface1 + { + property1: boolean; + } +var a = 4; // comment 7 \ No newline at end of file diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.js b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.js new file mode 100644 index 00000000000..d9020c79e29 --- /dev/null +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.js @@ -0,0 +1,710 @@ +//// [thisTypeInNativeThisAssignableMethods.ts] + +class A { + options: string[]; + + addOptions(options: string[]) { + if (!this.options) { + this.options = []; + } + options.forEach(function (item) { + this.options.push(item); + }, this); + return this; + } + + testUndefined(options: string[]) { + const undefinedArr: Array = [] + options.forEach(function () { + undefinedArr.push(this); + }); // case1 + options.forEach(function () { + undefinedArr.push(this); + }, undefined); // case2 + options.forEach(function () { + undefinedArr.push(this); + }, null); // case3 + + const arrLike = {} as ArrayLike + Array.from(arrLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined) + + const iterLike = [] as Iterable + Array.from(iterLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined) + } + + test(options: string[]) { + const thisObject = { + options: [] as string[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + + const arrLike = {} as ArrayLike + Array.from(arrLike, function (item) { + return this.options[item].length + }, thisObject) + + const iterLike = [] as Iterable + Array.from(iterLike, function (item) { + return this.options[item].length + }, thisObject) + } + + test1(options: string[]) { + const thisObject = { + options: [] as ReadonlyArray + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test2(options: Int8Array[]) { + const thisObject = { + options: [] as Int8Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test3(options: Uint8Array[]) { + const thisObject = { + options: [] as Uint8Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test4(options: Float32Array[]) { + const thisObject = { + options: [] as Float32Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test5(options: Uint8ClampedArray[]) { + const thisObject = { + options: [] as Uint8ClampedArray[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test6(options: Int16Array[]) { + const thisObject = { + options: [] as Int16Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test7(options: Uint16Array[]) { + const thisObject = { + options: [] as Uint16Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test8(options: Uint32Array[]) { + const thisObject = { + options: [] as Uint32Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test9(options: Float64Array[]) { + const thisObject = { + options: [] as Float64Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } +} + + +//// [thisTypeInNativeThisAssignableMethods.js] +class A { + addOptions(options) { + if (!this.options) { + this.options = []; + } + options.forEach(function (item) { + this.options.push(item); + }, this); + return this; + } + testUndefined(options) { + const undefinedArr = []; + options.forEach(function () { + undefinedArr.push(this); + }); // case1 + options.forEach(function () { + undefinedArr.push(this); + }, undefined); // case2 + options.forEach(function () { + undefinedArr.push(this); + }, null); // case3 + const arrLike = {}; + Array.from(arrLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined); + const iterLike = []; + Array.from(iterLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined); + } + test(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + const arrLike = {}; + Array.from(arrLike, function (item) { + return this.options[item].length; + }, thisObject); + const iterLike = []; + Array.from(iterLike, function (item) { + return this.options[item].length; + }, thisObject); + } + test1(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test2(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test3(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test4(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test5(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test6(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test7(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test8(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + test9(options) { + const thisObject = { + options: [] + }; + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } +} diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols new file mode 100644 index 00000000000..2ff555baa54 --- /dev/null +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.symbols @@ -0,0 +1,1569 @@ +=== tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts === + +class A { +>A : Symbol(A, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 0)) + + options: string[]; +>options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) + + addOptions(options: string[]) { +>addOptions : Symbol(A.addOptions, Decl(thisTypeInNativeThisAssignableMethods.ts, 2, 22)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 4, 15)) + + if (!this.options) { +>this.options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) +>this : Symbol(A, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 0)) +>options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) + + this.options = []; +>this.options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) +>this : Symbol(A, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 0)) +>options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) + } + options.forEach(function (item) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 4, 15)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 8, 34)) + + this.options.push(item); +>this.options.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>this.options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(A.options, Decl(thisTypeInNativeThisAssignableMethods.ts, 1, 9)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 8, 34)) + + }, this); +>this : Symbol(A, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 0)) + + return this; +>this : Symbol(A, Decl(thisTypeInNativeThisAssignableMethods.ts, 0, 0)) + } + + testUndefined(options: string[]) { +>testUndefined : Symbol(A.testUndefined, Decl(thisTypeInNativeThisAssignableMethods.ts, 12, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 18)) + + const undefinedArr: Array = [] +>undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 15, 13)) +>Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + + options.forEach(function () { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 18)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + undefinedArr.push(this); +>undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 15, 13)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) + + }); // case1 + options.forEach(function () { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 18)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + undefinedArr.push(this); +>undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 15, 13)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) + + }, undefined); // case2 +>undefined : Symbol(undefined) + + options.forEach(function () { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 14, 18)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) + + undefinedArr.push(this); +>undefinedArr.push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>undefinedArr : Symbol(undefinedArr, Decl(thisTypeInNativeThisAssignableMethods.ts, 15, 13)) +>push : Symbol(Array.push, Decl(lib.es5.d.ts, --, --)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) + + }, null); // case3 + + const arrLike = {} as ArrayLike +>arrLike : Symbol(arrLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 26, 13)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --)) + + Array.from(arrLike, function (item) { +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arrLike : Symbol(arrLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 26, 13)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 27, 38)) + + return this === undefined ? 2 : 1; +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>undefined : Symbol(undefined) + + }, undefined) +>undefined : Symbol(undefined) + + const iterLike = [] as Iterable +>iterLike : Symbol(iterLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 31, 13)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) + + Array.from(iterLike, function (item) { +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>iterLike : Symbol(iterLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 31, 13)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 32, 39)) + + return this === undefined ? 2 : 1; +>this : Symbol(this, Decl(lib.es2015.iterable.d.ts, --, --)) +>undefined : Symbol(undefined) + + }, undefined) +>undefined : Symbol(undefined) + } + + test(options: string[]) { +>test : Symbol(A.test, Decl(thisTypeInNativeThisAssignableMethods.ts, 35, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options: [] as string[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 42, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 42, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 42, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 42, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 46, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 46, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 46, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 46, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 50, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 50, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 50, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 50, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 54, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 54, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 54, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 54, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 54, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 59, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 59, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 59, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 59, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 63, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 63, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 63, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 63, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 37, 9)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 67, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 67, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 67, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 67, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + const arrLike = {} as ArrayLike +>arrLike : Symbol(arrLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 71, 13)) +>ArrayLike : Symbol(ArrayLike, Decl(lib.es5.d.ts, --, --)) + + Array.from(arrLike, function (item) { +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>arrLike : Symbol(arrLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 71, 13)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 72, 38)) + + return this.options[item].length +>this.options[item].length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 72, 38)) +>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) + + }, thisObject) +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + + const iterLike = [] as Iterable +>iterLike : Symbol(iterLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 76, 13)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) + + Array.from(iterLike, function (item) { +>Array.from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>Array : Symbol(Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>from : Symbol(ArrayConstructor.from, Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>iterLike : Symbol(iterLike, Decl(thisTypeInNativeThisAssignableMethods.ts, 76, 13)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 77, 39)) + + return this.options[item].length +>this.options[item].length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>this : Symbol(this, Decl(lib.es2015.iterable.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 28)) +>item : Symbol(item, Decl(thisTypeInNativeThisAssignableMethods.ts, 77, 39)) +>length : Symbol(String.length, Decl(lib.es5.d.ts, --, --)) + + }, thisObject) +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 38, 13)) + } + + test1(options: string[]) { +>test1 : Symbol(A.test1, Decl(thisTypeInNativeThisAssignableMethods.ts, 80, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options: [] as ReadonlyArray +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>ReadonlyArray : Symbol(ReadonlyArray, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 87, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 87, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 87, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 87, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 91, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 91, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 91, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 91, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 95, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 95, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 95, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 95, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 99, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 99, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 99, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 99, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 99, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 104, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 104, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 104, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 104, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 108, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 108, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 108, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 108, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 82, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 112, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 112, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 112, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 112, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 83, 13)) + } + + test2(options: Int8Array[]) { +>test2 : Symbol(A.test2, Decl(thisTypeInNativeThisAssignableMethods.ts, 115, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>Int8Array : Symbol(Int8Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options: [] as Int8Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>Int8Array : Symbol(Int8Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 122, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 122, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 122, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 122, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 126, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 126, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 126, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 126, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 130, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 130, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 130, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 130, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 134, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 134, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 134, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 134, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 134, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 139, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 139, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 139, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 139, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 143, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 143, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 143, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 143, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 117, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 147, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 147, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 147, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 147, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 118, 13)) + } + + test3(options: Uint8Array[]) { +>test3 : Symbol(A.test3, Decl(thisTypeInNativeThisAssignableMethods.ts, 150, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options: [] as Uint8Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>Uint8Array : Symbol(Uint8Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 157, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 157, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 157, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 157, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 161, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 161, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 161, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 161, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 165, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 165, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 165, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 165, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 169, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 169, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 169, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 169, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 169, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 174, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 174, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 174, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 174, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 178, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 178, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 178, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 178, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 152, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 182, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 182, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 182, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 182, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 153, 13)) + } + + test4(options: Float32Array[]) { +>test4 : Symbol(A.test4, Decl(thisTypeInNativeThisAssignableMethods.ts, 185, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>Float32Array : Symbol(Float32Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options: [] as Float32Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>Float32Array : Symbol(Float32Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 192, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 192, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 192, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 192, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 196, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 196, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 196, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 196, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 200, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 200, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 200, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 200, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 204, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 204, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 204, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 204, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 204, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 209, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 209, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 209, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 209, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 213, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 213, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 213, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 213, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 187, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 217, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 217, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 217, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 217, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 188, 13)) + } + + test5(options: Uint8ClampedArray[]) { +>test5 : Symbol(A.test5, Decl(thisTypeInNativeThisAssignableMethods.ts, 220, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options: [] as Uint8ClampedArray[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 227, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 227, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 227, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 227, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 231, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 231, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 231, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 231, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 235, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 235, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 235, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 235, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 239, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 239, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 239, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 239, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 239, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 244, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 244, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 244, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 244, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 248, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 248, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 248, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 248, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 222, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 252, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 252, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 252, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 252, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 223, 13)) + } + + test6(options: Int16Array[]) { +>test6 : Symbol(A.test6, Decl(thisTypeInNativeThisAssignableMethods.ts, 255, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>Int16Array : Symbol(Int16Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options: [] as Int16Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>Int16Array : Symbol(Int16Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 262, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 262, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 262, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 262, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 266, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 266, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 266, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 266, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 270, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 270, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 270, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 270, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 274, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 274, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 274, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 274, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 274, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 279, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 279, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 279, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 279, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 283, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 283, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 283, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 283, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 257, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 287, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 287, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 287, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 287, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 258, 13)) + } + + test7(options: Uint16Array[]) { +>test7 : Symbol(A.test7, Decl(thisTypeInNativeThisAssignableMethods.ts, 290, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options: [] as Uint16Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>Uint16Array : Symbol(Uint16Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 297, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 297, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 297, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 297, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 301, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 301, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 301, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 301, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 305, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 305, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 305, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 305, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 309, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 309, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 309, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 309, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 309, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 314, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 314, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 314, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 314, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 318, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 318, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 318, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 318, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 292, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 322, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 322, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 322, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 322, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 293, 13)) + } + + test8(options: Uint32Array[]) { +>test8 : Symbol(A.test8, Decl(thisTypeInNativeThisAssignableMethods.ts, 325, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options: [] as Uint32Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>Uint32Array : Symbol(Uint32Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 332, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 332, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 332, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 332, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 336, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 336, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 336, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 336, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 340, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 340, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 340, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 340, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 344, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 344, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 344, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 344, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 344, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 349, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 349, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 349, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 349, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 353, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 353, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 353, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 353, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 327, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 357, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 357, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 357, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 357, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 328, 13)) + } + + test9(options: Float64Array[]) { +>test9 : Symbol(A.test9, Decl(thisTypeInNativeThisAssignableMethods.ts, 360, 5)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>Float64Array : Symbol(Float64Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + const thisObject = { +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options: [] as Float64Array[] +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>Float64Array : Symbol(Float64Array, Decl(lib.es2016.array.include.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) + + }; + + options.find(function (val, index) { +>options.find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>find : Symbol(Array.find, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 367, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 367, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 367, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 367, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.findIndex(function (val, index) { +>options.findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>findIndex : Symbol(Array.findIndex, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 371, 36)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 371, 40)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 371, 36)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es2015.core.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 371, 40)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.forEach(function (val, index) { +>options.forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>forEach : Symbol(Array.forEach, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 375, 34)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 375, 38)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 375, 34)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 375, 38)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.map(function (val, index) { +>options.map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>map : Symbol(Array.map, 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, --, --), 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, --, --), 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, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 379, 30)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 379, 34)) + + if (val === this.options[index]) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 379, 30)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 379, 34)) + + return this.options[index]; +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 379, 34)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.some(function (val, index) { +>options.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 384, 31)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 384, 35)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 384, 31)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 384, 35)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.filter(function (val, index) { +>options.filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>filter : Symbol(Array.filter, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 388, 33)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 388, 37)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 388, 33)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 388, 37)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + + options.every(function (val, index) { +>options.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 362, 10)) +>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 392, 32)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 392, 36)) + + return val === this.options[index]; +>val : Symbol(val, Decl(thisTypeInNativeThisAssignableMethods.ts, 392, 32)) +>this.options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>this : Symbol(this, Decl(lib.es5.d.ts, --, --)) +>options : Symbol(options, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 28)) +>index : Symbol(index, Decl(thisTypeInNativeThisAssignableMethods.ts, 392, 36)) + + }, thisObject); +>thisObject : Symbol(thisObject, Decl(thisTypeInNativeThisAssignableMethods.ts, 363, 13)) + } +} + diff --git a/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types new file mode 100644 index 00000000000..e64918181ca --- /dev/null +++ b/tests/baselines/reference/thisTypeInNativeThisAssignableMethods.types @@ -0,0 +1,1932 @@ +=== tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts === + +class A { +>A : A + + options: string[]; +>options : string[] + + addOptions(options: string[]) { +>addOptions : (options: string[]) => this +>options : string[] + + if (!this.options) { +>!this.options : boolean +>this.options : string[] +>this : this +>options : string[] + + this.options = []; +>this.options = [] : undefined[] +>this.options : string[] +>this : this +>options : string[] +>[] : undefined[] + } + options.forEach(function (item) { +>options.forEach(function (item) { this.options.push(item); }, this) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function (item) { this.options.push(item); } : (this: this, item: string) => void +>item : string + + this.options.push(item); +>this.options.push(item) : number +>this.options.push : (...items: string[]) => number +>this.options : string[] +>this : this +>options : string[] +>push : (...items: string[]) => number +>item : string + + }, this); +>this : this + + return this; +>this : this + } + + testUndefined(options: string[]) { +>testUndefined : (options: string[]) => void +>options : string[] + + const undefinedArr: Array = [] +>undefinedArr : undefined[] +>Array : T[] +>[] : undefined[] + + options.forEach(function () { +>options.forEach(function () { undefinedArr.push(this); }) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function () { undefinedArr.push(this); } : (this: undefined) => void + + undefinedArr.push(this); +>undefinedArr.push(this) : number +>undefinedArr.push : (...items: undefined[]) => number +>undefinedArr : undefined[] +>push : (...items: undefined[]) => number +>this : undefined + + }); // case1 + options.forEach(function () { +>options.forEach(function () { undefinedArr.push(this); }, undefined) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function () { undefinedArr.push(this); } : (this: undefined) => void + + undefinedArr.push(this); +>undefinedArr.push(this) : number +>undefinedArr.push : (...items: undefined[]) => number +>undefinedArr : undefined[] +>push : (...items: undefined[]) => number +>this : undefined + + }, undefined); // case2 +>undefined : undefined + + options.forEach(function () { +>options.forEach(function () { undefinedArr.push(this); }, null) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function () { undefinedArr.push(this); } : (this: undefined) => void + + undefinedArr.push(this); +>undefinedArr.push(this) : number +>undefinedArr.push : (...items: undefined[]) => number +>undefinedArr : undefined[] +>push : (...items: undefined[]) => number +>this : undefined + + }, null); // case3 +>null : null + + const arrLike = {} as ArrayLike +>arrLike : ArrayLike +>{} as ArrayLike : ArrayLike +>{} : {} +>ArrayLike : ArrayLike + + Array.from(arrLike, function (item) { +>Array.from(arrLike, function (item) { return this === undefined ? 2 : 1; }, undefined) : (2 | 1)[] +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array : ArrayConstructor +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>arrLike : ArrayLike +>function (item) { return this === undefined ? 2 : 1; } : (this: undefined, item: number) => 2 | 1 +>item : number + + return this === undefined ? 2 : 1; +>this === undefined ? 2 : 1 : 2 | 1 +>this === undefined : boolean +>this : undefined +>undefined : undefined +>2 : 2 +>1 : 1 + + }, undefined) +>undefined : undefined + + const iterLike = [] as Iterable +>iterLike : Iterable +>[] as Iterable : Iterable +>[] : undefined[] +>Iterable : Iterable + + Array.from(iterLike, function (item) { +>Array.from(iterLike, function (item) { return this === undefined ? 2 : 1; }, undefined) : (2 | 1)[] +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array : ArrayConstructor +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>iterLike : Iterable +>function (item) { return this === undefined ? 2 : 1; } : (this: undefined, item: number) => 2 | 1 +>item : number + + return this === undefined ? 2 : 1; +>this === undefined ? 2 : 1 : 2 | 1 +>this === undefined : boolean +>this : undefined +>undefined : undefined +>2 : 2 +>1 : 1 + + }, undefined) +>undefined : undefined + } + + test(options: string[]) { +>test : (options: string[]) => void +>options : string[] + + const thisObject = { +>thisObject : { options: string[]; } +>{ options: [] as string[] } : { options: string[]; } + + options: [] as string[] +>options : string[] +>[] as string[] : string[] +>[] : undefined[] + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : string +>options.find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>options : string[] +>find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>options : string[] +>findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : string[] +>options.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>options : string[] +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => string +>val : string +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + return this.options[index]; +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options : string[] +>some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] +>options.filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>options : string[] +>filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options : string[] +>every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: string[]; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>index : number + + }, thisObject); +>thisObject : { options: string[]; } + + const arrLike = {} as ArrayLike +>arrLike : ArrayLike +>{} as ArrayLike : ArrayLike +>{} : {} +>ArrayLike : ArrayLike + + Array.from(arrLike, function (item) { +>Array.from(arrLike, function (item) { return this.options[item].length }, thisObject) : number[] +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array : ArrayConstructor +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>arrLike : ArrayLike +>function (item) { return this.options[item].length } : (this: { options: string[]; }, item: number) => number +>item : number + + return this.options[item].length +>this.options[item].length : number +>this.options[item] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>item : number +>length : number + + }, thisObject) +>thisObject : { options: string[]; } + + const iterLike = [] as Iterable +>iterLike : Iterable +>[] as Iterable : Iterable +>[] : undefined[] +>Iterable : Iterable + + Array.from(iterLike, function (item) { +>Array.from(iterLike, function (item) { return this.options[item].length }, thisObject) : number[] +>Array.from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>Array : ArrayConstructor +>from : { (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U): U[]; (iterable: Iterable, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (iterable: Iterable, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (iterable: Iterable): T[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U): U[]; (arrayLike: ArrayLike, mapfn: (this: undefined, v: T, k: number) => U, thisArg: undefined): U[]; (arrayLike: ArrayLike, mapfn: (this: Z, v: T, k: number) => U, thisArg: Z): U[]; (arrayLike: ArrayLike): T[]; } +>iterLike : Iterable +>function (item) { return this.options[item].length } : (this: { options: string[]; }, item: number) => number +>item : number + + return this.options[item].length +>this.options[item].length : number +>this.options[item] : string +>this.options : string[] +>this : { options: string[]; } +>options : string[] +>item : number +>length : number + + }, thisObject) +>thisObject : { options: string[]; } + } + + test1(options: string[]) { +>test1 : (options: string[]) => void +>options : string[] + + const thisObject = { +>thisObject : { options: ReadonlyArray; } +>{ options: [] as ReadonlyArray } : { options: ReadonlyArray; } + + options: [] as ReadonlyArray +>options : ReadonlyArray +>[] as ReadonlyArray : ReadonlyArray +>[] : undefined[] +>ReadonlyArray : ReadonlyArray + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : string +>options.find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>options : string[] +>find : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): string; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): string; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): string; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>options : string[] +>findIndex : { (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean): number; (predicate: (this: undefined, value: string, index: number, obj: string[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: string, index: number, obj: string[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>options : string[] +>forEach : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void): void; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: string, index: number, array: string[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : string[] +>options.map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>options : string[] +>map : { (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U]; (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U]; (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U]; (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U]; (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U]; (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => string +>val : string +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + return this.options[index]; +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options : string[] +>some : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : string[] +>options.filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>options : string[] +>filter : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any): string[]; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => any, thisArg: undefined): string[]; (callbackfn: (this: Z, value: string, index: number, array: string[]) => any, thisArg: Z): string[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>options : string[] +>every : { (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean): boolean; (callbackfn: (this: undefined, value: string, index: number, array: string[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: string, index: number, array: string[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: ReadonlyArray; }, val: string, index: number) => boolean +>val : string +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : string +>this.options[index] : string +>this.options : ReadonlyArray +>this : { options: ReadonlyArray; } +>options : ReadonlyArray +>index : number + + }, thisObject); +>thisObject : { options: ReadonlyArray; } + } + + test2(options: Int8Array[]) { +>test2 : (options: Int8Array[]) => void +>options : Int8Array[] +>Int8Array : Int8Array + + const thisObject = { +>thisObject : { options: Int8Array[]; } +>{ options: [] as Int8Array[] } : { options: Int8Array[]; } + + options: [] as Int8Array[] +>options : Int8Array[] +>[] as Int8Array[] : Int8Array[] +>[] : undefined[] +>Int8Array : Int8Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Int8Array +>options.find : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } +>options : Int8Array[] +>find : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): Int8Array; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): Int8Array; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): Int8Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } +>options : Int8Array[] +>findIndex : { (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean): number; (predicate: (this: undefined, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int8Array, index: number, obj: Int8Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void): void; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: Z): void; } +>options : Int8Array[] +>forEach : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void): void; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Int8Array[] +>options.map : { (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): U[]; } +>options : Int8Array[] +>map : { (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int8Array, Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): [U, U]; (this: [Int8Array, Int8Array], callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => Int8Array +>val : Int8Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + return this.options[index]; +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>options : Int8Array[] +>some : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int8Array[] +>options.filter : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any): Int8Array[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: undefined): Int8Array[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: Z): Int8Array[]; } +>options : Int8Array[] +>filter : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any): Int8Array[]; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: undefined): Int8Array[]; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => any, thisArg: Z): Int8Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>options : Int8Array[] +>every : { (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int8Array, index: number, array: Int8Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int8Array[]; }, val: Int8Array, index: number) => boolean +>val : Int8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int8Array +>this.options[index] : Int8Array +>this.options : Int8Array[] +>this : { options: Int8Array[]; } +>options : Int8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int8Array[]; } + } + + test3(options: Uint8Array[]) { +>test3 : (options: Uint8Array[]) => void +>options : Uint8Array[] +>Uint8Array : Uint8Array + + const thisObject = { +>thisObject : { options: Uint8Array[]; } +>{ options: [] as Uint8Array[] } : { options: Uint8Array[]; } + + options: [] as Uint8Array[] +>options : Uint8Array[] +>[] as Uint8Array[] : Uint8Array[] +>[] : undefined[] +>Uint8Array : Uint8Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8Array +>options.find : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } +>options : Uint8Array[] +>find : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): Uint8Array; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): Uint8Array; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): Uint8Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } +>options : Uint8Array[] +>findIndex : { (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean): number; (predicate: (this: undefined, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8Array, index: number, obj: Uint8Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void): void; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: Z): void; } +>options : Uint8Array[] +>forEach : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void): void; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint8Array[] +>options.map : { (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): U[]; } +>options : Uint8Array[] +>map : { (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8Array, Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint8Array, Uint8Array], callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => Uint8Array +>val : Uint8Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + return this.options[index]; +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint8Array[] +>some : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8Array[] +>options.filter : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any): Uint8Array[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: undefined): Uint8Array[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: Z): Uint8Array[]; } +>options : Uint8Array[] +>filter : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any): Uint8Array[]; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: undefined): Uint8Array[]; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => any, thisArg: Z): Uint8Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint8Array[] +>every : { (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8Array, index: number, array: Uint8Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8Array[]; }, val: Uint8Array, index: number) => boolean +>val : Uint8Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8Array +>this.options[index] : Uint8Array +>this.options : Uint8Array[] +>this : { options: Uint8Array[]; } +>options : Uint8Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8Array[]; } + } + + test4(options: Float32Array[]) { +>test4 : (options: Float32Array[]) => void +>options : Float32Array[] +>Float32Array : Float32Array + + const thisObject = { +>thisObject : { options: Float32Array[]; } +>{ options: [] as Float32Array[] } : { options: Float32Array[]; } + + options: [] as Float32Array[] +>options : Float32Array[] +>[] as Float32Array[] : Float32Array[] +>[] : undefined[] +>Float32Array : Float32Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Float32Array +>options.find : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } +>options : Float32Array[] +>find : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): Float32Array; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): Float32Array; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): Float32Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } +>options : Float32Array[] +>findIndex : { (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean): number; (predicate: (this: undefined, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float32Array, index: number, obj: Float32Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void): void; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: Z): void; } +>options : Float32Array[] +>forEach : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void): void; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Float32Array[] +>options.map : { (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): U[]; } +>options : Float32Array[] +>map : { (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float32Array, Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): [U, U]; (this: [Float32Array, Float32Array], callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => Float32Array +>val : Float32Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + return this.options[index]; +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>options : Float32Array[] +>some : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float32Array[] +>options.filter : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any): Float32Array[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: undefined): Float32Array[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: Z): Float32Array[]; } +>options : Float32Array[] +>filter : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any): Float32Array[]; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: undefined): Float32Array[]; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => any, thisArg: Z): Float32Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>options : Float32Array[] +>every : { (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float32Array, index: number, array: Float32Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float32Array[]; }, val: Float32Array, index: number) => boolean +>val : Float32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float32Array +>this.options[index] : Float32Array +>this.options : Float32Array[] +>this : { options: Float32Array[]; } +>options : Float32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float32Array[]; } + } + + test5(options: Uint8ClampedArray[]) { +>test5 : (options: Uint8ClampedArray[]) => void +>options : Uint8ClampedArray[] +>Uint8ClampedArray : Uint8ClampedArray + + const thisObject = { +>thisObject : { options: Uint8ClampedArray[]; } +>{ options: [] as Uint8ClampedArray[] } : { options: Uint8ClampedArray[]; } + + options: [] as Uint8ClampedArray[] +>options : Uint8ClampedArray[] +>[] as Uint8ClampedArray[] : Uint8ClampedArray[] +>[] : undefined[] +>Uint8ClampedArray : Uint8ClampedArray + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8ClampedArray +>options.find : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } +>options : Uint8ClampedArray[] +>find : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): Uint8ClampedArray; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): Uint8ClampedArray; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): Uint8ClampedArray; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } +>options : Uint8ClampedArray[] +>findIndex : { (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean): number; (predicate: (this: undefined, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint8ClampedArray, index: number, obj: Uint8ClampedArray[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void): void; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: Z): void; } +>options : Uint8ClampedArray[] +>forEach : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void): void; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint8ClampedArray[] +>options.map : { (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): U[]; } +>options : Uint8ClampedArray[] +>map : { (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): [U, U]; (this: [Uint8ClampedArray, Uint8ClampedArray], callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U): U[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => Uint8ClampedArray +>val : Uint8ClampedArray +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + return this.options[index]; +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>options : Uint8ClampedArray[] +>some : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint8ClampedArray[] +>options.filter : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any): Uint8ClampedArray[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: undefined): Uint8ClampedArray[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: Z): Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>filter : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any): Uint8ClampedArray[]; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: undefined): Uint8ClampedArray[]; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => any, thisArg: Z): Uint8ClampedArray[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>options : Uint8ClampedArray[] +>every : { (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint8ClampedArray, index: number, array: Uint8ClampedArray[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint8ClampedArray[]; }, val: Uint8ClampedArray, index: number) => boolean +>val : Uint8ClampedArray +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint8ClampedArray +>this.options[index] : Uint8ClampedArray +>this.options : Uint8ClampedArray[] +>this : { options: Uint8ClampedArray[]; } +>options : Uint8ClampedArray[] +>index : number + + }, thisObject); +>thisObject : { options: Uint8ClampedArray[]; } + } + + test6(options: Int16Array[]) { +>test6 : (options: Int16Array[]) => void +>options : Int16Array[] +>Int16Array : Int16Array + + const thisObject = { +>thisObject : { options: Int16Array[]; } +>{ options: [] as Int16Array[] } : { options: Int16Array[]; } + + options: [] as Int16Array[] +>options : Int16Array[] +>[] as Int16Array[] : Int16Array[] +>[] : undefined[] +>Int16Array : Int16Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Int16Array +>options.find : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } +>options : Int16Array[] +>find : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): Int16Array; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): Int16Array; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): Int16Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } +>options : Int16Array[] +>findIndex : { (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean): number; (predicate: (this: undefined, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Int16Array, index: number, obj: Int16Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void): void; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: Z): void; } +>options : Int16Array[] +>forEach : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void): void; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Int16Array[] +>options.map : { (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): U[]; } +>options : Int16Array[] +>map : { (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Int16Array, Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): [U, U]; (this: [Int16Array, Int16Array], callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => Int16Array +>val : Int16Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + return this.options[index]; +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>options : Int16Array[] +>some : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Int16Array[] +>options.filter : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any): Int16Array[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: undefined): Int16Array[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: Z): Int16Array[]; } +>options : Int16Array[] +>filter : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any): Int16Array[]; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: undefined): Int16Array[]; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => any, thisArg: Z): Int16Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>options : Int16Array[] +>every : { (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Int16Array, index: number, array: Int16Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Int16Array[]; }, val: Int16Array, index: number) => boolean +>val : Int16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Int16Array +>this.options[index] : Int16Array +>this.options : Int16Array[] +>this : { options: Int16Array[]; } +>options : Int16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Int16Array[]; } + } + + test7(options: Uint16Array[]) { +>test7 : (options: Uint16Array[]) => void +>options : Uint16Array[] +>Uint16Array : Uint16Array + + const thisObject = { +>thisObject : { options: Uint16Array[]; } +>{ options: [] as Uint16Array[] } : { options: Uint16Array[]; } + + options: [] as Uint16Array[] +>options : Uint16Array[] +>[] as Uint16Array[] : Uint16Array[] +>[] : undefined[] +>Uint16Array : Uint16Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint16Array +>options.find : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } +>options : Uint16Array[] +>find : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): Uint16Array; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): Uint16Array; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): Uint16Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } +>options : Uint16Array[] +>findIndex : { (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean): number; (predicate: (this: undefined, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint16Array, index: number, obj: Uint16Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void): void; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: Z): void; } +>options : Uint16Array[] +>forEach : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void): void; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint16Array[] +>options.map : { (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): U[]; } +>options : Uint16Array[] +>map : { (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint16Array, Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint16Array, Uint16Array], callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => Uint16Array +>val : Uint16Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + return this.options[index]; +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint16Array[] +>some : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint16Array[] +>options.filter : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any): Uint16Array[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: undefined): Uint16Array[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: Z): Uint16Array[]; } +>options : Uint16Array[] +>filter : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any): Uint16Array[]; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: undefined): Uint16Array[]; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => any, thisArg: Z): Uint16Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint16Array[] +>every : { (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint16Array, index: number, array: Uint16Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint16Array[]; }, val: Uint16Array, index: number) => boolean +>val : Uint16Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint16Array +>this.options[index] : Uint16Array +>this.options : Uint16Array[] +>this : { options: Uint16Array[]; } +>options : Uint16Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint16Array[]; } + } + + test8(options: Uint32Array[]) { +>test8 : (options: Uint32Array[]) => void +>options : Uint32Array[] +>Uint32Array : Uint32Array + + const thisObject = { +>thisObject : { options: Uint32Array[]; } +>{ options: [] as Uint32Array[] } : { options: Uint32Array[]; } + + options: [] as Uint32Array[] +>options : Uint32Array[] +>[] as Uint32Array[] : Uint32Array[] +>[] : undefined[] +>Uint32Array : Uint32Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Uint32Array +>options.find : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } +>options : Uint32Array[] +>find : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): Uint32Array; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): Uint32Array; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): Uint32Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } +>options : Uint32Array[] +>findIndex : { (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean): number; (predicate: (this: undefined, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Uint32Array, index: number, obj: Uint32Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void): void; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: Z): void; } +>options : Uint32Array[] +>forEach : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void): void; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Uint32Array[] +>options.map : { (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): U[]; } +>options : Uint32Array[] +>map : { (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Uint32Array, Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): [U, U]; (this: [Uint32Array, Uint32Array], callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U): U[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => Uint32Array +>val : Uint32Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + return this.options[index]; +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint32Array[] +>some : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Uint32Array[] +>options.filter : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any): Uint32Array[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: undefined): Uint32Array[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: Z): Uint32Array[]; } +>options : Uint32Array[] +>filter : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any): Uint32Array[]; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: undefined): Uint32Array[]; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => any, thisArg: Z): Uint32Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>options : Uint32Array[] +>every : { (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Uint32Array, index: number, array: Uint32Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Uint32Array[]; }, val: Uint32Array, index: number) => boolean +>val : Uint32Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Uint32Array +>this.options[index] : Uint32Array +>this.options : Uint32Array[] +>this : { options: Uint32Array[]; } +>options : Uint32Array[] +>index : number + + }, thisObject); +>thisObject : { options: Uint32Array[]; } + } + + test9(options: Float64Array[]) { +>test9 : (options: Float64Array[]) => void +>options : Float64Array[] +>Float64Array : Float64Array + + const thisObject = { +>thisObject : { options: Float64Array[]; } +>{ options: [] as Float64Array[] } : { options: Float64Array[]; } + + options: [] as Float64Array[] +>options : Float64Array[] +>[] as Float64Array[] : Float64Array[] +>[] : undefined[] +>Float64Array : Float64Array + + }; + + options.find(function (val, index) { +>options.find(function (val, index) { return val === this.options[index]; }, thisObject) : Float64Array +>options.find : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } +>options : Float64Array[] +>find : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): Float64Array; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): Float64Array; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): Float64Array; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.findIndex(function (val, index) { +>options.findIndex(function (val, index) { return val === this.options[index]; }, thisObject) : number +>options.findIndex : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } +>options : Float64Array[] +>findIndex : { (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean): number; (predicate: (this: undefined, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: undefined): number; (predicate: (this: Z, value: Float64Array, index: number, obj: Float64Array[]) => boolean, thisArg: Z): number; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.forEach(function (val, index) { +>options.forEach(function (val, index) { return val === this.options[index]; }, thisObject) : void +>options.forEach : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void): void; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: Z): void; } +>options : Float64Array[] +>forEach : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void): void; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: undefined): void; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => void, thisArg: Z): void; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.map(function (val, index) { +>options.map(function (val, index) { if (val === this.options[index]) return this.options[index]; }, thisObject) : Float64Array[] +>options.map : { (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): U[]; } +>options : Float64Array[] +>map : { (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U, U]; (this: [Float64Array, Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): [U, U]; (this: [Float64Array, Float64Array], callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U): U[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => U, thisArg: Z): U[]; } +>function (val, index) { if (val === this.options[index]) return this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => Float64Array +>val : Float64Array +>index : number + + if (val === this.options[index]) +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + return this.options[index]; +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.some(function (val, index) { +>options.some(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.some : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>options : Float64Array[] +>some : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.filter(function (val, index) { +>options.filter(function (val, index) { return val === this.options[index]; }, thisObject) : Float64Array[] +>options.filter : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any): Float64Array[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: undefined): Float64Array[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: Z): Float64Array[]; } +>options : Float64Array[] +>filter : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any): Float64Array[]; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: undefined): Float64Array[]; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => any, thisArg: Z): Float64Array[]; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + + options.every(function (val, index) { +>options.every(function (val, index) { return val === this.options[index]; }, thisObject) : boolean +>options.every : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>options : Float64Array[] +>every : { (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean): boolean; (callbackfn: (this: undefined, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: undefined): boolean; (callbackfn: (this: Z, value: Float64Array, index: number, array: Float64Array[]) => boolean, thisArg: Z): boolean; } +>function (val, index) { return val === this.options[index]; } : (this: { options: Float64Array[]; }, val: Float64Array, index: number) => boolean +>val : Float64Array +>index : number + + return val === this.options[index]; +>val === this.options[index] : boolean +>val : Float64Array +>this.options[index] : Float64Array +>this.options : Float64Array[] +>this : { options: Float64Array[]; } +>options : Float64Array[] +>index : number + + }, thisObject); +>thisObject : { options: Float64Array[]; } + } +} + diff --git a/tests/baselines/reference/tsxSpreadChildren.symbols b/tests/baselines/reference/tsxSpreadChildren.symbols index b2631c70fd9..2556b7c61b6 100644 --- a/tests/baselines/reference/tsxSpreadChildren.symbols +++ b/tests/baselines/reference/tsxSpreadChildren.symbols @@ -59,9 +59,9 @@ function TodoList({ todos }: TodoListProps) { >div : Symbol(JSX.IntrinsicElements, Decl(tsxSpreadChildren.tsx, 2, 22)) {...todos.map(todo => )} ->todos.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>todos.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >todos : Symbol(todos, Decl(tsxSpreadChildren.tsx, 19, 19)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >todo : Symbol(todo, Decl(tsxSpreadChildren.tsx, 21, 22)) >Todo : Symbol(Todo, Decl(tsxSpreadChildren.tsx, 15, 1)) >key : Symbol(key, Decl(tsxSpreadChildren.tsx, 21, 35)) diff --git a/tests/baselines/reference/tsxSpreadChildren.types b/tests/baselines/reference/tsxSpreadChildren.types index 1317499ff45..9ab9d7093d4 100644 --- a/tests/baselines/reference/tsxSpreadChildren.types +++ b/tests/baselines/reference/tsxSpreadChildren.types @@ -64,10 +64,10 @@ function TodoList({ todos }: TodoListProps) { {...todos.map(todo => )} >todos.map(todo => ) : JSX.Element[] ->todos.map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): U[]; } +>todos.map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): U[]; (callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): U[]; } >todos : TodoProp[] ->map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TodoProp, index: number, array: TodoProp[]) => U, thisArg?: any): U[]; } ->todo => : (todo: TodoProp) => JSX.Element +>map : { (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U, U]; (this: [TodoProp, TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): [U, U]; (this: [TodoProp, TodoProp], callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U): U[]; (callbackfn: (this: undefined, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TodoProp, index: number, array: TodoProp[]) => U, thisArg: Z): U[]; } +>todo => : (this: undefined, todo: TodoProp) => JSX.Element >todo : TodoProp > : JSX.Element >Todo : (prop: { key: number; todo: string; }) => JSX.Element diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols index 766c75e2c13..d294a9c28cf 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.symbols @@ -15,9 +15,9 @@ var nodes: TreeNode[]; >TreeNode : Symbol(TreeNode, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 0)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 5, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 0, 17)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.ts, 6, 10)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types index 045b5e65da3..21332704326 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral01.types @@ -16,10 +16,10 @@ var nodes: TreeNode[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): U[]; } +>nodes.map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): U[]; (callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): U[]; } >nodes : TreeNode[] ->map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNode, index: number, array: TreeNode[]) => U, thisArg?: any): U[]; } ->n => n.name : (n: TreeNode) => string +>map : { (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNode, TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): [U, U]; (this: [TreeNode, TreeNode], callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U): U[]; (callbackfn: (this: undefined, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNode, index: number, array: TreeNode[]) => U, thisArg: Z): U[]; } +>n => n.name : (this: undefined, n: TreeNode) => string >n : TreeNode >n.name : string >n : TreeNode diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols index 62e2b398827..3761994619c 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.symbols @@ -26,9 +26,9 @@ var nodes: TreeNodeMiddleman[]; >TreeNodeMiddleman : Symbol(TreeNodeMiddleman, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 3, 1)) nodes.map(n => n.name); ->nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>nodes.map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >nodes : Symbol(nodes, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 10, 3)) ->map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) +>map : Symbol(Array.map, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) >n.name : Symbol(name, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 5, 26)) >n : Symbol(n, Decl(typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.ts, 11, 10)) diff --git a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types index a75a997eb78..6cb4b81e0ce 100644 --- a/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types +++ b/tests/baselines/reference/typeArgumentInferenceWithRecursivelyReferencedTypeAliasToTypeLiteral02.types @@ -27,10 +27,10 @@ var nodes: TreeNodeMiddleman[]; nodes.map(n => n.name); >nodes.map(n => n.name) : string[] ->nodes.map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; } +>nodes.map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): U[]; (callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): U[]; } >nodes : TreeNodeMiddleman[] ->map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): [U, U]; (callbackfn: (value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg?: any): U[]; } ->n => n.name : (n: TreeNodeMiddleman) => string +>map : { (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): [U, U]; (this: [TreeNodeMiddleman, TreeNodeMiddleman], callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): [U, U]; (callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U): U[]; (callbackfn: (this: undefined, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: undefined): U[]; (callbackfn: (this: Z, value: TreeNodeMiddleman, index: number, array: TreeNodeMiddleman[]) => U, thisArg: Z): U[]; } +>n => n.name : (this: undefined, n: TreeNodeMiddleman) => string >n : TreeNodeMiddleman >n.name : string >n : TreeNodeMiddleman diff --git a/tests/baselines/reference/typedArrays.symbols b/tests/baselines/reference/typedArrays.symbols index 2d45fb7e5c1..ca7812bbcc8 100644 --- a/tests/baselines/reference/typedArrays.symbols +++ b/tests/baselines/reference/typedArrays.symbols @@ -167,65 +167,65 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 47, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 46, 44)) return typedArrays; @@ -242,65 +242,65 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { typedArrays[0] = Int8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[1] = Uint8Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[2] = Int16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[3] = Uint16Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[4] = Int32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[5] = Uint32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[6] = Float32Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[7] = Float64Array.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) typedArrays[8] = Uint8ClampedArray.from(obj); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 62, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 61, 47)) return typedArrays; @@ -458,73 +458,73 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n typedArrays[0] = Int8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[1] = Uint8Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[2] = Int16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[3] = Uint16Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[4] = Int32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[5] = Uint32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[6] = Float32Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[7] = Float64Array.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 107, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 106, 36)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 106, 58)) @@ -546,81 +546,81 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v typedArrays[0] = Int8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int8Array.from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int8Array : Symbol(Int8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8Array.from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8Array : Symbol(Uint8Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[2] = Int16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int16Array.from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int16Array : Symbol(Int16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint16Array.from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint16Array : Symbol(Uint16Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint16ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[4] = Int32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Int32Array.from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Int32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint32Array.from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint32Array : Symbol(Uint32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[6] = Float32Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float32Array.from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float32Array : Symbol(Float32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float32ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[7] = Float64Array.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Float64Array.from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Float64Array : Symbol(Float64Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Float64ArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg); >typedArrays : Symbol(typedArrays, Decl(typedArrays.ts, 122, 7)) ->Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>Uint8ClampedArray.from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >Uint8ClampedArray : Symbol(Uint8ClampedArray, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) ->from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) +>from : Symbol(Uint8ClampedArrayConstructor.from, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --)) >obj : Symbol(obj, Decl(typedArrays.ts, 121, 38)) >mapFn : Symbol(mapFn, Decl(typedArrays.ts, 121, 60)) >thisArg : Symbol(thisArg, Decl(typedArrays.ts, 121, 98)) diff --git a/tests/baselines/reference/typedArrays.types b/tests/baselines/reference/typedArrays.types index 444d6a74e43..24924a5810e 100644 --- a/tests/baselines/reference/typedArrays.types +++ b/tests/baselines/reference/typedArrays.types @@ -274,9 +274,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : number[] typedArrays[1] = Uint8Array.from(obj); @@ -285,9 +285,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : number[] typedArrays[2] = Int16Array.from(obj); @@ -296,9 +296,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : number[] typedArrays[3] = Uint16Array.from(obj); @@ -307,9 +307,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : number[] typedArrays[4] = Int32Array.from(obj); @@ -318,9 +318,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : number[] typedArrays[5] = Uint32Array.from(obj); @@ -329,9 +329,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : number[] typedArrays[6] = Float32Array.from(obj); @@ -340,9 +340,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : number[] typedArrays[7] = Float64Array.from(obj); @@ -351,9 +351,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : number[] typedArrays[8] = Uint8ClampedArray.from(obj); @@ -362,9 +362,9 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : number[] return typedArrays; @@ -386,9 +386,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >0 : 0 >Int8Array.from(obj) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike typedArrays[1] = Uint8Array.from(obj); @@ -397,9 +397,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >1 : 1 >Uint8Array.from(obj) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike typedArrays[2] = Int16Array.from(obj); @@ -408,9 +408,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >2 : 2 >Int16Array.from(obj) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike typedArrays[3] = Uint16Array.from(obj); @@ -419,9 +419,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >3 : 3 >Uint16Array.from(obj) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike typedArrays[4] = Int32Array.from(obj); @@ -430,9 +430,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >4 : 4 >Int32Array.from(obj) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike typedArrays[5] = Uint32Array.from(obj); @@ -441,9 +441,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >5 : 5 >Uint32Array.from(obj) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike typedArrays[6] = Float32Array.from(obj); @@ -452,9 +452,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >6 : 6 >Float32Array.from(obj) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike typedArrays[7] = Float64Array.from(obj); @@ -463,9 +463,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >7 : 7 >Float64Array.from(obj) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike typedArrays[8] = Uint8ClampedArray.from(obj); @@ -474,9 +474,9 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike) { >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike return typedArrays; @@ -758,9 +758,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -770,9 +770,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -782,9 +782,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -794,9 +794,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -806,9 +806,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -818,9 +818,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -830,9 +830,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -842,9 +842,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -854,9 +854,9 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike, mapFn: (n:number, v:n >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number @@ -883,9 +883,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >0 : 0 >Int8Array.from(obj, mapFn, thisArg) : Int8Array ->Int8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>Int8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >Int8Array : Int8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: ArrayLike): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int8Array; (arrayLike: Iterable): Int8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -896,9 +896,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >1 : 1 >Uint8Array.from(obj, mapFn, thisArg) : Uint8Array ->Uint8Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>Uint8Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >Uint8Array : Uint8ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: ArrayLike): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8Array; (arrayLike: Iterable): Uint8Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -909,9 +909,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >2 : 2 >Int16Array.from(obj, mapFn, thisArg) : Int16Array ->Int16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>Int16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >Int16Array : Int16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: ArrayLike): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int16Array; (arrayLike: Iterable): Int16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -922,9 +922,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >3 : 3 >Uint16Array.from(obj, mapFn, thisArg) : Uint16Array ->Uint16Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>Uint16Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >Uint16Array : Uint16ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: ArrayLike): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint16Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint16Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint16Array; (arrayLike: Iterable): Uint16Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -935,9 +935,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >4 : 4 >Int32Array.from(obj, mapFn, thisArg) : Int32Array ->Int32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>Int32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >Int32Array : Int32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: ArrayLike): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Int32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Int32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Int32Array; (arrayLike: Iterable): Int32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -948,9 +948,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >5 : 5 >Uint32Array.from(obj, mapFn, thisArg) : Uint32Array ->Uint32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>Uint32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >Uint32Array : Uint32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: ArrayLike): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint32Array; (arrayLike: Iterable): Uint32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -961,9 +961,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >6 : 6 >Float32Array.from(obj, mapFn, thisArg) : Float32Array ->Float32Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>Float32Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >Float32Array : Float32ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: ArrayLike): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float32Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float32Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float32Array; (arrayLike: Iterable): Float32Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -974,9 +974,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >7 : 7 >Float64Array.from(obj, mapFn, thisArg) : Float64Array ->Float64Array.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>Float64Array.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >Float64Array : Float64ArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: ArrayLike): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Float64Array; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Float64Array; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Float64Array; (arrayLike: Iterable): Float64Array; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} @@ -987,9 +987,9 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike, mapFn: (n:number, v >typedArrays : any[] >8 : 8 >Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray ->Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>Uint8ClampedArray.from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >Uint8ClampedArray : Uint8ClampedArrayConstructor ->from : { (arrayLike: ArrayLike, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; (arrayLike: Iterable, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; } +>from : { (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: ArrayLike, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: ArrayLike): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: undefined, v: number, k: number) => number, thisArg: undefined): Uint8ClampedArray; (arrayLike: Iterable, mapfn: (this: Z, v: number, k: number) => number, thisArg: Z): Uint8ClampedArray; (arrayLike: Iterable): Uint8ClampedArray; } >obj : ArrayLike >mapFn : (n: number, v: number) => number >thisArg : {} diff --git a/tests/cases/compiler/indexedAccessTypeConstraints.ts b/tests/cases/compiler/indexedAccessTypeConstraints.ts new file mode 100644 index 00000000000..c1c1bca198b --- /dev/null +++ b/tests/cases/compiler/indexedAccessTypeConstraints.ts @@ -0,0 +1,36 @@ +// @strict: true + +// Repro from #14557 + +interface IData { + content: T; +} + +type Data = { + get: (prop: K) => T[K]; +}; + +class Parent { + private data: Data; + getData(): Data { + return this.data; + } +} + +export class Foo extends Parent> { + getContent(): C { + return this.getData().get('content'); + } +} + +export class Bar> extends Parent { + getContent(): C { + return this.getData().get('content'); + } +} + +// Repro from #14557 + +function foo(x: C, y: T['content']) { + x = y; +} diff --git a/tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts b/tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts new file mode 100644 index 00000000000..17ff41c70a7 --- /dev/null +++ b/tests/cases/compiler/thisTypeInNativeThisAssignableMethods.ts @@ -0,0 +1,398 @@ +// @target: ES2017 + +class A { + options: string[]; + + addOptions(options: string[]) { + if (!this.options) { + this.options = []; + } + options.forEach(function (item) { + this.options.push(item); + }, this); + return this; + } + + testUndefined(options: string[]) { + const undefinedArr: Array = [] + options.forEach(function () { + undefinedArr.push(this); + }); // case1 + options.forEach(function () { + undefinedArr.push(this); + }, undefined); // case2 + options.forEach(function () { + undefinedArr.push(this); + }, null); // case3 + + const arrLike = {} as ArrayLike + Array.from(arrLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined) + + const iterLike = [] as Iterable + Array.from(iterLike, function (item) { + return this === undefined ? 2 : 1; + }, undefined) + } + + test(options: string[]) { + const thisObject = { + options: [] as string[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + + const arrLike = {} as ArrayLike + Array.from(arrLike, function (item) { + return this.options[item].length + }, thisObject) + + const iterLike = [] as Iterable + Array.from(iterLike, function (item) { + return this.options[item].length + }, thisObject) + } + + test1(options: string[]) { + const thisObject = { + options: [] as ReadonlyArray + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test2(options: Int8Array[]) { + const thisObject = { + options: [] as Int8Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test3(options: Uint8Array[]) { + const thisObject = { + options: [] as Uint8Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test4(options: Float32Array[]) { + const thisObject = { + options: [] as Float32Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test5(options: Uint8ClampedArray[]) { + const thisObject = { + options: [] as Uint8ClampedArray[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test6(options: Int16Array[]) { + const thisObject = { + options: [] as Int16Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test7(options: Uint16Array[]) { + const thisObject = { + options: [] as Uint16Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test8(options: Uint32Array[]) { + const thisObject = { + options: [] as Uint32Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } + + test9(options: Float64Array[]) { + const thisObject = { + options: [] as Float64Array[] + }; + + options.find(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.findIndex(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.forEach(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.map(function (val, index) { + if (val === this.options[index]) + return this.options[index]; + }, thisObject); + + options.some(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.filter(function (val, index) { + return val === this.options[index]; + }, thisObject); + + options.every(function (val, index) { + return val === this.options[index]; + }, thisObject); + } +} diff --git a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts index d843e86b725..9cf02a9c7dd 100644 --- a/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts +++ b/tests/cases/conformance/salsa/inferringClassMembersFromAssignments.ts @@ -21,6 +21,15 @@ class C { this.inMethod = "string" } this.inMultiple = "string"; + + var action = () => { + if (Math.random()) { + this.inNestedArrowFunction = 0; + } + else { + this.inNestedArrowFunction = "string" + } + }; } get() { if (Math.random()) { @@ -39,6 +48,14 @@ class C { this.inSetter = "string" } } + prop = () => { + if (Math.random()) { + this.inPropertyDeclaration = 0; + } + else { + this.inPropertyDeclaration = "string" + } + } static method() { if (Math.random()) { this.inStaticMethod = 0; @@ -46,6 +63,15 @@ class C { else { this.inStaticMethod = "string" } + + var action = () => { + if (Math.random()) { + this.inStaticNestedArrowFunction = 0; + } + else { + this.inStaticNestedArrowFunction = "string" + } + }; } static get() { if (Math.random()) { @@ -63,6 +89,14 @@ class C { this.inStaticSetter = "string" } } + static prop = () => { + if (Math.random()) { + this.inStaticPropertyDeclaration = 0; + } + else { + this.inStaticPropertyDeclaration = "string" + } + } } // @filename: b.ts @@ -76,6 +110,8 @@ var stringOrNumberOrUndefined: string | number | undefined; var stringOrNumberOrUndefined = c.inMethod; var stringOrNumberOrUndefined = c.inGetter; var stringOrNumberOrUndefined = c.inSetter; +var stringOrNumberOrUndefined = c.inPropertyDeclaration; +var stringOrNumberOrUndefined = c.inNestedArrowFunction var stringOrNumberOrBoolean: string | number | boolean; @@ -85,3 +121,5 @@ var stringOrNumberOrBoolean = c.inMultiple; var stringOrNumberOrUndefined = C.inStaticMethod; var stringOrNumberOrUndefined = C.inStaticGetter; var stringOrNumberOrUndefined = C.inStaticSetter; +var stringOrNumberOrUndefined = C.inStaticPropertyDeclaration; +var stringOrNumberOrUndefined = C.inStaticNestedArrowFunction; diff --git a/tests/cases/fourslash/codeFixAddForgottenThis01.ts b/tests/cases/fourslash/codeFixAddForgottenThis01.ts index 90d191b6ba5..07f06348212 100644 --- a/tests/cases/fourslash/codeFixAddForgottenThis01.ts +++ b/tests/cases/fourslash/codeFixAddForgottenThis01.ts @@ -2,9 +2,11 @@ ////class C { //// foo: number; -//// constructor() { -//// [|foo = 10|]; -//// } +//// constructor() {[| +//// foo = 10; +//// |]} ////} -verify.rangeAfterCodeFix("this.foo = 10"); \ No newline at end of file +verify.rangeAfterCodeFix(` + this.foo = 10; + `, /*includeWhitespace*/ true); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixSuperAfterThis.ts b/tests/cases/fourslash/codeFixSuperAfterThis.ts index 2bff98ceca0..55b44b07881 100644 --- a/tests/cases/fourslash/codeFixSuperAfterThis.ts +++ b/tests/cases/fourslash/codeFixSuperAfterThis.ts @@ -6,8 +6,10 @@ //// private a:number; //// constructor() {[| //// this.a = 12; -//// super();|] -//// } +//// super(); +//// |]} ////} - -verify.rangeAfterCodeFix("super(); this.a = 12;"); \ No newline at end of file +verify.rangeAfterCodeFix(` + super(); + this.a = 12; + `, /*includeWhiteSpace*/ true); \ No newline at end of file diff --git a/tests/cases/fourslash/codeFixSuperCall.ts b/tests/cases/fourslash/codeFixSuperCall.ts index c918e74dc38..f7584050a15 100644 --- a/tests/cases/fourslash/codeFixSuperCall.ts +++ b/tests/cases/fourslash/codeFixSuperCall.ts @@ -1,10 +1,11 @@ -/// +/// ////class Base{ ////} ////class C extends Base{ -//// constructor() {[| |] -//// } +//// constructor() {[| +//// |]} ////} - -verify.rangeAfterCodeFix('super();'); +verify.rangeAfterCodeFix(` + super(); + `, /*includeWhitespace*/ true); diff --git a/tests/cases/fourslash/completionEntryForUnionMethod.ts b/tests/cases/fourslash/completionEntryForUnionMethod.ts index dd0e034cd2d..2dc80e757b2 100644 --- a/tests/cases/fourslash/completionEntryForUnionMethod.ts +++ b/tests/cases/fourslash/completionEntryForUnionMethod.ts @@ -5,7 +5,7 @@ goTo.marker(); verify.quickInfoIs( - "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U];\n (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U];\n (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U];\n (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U];\n (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U];\n (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U];\n (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[];\n}", + "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U];\n (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U];\n (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U];\n (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U];\n (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U];\n (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U];\n (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[];\n (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U];\n (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U];\n (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U];\n (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U];\n (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U];\n (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U];\n (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[];\n (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[];\n}", "Calls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results.\nCalls a defined callback function on each element of an array, and returns an array that contains the results."); -verify.completionListContains('map', "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U, U];\n (this: [string, string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U, U];\n (this: [string, string], callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): [U, U];\n (callbackfn: (value: string, index: number, array: string[]) => U, thisArg?: any): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U, U];\n (this: [number, number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U, U];\n (this: [number, number], callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): [U, U];\n (callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any): U[];\n}"); +verify.completionListContains('map', "(property) map: {\n (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [string, string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [string, string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U, U];\n (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U, U];\n (this: [string, string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U, U];\n (this: [string, string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U, U];\n (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): [U, U];\n (this: [string, string], callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): [U, U];\n (this: [string, string], callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U): U[];\n (callbackfn: (this: undefined, value: string, index: number, array: string[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: string, index: number, array: string[]) => U, thisArg: Z): U[];\n} | {\n (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U, U];\n (this: [number, number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U, U];\n (this: [number, number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U, U];\n (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U, U];\n (this: [number, number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U, U];\n (this: [number, number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U, U];\n (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): [U, U];\n (this: [number, number], callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): [U, U];\n (this: [number, number], callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): [U, U];\n (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U): U[];\n (callbackfn: (this: undefined, value: number, index: number, array: number[]) => U, thisArg: undefined): U[];\n (callbackfn: (this: Z, value: number, index: number, array: number[]) => U, thisArg: Z): U[];\n}"); diff --git a/tests/cases/fourslash/docCommentTemplateIndentation.ts b/tests/cases/fourslash/docCommentTemplateIndentation.ts index db7e48dab2e..3f84a73b81f 100644 --- a/tests/cases/fourslash/docCommentTemplateIndentation.ts +++ b/tests/cases/fourslash/docCommentTemplateIndentation.ts @@ -1,13 +1,13 @@ /// // @Filename: indents.ts -/////*0*/ +//// a /*2*/ //// /*1*/ -//// /*2*/function foo() { } +/////*0*/ function foo() { } const noIndentEmptyScaffolding = "/**\r\n * \r\n */"; const oneIndentEmptyScaffolding = "/**\r\n * \r\n */"; -const twoIndentEmptyScaffolding = "/**\r\n * \r\n */\r\n "; +const twoIndentEmptyScaffolding = "/**\r\n * \r\n */"; const noIndentOffset = 8; const oneIndentOffset = noIndentOffset + 4; const twoIndentOffset = oneIndentOffset + 4; @@ -19,4 +19,4 @@ goTo.marker("1"); verify.DocCommentTemplate(oneIndentEmptyScaffolding, oneIndentOffset); goTo.marker("2"); -verify.DocCommentTemplate(twoIndentEmptyScaffolding, twoIndentOffset); \ No newline at end of file +verify.DocCommentTemplate(twoIndentEmptyScaffolding, twoIndentOffset); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport10.ts b/tests/cases/fourslash/importNameCodeFixExistingImport10.ts index 25246e70123..8a178e72730 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport10.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport10.ts @@ -16,6 +16,6 @@ verify.importFixAtPosition([ `{ v1, v2, -f1 + f1 }` ]); \ No newline at end of file diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport11.ts b/tests/cases/fourslash/importNameCodeFixExistingImport11.ts index 304ffb896df..8822356c13a 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport11.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport11.ts @@ -15,6 +15,7 @@ verify.importFixAtPosition([ `{ v1, v2, - v3, f1 + v3, + f1 }` ]); \ No newline at end of file diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport9.ts b/tests/cases/fourslash/importNameCodeFixExistingImport9.ts index 05d17927454..51496abff12 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport9.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport9.ts @@ -11,7 +11,6 @@ verify.importFixAtPosition([ `{ - v1, -f1 + v1, f1 }` ]); \ No newline at end of file diff --git a/tests/cases/fourslash/tsxCompletion14.ts b/tests/cases/fourslash/tsxCompletion14.ts new file mode 100644 index 00000000000..32fbaef71f3 --- /dev/null +++ b/tests/cases/fourslash/tsxCompletion14.ts @@ -0,0 +1,44 @@ +/// +//@module: commonjs +//@jsx: preserve + +//// declare module JSX { +//// interface Element { } +//// interface IntrinsicElements { +//// } +//// interface ElementAttributesProperty { props; } +//// } + +//@Filename: exporter.tsx +//// export class Thing { props: { ONE: string; TWO: number } } +//// export module M { +//// export declare function SFCComp(props: { Three: number; Four: string }): JSX.Element; +//// } + +//@Filename: file.tsx +//// import * as Exp from './exporter'; +//// var x1 = ; +//// var x2 = ; +//// var x3 = ; +//// var x4 = ; + + +goTo.marker("1"); +verify.completionListCount(2); +verify.completionListContains('ONE'); +verify.completionListContains('TWO'); + +goTo.marker("2"); +verify.completionListCount(2); +verify.completionListContains("Three"); +verify.completionListContains("Four"); + +goTo.marker("3"); +verify.completionListCount(2); +verify.completionListContains('ONE'); +verify.completionListContains('TWO'); + +goTo.marker("4"); +verify.completionListCount(2); +verify.completionListContains("Three"); +verify.completionListContains("Four"); diff --git a/tests/cases/fourslash/unusedFunctionInNamespace1.ts b/tests/cases/fourslash/unusedFunctionInNamespace1.ts index 288573608f2..7a63ff13caa 100644 --- a/tests/cases/fourslash/unusedFunctionInNamespace1.ts +++ b/tests/cases/fourslash/unusedFunctionInNamespace1.ts @@ -8,5 +8,4 @@ //// } |] verify.rangeAfterCodeFix(`namespace greeter { - // some legit comments }`); diff --git a/tests/cases/fourslash/unusedVariableInForLoop7FS.ts b/tests/cases/fourslash/unusedVariableInForLoop7FS.ts index 5aa3251c0b4..7f99863ba46 100644 --- a/tests/cases/fourslash/unusedVariableInForLoop7FS.ts +++ b/tests/cases/fourslash/unusedVariableInForLoop7FS.ts @@ -1,12 +1,16 @@ /// // @noUnusedLocals: true -//// function f1 () { -//// for (const elem of ["a", "b", "c"]) { -//// elem; -//// [|var x = 20; -//// }|] -////} +////function f1 () [|{ +//// for (const elem of ["a", "b", "c"]) { +//// elem; +//// var x = 20; +//// } +////}|] //// -verify.rangeAfterCodeFix("}"); +verify.rangeAfterCodeFix(`{ + for (const elem of ["a", "b", "c"]) { + elem; + } +}`, /*includeWhiteSpace*/ true);