From 2a907a9c3ab48e8d68ed11a6fd5546b3bcdd8a62 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 17 Mar 2015 14:57:21 -0700 Subject: [PATCH 01/16] Type serialization for decorators --- src/compiler/checker.ts | 188 ++++++++++++++++++++++++++++++++++++++++ src/compiler/emitter.ts | 3 +- 2 files changed, 190 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 6fdaac79ce..58607e449d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2965,6 +2965,16 @@ module ts { return getSignaturesOfObjectOrUnionType(getApparentType(type), kind); } + function typeHasCallOrConstructSignatures(type: Type): boolean { + let apparentType = getApparentType(type); + if (apparentType.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { + let resolved = resolveObjectOrUnionTypeMembers(type); + return resolved.callSignatures.length > 0 + || resolved.constructSignatures.length > 0; + } + return false; + } + function getIndexTypeOfObjectOrUnionType(type: Type, kind: IndexKind): Type { if (type.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { let resolved = resolveObjectOrUnionTypeMembers(type); @@ -11337,6 +11347,184 @@ module ts { return undefined; } + /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeEntityName(node: EntityName, getGeneratedNameForNode: (Node: Node) => string, fallbackPath?: string[]): string { + if (node.kind === SyntaxKind.Identifier) { + var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); + var text = substitution || (node).text; + if (fallbackPath) { + fallbackPath.push(text); + } + else { + return text; + } + } + else { + var left = serializeEntityName((node).left, getGeneratedNameForNode, fallbackPath); + var right = serializeEntityName((node).right, getGeneratedNameForNode, fallbackPath); + if (!fallbackPath) { + return left + "." + right; + } + } + } + + /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeTypeReferenceNode(node: TypeReferenceNode, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of a TypeReferenceNode uses the following rules: + // + // * The serialized type of a TypeReference that is `void` is "void 0". + // * The serialized type of a TypeReference that is a `boolean` is "Boolean". + // * The serialized type of a TypeReference that is an enum or `number` is "Number". + // * The serialized type of a TypeReference that is a string literal or `string` is "String". + // * The serialized type of a TypeReference that is a tuple is "Array". + // * The serialized type of a TypeReference that is a `symbol` is "Symbol". + // * The serialized type of a TypeReference with a value declaration is its entity name. + // * The serialized type of a TypeReference with a call or construct signature is "Function". + // * The serialized type of any other type is "Object". + let type = getTypeFromTypeReferenceNode(node); + if (type.flags & TypeFlags.Void) { + return "void 0"; + } + else if (type.flags & TypeFlags.Boolean) { + return "Boolean"; + } + else if (type.flags & TypeFlags.NumberLike) { + return "Number"; + } + else if (type.flags & TypeFlags.StringLike) { + return "String"; + } + else if (type.flags & TypeFlags.Tuple) { + return "Array"; + } + else if (type.flags & TypeFlags.ESSymbol) { + return "Symbol"; + } + else if (type.symbol.valueDeclaration) { + return serializeEntityName(node.typeName, getGeneratedNameForNode); + } + else if (typeHasCallOrConstructSignatures(type)) { + return "Function"; + } + else if (type === unknownType) { + var fallbackPath: string[] = []; + serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath); + return fallbackPath; + } + + return "Object"; + } + + /** Serializes a TypeNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeTypeNode(node: TypeNode | LiteralExpression, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of a TypeNode uses the following rules: + // + // * The serialized type of `void` is "void 0" (undefined). + // * The serialized type of a parenthesized type is the serialized type of its nested type. + // * The serialized type of a Function or Constructor type is "Function". + // * The serialized type of an Array or Tuple type is "Array". + // * The serialized type of `boolean` is "Boolean". + // * The serialized type of `string` or a string-literal type is "String". + // * The serialized type of a type reference is handled by `serializeTypeReferenceNode`. + // * The serialized type of any other type node is "Object". + if (node) { + switch (node.kind) { + case SyntaxKind.VoidKeyword: + return "void 0"; + case SyntaxKind.ParenthesizedType: + return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + return "Function"; + case SyntaxKind.ArrayType: + case SyntaxKind.TupleType: + return "Array"; + case SyntaxKind.BooleanKeyword: + return "Boolean"; + case SyntaxKind.StringKeyword: + case SyntaxKind.StringLiteral: + return "String"; + case SyntaxKind.NumberKeyword: + return "Number"; + case SyntaxKind.TypeReference: + return serializeTypeReferenceNode(node, getGeneratedNameForNode); + case SyntaxKind.TypeQuery: + case SyntaxKind.TypeLiteral: + case SyntaxKind.UnionType: + case SyntaxKind.AnyKeyword: + default: + break; + } + } + + return "Object"; + } + + /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the `@type` and `@paramtypes` decorators. */ + function serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of the type of a declaration uses the following rules: + // + // * The serialized type of a ClassDeclaration is the class name (see serializeEntityName). + // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. + // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. + // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. + // * The serialized type of any other FunctionLikeDeclaration is "Function". + // * The serialized type of any other node is "void 0". + // + // For rules on serializing type annotations, see `serializeTypeNode`. + switch (node.kind) { + case SyntaxKind.ClassDeclaration: return serializeEntityName((node).name, getGeneratedNameForNode); + case SyntaxKind.PropertyDeclaration: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.Parameter: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.GetAccessor: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.SetAccessor: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node), getGeneratedNameForNode); + } + if (isFunctionLike(node)) { + return "Function"; + } + return "void 0"; + } + + /** Serializes the parameter types of a function or the constructor of a class. Used by the `@paramtypes` decorator. */ + function serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[] { + // serialization of parameter types uses the following rules: + // + // * If the declaration is a class, the parameters of the first constructor with a body are used. + // * If the declaration is function-like and has a body, the parameters of the function are used. + // + // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. + if (node) { + var valueDeclaration: FunctionLikeDeclaration; + if (node.kind === SyntaxKind.ClassDeclaration) { + valueDeclaration = getFirstConstructorWithBody(node); + } + else if (isFunctionLike(node) && nodeIsPresent((node).body)) { + valueDeclaration = node; + } + if (valueDeclaration) { + var result: (string | string[])[]; + var parameters = valueDeclaration.parameters; + var parameterCount = parameters.length; + if (parameterCount > 0) { + result = new Array(parameterCount); + for (var i = 0; i < parameterCount; i++) { + result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + } + return result; + } + } + } + return emptyArray; + } + + /** Serializes the return type of function. Used by the `@returntype` decorator. */ + function serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + if (node && isFunctionLike(node)) { + return serializeTypeNode((node).type, getGeneratedNameForNode); + } + return "void 0"; + } + function writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { // Get type of the symbol if this is the valid symbol otherwise get type at location let symbol = getSymbolOfNode(declaration); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 02531593de..c772262e89 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4652,7 +4652,8 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } } return value; -};`); +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } };`); decorateEmitted = true; } if (isExternalModule(node)) { From a1d445ebc90876cb61c456309c3dc239ad0f9c85 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 17 Mar 2015 17:09:39 -0700 Subject: [PATCH 02/16] Updated baselines --- src/compiler/checker.ts | 83 ++++++++++++++-- src/compiler/emitter.ts | 95 ++++++++++++++++++- src/compiler/types.ts | 3 + src/lib/es6.d.ts | 36 +++---- .../baselines/reference/APISample_compile.js | 7 ++ .../reference/APISample_compile.types | 23 +++++ tests/baselines/reference/APISample_linter.js | 7 ++ .../reference/APISample_linter.types | 23 +++++ .../reference/APISample_transform.js | 7 ++ .../reference/APISample_transform.types | 23 +++++ .../baselines/reference/APISample_watcher.js | 7 ++ .../reference/APISample_watcher.types | 23 +++++ .../baselines/reference/decoratorOnClass1.js | 18 ++++ .../baselines/reference/decoratorOnClass2.js | 18 ++++ .../baselines/reference/decoratorOnClass3.js | 18 ++++ .../baselines/reference/decoratorOnClass4.js | 18 ++++ .../baselines/reference/decoratorOnClass5.js | 18 ++++ .../baselines/reference/decoratorOnClass8.js | 18 ++++ .../reference/decoratorOnClassAccessor1.js | 18 ++++ .../reference/decoratorOnClassAccessor2.js | 18 ++++ .../reference/decoratorOnClassAccessor4.js | 18 ++++ .../reference/decoratorOnClassAccessor5.js | 18 ++++ .../decoratorOnClassConstructorParameter1.js | 22 +++++ .../decoratorOnClassConstructorParameter4.js | 22 +++++ .../reference/decoratorOnClassMethod1.js | 18 ++++ .../reference/decoratorOnClassMethod10.js | 18 ++++ .../reference/decoratorOnClassMethod2.js | 18 ++++ .../reference/decoratorOnClassMethod4.js | 23 +++++ .../reference/decoratorOnClassMethod5.js | 23 +++++ .../reference/decoratorOnClassMethod6.js | 23 +++++ .../reference/decoratorOnClassMethod7.js | 23 +++++ .../reference/decoratorOnClassMethod8.js | 18 ++++ .../decoratorOnClassMethodParameter1.js | 22 +++++ .../reference/decoratorOnClassProperty1.js | 22 +++++ .../reference/decoratorOnClassProperty10.js | 22 +++++ .../reference/decoratorOnClassProperty11.js | 22 +++++ .../reference/decoratorOnClassProperty2.js | 22 +++++ .../reference/decoratorOnClassProperty6.js | 18 ++++ .../reference/decoratorOnClassProperty7.js | 22 +++++ 39 files changed, 843 insertions(+), 32 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 58607e449d..a5a27df412 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8702,6 +8702,41 @@ module ts { } } + /** Checks a type reference node as an expression. */ + function checkTypeNodeAsExpression(node: TypeNode | LiteralExpression) { + if (node && node.kind === SyntaxKind.TypeReference) { + var type = getTypeFromTypeNode(node); + if (!type || type.flags & (TypeFlags.Intrinsic | TypeFlags.NumberLike | TypeFlags.StringLike)) { + return; + } + if (type.symbol.valueDeclaration) { + checkExpressionOrQualifiedName((node).typeName); + } + } + } + + /** + * Checks the type annotation of an accessor declaration or property declaration as + * an expression if it is a type reference to a type with a value declaration. + */ + function checkTypeAnnotationAsExpression(node: AccessorDeclaration | PropertyDeclaration | ParameterDeclaration | MethodDeclaration) { + switch (node.kind) { + case SyntaxKind.PropertyDeclaration: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.Parameter: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.MethodDeclaration: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.GetAccessor: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.SetAccessor: return checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); + } + } + + /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ + function checkParameterTypeAnnotationsAsExpressions(node: FunctionLikeDeclaration) { + // ensure all type annotations with a value declaration are checked as an expression + if (node) { + forEach(node.parameters, checkTypeAnnotationAsExpression); + } + } + /** Check the decorators of a node */ function checkDecorators(node: Node): void { if (!node.decorators) { @@ -8710,18 +8745,28 @@ module ts { switch (node.kind) { case SyntaxKind.ClassDeclaration: + var constructor = getFirstConstructorWithBody(node); + if (constructor) { + checkParameterTypeAnnotationsAsExpressions(constructor); + } + break; + case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: + checkParameterTypeAnnotationsAsExpressions(node); + // fall-through + case SyntaxKind.SetAccessor: + case SyntaxKind.GetAccessor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.Parameter: - emitDecorate = true; + checkTypeAnnotationAsExpression(node); break; default: return; } + emitDecorate = true; forEach(node.decorators, checkDecorator); } @@ -11400,17 +11445,17 @@ module ts { else if (type.flags & TypeFlags.ESSymbol) { return "Symbol"; } - else if (type.symbol.valueDeclaration) { - return serializeEntityName(node.typeName, getGeneratedNameForNode); - } - else if (typeHasCallOrConstructSignatures(type)) { - return "Function"; - } else if (type === unknownType) { var fallbackPath: string[] = []; serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath); return fallbackPath; } + else if (type.symbol && type.symbol.valueDeclaration) { + return serializeEntityName(node.typeName, getGeneratedNameForNode); + } + else if (typeHasCallOrConstructSignatures(type)) { + return "Function"; + } return "Object"; } @@ -11473,7 +11518,7 @@ module ts { // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { - case SyntaxKind.ClassDeclaration: return serializeEntityName((node).name, getGeneratedNameForNode); + case SyntaxKind.ClassDeclaration: return "Function"; case SyntaxKind.PropertyDeclaration: return serializeTypeNode((node).type, getGeneratedNameForNode); case SyntaxKind.Parameter: return serializeTypeNode((node).type, getGeneratedNameForNode); case SyntaxKind.GetAccessor: return serializeTypeNode((node).type, getGeneratedNameForNode); @@ -11508,7 +11553,22 @@ module ts { if (parameterCount > 0) { result = new Array(parameterCount); for (var i = 0; i < parameterCount; i++) { - result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + if (parameters[i].dotDotDotToken) { + var parameterType = parameters[i].type; + if (parameterType.kind === SyntaxKind.ArrayType) { + parameterType = (parameterType).elementType; + } + else if (parameterType.kind === SyntaxKind.TypeReference && (parameterType).typeArguments && (parameterType).typeArguments.length === 1) { + parameterType = (parameterType).typeArguments[0]; + } + else { + parameterType = undefined; + } + result[i] = serializeTypeNode(parameterType, getGeneratedNameForNode); + } + else { + result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + } } return result; } @@ -11612,6 +11672,9 @@ module ts { resolvesToSomeValue, collectLinkedAliases, getBlockScopedVariableId, + serializeTypeOfNode, + serializeParameterTypesOfNode, + serializeReturnTypeOfNode, }; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c772262e89..1e959eeb7d 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3791,7 +3791,7 @@ module ts { emitStart(node); emitDeclarationName(node); write(" = "); - emitDecorateStart(node.decorators); + emitDecorateStart(node); emitDeclarationName(node); write(");"); emitEnd(node); @@ -3879,7 +3879,7 @@ module ts { write(", "); } - emitDecorateStart(decorators); + emitDecorateStart(member); emitStart(member.name); emitClassMemberPrefix(node, member); write(", "); @@ -3931,7 +3931,7 @@ module ts { writeLine(); emitStart(parameter); - emitDecorateStart(parameter.decorators); + emitDecorateStart(parameter); emitStart(parameter.name); if (member.kind === SyntaxKind.Constructor) { @@ -3953,8 +3953,9 @@ module ts { }); } - function emitDecorateStart(decorators: Decorator[]): void { + function emitDecorateStart(node: Declaration): void { write("__decorate(["); + let decorators = node.decorators; let decoratorCount = decorators.length; for (let i = 0; i < decoratorCount; i++) { if (i > 0) { @@ -3965,9 +3966,95 @@ module ts { emit(decorator.expression); emitEnd(decorator); } + emitSerializedTypeMetadata(node); write("], "); } + function formatPathSegment(location: Node, path: string[], index: number): string { + switch (index) { + case 0: + return `typeof ${path[index]} !== 'undefined' && ${path[index]}`; + case 1: + return `${formatPathSegment(location, path, index - 1) }.${path[index]}`; + default: + let temp = createTempVariable(location); + recordTempDeclaration(temp); + return `(${temp.text} = ${formatPathSegment(location, path, index - 1) }) && ${temp.text}.${path[index]}`; + } + } + + function shouldEmitTypeMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.Parameter: + return true; + } + return false; + } + + function shouldEmitReturnTypeMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + return true; + } + return false; + } + + function shouldEmitParamTypesMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.SetAccessor: + return true; + } + return false; + } + + function emitSerializedTypeMetadata(node: Declaration): void { + if (shouldEmitTypeMetadata(node)) { + var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + write(", __metadata('design:type', "); + emitSerializedType(node, serializedType); + write(")"); + } + } + if (shouldEmitParamTypesMetadata(node)) { + var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); + if (serializedTypes) { + write(", __metadata('design:paramtypes', ["); + for (var i = 0; i < serializedTypes.length; ++i) { + if (i > 0) { + write(", "); + } + emitSerializedType(node, serializedTypes[i]); + } + write("])"); + } + } + if (shouldEmitReturnTypeMetadata(node)) { + var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + write(", __metadata('design:returntype', "); + emitSerializedType(node, serializedType); + write(")"); + } + } + } + + function emitSerializedType(location: Node, name: string | string[]): void { + if (typeof name === "string") { + write(name); + return; + } + else { + Debug.assert(name.length > 0, "Invalid type name path for serialization"); + write(`(${formatPathSegment(location, name, name.length - 1) }) || Object`); + } + } function emitInterfaceDeclaration(node: InterfaceDeclaration) { emitOnlyPinnedOrTripleSlashComments(node); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index e5697f9f37..06f21836a6 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1236,6 +1236,9 @@ module ts { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } export const enum SymbolFlags { diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 3e6ac3f756..8590e2273e 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -3513,27 +3513,27 @@ interface ProxyHandler { interface ProxyConstructor { revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - new (target: T, handeler: ProxyHandler): T + new (target: T, handler: ProxyHandler): T } declare var Proxy: ProxyConstructor; -declare var Reflect: { - apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - construct(target: Function, argumentsList: ArrayLike): any; - defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - deleteProperty(target: any, propertyKey: PropertyKey): boolean; - enumerate(target: any): IterableIterator; - get(target: any, propertyKey: PropertyKey, receiver?: any): any; - getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - getPrototypeOf(target: any): any; - has(target: any, propertyKey: string): boolean; - has(target: any, propertyKey: symbol): boolean; - isExtensible(target: any): boolean; - ownKeys(target: any): Array; - preventExtensions(target: any): boolean; - set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean; - setPrototypeOf(target: any, proto: any): boolean; -}; +declare module Reflect { + function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; + function construct(target: Function, argumentsList: ArrayLike): any; + function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; + function deleteProperty(target: any, propertyKey: PropertyKey): boolean; + function enumerate(target: any): IterableIterator; + function get(target: any, propertyKey: PropertyKey, receiver?: any): any; + function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; + function getPrototypeOf(target: any): any; + function has(target: any, propertyKey: string): boolean; + function has(target: any, propertyKey: symbol): boolean; + function isExtensible(target: any): boolean; + function ownKeys(target: any): Array; + function preventExtensions(target: any): boolean; + function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean; + function setPrototypeOf(target: any, proto: any): boolean; +} /** * Represents the completion of an asynchronous operation diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 07d5e4337a..cb9cd765b2 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -964,6 +964,13 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; +<<<<<<< HEAD +======= + getClassDeclarationVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node): string | string[]; + serializeParameterTypesOfNode(node: Node): (string | string[])[]; + serializeReturnTypeOfNode(node: Node): string | string[]; +>>>>>>> Updated baselines } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index eff47a4cb7..71c0db3d19 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -3150,6 +3150,29 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier +<<<<<<< HEAD +======= + + getClassDeclarationVariableId(node: Identifier): number; +>getClassDeclarationVariableId : (node: Identifier) => number +>node : Identifier +>Identifier : Identifier + + serializeTypeOfNode(node: Node): string | string[]; +>serializeTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node) => (string | string[])[] +>node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node): string | string[]; +>serializeReturnTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node +>>>>>>> Updated baselines } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index b57acaf0e9..1459cf0f77 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -995,6 +995,13 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; +<<<<<<< HEAD +======= + getClassDeclarationVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node): string | string[]; + serializeParameterTypesOfNode(node: Node): (string | string[])[]; + serializeReturnTypeOfNode(node: Node): string | string[]; +>>>>>>> Updated baselines } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 600bf5c6ad..f979f60b57 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -3296,6 +3296,29 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier +<<<<<<< HEAD +======= + + getClassDeclarationVariableId(node: Identifier): number; +>getClassDeclarationVariableId : (node: Identifier) => number +>node : Identifier +>Identifier : Identifier + + serializeTypeOfNode(node: Node): string | string[]; +>serializeTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node) => (string | string[])[] +>node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node): string | string[]; +>serializeReturnTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node +>>>>>>> Updated baselines } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 4004007508..7c59f94ca4 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -996,6 +996,13 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; +<<<<<<< HEAD +======= + getClassDeclarationVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node): string | string[]; + serializeParameterTypesOfNode(node: Node): (string | string[])[]; + serializeReturnTypeOfNode(node: Node): string | string[]; +>>>>>>> Updated baselines } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 4ea9c49d75..004f179f28 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -3246,6 +3246,29 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier +<<<<<<< HEAD +======= + + getClassDeclarationVariableId(node: Identifier): number; +>getClassDeclarationVariableId : (node: Identifier) => number +>node : Identifier +>Identifier : Identifier + + serializeTypeOfNode(node: Node): string | string[]; +>serializeTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node) => (string | string[])[] +>node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node): string | string[]; +>serializeReturnTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node +>>>>>>> Updated baselines } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 34503a0d81..606bffdf77 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1033,6 +1033,13 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; +<<<<<<< HEAD +======= + getClassDeclarationVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node): string | string[]; + serializeParameterTypesOfNode(node: Node): (string | string[])[]; + serializeReturnTypeOfNode(node: Node): string | string[]; +>>>>>>> Updated baselines } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 3903e169b4..5170a0bd2b 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -3419,6 +3419,29 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier +<<<<<<< HEAD +======= + + getClassDeclarationVariableId(node: Identifier): number; +>getClassDeclarationVariableId : (node: Identifier) => number +>node : Identifier +>Identifier : Identifier + + serializeTypeOfNode(node: Node): string | string[]; +>serializeTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node) => (string | string[])[] +>node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node): string | string[]; +>serializeReturnTypeOfNode : (node: Node) => string | string[] +>node : Node +>Node : Node +>>>>>>> Updated baselines } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index 24be251746..c5b0233bfb 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClass1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +24,22 @@ var C = (function () { function C() { } C = __decorate([dec], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec, __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index 92741819e9..ee0fd6010b 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -6,6 +6,7 @@ export class C { } //// [decoratorOnClass2.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,6 +24,23 @@ var C = (function () { function C() { } C = __decorate([dec], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec, __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); exports.C = C; diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 766acc4207..17f0c395b8 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -7,6 +7,7 @@ class C { } //// [decoratorOnClass3.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,5 +25,22 @@ var C = (function () { function C() { } C = __decorate([dec], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec, __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index 95bde54937..b530b477c1 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClass4.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +24,22 @@ var C = (function () { function C() { } C = __decorate([dec()], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index a93d625f49..c01463ace0 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClass5.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +24,22 @@ var C = (function () { function C() { } C = __decorate([dec()], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index 0e782d45e1..99ce993e95 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClass8.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +24,22 @@ var C = (function () { function C() { } C = __decorate([dec()], C); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index d78e776cb9..6065bad5dc 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassAccessor1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,6 +20,19 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } @@ -29,6 +43,10 @@ var C = (function () { enumerable: true, configurable: true }); +<<<<<<< HEAD Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); +======= + __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index f1bfce9ea6..6ba38de1b1 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassAccessor2.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,6 +20,19 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } @@ -29,6 +43,10 @@ var C = (function () { enumerable: true, configurable: true }); +<<<<<<< HEAD Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); +======= + __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 77dbc569e5..5495d4d8f4 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassAccessor4.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,6 +20,19 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } @@ -28,6 +42,10 @@ var C = (function () { enumerable: true, configurable: true }); +<<<<<<< HEAD Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); +======= + __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index bfd6518c59..6b4542b637 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassAccessor5.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,6 +20,19 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } @@ -28,6 +42,10 @@ var C = (function () { enumerable: true, configurable: true }); +<<<<<<< HEAD Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); +======= + __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index 0c86a1ccf7..232d687322 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -1,11 +1,16 @@ //// [decoratorOnClassConstructorParameter1.ts] +<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; +======= +declare function dec(target: Function, parameterIndex: number): void; +>>>>>>> Updated baselines class C { constructor(@dec p: number) {} } //// [decoratorOnClassConstructorParameter1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C(p) { } __decorate([dec], C, void 0, 0); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C(p) { + } + __decorate([dec, __metadata('design:type', Number)], C, 0); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index 07dc7cae07..afb8775f58 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -1,11 +1,16 @@ //// [decoratorOnClassConstructorParameter4.ts] +<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; +======= +declare function dec(target: Function, parameterIndex: number): void; +>>>>>>> Updated baselines class C { constructor(public @dec p: number) {} } //// [decoratorOnClassConstructorParameter4.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C(public, p) { } __decorate([dec], C, void 0, 1); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C(public, p) { + } + __decorate([dec, __metadata('design:type', Number)], C, 1); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index be9c00290f..ece5d6320e 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,11 +20,28 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } C.prototype.method = function () { }; +<<<<<<< HEAD Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); +======= + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index 3dd38f806b..b8b60aa944 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod10.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,11 +20,28 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } C.prototype.method = function () { }; +<<<<<<< HEAD Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); +======= + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index b7df7b9ba9..01f41e185f 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod2.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,11 +20,28 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } C.prototype.method = function () { }; +<<<<<<< HEAD Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); +======= + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 7021e5af32..4f4227a23f 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod4.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index 3bde0968ea..a74536cc16 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod5.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec()], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 126dc47ad2..6f9c42a720 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod6.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 34fbdb53ca..2ad1e43998 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod7.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index 629ff4e253..2fd17798b2 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod8.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,11 +20,28 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } C.prototype.method = function () { }; +<<<<<<< HEAD Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); +======= + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index 1dcb057e53..171872ee28 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -1,11 +1,16 @@ //// [decoratorOnClassMethodParameter1.ts] +<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; +======= +declare function dec(target: Function, parameterIndex: number): void; +>>>>>>> Updated baselines class C { method(@dec p: number) {} } //// [decoratorOnClassMethodParameter1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -19,11 +24,28 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>>>>> Updated baselines var C = (function () { function C() { } C.prototype.method = function (p) { }; +<<<<<<< HEAD __decorate([dec], C.prototype, "method", 0); +======= + __decorate([dec, __metadata('design:type', Number)], C.prototype.method, 0); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index efc6a2c04d..f9cfab7d65 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -1,11 +1,16 @@ //// [decoratorOnClassProperty1.ts] +<<<<<<< HEAD declare function dec(target: any, propertyKey: string): void; +======= +declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor; +>>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty1.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C() { } __decorate([dec], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index d55eb71e3c..c7b3a56464 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -1,11 +1,16 @@ //// [decoratorOnClassProperty10.ts] +<<<<<<< HEAD declare function dec(): (target: any, propertyKey: string) => void; +======= +declare function dec(): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; +>>>>>>> Updated baselines class C { @dec() prop; } //// [decoratorOnClassProperty10.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C() { } __decorate([dec()], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec(), __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index 63e5f8d02e..d784eb56a8 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -1,11 +1,16 @@ //// [decoratorOnClassProperty11.ts] +<<<<<<< HEAD declare function dec(): (target: any, propertyKey: string) => void; +======= +declare function dec(): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; +>>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty11.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C() { } __decorate([dec], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index d52baa7920..4968fce088 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -1,11 +1,16 @@ //// [decoratorOnClassProperty2.ts] +<<<<<<< HEAD declare function dec(target: any, propertyKey: string): void; +======= +declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor; +>>>>>>> Updated baselines class C { @dec public prop; } //// [decoratorOnClassProperty2.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C() { } __decorate([dec], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index 7f087156bc..2eaf977c7e 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassProperty6.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +24,22 @@ var C = (function () { function C() { } __decorate([dec], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index ba2c8383a2..72f08c988f 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -1,11 +1,16 @@ //// [decoratorOnClassProperty7.ts] +<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, paramIndex: number): void; +======= +declare function dec(target: Function, paramIndex: number): void; +>>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty7.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -23,5 +28,22 @@ var C = (function () { function C() { } __decorate([dec], C.prototype, "prop"); +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function () { + function C() { + } + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); +>>>>>>> Updated baselines return C; })(); From 71803c6412ffc827a3543b1918d36a3c4a396f18 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 25 Mar 2015 18:12:57 -0700 Subject: [PATCH 03/16] Minor emit cleanup --- src/compiler/emitter.ts | 10 +- .../baselines/reference/APISample_compile.js | 10 +- .../reference/APISample_compile.types | 33 +- tests/baselines/reference/APISample_linter.js | 10 +- .../reference/APISample_linter.types | 33 +- .../reference/APISample_transform.js | 10 +- .../reference/APISample_transform.types | 33 +- .../baselines/reference/APISample_watcher.js | 10 +- .../reference/APISample_watcher.types | 33 +- .../baselines/reference/decoratorOnClass1.js | 19 +- .../baselines/reference/decoratorOnClass2.js | 19 +- .../baselines/reference/decoratorOnClass3.js | 19 +- .../baselines/reference/decoratorOnClass4.js | 19 +- .../baselines/reference/decoratorOnClass5.js | 19 +- .../baselines/reference/decoratorOnClass8.js | 19 +- .../reference/decoratorOnClassAccessor1.js | 21 +- .../reference/decoratorOnClassAccessor2.js | 21 +- .../reference/decoratorOnClassAccessor4.js | 21 +- .../reference/decoratorOnClassAccessor5.js | 21 +- .../decoratorOnClassConstructorParameter1.js | 25 +- .../decoratorOnClassConstructorParameter4.js | 25 +- .../reference/decoratorOnClassMethod1.js | 21 +- .../reference/decoratorOnClassMethod10.js | 21 +- .../reference/decoratorOnClassMethod2.js | 21 +- .../reference/decoratorOnClassMethod4.js | 26 +- .../reference/decoratorOnClassMethod5.js | 26 +- .../reference/decoratorOnClassMethod6.js | 26 +- .../reference/decoratorOnClassMethod7.js | 26 +- .../reference/decoratorOnClassMethod8.js | 21 +- .../decoratorOnClassMethodParameter1.js | 25 +- .../reference/decoratorOnClassProperty1.js | 23 +- .../reference/decoratorOnClassProperty10.js | 23 +- .../reference/decoratorOnClassProperty11.js | 23 +- .../reference/decoratorOnClassProperty2.js | 23 +- .../reference/decoratorOnClassProperty6.js | 19 +- .../reference/decoratorOnClassProperty7.js | 23 +- .../sourceMapValidationDecorators.js | 19 +- .../sourceMapValidationDecorators.js.map | 2 +- ...ourceMapValidationDecorators.sourcemap.txt | 531 +++++++++--------- 39 files changed, 404 insertions(+), 925 deletions(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1e959eeb7d..de52dd370c 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3970,16 +3970,16 @@ module ts { write("], "); } - function formatPathSegment(location: Node, path: string[], index: number): string { + function serializeTypeNameSegment(location: Node, path: string[], index: number): string { switch (index) { case 0: return `typeof ${path[index]} !== 'undefined' && ${path[index]}`; case 1: - return `${formatPathSegment(location, path, index - 1) }.${path[index]}`; + return `${serializeTypeNameSegment(location, path, index - 1) }.${path[index]}`; default: let temp = createTempVariable(location); recordTempDeclaration(temp); - return `(${temp.text} = ${formatPathSegment(location, path, index - 1) }) && ${temp.text}.${path[index]}`; + return `(${temp.text} = ${serializeTypeNameSegment(location, path, index - 1) }) && ${temp.text}.${path[index]}`; } } @@ -4052,7 +4052,7 @@ module ts { } else { Debug.assert(name.length > 0, "Invalid type name path for serialization"); - write(`(${formatPathSegment(location, name, name.length - 1) }) || Object`); + write(`(${serializeTypeNameSegment(location, name, name.length - 1) }) || Object`); } } function emitInterfaceDeclaration(node: InterfaceDeclaration) { @@ -4740,7 +4740,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } };`); +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } };`); decorateEmitted = true; } if (isExternalModule(node)) { diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index cb9cd765b2..f8c09387a8 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -964,13 +964,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; - serializeTypeOfNode(node: Node): string | string[]; - serializeParameterTypesOfNode(node: Node): (string | string[])[]; - serializeReturnTypeOfNode(node: Node): string | string[]; ->>>>>>> Updated baselines + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 71c0db3d19..d2a1f44d17 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -3150,29 +3150,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; ->getClassDeclarationVariableId : (node: Identifier) => number ->node : Identifier ->Identifier : Identifier - - serializeTypeOfNode(node: Node): string | string[]; ->serializeTypeOfNode : (node: Node) => string | string[] + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] >node : Node >Node : Node - - serializeParameterTypesOfNode(node: Node): (string | string[])[]; ->serializeParameterTypesOfNode : (node: Node) => (string | string[])[] ->node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node >Node : Node - serializeReturnTypeOfNode(node: Node): string | string[]; ->serializeReturnTypeOfNode : (node: Node) => string | string[] + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] >node : Node >Node : Node ->>>>>>> Updated baselines +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 1459cf0f77..40abbad18c 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -995,13 +995,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; - serializeTypeOfNode(node: Node): string | string[]; - serializeParameterTypesOfNode(node: Node): (string | string[])[]; - serializeReturnTypeOfNode(node: Node): string | string[]; ->>>>>>> Updated baselines + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index f979f60b57..bb5dd76470 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -3296,29 +3296,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; ->getClassDeclarationVariableId : (node: Identifier) => number ->node : Identifier ->Identifier : Identifier - - serializeTypeOfNode(node: Node): string | string[]; ->serializeTypeOfNode : (node: Node) => string | string[] + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] >node : Node >Node : Node - - serializeParameterTypesOfNode(node: Node): (string | string[])[]; ->serializeParameterTypesOfNode : (node: Node) => (string | string[])[] ->node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node >Node : Node - serializeReturnTypeOfNode(node: Node): string | string[]; ->serializeReturnTypeOfNode : (node: Node) => string | string[] + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] >node : Node >Node : Node ->>>>>>> Updated baselines +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 7c59f94ca4..c108f5a341 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -996,13 +996,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; - serializeTypeOfNode(node: Node): string | string[]; - serializeParameterTypesOfNode(node: Node): (string | string[])[]; - serializeReturnTypeOfNode(node: Node): string | string[]; ->>>>>>> Updated baselines + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 004f179f28..280427efe8 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -3246,29 +3246,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; ->getClassDeclarationVariableId : (node: Identifier) => number ->node : Identifier ->Identifier : Identifier - - serializeTypeOfNode(node: Node): string | string[]; ->serializeTypeOfNode : (node: Node) => string | string[] + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] >node : Node >Node : Node - - serializeParameterTypesOfNode(node: Node): (string | string[])[]; ->serializeParameterTypesOfNode : (node: Node) => (string | string[])[] ->node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node >Node : Node - serializeReturnTypeOfNode(node: Node): string | string[]; ->serializeReturnTypeOfNode : (node: Node) => string | string[] + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] >node : Node >Node : Node ->>>>>>> Updated baselines +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 606bffdf77..e752b4e53f 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1033,13 +1033,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; - serializeTypeOfNode(node: Node): string | string[]; - serializeParameterTypesOfNode(node: Node): (string | string[])[]; - serializeReturnTypeOfNode(node: Node): string | string[]; ->>>>>>> Updated baselines + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 5170a0bd2b..c8d758fd86 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -3419,29 +3419,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier -<<<<<<< HEAD -======= - getClassDeclarationVariableId(node: Identifier): number; ->getClassDeclarationVariableId : (node: Identifier) => number ->node : Identifier ->Identifier : Identifier - - serializeTypeOfNode(node: Node): string | string[]; ->serializeTypeOfNode : (node: Node) => string | string[] + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] >node : Node >Node : Node - - serializeParameterTypesOfNode(node: Node): (string | string[])[]; ->serializeParameterTypesOfNode : (node: Node) => (string | string[])[] ->node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node >Node : Node - serializeReturnTypeOfNode(node: Node): string | string[]; ->serializeReturnTypeOfNode : (node: Node) => string | string[] + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] >node : Node >Node : Node ->>>>>>> Updated baselines +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index c5b0233bfb..eff31559ba 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClass1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec, __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index ee0fd6010b..b90db23abf 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -6,7 +6,6 @@ export class C { } //// [decoratorOnClass2.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,27 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec, __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); exports.C = C; diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 17f0c395b8..990adc775e 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -7,7 +7,6 @@ class C { } //// [decoratorOnClass3.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -21,26 +20,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec, __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index b530b477c1..89afb51bf7 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClass4.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec()], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec(), __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index c01463ace0..264397450a 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClass5.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec()], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec(), __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index 99ce993e95..87334f216a 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClass8.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - C = __decorate([dec()], C); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C = __decorate([dec(), __metadata('design:paramtypes', [])], C); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index 6065bad5dc..0aa6073c24 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassAccessor1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,19 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -43,10 +30,6 @@ var C = (function () { enumerable: true, configurable: true }); -<<<<<<< HEAD - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); -======= - __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index 6ba38de1b1..3349c73a2e 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassAccessor2.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,19 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -43,10 +30,6 @@ var C = (function () { enumerable: true, configurable: true }); -<<<<<<< HEAD - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); -======= - __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 5495d4d8f4..a236f893d6 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassAccessor4.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,19 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -42,10 +29,6 @@ var C = (function () { enumerable: true, configurable: true }); -<<<<<<< HEAD - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); -======= - __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index 6b4542b637..c127904250 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassAccessor5.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,19 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -42,10 +29,6 @@ var C = (function () { enumerable: true, configurable: true }); -<<<<<<< HEAD - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); -======= - __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index 232d687322..4f32240a4f 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -1,16 +1,11 @@ //// [decoratorOnClassConstructorParameter1.ts] -<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; -======= -declare function dec(target: Function, parameterIndex: number): void; ->>>>>>> Updated baselines class C { constructor(@dec p: number) {} } //// [decoratorOnClassConstructorParameter1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C(p) { } - __decorate([dec], C, void 0, 0); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function () { - function C(p) { - } - __decorate([dec, __metadata('design:type', Number)], C, 0); ->>>>>>> Updated baselines + __decorate([dec, __metadata('design:type', Number)], C, void 0, 0); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index afb8775f58..a9e5f2b9d6 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -1,16 +1,11 @@ //// [decoratorOnClassConstructorParameter4.ts] -<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; -======= -declare function dec(target: Function, parameterIndex: number): void; ->>>>>>> Updated baselines class C { constructor(public @dec p: number) {} } //// [decoratorOnClassConstructorParameter4.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C(public, p) { } - __decorate([dec], C, void 0, 1); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function () { - function C(public, p) { - } - __decorate([dec, __metadata('design:type', Number)], C, 1); ->>>>>>> Updated baselines + __decorate([dec, __metadata('design:type', Number)], C, void 0, 1); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index ece5d6320e..10fd030203 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,28 +19,12 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; -<<<<<<< HEAD - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); -======= - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index b8b60aa944..520b8f1ee0 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod10.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,28 +19,12 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; -<<<<<<< HEAD - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); -======= - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index 01f41e185f..30ff677eda 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod2.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,28 +19,12 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; -<<<<<<< HEAD - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); -======= - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 4f4227a23f..c670644ed6 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod4.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,31 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index a74536cc16..809461edc7 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod5.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,31 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec()], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 6f9c42a720..c954417e85 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod6.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,31 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 2ad1e43998..accc79d371 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod7.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,31 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index 2fd17798b2..60c9d73c82 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod8.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,28 +19,12 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; -<<<<<<< HEAD - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); -======= - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method"); ->>>>>>> Updated baselines + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index 171872ee28..e5452fd99e 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -1,16 +1,11 @@ //// [decoratorOnClassMethodParameter1.ts] -<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, parameterIndex: number): void; -======= -declare function dec(target: Function, parameterIndex: number): void; ->>>>>>> Updated baselines class C { method(@dec p: number) {} } //// [decoratorOnClassMethodParameter1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,28 +19,12 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; ->>>>>>> Updated baselines +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function (p) { }; -<<<<<<< HEAD - __decorate([dec], C.prototype, "method", 0); -======= - __decorate([dec, __metadata('design:type', Number)], C.prototype.method, 0); ->>>>>>> Updated baselines + __decorate([dec, __metadata('design:type', Number)], C.prototype, "method", 0); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index f9cfab7d65..c8c8132f7a 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -1,16 +1,11 @@ //// [decoratorOnClassProperty1.ts] -<<<<<<< HEAD declare function dec(target: any, propertyKey: string): void; -======= -declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor; ->>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty1.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index c7b3a56464..d53f0a2d5d 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -1,16 +1,11 @@ //// [decoratorOnClassProperty10.ts] -<<<<<<< HEAD declare function dec(): (target: any, propertyKey: string) => void; -======= -declare function dec(): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; ->>>>>>> Updated baselines class C { @dec() prop; } //// [decoratorOnClassProperty10.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec()], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec(), __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index d784eb56a8..8d31376b00 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -1,16 +1,11 @@ //// [decoratorOnClassProperty11.ts] -<<<<<<< HEAD declare function dec(): (target: any, propertyKey: string) => void; -======= -declare function dec(): (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; ->>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty11.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index 4968fce088..78c53b3eb3 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -1,16 +1,11 @@ //// [decoratorOnClassProperty2.ts] -<<<<<<< HEAD declare function dec(target: any, propertyKey: string): void; -======= -declare function dec(target: any, propertyKey: string, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor; ->>>>>>> Updated baselines class C { @dec public prop; } //// [decoratorOnClassProperty2.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index 2eaf977c7e..d1751ca315 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassProperty6.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -20,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index 72f08c988f..bc381ec5cf 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -1,16 +1,11 @@ //// [decoratorOnClassProperty7.ts] -<<<<<<< HEAD declare function dec(target: Function, propertyKey: string | symbol, paramIndex: number): void; -======= -declare function dec(target: Function, paramIndex: number): void; ->>>>>>> Updated baselines class C { @dec prop; } //// [decoratorOnClassProperty7.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -24,26 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var C = (function () { - function C() { - } - __decorate([dec], C.prototype, "prop"); -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); ->>>>>>> Updated baselines return C; })(); diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index 81ce9bc60f..eae494a440 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -68,6 +68,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var Greeter = (function () { function Greeter(greeting) { var b = []; @@ -93,15 +94,15 @@ var Greeter = (function () { configurable: true }); Greeter.x1 = 10; - Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); - __decorate([PropertyDecorator1, PropertyDecorator2(50)], Greeter.prototype, "x"); - __decorate([ParameterDecorator1, ParameterDecorator2(70)], Greeter.prototype, "fn", 0); - __decorate([ParameterDecorator1, ParameterDecorator2(90)], Greeter.prototype, "greetings", 0); - Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); - __decorate([PropertyDecorator1, PropertyDecorator2(60)], Greeter, "x1"); - __decorate([ParameterDecorator1, ParameterDecorator2(20)], Greeter, void 0, 0); - __decorate([ParameterDecorator1, ParameterDecorator2(30)], Greeter, void 0, 1); - Greeter = __decorate([ClassDecorator1, ClassDecorator2(10)], Greeter); + Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); + __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); + __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); + __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); + Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); + __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); + __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); + __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); + Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); return Greeter; })(); //# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 4cca04a1e3..f90ca15a23 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA,cAFJA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACfA,sBAACA,EAASA;IAOhBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACxBA,0BAACA,EAAQA;IAWTA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACxBA,iCAASA,EAAQA;IATnBA,sBAEIA,8BAASA,cAFZA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACnBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACRA,aAAEA,EAAcA;IArB7BA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACjBA,kBAAQA,EAAQA;IAEvBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACrBA,kBAACA,EAAUA;IAVpBA,sBAACA,eAAeA,EACfA,eAAeA,CAACA,EAAEA,CAACA,YA6CnBA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA,cAFJA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sHACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACfA,sBAACA,EAASA;IAOhBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,0BAACA,EAAQA;IAWTA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,iCAASA,EAAQA;IATnBA,sBAEIA,8BAASA,cAFZA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACnBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACRA,aAAEA,EAAcA;IArB7BA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACjBA,kBAAQA,EAAQA;IAEvBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,qCACrBA,kBAACA,EAAUA;IAVpBA,sBAACA,eAAeA,EACfA,eAAeA,CAACA,EAAEA,CAACA,+DA6CnBA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index c0b9d97e6f..bd57077959 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -21,6 +21,7 @@ sourceFile:sourceMapValidationDecorators.ts >>> } >>> return value; >>>}; +>>>var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; >>>var Greeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> @@ -32,7 +33,7 @@ sourceFile:sourceMapValidationDecorators.ts >declare function ParameterDecorator2(x: number): (target: Function, key: string | symbol, paramIndex: number) => void; > > -1 >Emitted(14, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(15, 1) Source(8, 1) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ @@ -47,9 +48,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(20) > public 3 > greeting: string -1->Emitted(15, 5) Source(11, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(15, 22) Source(14, 14) + SourceIndex(0) name (Greeter) -3 >Emitted(15, 30) Source(14, 30) + SourceIndex(0) name (Greeter) +1->Emitted(16, 5) Source(11, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(16, 22) Source(14, 14) + SourceIndex(0) name (Greeter) +3 >Emitted(16, 30) Source(14, 30) + SourceIndex(0) name (Greeter) --- >>> var b = []; 1 >^^^^^^^^ @@ -61,8 +62,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(16, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(16, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(17, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(17, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^ @@ -83,12 +84,12 @@ sourceFile:sourceMapValidationDecorators.ts 6 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1->Emitted(17, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(17, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(17, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(17, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(17, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(17, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(18, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(18, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(18, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(18, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(18, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +6 >Emitted(18, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> b[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^ @@ -97,8 +98,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(18, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(18, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(19, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(19, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> } >>> this.greeting = greeting; @@ -112,11 +113,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > 4 > greeting 5 > : string -1 >Emitted(20, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(20, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(20, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(20, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(20, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(21, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(21, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(21, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(21, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(21, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) --- >>> } 1 >^^^^ @@ -129,8 +130,8 @@ sourceFile:sourceMapValidationDecorators.ts > ...b: string[]) { > 2 > } -1 >Emitted(21, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(21, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(22, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(22, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -144,9 +145,9 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > greet 3 > -1->Emitted(22, 5) Source(23, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(22, 28) Source(23, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(22, 31) Source(21, 5) + SourceIndex(0) name (Greeter) +1->Emitted(23, 5) Source(23, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(23, 28) Source(23, 10) + SourceIndex(0) name (Greeter) +3 >Emitted(23, 31) Source(21, 5) + SourceIndex(0) name (Greeter) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -174,17 +175,17 @@ sourceFile:sourceMapValidationDecorators.ts 9 > + 10> "" 11> ; -1->Emitted(23, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(23, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) -3 >Emitted(23, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) -4 >Emitted(23, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) -5 >Emitted(23, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) -6 >Emitted(23, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) -7 >Emitted(23, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) -8 >Emitted(23, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) -9 >Emitted(23, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) -10>Emitted(23, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) -11>Emitted(23, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) +1->Emitted(24, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(24, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) +3 >Emitted(24, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) +4 >Emitted(24, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) +5 >Emitted(24, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) +6 >Emitted(24, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) +7 >Emitted(24, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) +8 >Emitted(24, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) +9 >Emitted(24, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) +10>Emitted(24, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) +11>Emitted(24, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) --- >>> }; 1 >^^^^ @@ -193,8 +194,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(24, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(24, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) +1 >Emitted(25, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(25, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) --- >>> Greeter.prototype.fn = function (x) { 1->^^^^ @@ -220,11 +221,11 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(70) > 5 > x: number -1->Emitted(25, 5) Source(35, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(25, 25) Source(35, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(25, 28) Source(35, 5) + SourceIndex(0) name (Greeter) -4 >Emitted(25, 38) Source(38, 7) + SourceIndex(0) name (Greeter) -5 >Emitted(25, 39) Source(38, 16) + SourceIndex(0) name (Greeter) +1->Emitted(26, 5) Source(35, 13) + SourceIndex(0) name (Greeter) +2 >Emitted(26, 25) Source(35, 15) + SourceIndex(0) name (Greeter) +3 >Emitted(26, 28) Source(35, 5) + SourceIndex(0) name (Greeter) +4 >Emitted(26, 38) Source(38, 7) + SourceIndex(0) name (Greeter) +5 >Emitted(26, 39) Source(38, 16) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1 >^^^^^^^^ @@ -242,13 +243,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1 >Emitted(26, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(26, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) -3 >Emitted(26, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) -4 >Emitted(26, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) -5 >Emitted(26, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) -6 >Emitted(26, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) -7 >Emitted(26, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(27, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(27, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) +3 >Emitted(27, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) +4 >Emitted(27, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) +5 >Emitted(27, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) +6 >Emitted(27, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) +7 >Emitted(27, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) --- >>> }; 1 >^^^^ @@ -257,8 +258,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(27, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(27, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(28, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(28, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -271,15 +272,15 @@ sourceFile:sourceMapValidationDecorators.ts > @PropertyDecorator2(80) > get 3 > greetings -1->Emitted(28, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(28, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(28, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +1->Emitted(29, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(29, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(29, 57) Source(44, 18) + SourceIndex(0) name (Greeter) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(29, 14) Source(42, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(30, 14) Source(42, 5) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -299,13 +300,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1->Emitted(30, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(30, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(30, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(30, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(30, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(30, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(30, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(31, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(31, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(31, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(31, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(31, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(31, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(31, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -314,8 +315,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(31, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(31, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(32, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(32, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -330,9 +331,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(90) > 3 > greetings: string -1->Emitted(32, 14) Source(48, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(32, 24) Source(51, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(32, 33) Source(51, 24) + SourceIndex(0) name (Greeter) +1->Emitted(33, 14) Source(48, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(33, 24) Source(51, 7) + SourceIndex(0) name (Greeter) +3 >Emitted(33, 33) Source(51, 24) + SourceIndex(0) name (Greeter) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -350,13 +351,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > = 6 > greetings 7 > ; -1->Emitted(33, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(33, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(33, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(33, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(33, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(33, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(33, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(34, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(34, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(34, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(34, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(34, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(34, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(34, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -365,8 +366,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(34, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(34, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(35, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(35, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> enumerable: true, >>> configurable: true @@ -374,7 +375,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^^-> 1-> -1->Emitted(37, 8) Source(46, 6) + SourceIndex(0) name (Greeter) +1->Emitted(38, 8) Source(46, 6) + SourceIndex(0) name (Greeter) --- >>> Greeter.x1 = 10; 1->^^^^ @@ -382,19 +383,19 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > x1 3 > : number = 4 > 10 5 > ; -1->Emitted(38, 5) Source(33, 20) + SourceIndex(0) name (Greeter) -2 >Emitted(38, 15) Source(33, 22) + SourceIndex(0) name (Greeter) -3 >Emitted(38, 18) Source(33, 33) + SourceIndex(0) name (Greeter) -4 >Emitted(38, 20) Source(33, 35) + SourceIndex(0) name (Greeter) -5 >Emitted(38, 21) Source(33, 36) + SourceIndex(0) name (Greeter) +1->Emitted(39, 5) Source(33, 20) + SourceIndex(0) name (Greeter) +2 >Emitted(39, 15) Source(33, 22) + SourceIndex(0) name (Greeter) +3 >Emitted(39, 18) Source(33, 33) + SourceIndex(0) name (Greeter) +4 >Emitted(39, 20) Source(33, 35) + SourceIndex(0) name (Greeter) +5 >Emitted(39, 21) Source(33, 36) + SourceIndex(0) name (Greeter) --- ->>> Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); +>>> Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -405,11 +406,11 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ^ 9 > ^^ 10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^ 1-> 2 > @PropertyDecorator1 > @PropertyDecorator2(40) @@ -425,29 +426,29 @@ sourceFile:sourceMapValidationDecorators.ts 10> ) 11> > -12> greet -13> -14> greet -15> () { - > return "

" + this.greeting + "

"; - > } -1->Emitted(39, 5) Source(21, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(39, 27) Source(23, 5) + SourceIndex(0) name (Greeter) -3 >Emitted(39, 53) Source(23, 10) + SourceIndex(0) name (Greeter) -4 >Emitted(39, 67) Source(21, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(39, 85) Source(21, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(39, 87) Source(22, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(39, 105) Source(22, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(39, 106) Source(22, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(39, 108) Source(22, 27) + SourceIndex(0) name (Greeter) -10>Emitted(39, 109) Source(22, 28) + SourceIndex(0) name (Greeter) -11>Emitted(39, 112) Source(23, 5) + SourceIndex(0) name (Greeter) -12>Emitted(39, 138) Source(23, 10) + SourceIndex(0) name (Greeter) -13>Emitted(39, 172) Source(23, 5) + SourceIndex(0) name (Greeter) -14>Emitted(39, 198) Source(23, 10) + SourceIndex(0) name (Greeter) -15>Emitted(39, 202) Source(25, 6) + SourceIndex(0) name (Greeter) +12> greet +13> +14> greet +15> () { + > return "

" + this.greeting + "

"; + > } +1->Emitted(40, 5) Source(21, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(40, 27) Source(23, 5) + SourceIndex(0) name (Greeter) +3 >Emitted(40, 53) Source(23, 10) + SourceIndex(0) name (Greeter) +4 >Emitted(40, 67) Source(21, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(40, 85) Source(21, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(40, 87) Source(22, 6) + SourceIndex(0) name (Greeter) +7 >Emitted(40, 105) Source(22, 24) + SourceIndex(0) name (Greeter) +8 >Emitted(40, 106) Source(22, 25) + SourceIndex(0) name (Greeter) +9 >Emitted(40, 108) Source(22, 27) + SourceIndex(0) name (Greeter) +10>Emitted(40, 109) Source(22, 28) + SourceIndex(0) name (Greeter) +11>Emitted(40, 227) Source(23, 5) + SourceIndex(0) name (Greeter) +12>Emitted(40, 253) Source(23, 10) + SourceIndex(0) name (Greeter) +13>Emitted(40, 287) Source(23, 5) + SourceIndex(0) name (Greeter) +14>Emitted(40, 313) Source(23, 10) + SourceIndex(0) name (Greeter) +15>Emitted(40, 317) Source(25, 6) + SourceIndex(0) name (Greeter) --- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(50)], Greeter.prototype, "x"); +>>> __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); 1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^ @@ -456,10 +457,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^-> 1 > > > @@ -473,21 +474,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > private -10> x -11> : string; -1 >Emitted(40, 5) Source(27, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(40, 17) Source(27, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(40, 35) Source(27, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(40, 37) Source(28, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(40, 55) Source(28, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(40, 56) Source(28, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(40, 58) Source(28, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(40, 59) Source(28, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(40, 62) Source(29, 13) + SourceIndex(0) name (Greeter) -10>Emitted(40, 84) Source(29, 14) + SourceIndex(0) name (Greeter) -11>Emitted(40, 86) Source(29, 23) + SourceIndex(0) name (Greeter) +10> x +11> : string; +1 >Emitted(41, 5) Source(27, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(41, 17) Source(27, 6) + SourceIndex(0) name (Greeter) +3 >Emitted(41, 35) Source(27, 24) + SourceIndex(0) name (Greeter) +4 >Emitted(41, 37) Source(28, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(41, 55) Source(28, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(41, 56) Source(28, 25) + SourceIndex(0) name (Greeter) +7 >Emitted(41, 58) Source(28, 27) + SourceIndex(0) name (Greeter) +8 >Emitted(41, 59) Source(28, 28) + SourceIndex(0) name (Greeter) +9 >Emitted(41, 97) Source(29, 13) + SourceIndex(0) name (Greeter) +10>Emitted(41, 119) Source(29, 14) + SourceIndex(0) name (Greeter) +11>Emitted(41, 121) Source(29, 23) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(70)], Greeter.prototype, "fn", 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -496,10 +497,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^-> 1-> > > @PropertyDecorator1 @@ -518,21 +519,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > -10> x -11> : number -1->Emitted(41, 5) Source(36, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(41, 17) Source(36, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(41, 36) Source(36, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(41, 38) Source(37, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(41, 57) Source(37, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(41, 58) Source(37, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(41, 60) Source(37, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(41, 61) Source(37, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(41, 64) Source(38, 7) + SourceIndex(0) name (Greeter) -10>Emitted(41, 90) Source(38, 8) + SourceIndex(0) name (Greeter) -11>Emitted(41, 92) Source(38, 16) + SourceIndex(0) name (Greeter) +10> x +11> : number +1->Emitted(42, 5) Source(36, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(42, 17) Source(36, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(42, 36) Source(36, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(42, 38) Source(37, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(42, 57) Source(37, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(42, 58) Source(37, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(42, 60) Source(37, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(42, 61) Source(37, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(42, 99) Source(38, 7) + SourceIndex(0) name (Greeter) +10>Emitted(42, 125) Source(38, 8) + SourceIndex(0) name (Greeter) +11>Emitted(42, 127) Source(38, 16) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(90)], Greeter.prototype, "greetings", 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -541,10 +542,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->) { > return this.greeting; > } @@ -567,21 +568,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > -10> greetings -11> : string -1->Emitted(42, 5) Source(49, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(42, 17) Source(49, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(42, 36) Source(49, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(42, 38) Source(50, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(42, 57) Source(50, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(42, 58) Source(50, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(42, 60) Source(50, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(42, 61) Source(50, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(42, 64) Source(51, 7) + SourceIndex(0) name (Greeter) -10>Emitted(42, 97) Source(51, 16) + SourceIndex(0) name (Greeter) -11>Emitted(42, 99) Source(51, 24) + SourceIndex(0) name (Greeter) +10> greetings +11> : string +1->Emitted(43, 5) Source(49, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(43, 17) Source(49, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(43, 36) Source(49, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(43, 38) Source(50, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(43, 57) Source(50, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(43, 58) Source(50, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(43, 60) Source(50, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(43, 61) Source(50, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(43, 99) Source(51, 7) + SourceIndex(0) name (Greeter) +10>Emitted(43, 132) Source(51, 16) + SourceIndex(0) name (Greeter) +11>Emitted(43, 134) Source(51, 24) + SourceIndex(0) name (Greeter) --- ->>> Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); +>>> Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -592,11 +593,11 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ^ 9 > ^^ 10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^ 1-> 2 > @PropertyDecorator1 > @PropertyDecorator2(80) @@ -612,29 +613,29 @@ sourceFile:sourceMapValidationDecorators.ts 10> ) 11> > get -12> greetings -13> -14> greetings -15> () { - > return this.greeting; - > } -1->Emitted(43, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(43, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(43, 57) Source(44, 18) + SourceIndex(0) name (Greeter) -4 >Emitted(43, 71) Source(42, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(43, 89) Source(42, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(43, 91) Source(43, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(43, 109) Source(43, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(43, 110) Source(43, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(43, 112) Source(43, 27) + SourceIndex(0) name (Greeter) -10>Emitted(43, 113) Source(43, 28) + SourceIndex(0) name (Greeter) -11>Emitted(43, 116) Source(44, 9) + SourceIndex(0) name (Greeter) -12>Emitted(43, 146) Source(44, 18) + SourceIndex(0) name (Greeter) -13>Emitted(43, 180) Source(44, 9) + SourceIndex(0) name (Greeter) -14>Emitted(43, 210) Source(44, 18) + SourceIndex(0) name (Greeter) -15>Emitted(43, 214) Source(46, 6) + SourceIndex(0) name (Greeter) +12> greetings +13> +14> greetings +15> () { + > return this.greeting; + > } +1->Emitted(44, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(44, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(44, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +4 >Emitted(44, 71) Source(42, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(44, 89) Source(42, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(44, 91) Source(43, 6) + SourceIndex(0) name (Greeter) +7 >Emitted(44, 109) Source(43, 24) + SourceIndex(0) name (Greeter) +8 >Emitted(44, 110) Source(43, 25) + SourceIndex(0) name (Greeter) +9 >Emitted(44, 112) Source(43, 27) + SourceIndex(0) name (Greeter) +10>Emitted(44, 113) Source(43, 28) + SourceIndex(0) name (Greeter) +11>Emitted(44, 151) Source(44, 9) + SourceIndex(0) name (Greeter) +12>Emitted(44, 181) Source(44, 18) + SourceIndex(0) name (Greeter) +13>Emitted(44, 215) Source(44, 9) + SourceIndex(0) name (Greeter) +14>Emitted(44, 245) Source(44, 18) + SourceIndex(0) name (Greeter) +15>Emitted(44, 249) Source(46, 6) + SourceIndex(0) name (Greeter) --- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(60)], Greeter, "x1"); +>>> __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); 1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^ @@ -643,10 +644,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^-> 1 > 2 > @ 3 > PropertyDecorator1 @@ -658,21 +659,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > private static -10> x1 -11> : number = 10; -1 >Emitted(44, 5) Source(31, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(44, 17) Source(31, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(44, 35) Source(31, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(44, 37) Source(32, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(44, 55) Source(32, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(44, 56) Source(32, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(44, 58) Source(32, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(44, 59) Source(32, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(44, 62) Source(33, 20) + SourceIndex(0) name (Greeter) -10>Emitted(44, 75) Source(33, 22) + SourceIndex(0) name (Greeter) -11>Emitted(44, 77) Source(33, 36) + SourceIndex(0) name (Greeter) +10> x1 +11> : number = 10; +1 >Emitted(45, 5) Source(31, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(45, 17) Source(31, 6) + SourceIndex(0) name (Greeter) +3 >Emitted(45, 35) Source(31, 24) + SourceIndex(0) name (Greeter) +4 >Emitted(45, 37) Source(32, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(45, 55) Source(32, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(45, 56) Source(32, 25) + SourceIndex(0) name (Greeter) +7 >Emitted(45, 58) Source(32, 27) + SourceIndex(0) name (Greeter) +8 >Emitted(45, 59) Source(32, 28) + SourceIndex(0) name (Greeter) +9 >Emitted(45, 97) Source(33, 20) + SourceIndex(0) name (Greeter) +10>Emitted(45, 110) Source(33, 22) + SourceIndex(0) name (Greeter) +11>Emitted(45, 112) Source(33, 36) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(20)], Greeter, void 0, 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -681,10 +682,9 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^ +11> ^^ 1-> 2 > @ 3 > ParameterDecorator1 @@ -696,22 +696,22 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > public -10> greeting -11> : string -1->Emitted(45, 5) Source(12, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(45, 17) Source(12, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(45, 36) Source(12, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(45, 38) Source(13, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(45, 57) Source(13, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(45, 58) Source(13, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(45, 60) Source(13, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(45, 61) Source(13, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(45, 64) Source(14, 14) + SourceIndex(0) name (Greeter) -10>Emitted(45, 82) Source(14, 22) + SourceIndex(0) name (Greeter) -11>Emitted(45, 84) Source(14, 30) + SourceIndex(0) name (Greeter) +10> greeting +11> : string +1->Emitted(46, 5) Source(12, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(46, 17) Source(12, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(46, 36) Source(12, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(46, 38) Source(13, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(46, 57) Source(13, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(46, 58) Source(13, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(46, 60) Source(13, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(46, 61) Source(13, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(46, 99) Source(14, 14) + SourceIndex(0) name (Greeter) +10>Emitted(46, 117) Source(14, 22) + SourceIndex(0) name (Greeter) +11>Emitted(46, 119) Source(14, 30) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(30)], Greeter, void 0, 1); -1->^^^^ +>>> __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); +1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ 4 > ^^ @@ -719,10 +719,11 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -1->, +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^-> +1 >, > > 2 > @ @@ -735,22 +736,22 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > ... -10> b -11> : string[] -1->Emitted(46, 5) Source(16, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(46, 17) Source(16, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(46, 36) Source(16, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(46, 38) Source(17, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(46, 57) Source(17, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(46, 58) Source(17, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(46, 60) Source(17, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(46, 61) Source(17, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(46, 64) Source(18, 10) + SourceIndex(0) name (Greeter) -10>Emitted(46, 82) Source(18, 11) + SourceIndex(0) name (Greeter) -11>Emitted(46, 84) Source(18, 21) + SourceIndex(0) name (Greeter) +10> b +11> : string[] +1 >Emitted(47, 5) Source(16, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(47, 17) Source(16, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(47, 36) Source(16, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(47, 38) Source(17, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(47, 57) Source(17, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(47, 58) Source(17, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(47, 60) Source(17, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(47, 61) Source(17, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(47, 98) Source(18, 10) + SourceIndex(0) name (Greeter) +10>Emitted(47, 116) Source(18, 11) + SourceIndex(0) name (Greeter) +11>Emitted(47, 118) Source(18, 21) + SourceIndex(0) name (Greeter) --- ->>> Greeter = __decorate([ClassDecorator1, ClassDecorator2(10)], Greeter); -1 >^^^^ +>>> Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); +1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^ 4 > ^^ @@ -758,8 +759,8 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^^^^^^^^^ -1 > +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> 2 > @ 3 > ClassDecorator1 4 > @@ -814,23 +815,23 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(47, 5) Source(8, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(47, 27) Source(8, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(47, 42) Source(8, 17) + SourceIndex(0) name (Greeter) -4 >Emitted(47, 44) Source(9, 2) + SourceIndex(0) name (Greeter) -5 >Emitted(47, 59) Source(9, 17) + SourceIndex(0) name (Greeter) -6 >Emitted(47, 60) Source(9, 18) + SourceIndex(0) name (Greeter) -7 >Emitted(47, 62) Source(9, 20) + SourceIndex(0) name (Greeter) -8 >Emitted(47, 63) Source(9, 21) + SourceIndex(0) name (Greeter) -9 >Emitted(47, 75) Source(54, 2) + SourceIndex(0) name (Greeter) +1->Emitted(48, 5) Source(8, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(48, 27) Source(8, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(48, 42) Source(8, 17) + SourceIndex(0) name (Greeter) +4 >Emitted(48, 44) Source(9, 2) + SourceIndex(0) name (Greeter) +5 >Emitted(48, 59) Source(9, 17) + SourceIndex(0) name (Greeter) +6 >Emitted(48, 60) Source(9, 18) + SourceIndex(0) name (Greeter) +7 >Emitted(48, 62) Source(9, 20) + SourceIndex(0) name (Greeter) +8 >Emitted(48, 63) Source(9, 21) + SourceIndex(0) name (Greeter) +9 >Emitted(48, 126) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>> return Greeter; 1 >^^^^ 2 > ^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(48, 5) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(48, 19) Source(54, 2) + SourceIndex(0) name (Greeter) +1 >Emitted(49, 5) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(49, 19) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>>})(); 1 > @@ -888,9 +889,9 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(49, 1) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(49, 2) Source(54, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(49, 2) Source(8, 1) + SourceIndex(0) -4 >Emitted(49, 6) Source(54, 2) + SourceIndex(0) +1 >Emitted(50, 1) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(50, 2) Source(54, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(50, 2) Source(8, 1) + SourceIndex(0) +4 >Emitted(50, 6) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file From 9aa3af83bc68b639e18be9d286fbcc8357cdef15 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 17 Mar 2015 14:57:21 -0700 Subject: [PATCH 04/16] Type serialization for decorators --- src/compiler/checker.ts | 188 ++++++++++++++++++++++++++++++++++++++++ src/compiler/emitter.ts | 3 +- 2 files changed, 190 insertions(+), 1 deletion(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c9564927f5..ae63db496c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -2996,6 +2996,16 @@ module ts { return getSignaturesOfObjectOrUnionType(getApparentType(type), kind); } + function typeHasCallOrConstructSignatures(type: Type): boolean { + let apparentType = getApparentType(type); + if (apparentType.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { + let resolved = resolveObjectOrUnionTypeMembers(type); + return resolved.callSignatures.length > 0 + || resolved.constructSignatures.length > 0; + } + return false; + } + function getIndexTypeOfObjectOrUnionType(type: Type, kind: IndexKind): Type { if (type.flags & (TypeFlags.ObjectType | TypeFlags.Union)) { let resolved = resolveObjectOrUnionTypeMembers(type); @@ -11445,6 +11455,184 @@ module ts { return undefined; } + /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeEntityName(node: EntityName, getGeneratedNameForNode: (Node: Node) => string, fallbackPath?: string[]): string { + if (node.kind === SyntaxKind.Identifier) { + var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); + var text = substitution || (node).text; + if (fallbackPath) { + fallbackPath.push(text); + } + else { + return text; + } + } + else { + var left = serializeEntityName((node).left, getGeneratedNameForNode, fallbackPath); + var right = serializeEntityName((node).right, getGeneratedNameForNode, fallbackPath); + if (!fallbackPath) { + return left + "." + right; + } + } + } + + /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeTypeReferenceNode(node: TypeReferenceNode, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of a TypeReferenceNode uses the following rules: + // + // * The serialized type of a TypeReference that is `void` is "void 0". + // * The serialized type of a TypeReference that is a `boolean` is "Boolean". + // * The serialized type of a TypeReference that is an enum or `number` is "Number". + // * The serialized type of a TypeReference that is a string literal or `string` is "String". + // * The serialized type of a TypeReference that is a tuple is "Array". + // * The serialized type of a TypeReference that is a `symbol` is "Symbol". + // * The serialized type of a TypeReference with a value declaration is its entity name. + // * The serialized type of a TypeReference with a call or construct signature is "Function". + // * The serialized type of any other type is "Object". + let type = getTypeFromTypeReferenceNode(node); + if (type.flags & TypeFlags.Void) { + return "void 0"; + } + else if (type.flags & TypeFlags.Boolean) { + return "Boolean"; + } + else if (type.flags & TypeFlags.NumberLike) { + return "Number"; + } + else if (type.flags & TypeFlags.StringLike) { + return "String"; + } + else if (type.flags & TypeFlags.Tuple) { + return "Array"; + } + else if (type.flags & TypeFlags.ESSymbol) { + return "Symbol"; + } + else if (type.symbol.valueDeclaration) { + return serializeEntityName(node.typeName, getGeneratedNameForNode); + } + else if (typeHasCallOrConstructSignatures(type)) { + return "Function"; + } + else if (type === unknownType) { + var fallbackPath: string[] = []; + serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath); + return fallbackPath; + } + + return "Object"; + } + + /** Serializes a TypeNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + function serializeTypeNode(node: TypeNode | LiteralExpression, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of a TypeNode uses the following rules: + // + // * The serialized type of `void` is "void 0" (undefined). + // * The serialized type of a parenthesized type is the serialized type of its nested type. + // * The serialized type of a Function or Constructor type is "Function". + // * The serialized type of an Array or Tuple type is "Array". + // * The serialized type of `boolean` is "Boolean". + // * The serialized type of `string` or a string-literal type is "String". + // * The serialized type of a type reference is handled by `serializeTypeReferenceNode`. + // * The serialized type of any other type node is "Object". + if (node) { + switch (node.kind) { + case SyntaxKind.VoidKeyword: + return "void 0"; + case SyntaxKind.ParenthesizedType: + return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.FunctionType: + case SyntaxKind.ConstructorType: + return "Function"; + case SyntaxKind.ArrayType: + case SyntaxKind.TupleType: + return "Array"; + case SyntaxKind.BooleanKeyword: + return "Boolean"; + case SyntaxKind.StringKeyword: + case SyntaxKind.StringLiteral: + return "String"; + case SyntaxKind.NumberKeyword: + return "Number"; + case SyntaxKind.TypeReference: + return serializeTypeReferenceNode(node, getGeneratedNameForNode); + case SyntaxKind.TypeQuery: + case SyntaxKind.TypeLiteral: + case SyntaxKind.UnionType: + case SyntaxKind.AnyKeyword: + default: + break; + } + } + + return "Object"; + } + + /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the `@type` and `@paramtypes` decorators. */ + function serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + // serialization of the type of a declaration uses the following rules: + // + // * The serialized type of a ClassDeclaration is the class name (see serializeEntityName). + // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. + // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. + // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. + // * The serialized type of any other FunctionLikeDeclaration is "Function". + // * The serialized type of any other node is "void 0". + // + // For rules on serializing type annotations, see `serializeTypeNode`. + switch (node.kind) { + case SyntaxKind.ClassDeclaration: return serializeEntityName((node).name, getGeneratedNameForNode); + case SyntaxKind.PropertyDeclaration: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.Parameter: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.GetAccessor: return serializeTypeNode((node).type, getGeneratedNameForNode); + case SyntaxKind.SetAccessor: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node), getGeneratedNameForNode); + } + if (isFunctionLike(node)) { + return "Function"; + } + return "void 0"; + } + + /** Serializes the parameter types of a function or the constructor of a class. Used by the `@paramtypes` decorator. */ + function serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[] { + // serialization of parameter types uses the following rules: + // + // * If the declaration is a class, the parameters of the first constructor with a body are used. + // * If the declaration is function-like and has a body, the parameters of the function are used. + // + // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. + if (node) { + var valueDeclaration: FunctionLikeDeclaration; + if (node.kind === SyntaxKind.ClassDeclaration) { + valueDeclaration = getFirstConstructorWithBody(node); + } + else if (isFunctionLike(node) && nodeIsPresent((node).body)) { + valueDeclaration = node; + } + if (valueDeclaration) { + var result: (string | string[])[]; + var parameters = valueDeclaration.parameters; + var parameterCount = parameters.length; + if (parameterCount > 0) { + result = new Array(parameterCount); + for (var i = 0; i < parameterCount; i++) { + result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + } + return result; + } + } + } + return emptyArray; + } + + /** Serializes the return type of function. Used by the `@returntype` decorator. */ + function serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { + if (node && isFunctionLike(node)) { + return serializeTypeNode((node).type, getGeneratedNameForNode); + } + return "void 0"; + } + function writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { // Get type of the symbol if this is the valid symbol otherwise get type at location let symbol = getSymbolOfNode(declaration); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6ec4ea2389..32a303be68 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -4581,7 +4581,8 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } } return value; -};`); +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } };`); decorateEmitted = true; } if (isExternalModule(node)) { From 2b78424fd46b54df48d24c556eb8f72d853fe549 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 17 Mar 2015 17:09:39 -0700 Subject: [PATCH 05/16] Updated baselines --- src/compiler/checker.ts | 85 +- src/compiler/emitter.ts | 98 +- src/compiler/types.ts | 3 + src/lib/es6.d.ts | 36 +- .../baselines/reference/APISample_compile.js | 3 + .../reference/APISample_compile.types | 24 + tests/baselines/reference/APISample_linter.js | 3 + .../reference/APISample_linter.types | 24 + .../reference/APISample_linter.types.pull | 6433 ----------------- .../reference/APISample_transform.js | 3 + .../reference/APISample_transform.types | 24 + .../baselines/reference/APISample_watcher.js | 3 + .../reference/APISample_watcher.types | 24 + .../baselines/reference/decoratorOnClass1.js | 3 +- .../baselines/reference/decoratorOnClass2.js | 3 +- .../baselines/reference/decoratorOnClass3.js | 3 +- .../baselines/reference/decoratorOnClass4.js | 3 +- .../baselines/reference/decoratorOnClass5.js | 3 +- .../baselines/reference/decoratorOnClass8.js | 3 +- .../reference/decoratorOnClassAccessor1.js | 3 +- .../reference/decoratorOnClassAccessor2.js | 3 +- .../reference/decoratorOnClassAccessor4.js | 3 +- .../reference/decoratorOnClassAccessor5.js | 3 +- .../decoratorOnClassConstructorParameter1.js | 3 +- .../decoratorOnClassConstructorParameter4.js | 3 +- .../reference/decoratorOnClassMethod1.js | 3 +- .../reference/decoratorOnClassMethod10.js | 3 +- .../reference/decoratorOnClassMethod2.js | 3 +- .../reference/decoratorOnClassMethod4.js | 3 +- .../reference/decoratorOnClassMethod5.js | 3 +- .../reference/decoratorOnClassMethod6.js | 3 +- .../reference/decoratorOnClassMethod7.js | 3 +- .../reference/decoratorOnClassMethod8.js | 3 +- .../decoratorOnClassMethodParameter1.js | 3 +- .../reference/decoratorOnClassProperty1.js | 3 +- .../reference/decoratorOnClassProperty10.js | 3 +- .../reference/decoratorOnClassProperty11.js | 3 +- .../reference/decoratorOnClassProperty2.js | 3 +- .../reference/decoratorOnClassProperty6.js | 3 +- .../reference/decoratorOnClassProperty7.js | 3 +- .../sourceMapValidationDecorators.js | 19 +- .../sourceMapValidationDecorators.js.map | 2 +- ...ourceMapValidationDecorators.sourcemap.txt | 531 +- 43 files changed, 625 insertions(+), 6771 deletions(-) delete mode 100644 tests/baselines/reference/APISample_linter.types.pull diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ae63db496c..79ee84059e 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8744,6 +8744,41 @@ module ts { } } + /** Checks a type reference node as an expression. */ + function checkTypeNodeAsExpression(node: TypeNode | LiteralExpression) { + if (node && node.kind === SyntaxKind.TypeReference) { + var type = getTypeFromTypeNodeOrHeritageClauseElement(node); + if (!type || type.flags & (TypeFlags.Intrinsic | TypeFlags.NumberLike | TypeFlags.StringLike)) { + return; + } + if (type.symbol.valueDeclaration) { + checkExpressionOrQualifiedName((node).typeName); + } + } + } + + /** + * Checks the type annotation of an accessor declaration or property declaration as + * an expression if it is a type reference to a type with a value declaration. + */ + function checkTypeAnnotationAsExpression(node: AccessorDeclaration | PropertyDeclaration | ParameterDeclaration | MethodDeclaration) { + switch (node.kind) { + case SyntaxKind.PropertyDeclaration: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.Parameter: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.MethodDeclaration: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.GetAccessor: return checkTypeNodeAsExpression((node).type); + case SyntaxKind.SetAccessor: return checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); + } + } + + /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ + function checkParameterTypeAnnotationsAsExpressions(node: FunctionLikeDeclaration) { + // ensure all type annotations with a value declaration are checked as an expression + if (node) { + forEach(node.parameters, checkTypeAnnotationAsExpression); + } + } + /** Check the decorators of a node */ function checkDecorators(node: Node): void { if (!node.decorators) { @@ -8752,18 +8787,28 @@ module ts { switch (node.kind) { case SyntaxKind.ClassDeclaration: + var constructor = getFirstConstructorWithBody(node); + if (constructor) { + checkParameterTypeAnnotationsAsExpressions(constructor); + } + break; + case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: + checkParameterTypeAnnotationsAsExpressions(node); + // fall-through + case SyntaxKind.SetAccessor: + case SyntaxKind.GetAccessor: case SyntaxKind.PropertyDeclaration: case SyntaxKind.Parameter: - emitDecorate = true; + checkTypeAnnotationAsExpression(node); break; default: return; } + emitDecorate = true; forEach(node.decorators, checkDecorator); } @@ -11489,7 +11534,7 @@ module ts { // * The serialized type of a TypeReference with a value declaration is its entity name. // * The serialized type of a TypeReference with a call or construct signature is "Function". // * The serialized type of any other type is "Object". - let type = getTypeFromTypeReferenceNode(node); + let type = getTypeFromTypeReference(node); if (type.flags & TypeFlags.Void) { return "void 0"; } @@ -11508,17 +11553,17 @@ module ts { else if (type.flags & TypeFlags.ESSymbol) { return "Symbol"; } - else if (type.symbol.valueDeclaration) { - return serializeEntityName(node.typeName, getGeneratedNameForNode); - } - else if (typeHasCallOrConstructSignatures(type)) { - return "Function"; - } else if (type === unknownType) { var fallbackPath: string[] = []; serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath); return fallbackPath; } + else if (type.symbol && type.symbol.valueDeclaration) { + return serializeEntityName(node.typeName, getGeneratedNameForNode); + } + else if (typeHasCallOrConstructSignatures(type)) { + return "Function"; + } return "Object"; } @@ -11581,7 +11626,7 @@ module ts { // // For rules on serializing type annotations, see `serializeTypeNode`. switch (node.kind) { - case SyntaxKind.ClassDeclaration: return serializeEntityName((node).name, getGeneratedNameForNode); + case SyntaxKind.ClassDeclaration: return "Function"; case SyntaxKind.PropertyDeclaration: return serializeTypeNode((node).type, getGeneratedNameForNode); case SyntaxKind.Parameter: return serializeTypeNode((node).type, getGeneratedNameForNode); case SyntaxKind.GetAccessor: return serializeTypeNode((node).type, getGeneratedNameForNode); @@ -11616,7 +11661,22 @@ module ts { if (parameterCount > 0) { result = new Array(parameterCount); for (var i = 0; i < parameterCount; i++) { - result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + if (parameters[i].dotDotDotToken) { + var parameterType = parameters[i].type; + if (parameterType.kind === SyntaxKind.ArrayType) { + parameterType = (parameterType).elementType; + } + else if (parameterType.kind === SyntaxKind.TypeReference && (parameterType).typeArguments && (parameterType).typeArguments.length === 1) { + parameterType = (parameterType).typeArguments[0]; + } + else { + parameterType = undefined; + } + result[i] = serializeTypeNode(parameterType, getGeneratedNameForNode); + } + else { + result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); + } } return result; } @@ -11720,6 +11780,9 @@ module ts { resolvesToSomeValue, collectLinkedAliases, getBlockScopedVariableId, + serializeTypeOfNode, + serializeParameterTypesOfNode, + serializeReturnTypeOfNode, }; } diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 32a303be68..68705a0b81 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1108,9 +1108,7 @@ module ts { return; } - let generatedVariable = createTempVariable(TempFlags.Auto); - generatedName = generatedVariable.text; - recordTempDeclaration(generatedVariable); + generatedName = createAndRecordTempVariable(TempFlags.Auto).text; computedPropertyNamesToGeneratedNames[node.id] = generatedName; write(generatedName); write(" = "); @@ -3723,7 +3721,7 @@ module ts { emitStart(node); emitDeclarationName(node); write(" = "); - emitDecorateStart(node.decorators); + emitDecorateStart(node); emitDeclarationName(node); write(");"); emitEnd(node); @@ -3811,7 +3809,7 @@ module ts { write(", "); } - emitDecorateStart(decorators); + emitDecorateStart(member); emitStart(member.name); emitClassMemberPrefix(node, member); write(", "); @@ -3863,7 +3861,7 @@ module ts { writeLine(); emitStart(parameter); - emitDecorateStart(parameter.decorators); + emitDecorateStart(parameter); emitStart(parameter.name); if (member.kind === SyntaxKind.Constructor) { @@ -3885,8 +3883,9 @@ module ts { }); } - function emitDecorateStart(decorators: Decorator[]): void { + function emitDecorateStart(node: Declaration): void { write("__decorate(["); + let decorators = node.decorators; let decoratorCount = decorators.length; for (let i = 0; i < decoratorCount; i++) { if (i > 0) { @@ -3897,9 +3896,94 @@ module ts { emit(decorator.expression); emitEnd(decorator); } + emitSerializedTypeMetadata(node); write("], "); } + function formatPathSegment(location: Node, path: string[], index: number): string { + switch (index) { + case 0: + return `typeof ${path[index]} !== 'undefined' && ${path[index]}`; + case 1: + return `${formatPathSegment(location, path, index - 1) }.${path[index]}`; + default: + let temp = createAndRecordTempVariable(TempFlags.Auto).text; + return `(${temp} = ${formatPathSegment(location, path, index - 1) }) && ${temp}.${path[index]}`; + } + } + + function shouldEmitTypeMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.Parameter: + return true; + } + return false; + } + + function shouldEmitReturnTypeMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + return true; + } + return false; + } + + function shouldEmitParamTypesMetadata(node: Declaration): boolean { + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.SetAccessor: + return true; + } + return false; + } + + function emitSerializedTypeMetadata(node: Declaration): void { + if (shouldEmitTypeMetadata(node)) { + var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + write(", __metadata('design:type', "); + emitSerializedType(node, serializedType); + write(")"); + } + } + if (shouldEmitParamTypesMetadata(node)) { + var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); + if (serializedTypes) { + write(", __metadata('design:paramtypes', ["); + for (var i = 0; i < serializedTypes.length; ++i) { + if (i > 0) { + write(", "); + } + emitSerializedType(node, serializedTypes[i]); + } + write("])"); + } + } + if (shouldEmitReturnTypeMetadata(node)) { + var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + write(", __metadata('design:returntype', "); + emitSerializedType(node, serializedType); + write(")"); + } + } + } + + function emitSerializedType(location: Node, name: string | string[]): void { + if (typeof name === "string") { + write(name); + return; + } + else { + Debug.assert(name.length > 0, "Invalid type name path for serialization"); + write(`(${formatPathSegment(location, name, name.length - 1) }) || Object`); + } + } function emitInterfaceDeclaration(node: InterfaceDeclaration) { emitOnlyPinnedOrTripleSlashComments(node); } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index ce78dee5a0..5e206a05e0 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1255,6 +1255,9 @@ module ts { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } export const enum SymbolFlags { diff --git a/src/lib/es6.d.ts b/src/lib/es6.d.ts index 3e6ac3f756..8590e2273e 100644 --- a/src/lib/es6.d.ts +++ b/src/lib/es6.d.ts @@ -3513,27 +3513,27 @@ interface ProxyHandler { interface ProxyConstructor { revocable(target: T, handler: ProxyHandler): { proxy: T; revoke: () => void; }; - new (target: T, handeler: ProxyHandler): T + new (target: T, handler: ProxyHandler): T } declare var Proxy: ProxyConstructor; -declare var Reflect: { - apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; - construct(target: Function, argumentsList: ArrayLike): any; - defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; - deleteProperty(target: any, propertyKey: PropertyKey): boolean; - enumerate(target: any): IterableIterator; - get(target: any, propertyKey: PropertyKey, receiver?: any): any; - getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; - getPrototypeOf(target: any): any; - has(target: any, propertyKey: string): boolean; - has(target: any, propertyKey: symbol): boolean; - isExtensible(target: any): boolean; - ownKeys(target: any): Array; - preventExtensions(target: any): boolean; - set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean; - setPrototypeOf(target: any, proto: any): boolean; -}; +declare module Reflect { + function apply(target: Function, thisArgument: any, argumentsList: ArrayLike): any; + function construct(target: Function, argumentsList: ArrayLike): any; + function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean; + function deleteProperty(target: any, propertyKey: PropertyKey): boolean; + function enumerate(target: any): IterableIterator; + function get(target: any, propertyKey: PropertyKey, receiver?: any): any; + function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor; + function getPrototypeOf(target: any): any; + function has(target: any, propertyKey: string): boolean; + function has(target: any, propertyKey: symbol): boolean; + function isExtensible(target: any): boolean; + function ownKeys(target: any): Array; + function preventExtensions(target: any): boolean; + function set(target: any, propertyKey: PropertyKey, value: any, receiver? :any): boolean; + function setPrototypeOf(target: any, proto: any): boolean; +} /** * Represents the completion of an asynchronous operation diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 854f141416..7fb5427c42 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -978,6 +978,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index b89a0c02bd..5ceacea486 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -3189,6 +3189,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier + + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index d7a1d02262..86d526e79b 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -1009,6 +1009,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 991af4841c..38ae459eac 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -3335,6 +3335,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier + + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_linter.types.pull b/tests/baselines/reference/APISample_linter.types.pull deleted file mode 100644 index e2a29716fc..0000000000 --- a/tests/baselines/reference/APISample_linter.types.pull +++ /dev/null @@ -1,6433 +0,0 @@ -=== tests/cases/compiler/APISample_linter.ts === - -/* - * Note: This test is a public API sample. The sample sources can be found - at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter - * Please log a "breaking change" issue for any API breaking change affecting this issue - */ - -declare var process: any; ->process : any - -declare var console: any; ->console : any - -declare var fs: any; ->fs : any - -import ts = require("typescript"); ->ts : typeof ts - -export function delint(sourceFile: ts.SourceFile) { ->delint : (sourceFile: ts.SourceFile) => void ->sourceFile : ts.SourceFile ->ts : unknown ->SourceFile : ts.SourceFile - - delintNode(sourceFile); ->delintNode(sourceFile) : void ->delintNode : (node: ts.Node) => void ->sourceFile : ts.SourceFile - - function delintNode(node: ts.Node) { ->delintNode : (node: ts.Node) => void ->node : ts.Node ->ts : unknown ->Node : ts.Node - - switch (node.kind) { ->node.kind : ts.SyntaxKind ->node : ts.Node ->kind : ts.SyntaxKind - - case ts.SyntaxKind.ForStatement: ->ts.SyntaxKind.ForStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->ForStatement : ts.SyntaxKind - - case ts.SyntaxKind.ForInStatement: ->ts.SyntaxKind.ForInStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->ForInStatement : ts.SyntaxKind - - case ts.SyntaxKind.WhileStatement: ->ts.SyntaxKind.WhileStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->WhileStatement : ts.SyntaxKind - - case ts.SyntaxKind.DoStatement: ->ts.SyntaxKind.DoStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->DoStatement : ts.SyntaxKind - - if ((node).statement.kind !== ts.SyntaxKind.Block) { ->(node).statement.kind !== ts.SyntaxKind.Block : boolean ->(node).statement.kind : ts.SyntaxKind ->(node).statement : ts.Statement ->(node) : ts.IterationStatement ->node : ts.IterationStatement ->ts : unknown ->IterationStatement : ts.IterationStatement ->node : ts.Node ->statement : ts.Statement ->kind : ts.SyntaxKind ->ts.SyntaxKind.Block : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->Block : ts.SyntaxKind - - report(node, "A looping statement's contents should be wrapped in a block body."); ->report(node, "A looping statement's contents should be wrapped in a block body.") : void ->report : (node: ts.Node, message: string) => void ->node : ts.Node - } - break; - case ts.SyntaxKind.IfStatement: ->ts.SyntaxKind.IfStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->IfStatement : ts.SyntaxKind - - var ifStatement = (node); ->ifStatement : ts.IfStatement ->(node) : ts.IfStatement ->node : ts.IfStatement ->ts : unknown ->IfStatement : ts.IfStatement ->node : ts.Node - - if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) { ->ifStatement.thenStatement.kind !== ts.SyntaxKind.Block : boolean ->ifStatement.thenStatement.kind : ts.SyntaxKind ->ifStatement.thenStatement : ts.Statement ->ifStatement : ts.IfStatement ->thenStatement : ts.Statement ->kind : ts.SyntaxKind ->ts.SyntaxKind.Block : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->Block : ts.SyntaxKind - - report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); ->report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.") : void ->report : (node: ts.Node, message: string) => void ->ifStatement.thenStatement : ts.Statement ->ifStatement : ts.IfStatement ->thenStatement : ts.Statement - } - if (ifStatement.elseStatement && ->ifStatement.elseStatement && ifStatement.elseStatement.kind !== ts.SyntaxKind.Block && ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement : boolean ->ifStatement.elseStatement && ifStatement.elseStatement.kind !== ts.SyntaxKind.Block : boolean ->ifStatement.elseStatement : ts.Statement ->ifStatement : ts.IfStatement ->elseStatement : ts.Statement - - ifStatement.elseStatement.kind !== ts.SyntaxKind.Block && ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement) { ->ifStatement.elseStatement.kind !== ts.SyntaxKind.Block : boolean ->ifStatement.elseStatement.kind : ts.SyntaxKind ->ifStatement.elseStatement : ts.Statement ->ifStatement : ts.IfStatement ->elseStatement : ts.Statement ->kind : ts.SyntaxKind ->ts.SyntaxKind.Block : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->Block : ts.SyntaxKind ->ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement : boolean ->ifStatement.elseStatement.kind : ts.SyntaxKind ->ifStatement.elseStatement : ts.Statement ->ifStatement : ts.IfStatement ->elseStatement : ts.Statement ->kind : ts.SyntaxKind ->ts.SyntaxKind.IfStatement : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->IfStatement : ts.SyntaxKind - - report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); ->report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.") : void ->report : (node: ts.Node, message: string) => void ->ifStatement.elseStatement : ts.Statement ->ifStatement : ts.IfStatement ->elseStatement : ts.Statement - } - break; - - case ts.SyntaxKind.BinaryExpression: ->ts.SyntaxKind.BinaryExpression : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->BinaryExpression : ts.SyntaxKind - - var op = (node).operatorToken.kind; ->op : ts.SyntaxKind ->(node).operatorToken.kind : ts.SyntaxKind ->(node).operatorToken : ts.Node ->(node) : ts.BinaryExpression ->node : ts.BinaryExpression ->ts : unknown ->BinaryExpression : ts.BinaryExpression ->node : ts.Node ->operatorToken : ts.Node ->kind : ts.SyntaxKind - - if (op === ts.SyntaxKind.EqualsEqualsToken || op === ts.SyntaxKind.ExclamationEqualsToken) { ->op === ts.SyntaxKind.EqualsEqualsToken || op === ts.SyntaxKind.ExclamationEqualsToken : boolean ->op === ts.SyntaxKind.EqualsEqualsToken : boolean ->op : ts.SyntaxKind ->ts.SyntaxKind.EqualsEqualsToken : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->EqualsEqualsToken : ts.SyntaxKind ->op === ts.SyntaxKind.ExclamationEqualsToken : boolean ->op : ts.SyntaxKind ->ts.SyntaxKind.ExclamationEqualsToken : ts.SyntaxKind ->ts.SyntaxKind : typeof ts.SyntaxKind ->ts : typeof ts ->SyntaxKind : typeof ts.SyntaxKind ->ExclamationEqualsToken : ts.SyntaxKind - - report(node, "Use '===' and '!=='.") ->report(node, "Use '===' and '!=='.") : void ->report : (node: ts.Node, message: string) => void ->node : ts.Node - } - break; - } - - ts.forEachChild(node, delintNode); ->ts.forEachChild(node, delintNode) : void ->ts.forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T ->ts : typeof ts ->forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T ->node : ts.Node ->delintNode : (node: ts.Node) => void - } - - function report(node: ts.Node, message: string) { ->report : (node: ts.Node, message: string) => void ->node : ts.Node ->ts : unknown ->Node : ts.Node ->message : string - - var lineChar = sourceFile.getLineAndCharacterOfPosition(node.getStart()); ->lineChar : ts.LineAndCharacter ->sourceFile.getLineAndCharacterOfPosition(node.getStart()) : ts.LineAndCharacter ->sourceFile.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter ->sourceFile : ts.SourceFile ->getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter ->node.getStart() : number ->node.getStart : (sourceFile?: ts.SourceFile) => number ->node : ts.Node ->getStart : (sourceFile?: ts.SourceFile) => number - - console.log(`${sourceFile.fileName} (${lineChar.line + 1},${lineChar.character + 1}): ${message}`) ->console.log(`${sourceFile.fileName} (${lineChar.line + 1},${lineChar.character + 1}): ${message}`) : any ->console.log : any ->console : any ->log : any ->sourceFile.fileName : string ->sourceFile : ts.SourceFile ->fileName : string ->lineChar.line + 1 : number ->lineChar.line : number ->lineChar : ts.LineAndCharacter ->line : number ->lineChar.character + 1 : number ->lineChar.character : number ->lineChar : ts.LineAndCharacter ->character : number ->message : string - } -} - -var fileNames = process.argv.slice(2); ->fileNames : any ->process.argv.slice(2) : any ->process.argv.slice : any ->process.argv : any ->process : any ->argv : any ->slice : any - -fileNames.forEach(fileName => { ->fileNames.forEach(fileName => { // Parse a file var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); // delint it delint(sourceFile);}) : any ->fileNames.forEach : any ->fileNames : any ->forEach : any ->fileName => { // Parse a file var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); // delint it delint(sourceFile);} : (fileName: any) => void ->fileName : any - - // Parse a file - var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); ->sourceFile : ts.SourceFile ->ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true) : ts.SourceFile ->ts.createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile ->ts : typeof ts ->createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile ->fileName : any ->fs.readFileSync(fileName).toString() : any ->fs.readFileSync(fileName).toString : any ->fs.readFileSync(fileName) : any ->fs.readFileSync : any ->fs : any ->readFileSync : any ->fileName : any ->toString : any ->ts.ScriptTarget.ES6 : ts.ScriptTarget ->ts.ScriptTarget : typeof ts.ScriptTarget ->ts : typeof ts ->ScriptTarget : typeof ts.ScriptTarget ->ES6 : ts.ScriptTarget - - // delint it - delint(sourceFile); ->delint(sourceFile) : void ->delint : (sourceFile: ts.SourceFile) => void ->sourceFile : ts.SourceFile - -}); - -=== typescript.d.ts === -/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */ - -declare module "typescript" { - interface Map { ->Map : Map ->T : T - - [index: string]: T; ->index : string ->T : T - } - interface TextRange { ->TextRange : TextRange - - pos: number; ->pos : number - - end: number; ->end : number - } - const enum SyntaxKind { ->SyntaxKind : SyntaxKind - - Unknown = 0, ->Unknown : SyntaxKind - - EndOfFileToken = 1, ->EndOfFileToken : SyntaxKind - - SingleLineCommentTrivia = 2, ->SingleLineCommentTrivia : SyntaxKind - - MultiLineCommentTrivia = 3, ->MultiLineCommentTrivia : SyntaxKind - - NewLineTrivia = 4, ->NewLineTrivia : SyntaxKind - - WhitespaceTrivia = 5, ->WhitespaceTrivia : SyntaxKind - - ConflictMarkerTrivia = 6, ->ConflictMarkerTrivia : SyntaxKind - - NumericLiteral = 7, ->NumericLiteral : SyntaxKind - - StringLiteral = 8, ->StringLiteral : SyntaxKind - - RegularExpressionLiteral = 9, ->RegularExpressionLiteral : SyntaxKind - - NoSubstitutionTemplateLiteral = 10, ->NoSubstitutionTemplateLiteral : SyntaxKind - - TemplateHead = 11, ->TemplateHead : SyntaxKind - - TemplateMiddle = 12, ->TemplateMiddle : SyntaxKind - - TemplateTail = 13, ->TemplateTail : SyntaxKind - - OpenBraceToken = 14, ->OpenBraceToken : SyntaxKind - - CloseBraceToken = 15, ->CloseBraceToken : SyntaxKind - - OpenParenToken = 16, ->OpenParenToken : SyntaxKind - - CloseParenToken = 17, ->CloseParenToken : SyntaxKind - - OpenBracketToken = 18, ->OpenBracketToken : SyntaxKind - - CloseBracketToken = 19, ->CloseBracketToken : SyntaxKind - - DotToken = 20, ->DotToken : SyntaxKind - - DotDotDotToken = 21, ->DotDotDotToken : SyntaxKind - - SemicolonToken = 22, ->SemicolonToken : SyntaxKind - - CommaToken = 23, ->CommaToken : SyntaxKind - - LessThanToken = 24, ->LessThanToken : SyntaxKind - - GreaterThanToken = 25, ->GreaterThanToken : SyntaxKind - - LessThanEqualsToken = 26, ->LessThanEqualsToken : SyntaxKind - - GreaterThanEqualsToken = 27, ->GreaterThanEqualsToken : SyntaxKind - - EqualsEqualsToken = 28, ->EqualsEqualsToken : SyntaxKind - - ExclamationEqualsToken = 29, ->ExclamationEqualsToken : SyntaxKind - - EqualsEqualsEqualsToken = 30, ->EqualsEqualsEqualsToken : SyntaxKind - - ExclamationEqualsEqualsToken = 31, ->ExclamationEqualsEqualsToken : SyntaxKind - - EqualsGreaterThanToken = 32, ->EqualsGreaterThanToken : SyntaxKind - - PlusToken = 33, ->PlusToken : SyntaxKind - - MinusToken = 34, ->MinusToken : SyntaxKind - - AsteriskToken = 35, ->AsteriskToken : SyntaxKind - - SlashToken = 36, ->SlashToken : SyntaxKind - - PercentToken = 37, ->PercentToken : SyntaxKind - - PlusPlusToken = 38, ->PlusPlusToken : SyntaxKind - - MinusMinusToken = 39, ->MinusMinusToken : SyntaxKind - - LessThanLessThanToken = 40, ->LessThanLessThanToken : SyntaxKind - - GreaterThanGreaterThanToken = 41, ->GreaterThanGreaterThanToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanToken = 42, ->GreaterThanGreaterThanGreaterThanToken : SyntaxKind - - AmpersandToken = 43, ->AmpersandToken : SyntaxKind - - BarToken = 44, ->BarToken : SyntaxKind - - CaretToken = 45, ->CaretToken : SyntaxKind - - ExclamationToken = 46, ->ExclamationToken : SyntaxKind - - TildeToken = 47, ->TildeToken : SyntaxKind - - AmpersandAmpersandToken = 48, ->AmpersandAmpersandToken : SyntaxKind - - BarBarToken = 49, ->BarBarToken : SyntaxKind - - QuestionToken = 50, ->QuestionToken : SyntaxKind - - ColonToken = 51, ->ColonToken : SyntaxKind - - AtToken = 52, ->AtToken : SyntaxKind - - EqualsToken = 53, ->EqualsToken : SyntaxKind - - PlusEqualsToken = 54, ->PlusEqualsToken : SyntaxKind - - MinusEqualsToken = 55, ->MinusEqualsToken : SyntaxKind - - AsteriskEqualsToken = 56, ->AsteriskEqualsToken : SyntaxKind - - SlashEqualsToken = 57, ->SlashEqualsToken : SyntaxKind - - PercentEqualsToken = 58, ->PercentEqualsToken : SyntaxKind - - LessThanLessThanEqualsToken = 59, ->LessThanLessThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanEqualsToken = 60, ->GreaterThanGreaterThanEqualsToken : SyntaxKind - - GreaterThanGreaterThanGreaterThanEqualsToken = 61, ->GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind - - AmpersandEqualsToken = 62, ->AmpersandEqualsToken : SyntaxKind - - BarEqualsToken = 63, ->BarEqualsToken : SyntaxKind - - CaretEqualsToken = 64, ->CaretEqualsToken : SyntaxKind - - Identifier = 65, ->Identifier : SyntaxKind - - BreakKeyword = 66, ->BreakKeyword : SyntaxKind - - CaseKeyword = 67, ->CaseKeyword : SyntaxKind - - CatchKeyword = 68, ->CatchKeyword : SyntaxKind - - ClassKeyword = 69, ->ClassKeyword : SyntaxKind - - ConstKeyword = 70, ->ConstKeyword : SyntaxKind - - ContinueKeyword = 71, ->ContinueKeyword : SyntaxKind - - DebuggerKeyword = 72, ->DebuggerKeyword : SyntaxKind - - DefaultKeyword = 73, ->DefaultKeyword : SyntaxKind - - DeleteKeyword = 74, ->DeleteKeyword : SyntaxKind - - DoKeyword = 75, ->DoKeyword : SyntaxKind - - ElseKeyword = 76, ->ElseKeyword : SyntaxKind - - EnumKeyword = 77, ->EnumKeyword : SyntaxKind - - ExportKeyword = 78, ->ExportKeyword : SyntaxKind - - ExtendsKeyword = 79, ->ExtendsKeyword : SyntaxKind - - FalseKeyword = 80, ->FalseKeyword : SyntaxKind - - FinallyKeyword = 81, ->FinallyKeyword : SyntaxKind - - ForKeyword = 82, ->ForKeyword : SyntaxKind - - FunctionKeyword = 83, ->FunctionKeyword : SyntaxKind - - IfKeyword = 84, ->IfKeyword : SyntaxKind - - ImportKeyword = 85, ->ImportKeyword : SyntaxKind - - InKeyword = 86, ->InKeyword : SyntaxKind - - InstanceOfKeyword = 87, ->InstanceOfKeyword : SyntaxKind - - NewKeyword = 88, ->NewKeyword : SyntaxKind - - NullKeyword = 89, ->NullKeyword : SyntaxKind - - ReturnKeyword = 90, ->ReturnKeyword : SyntaxKind - - SuperKeyword = 91, ->SuperKeyword : SyntaxKind - - SwitchKeyword = 92, ->SwitchKeyword : SyntaxKind - - ThisKeyword = 93, ->ThisKeyword : SyntaxKind - - ThrowKeyword = 94, ->ThrowKeyword : SyntaxKind - - TrueKeyword = 95, ->TrueKeyword : SyntaxKind - - TryKeyword = 96, ->TryKeyword : SyntaxKind - - TypeOfKeyword = 97, ->TypeOfKeyword : SyntaxKind - - VarKeyword = 98, ->VarKeyword : SyntaxKind - - VoidKeyword = 99, ->VoidKeyword : SyntaxKind - - WhileKeyword = 100, ->WhileKeyword : SyntaxKind - - WithKeyword = 101, ->WithKeyword : SyntaxKind - - AsKeyword = 102, ->AsKeyword : SyntaxKind - - ImplementsKeyword = 103, ->ImplementsKeyword : SyntaxKind - - InterfaceKeyword = 104, ->InterfaceKeyword : SyntaxKind - - LetKeyword = 105, ->LetKeyword : SyntaxKind - - PackageKeyword = 106, ->PackageKeyword : SyntaxKind - - PrivateKeyword = 107, ->PrivateKeyword : SyntaxKind - - ProtectedKeyword = 108, ->ProtectedKeyword : SyntaxKind - - PublicKeyword = 109, ->PublicKeyword : SyntaxKind - - StaticKeyword = 110, ->StaticKeyword : SyntaxKind - - YieldKeyword = 111, ->YieldKeyword : SyntaxKind - - AnyKeyword = 112, ->AnyKeyword : SyntaxKind - - BooleanKeyword = 113, ->BooleanKeyword : SyntaxKind - - ConstructorKeyword = 114, ->ConstructorKeyword : SyntaxKind - - DeclareKeyword = 115, ->DeclareKeyword : SyntaxKind - - GetKeyword = 116, ->GetKeyword : SyntaxKind - - ModuleKeyword = 117, ->ModuleKeyword : SyntaxKind - - RequireKeyword = 118, ->RequireKeyword : SyntaxKind - - NumberKeyword = 119, ->NumberKeyword : SyntaxKind - - SetKeyword = 120, ->SetKeyword : SyntaxKind - - StringKeyword = 121, ->StringKeyword : SyntaxKind - - SymbolKeyword = 122, ->SymbolKeyword : SyntaxKind - - TypeKeyword = 123, ->TypeKeyword : SyntaxKind - - FromKeyword = 124, ->FromKeyword : SyntaxKind - - OfKeyword = 125, ->OfKeyword : SyntaxKind - - QualifiedName = 126, ->QualifiedName : SyntaxKind - - ComputedPropertyName = 127, ->ComputedPropertyName : SyntaxKind - - TypeParameter = 128, ->TypeParameter : SyntaxKind - - Parameter = 129, ->Parameter : SyntaxKind - - Decorator = 130, ->Decorator : SyntaxKind - - PropertySignature = 131, ->PropertySignature : SyntaxKind - - PropertyDeclaration = 132, ->PropertyDeclaration : SyntaxKind - - MethodSignature = 133, ->MethodSignature : SyntaxKind - - MethodDeclaration = 134, ->MethodDeclaration : SyntaxKind - - Constructor = 135, ->Constructor : SyntaxKind - - GetAccessor = 136, ->GetAccessor : SyntaxKind - - SetAccessor = 137, ->SetAccessor : SyntaxKind - - CallSignature = 138, ->CallSignature : SyntaxKind - - ConstructSignature = 139, ->ConstructSignature : SyntaxKind - - IndexSignature = 140, ->IndexSignature : SyntaxKind - - TypeReference = 141, ->TypeReference : SyntaxKind - - FunctionType = 142, ->FunctionType : SyntaxKind - - ConstructorType = 143, ->ConstructorType : SyntaxKind - - TypeQuery = 144, ->TypeQuery : SyntaxKind - - TypeLiteral = 145, ->TypeLiteral : SyntaxKind - - ArrayType = 146, ->ArrayType : SyntaxKind - - TupleType = 147, ->TupleType : SyntaxKind - - UnionType = 148, ->UnionType : SyntaxKind - - ParenthesizedType = 149, ->ParenthesizedType : SyntaxKind - - ObjectBindingPattern = 150, ->ObjectBindingPattern : SyntaxKind - - ArrayBindingPattern = 151, ->ArrayBindingPattern : SyntaxKind - - BindingElement = 152, ->BindingElement : SyntaxKind - - ArrayLiteralExpression = 153, ->ArrayLiteralExpression : SyntaxKind - - ObjectLiteralExpression = 154, ->ObjectLiteralExpression : SyntaxKind - - PropertyAccessExpression = 155, ->PropertyAccessExpression : SyntaxKind - - ElementAccessExpression = 156, ->ElementAccessExpression : SyntaxKind - - CallExpression = 157, ->CallExpression : SyntaxKind - - NewExpression = 158, ->NewExpression : SyntaxKind - - TaggedTemplateExpression = 159, ->TaggedTemplateExpression : SyntaxKind - - TypeAssertionExpression = 160, ->TypeAssertionExpression : SyntaxKind - - ParenthesizedExpression = 161, ->ParenthesizedExpression : SyntaxKind - - FunctionExpression = 162, ->FunctionExpression : SyntaxKind - - ArrowFunction = 163, ->ArrowFunction : SyntaxKind - - DeleteExpression = 164, ->DeleteExpression : SyntaxKind - - TypeOfExpression = 165, ->TypeOfExpression : SyntaxKind - - VoidExpression = 166, ->VoidExpression : SyntaxKind - - PrefixUnaryExpression = 167, ->PrefixUnaryExpression : SyntaxKind - - PostfixUnaryExpression = 168, ->PostfixUnaryExpression : SyntaxKind - - BinaryExpression = 169, ->BinaryExpression : SyntaxKind - - ConditionalExpression = 170, ->ConditionalExpression : SyntaxKind - - TemplateExpression = 171, ->TemplateExpression : SyntaxKind - - YieldExpression = 172, ->YieldExpression : SyntaxKind - - SpreadElementExpression = 173, ->SpreadElementExpression : SyntaxKind - - ClassExpression = 174, ->ClassExpression : SyntaxKind - - OmittedExpression = 175, ->OmittedExpression : SyntaxKind - - TemplateSpan = 176, ->TemplateSpan : SyntaxKind - - HeritageClauseElement = 177, ->HeritageClauseElement : SyntaxKind - - SemicolonClassElement = 178, ->SemicolonClassElement : SyntaxKind - - Block = 179, ->Block : SyntaxKind - - VariableStatement = 180, ->VariableStatement : SyntaxKind - - EmptyStatement = 181, ->EmptyStatement : SyntaxKind - - ExpressionStatement = 182, ->ExpressionStatement : SyntaxKind - - IfStatement = 183, ->IfStatement : SyntaxKind - - DoStatement = 184, ->DoStatement : SyntaxKind - - WhileStatement = 185, ->WhileStatement : SyntaxKind - - ForStatement = 186, ->ForStatement : SyntaxKind - - ForInStatement = 187, ->ForInStatement : SyntaxKind - - ForOfStatement = 188, ->ForOfStatement : SyntaxKind - - ContinueStatement = 189, ->ContinueStatement : SyntaxKind - - BreakStatement = 190, ->BreakStatement : SyntaxKind - - ReturnStatement = 191, ->ReturnStatement : SyntaxKind - - WithStatement = 192, ->WithStatement : SyntaxKind - - SwitchStatement = 193, ->SwitchStatement : SyntaxKind - - LabeledStatement = 194, ->LabeledStatement : SyntaxKind - - ThrowStatement = 195, ->ThrowStatement : SyntaxKind - - TryStatement = 196, ->TryStatement : SyntaxKind - - DebuggerStatement = 197, ->DebuggerStatement : SyntaxKind - - VariableDeclaration = 198, ->VariableDeclaration : SyntaxKind - - VariableDeclarationList = 199, ->VariableDeclarationList : SyntaxKind - - FunctionDeclaration = 200, ->FunctionDeclaration : SyntaxKind - - ClassDeclaration = 201, ->ClassDeclaration : SyntaxKind - - InterfaceDeclaration = 202, ->InterfaceDeclaration : SyntaxKind - - TypeAliasDeclaration = 203, ->TypeAliasDeclaration : SyntaxKind - - EnumDeclaration = 204, ->EnumDeclaration : SyntaxKind - - ModuleDeclaration = 205, ->ModuleDeclaration : SyntaxKind - - ModuleBlock = 206, ->ModuleBlock : SyntaxKind - - CaseBlock = 207, ->CaseBlock : SyntaxKind - - ImportEqualsDeclaration = 208, ->ImportEqualsDeclaration : SyntaxKind - - ImportDeclaration = 209, ->ImportDeclaration : SyntaxKind - - ImportClause = 210, ->ImportClause : SyntaxKind - - NamespaceImport = 211, ->NamespaceImport : SyntaxKind - - NamedImports = 212, ->NamedImports : SyntaxKind - - ImportSpecifier = 213, ->ImportSpecifier : SyntaxKind - - ExportAssignment = 214, ->ExportAssignment : SyntaxKind - - ExportDeclaration = 215, ->ExportDeclaration : SyntaxKind - - NamedExports = 216, ->NamedExports : SyntaxKind - - ExportSpecifier = 217, ->ExportSpecifier : SyntaxKind - - MissingDeclaration = 218, ->MissingDeclaration : SyntaxKind - - ExternalModuleReference = 219, ->ExternalModuleReference : SyntaxKind - - CaseClause = 220, ->CaseClause : SyntaxKind - - DefaultClause = 221, ->DefaultClause : SyntaxKind - - HeritageClause = 222, ->HeritageClause : SyntaxKind - - CatchClause = 223, ->CatchClause : SyntaxKind - - PropertyAssignment = 224, ->PropertyAssignment : SyntaxKind - - ShorthandPropertyAssignment = 225, ->ShorthandPropertyAssignment : SyntaxKind - - EnumMember = 226, ->EnumMember : SyntaxKind - - SourceFile = 227, ->SourceFile : SyntaxKind - - SyntaxList = 228, ->SyntaxList : SyntaxKind - - Count = 229, ->Count : SyntaxKind - - FirstAssignment = 53, ->FirstAssignment : SyntaxKind - - LastAssignment = 64, ->LastAssignment : SyntaxKind - - FirstReservedWord = 66, ->FirstReservedWord : SyntaxKind - - LastReservedWord = 101, ->LastReservedWord : SyntaxKind - - FirstKeyword = 66, ->FirstKeyword : SyntaxKind - - LastKeyword = 125, ->LastKeyword : SyntaxKind - - FirstFutureReservedWord = 103, ->FirstFutureReservedWord : SyntaxKind - - LastFutureReservedWord = 111, ->LastFutureReservedWord : SyntaxKind - - FirstTypeNode = 141, ->FirstTypeNode : SyntaxKind - - LastTypeNode = 149, ->LastTypeNode : SyntaxKind - - FirstPunctuation = 14, ->FirstPunctuation : SyntaxKind - - LastPunctuation = 64, ->LastPunctuation : SyntaxKind - - FirstToken = 0, ->FirstToken : SyntaxKind - - LastToken = 125, ->LastToken : SyntaxKind - - FirstTriviaToken = 2, ->FirstTriviaToken : SyntaxKind - - LastTriviaToken = 6, ->LastTriviaToken : SyntaxKind - - FirstLiteralToken = 7, ->FirstLiteralToken : SyntaxKind - - LastLiteralToken = 10, ->LastLiteralToken : SyntaxKind - - FirstTemplateToken = 10, ->FirstTemplateToken : SyntaxKind - - LastTemplateToken = 13, ->LastTemplateToken : SyntaxKind - - FirstBinaryOperator = 24, ->FirstBinaryOperator : SyntaxKind - - LastBinaryOperator = 64, ->LastBinaryOperator : SyntaxKind - - FirstNode = 126, ->FirstNode : SyntaxKind - } - const enum NodeFlags { ->NodeFlags : NodeFlags - - Export = 1, ->Export : NodeFlags - - Ambient = 2, ->Ambient : NodeFlags - - Public = 16, ->Public : NodeFlags - - Private = 32, ->Private : NodeFlags - - Protected = 64, ->Protected : NodeFlags - - Static = 128, ->Static : NodeFlags - - Default = 256, ->Default : NodeFlags - - MultiLine = 512, ->MultiLine : NodeFlags - - Synthetic = 1024, ->Synthetic : NodeFlags - - DeclarationFile = 2048, ->DeclarationFile : NodeFlags - - Let = 4096, ->Let : NodeFlags - - Const = 8192, ->Const : NodeFlags - - OctalLiteral = 16384, ->OctalLiteral : NodeFlags - - ExportContext = 32768, ->ExportContext : NodeFlags - - Modifier = 499, ->Modifier : NodeFlags - - AccessibilityModifier = 112, ->AccessibilityModifier : NodeFlags - - BlockScoped = 12288, ->BlockScoped : NodeFlags - } - const enum ParserContextFlags { ->ParserContextFlags : ParserContextFlags - - StrictMode = 1, ->StrictMode : ParserContextFlags - - DisallowIn = 2, ->DisallowIn : ParserContextFlags - - Yield = 4, ->Yield : ParserContextFlags - - GeneratorParameter = 8, ->GeneratorParameter : ParserContextFlags - - Decorator = 16, ->Decorator : ParserContextFlags - - ThisNodeHasError = 32, ->ThisNodeHasError : ParserContextFlags - - ParserGeneratedFlags = 63, ->ParserGeneratedFlags : ParserContextFlags - - ThisNodeOrAnySubNodesHasError = 64, ->ThisNodeOrAnySubNodesHasError : ParserContextFlags - - HasAggregatedChildData = 128, ->HasAggregatedChildData : ParserContextFlags - } - const enum RelationComparisonResult { ->RelationComparisonResult : RelationComparisonResult - - Succeeded = 1, ->Succeeded : RelationComparisonResult - - Failed = 2, ->Failed : RelationComparisonResult - - FailedAndReported = 3, ->FailedAndReported : RelationComparisonResult - } - interface Node extends TextRange { ->Node : Node ->TextRange : TextRange - - kind: SyntaxKind; ->kind : SyntaxKind ->SyntaxKind : SyntaxKind - - flags: NodeFlags; ->flags : NodeFlags ->NodeFlags : NodeFlags - - parserContextFlags?: ParserContextFlags; ->parserContextFlags : ParserContextFlags ->ParserContextFlags : ParserContextFlags - - decorators?: NodeArray; ->decorators : NodeArray ->NodeArray : NodeArray ->Decorator : Decorator - - modifiers?: ModifiersArray; ->modifiers : ModifiersArray ->ModifiersArray : ModifiersArray - - id?: number; ->id : number - - parent?: Node; ->parent : Node ->Node : Node - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - - locals?: SymbolTable; ->locals : SymbolTable ->SymbolTable : SymbolTable - - nextContainer?: Node; ->nextContainer : Node ->Node : Node - - localSymbol?: Symbol; ->localSymbol : Symbol ->Symbol : Symbol - } - interface NodeArray extends Array, TextRange { ->NodeArray : NodeArray ->T : T ->Array : T[] ->T : T ->TextRange : TextRange - - hasTrailingComma?: boolean; ->hasTrailingComma : boolean - } - interface ModifiersArray extends NodeArray { ->ModifiersArray : ModifiersArray ->NodeArray : NodeArray ->Node : Node - - flags: number; ->flags : number - } - interface Identifier extends PrimaryExpression { ->Identifier : Identifier ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - } - interface QualifiedName extends Node { ->QualifiedName : QualifiedName ->Node : Node - - left: EntityName; ->left : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - right: Identifier; ->right : Identifier ->Identifier : Identifier - } - type EntityName = Identifier | QualifiedName; ->EntityName : Identifier | QualifiedName ->Identifier : Identifier ->QualifiedName : QualifiedName - - type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->Identifier : Identifier ->LiteralExpression : LiteralExpression ->ComputedPropertyName : ComputedPropertyName ->BindingPattern : BindingPattern - - interface Declaration extends Node { ->Declaration : Declaration ->Node : Node - - _declarationBrand: any; ->_declarationBrand : any - - name?: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern - } - interface ComputedPropertyName extends Node { ->ComputedPropertyName : ComputedPropertyName ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface Decorator extends Node { ->Decorator : Decorator ->Node : Node - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - } - interface TypeParameterDeclaration extends Declaration { ->TypeParameterDeclaration : TypeParameterDeclaration ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - constraint?: TypeNode; ->constraint : TypeNode ->TypeNode : TypeNode - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface SignatureDeclaration extends Declaration { ->SignatureDeclaration : SignatureDeclaration ->Declaration : Declaration - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - parameters: NodeArray; ->parameters : NodeArray ->NodeArray : NodeArray ->ParameterDeclaration : ParameterDeclaration - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface VariableDeclaration extends Declaration { ->VariableDeclaration : VariableDeclaration ->Declaration : Declaration - - parent?: VariableDeclarationList; ->parent : VariableDeclarationList ->VariableDeclarationList : VariableDeclarationList - - name: Identifier | BindingPattern; ->name : Identifier | BindingPattern ->Identifier : Identifier ->BindingPattern : BindingPattern - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface VariableDeclarationList extends Node { ->VariableDeclarationList : VariableDeclarationList ->Node : Node - - declarations: NodeArray; ->declarations : NodeArray ->NodeArray : NodeArray ->VariableDeclaration : VariableDeclaration - } - interface ParameterDeclaration extends Declaration { ->ParameterDeclaration : ParameterDeclaration ->Declaration : Declaration - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier | BindingPattern; ->name : Identifier | BindingPattern ->Identifier : Identifier ->BindingPattern : BindingPattern - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface BindingElement extends Declaration { ->BindingElement : BindingElement ->Declaration : Declaration - - propertyName?: Identifier; ->propertyName : Identifier ->Identifier : Identifier - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: Identifier | BindingPattern; ->name : Identifier | BindingPattern ->Identifier : Identifier ->BindingPattern : BindingPattern - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface PropertyDeclaration extends Declaration, ClassElement { ->PropertyDeclaration : PropertyDeclaration ->Declaration : Declaration ->ClassElement : ClassElement - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface ObjectLiteralElement extends Declaration { ->ObjectLiteralElement : ObjectLiteralElement ->Declaration : Declaration - - _objectLiteralBrandBrand: any; ->_objectLiteralBrandBrand : any - } - interface PropertyAssignment extends ObjectLiteralElement { ->PropertyAssignment : PropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - _propertyAssignmentBrand: any; ->_propertyAssignmentBrand : any - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern - - questionToken?: Node; ->questionToken : Node ->Node : Node - - initializer: Expression; ->initializer : Expression ->Expression : Expression - } - interface ShorthandPropertyAssignment extends ObjectLiteralElement { ->ShorthandPropertyAssignment : ShorthandPropertyAssignment ->ObjectLiteralElement : ObjectLiteralElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - questionToken?: Node; ->questionToken : Node ->Node : Node - } - interface VariableLikeDeclaration extends Declaration { ->VariableLikeDeclaration : VariableLikeDeclaration ->Declaration : Declaration - - propertyName?: Identifier; ->propertyName : Identifier ->Identifier : Identifier - - dotDotDotToken?: Node; ->dotDotDotToken : Node ->Node : Node - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern - - questionToken?: Node; ->questionToken : Node ->Node : Node - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface BindingPattern extends Node { ->BindingPattern : BindingPattern ->Node : Node - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->BindingElement : BindingElement - } - /** - * Several node kinds share function-like features such as a signature, - * a name, and a body. These nodes should extend FunctionLikeDeclaration. - * Examples: - * FunctionDeclaration - * MethodDeclaration - * AccessorDeclaration - */ - interface FunctionLikeDeclaration extends SignatureDeclaration { ->FunctionLikeDeclaration : FunctionLikeDeclaration ->SignatureDeclaration : SignatureDeclaration - - _functionLikeDeclarationBrand: any; ->_functionLikeDeclarationBrand : any - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - questionToken?: Node; ->questionToken : Node ->Node : Node - - body?: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { ->FunctionDeclaration : FunctionDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->Statement : Statement - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body?: Block; ->body : Block ->Block : Block - } - interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->MethodDeclaration : MethodDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - body?: Block; ->body : Block ->Block : Block - } - interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { ->ConstructorDeclaration : ConstructorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement - - body?: Block; ->body : Block ->Block : Block - } - interface SemicolonClassElement extends ClassElement { ->SemicolonClassElement : SemicolonClassElement ->ClassElement : ClassElement - - _semicolonClassElementBrand: any; ->_semicolonClassElementBrand : any - } - interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { ->AccessorDeclaration : AccessorDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration ->ClassElement : ClassElement ->ObjectLiteralElement : ObjectLiteralElement - - _accessorDeclarationBrand: any; ->_accessorDeclarationBrand : any - - body: Block; ->body : Block ->Block : Block - } - interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { ->IndexSignatureDeclaration : IndexSignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->ClassElement : ClassElement - - _indexSignatureDeclarationBrand: any; ->_indexSignatureDeclarationBrand : any - } - interface TypeNode extends Node { ->TypeNode : TypeNode ->Node : Node - - _typeNodeBrand: any; ->_typeNodeBrand : any - } - interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { ->FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode ->TypeNode : TypeNode ->SignatureDeclaration : SignatureDeclaration - - _functionOrConstructorTypeNodeBrand: any; ->_functionOrConstructorTypeNodeBrand : any - } - interface TypeReferenceNode extends TypeNode { ->TypeReferenceNode : TypeReferenceNode ->TypeNode : TypeNode - - typeName: EntityName; ->typeName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface TypeQueryNode extends TypeNode { ->TypeQueryNode : TypeQueryNode ->TypeNode : TypeNode - - exprName: EntityName; ->exprName : Identifier | QualifiedName ->EntityName : Identifier | QualifiedName - } - interface TypeLiteralNode extends TypeNode, Declaration { ->TypeLiteralNode : TypeLiteralNode ->TypeNode : TypeNode ->Declaration : Declaration - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Node : Node - } - interface ArrayTypeNode extends TypeNode { ->ArrayTypeNode : ArrayTypeNode ->TypeNode : TypeNode - - elementType: TypeNode; ->elementType : TypeNode ->TypeNode : TypeNode - } - interface TupleTypeNode extends TypeNode { ->TupleTypeNode : TupleTypeNode ->TypeNode : TypeNode - - elementTypes: NodeArray; ->elementTypes : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface UnionTypeNode extends TypeNode { ->UnionTypeNode : UnionTypeNode ->TypeNode : TypeNode - - types: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface ParenthesizedTypeNode extends TypeNode { ->ParenthesizedTypeNode : ParenthesizedTypeNode ->TypeNode : TypeNode - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface StringLiteralTypeNode extends LiteralExpression, TypeNode { ->StringLiteralTypeNode : StringLiteralTypeNode ->LiteralExpression : LiteralExpression ->TypeNode : TypeNode - } - interface Expression extends Node { ->Expression : Expression ->Node : Node - - _expressionBrand: any; ->_expressionBrand : any - - contextualType?: Type; ->contextualType : Type ->Type : Type - } - interface UnaryExpression extends Expression { ->UnaryExpression : UnaryExpression ->Expression : Expression - - _unaryExpressionBrand: any; ->_unaryExpressionBrand : any - } - interface PrefixUnaryExpression extends UnaryExpression { ->PrefixUnaryExpression : PrefixUnaryExpression ->UnaryExpression : UnaryExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - - operand: UnaryExpression; ->operand : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface PostfixUnaryExpression extends PostfixExpression { ->PostfixUnaryExpression : PostfixUnaryExpression ->PostfixExpression : PostfixExpression - - operand: LeftHandSideExpression; ->operand : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - operator: SyntaxKind; ->operator : SyntaxKind ->SyntaxKind : SyntaxKind - } - interface PostfixExpression extends UnaryExpression { ->PostfixExpression : PostfixExpression ->UnaryExpression : UnaryExpression - - _postfixExpressionBrand: any; ->_postfixExpressionBrand : any - } - interface LeftHandSideExpression extends PostfixExpression { ->LeftHandSideExpression : LeftHandSideExpression ->PostfixExpression : PostfixExpression - - _leftHandSideExpressionBrand: any; ->_leftHandSideExpressionBrand : any - } - interface MemberExpression extends LeftHandSideExpression { ->MemberExpression : MemberExpression ->LeftHandSideExpression : LeftHandSideExpression - - _memberExpressionBrand: any; ->_memberExpressionBrand : any - } - interface PrimaryExpression extends MemberExpression { ->PrimaryExpression : PrimaryExpression ->MemberExpression : MemberExpression - - _primaryExpressionBrand: any; ->_primaryExpressionBrand : any - } - interface DeleteExpression extends UnaryExpression { ->DeleteExpression : DeleteExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface TypeOfExpression extends UnaryExpression { ->TypeOfExpression : TypeOfExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface VoidExpression extends UnaryExpression { ->VoidExpression : VoidExpression ->UnaryExpression : UnaryExpression - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface YieldExpression extends Expression { ->YieldExpression : YieldExpression ->Expression : Expression - - asteriskToken?: Node; ->asteriskToken : Node ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BinaryExpression extends Expression { ->BinaryExpression : BinaryExpression ->Expression : Expression - - left: Expression; ->left : Expression ->Expression : Expression - - operatorToken: Node; ->operatorToken : Node ->Node : Node - - right: Expression; ->right : Expression ->Expression : Expression - } - interface ConditionalExpression extends Expression { ->ConditionalExpression : ConditionalExpression ->Expression : Expression - - condition: Expression; ->condition : Expression ->Expression : Expression - - questionToken: Node; ->questionToken : Node ->Node : Node - - whenTrue: Expression; ->whenTrue : Expression ->Expression : Expression - - colonToken: Node; ->colonToken : Node ->Node : Node - - whenFalse: Expression; ->whenFalse : Expression ->Expression : Expression - } - interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { ->FunctionExpression : FunctionExpression ->PrimaryExpression : PrimaryExpression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - body: Block | Expression; ->body : Expression | Block ->Block : Block ->Expression : Expression - } - interface ArrowFunction extends Expression, FunctionLikeDeclaration { ->ArrowFunction : ArrowFunction ->Expression : Expression ->FunctionLikeDeclaration : FunctionLikeDeclaration - - equalsGreaterThanToken: Node; ->equalsGreaterThanToken : Node ->Node : Node - } - interface LiteralExpression extends PrimaryExpression { ->LiteralExpression : LiteralExpression ->PrimaryExpression : PrimaryExpression - - text: string; ->text : string - - isUnterminated?: boolean; ->isUnterminated : boolean - - hasExtendedUnicodeEscape?: boolean; ->hasExtendedUnicodeEscape : boolean - } - interface StringLiteralExpression extends LiteralExpression { ->StringLiteralExpression : StringLiteralExpression ->LiteralExpression : LiteralExpression - - _stringLiteralExpressionBrand: any; ->_stringLiteralExpressionBrand : any - } - interface TemplateExpression extends PrimaryExpression { ->TemplateExpression : TemplateExpression ->PrimaryExpression : PrimaryExpression - - head: LiteralExpression; ->head : LiteralExpression ->LiteralExpression : LiteralExpression - - templateSpans: NodeArray; ->templateSpans : NodeArray ->NodeArray : NodeArray ->TemplateSpan : TemplateSpan - } - interface TemplateSpan extends Node { ->TemplateSpan : TemplateSpan ->Node : Node - - expression: Expression; ->expression : Expression ->Expression : Expression - - literal: LiteralExpression; ->literal : LiteralExpression ->LiteralExpression : LiteralExpression - } - interface ParenthesizedExpression extends PrimaryExpression { ->ParenthesizedExpression : ParenthesizedExpression ->PrimaryExpression : PrimaryExpression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ArrayLiteralExpression extends PrimaryExpression { ->ArrayLiteralExpression : ArrayLiteralExpression ->PrimaryExpression : PrimaryExpression - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface SpreadElementExpression extends Expression { ->SpreadElementExpression : SpreadElementExpression ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ObjectLiteralExpression extends PrimaryExpression, Declaration { ->ObjectLiteralExpression : ObjectLiteralExpression ->PrimaryExpression : PrimaryExpression ->Declaration : Declaration - - properties: NodeArray; ->properties : NodeArray ->NodeArray : NodeArray ->ObjectLiteralElement : ObjectLiteralElement - } - interface PropertyAccessExpression extends MemberExpression { ->PropertyAccessExpression : PropertyAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - dotToken: Node; ->dotToken : Node ->Node : Node - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ElementAccessExpression extends MemberExpression { ->ElementAccessExpression : ElementAccessExpression ->MemberExpression : MemberExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - argumentExpression?: Expression; ->argumentExpression : Expression ->Expression : Expression - } - interface CallExpression extends LeftHandSideExpression { ->CallExpression : CallExpression ->LeftHandSideExpression : LeftHandSideExpression - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - - arguments: NodeArray; ->arguments : NodeArray ->NodeArray : NodeArray ->Expression : Expression - } - interface HeritageClauseElement extends Node { ->HeritageClauseElement : HeritageClauseElement ->Node : Node - - expression: LeftHandSideExpression; ->expression : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - typeArguments?: NodeArray; ->typeArguments : NodeArray ->NodeArray : NodeArray ->TypeNode : TypeNode - } - interface NewExpression extends CallExpression, PrimaryExpression { ->NewExpression : NewExpression ->CallExpression : CallExpression ->PrimaryExpression : PrimaryExpression - } - interface TaggedTemplateExpression extends MemberExpression { ->TaggedTemplateExpression : TaggedTemplateExpression ->MemberExpression : MemberExpression - - tag: LeftHandSideExpression; ->tag : LeftHandSideExpression ->LeftHandSideExpression : LeftHandSideExpression - - template: LiteralExpression | TemplateExpression; ->template : LiteralExpression | TemplateExpression ->LiteralExpression : LiteralExpression ->TemplateExpression : TemplateExpression - } - type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->CallExpression : CallExpression ->NewExpression : NewExpression ->TaggedTemplateExpression : TaggedTemplateExpression - - interface TypeAssertion extends UnaryExpression { ->TypeAssertion : TypeAssertion ->UnaryExpression : UnaryExpression - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - - expression: UnaryExpression; ->expression : UnaryExpression ->UnaryExpression : UnaryExpression - } - interface Statement extends Node, ModuleElement { ->Statement : Statement ->Node : Node ->ModuleElement : ModuleElement - - _statementBrand: any; ->_statementBrand : any - } - interface Block extends Statement { ->Block : Block ->Statement : Statement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface VariableStatement extends Statement { ->VariableStatement : VariableStatement ->Statement : Statement - - declarationList: VariableDeclarationList; ->declarationList : VariableDeclarationList ->VariableDeclarationList : VariableDeclarationList - } - interface ExpressionStatement extends Statement { ->ExpressionStatement : ExpressionStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface IfStatement extends Statement { ->IfStatement : IfStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - thenStatement: Statement; ->thenStatement : Statement ->Statement : Statement - - elseStatement?: Statement; ->elseStatement : Statement ->Statement : Statement - } - interface IterationStatement extends Statement { ->IterationStatement : IterationStatement ->Statement : Statement - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface DoStatement extends IterationStatement { ->DoStatement : DoStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface WhileStatement extends IterationStatement { ->WhileStatement : WhileStatement ->IterationStatement : IterationStatement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForStatement extends IterationStatement { ->ForStatement : ForStatement ->IterationStatement : IterationStatement - - initializer?: VariableDeclarationList | Expression; ->initializer : Expression | VariableDeclarationList ->VariableDeclarationList : VariableDeclarationList ->Expression : Expression - - condition?: Expression; ->condition : Expression ->Expression : Expression - - iterator?: Expression; ->iterator : Expression ->Expression : Expression - } - interface ForInStatement extends IterationStatement { ->ForInStatement : ForInStatement ->IterationStatement : IterationStatement - - initializer: VariableDeclarationList | Expression; ->initializer : Expression | VariableDeclarationList ->VariableDeclarationList : VariableDeclarationList ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface ForOfStatement extends IterationStatement { ->ForOfStatement : ForOfStatement ->IterationStatement : IterationStatement - - initializer: VariableDeclarationList | Expression; ->initializer : Expression | VariableDeclarationList ->VariableDeclarationList : VariableDeclarationList ->Expression : Expression - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface BreakOrContinueStatement extends Statement { ->BreakOrContinueStatement : BreakOrContinueStatement ->Statement : Statement - - label?: Identifier; ->label : Identifier ->Identifier : Identifier - } - interface ReturnStatement extends Statement { ->ReturnStatement : ReturnStatement ->Statement : Statement - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface WithStatement extends Statement { ->WithStatement : WithStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface SwitchStatement extends Statement { ->SwitchStatement : SwitchStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - - caseBlock: CaseBlock; ->caseBlock : CaseBlock ->CaseBlock : CaseBlock - } - interface CaseBlock extends Node { ->CaseBlock : CaseBlock ->Node : Node - - clauses: NodeArray; ->clauses : NodeArray ->NodeArray : NodeArray ->CaseOrDefaultClause : CaseClause | DefaultClause - } - interface CaseClause extends Node { ->CaseClause : CaseClause ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - interface DefaultClause extends Node { ->DefaultClause : DefaultClause ->Node : Node - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->Statement : Statement - } - type CaseOrDefaultClause = CaseClause | DefaultClause; ->CaseOrDefaultClause : CaseClause | DefaultClause ->CaseClause : CaseClause ->DefaultClause : DefaultClause - - interface LabeledStatement extends Statement { ->LabeledStatement : LabeledStatement ->Statement : Statement - - label: Identifier; ->label : Identifier ->Identifier : Identifier - - statement: Statement; ->statement : Statement ->Statement : Statement - } - interface ThrowStatement extends Statement { ->ThrowStatement : ThrowStatement ->Statement : Statement - - expression: Expression; ->expression : Expression ->Expression : Expression - } - interface TryStatement extends Statement { ->TryStatement : TryStatement ->Statement : Statement - - tryBlock: Block; ->tryBlock : Block ->Block : Block - - catchClause?: CatchClause; ->catchClause : CatchClause ->CatchClause : CatchClause - - finallyBlock?: Block; ->finallyBlock : Block ->Block : Block - } - interface CatchClause extends Node { ->CatchClause : CatchClause ->Node : Node - - variableDeclaration: VariableDeclaration; ->variableDeclaration : VariableDeclaration ->VariableDeclaration : VariableDeclaration - - block: Block; ->block : Block ->Block : Block - } - interface ModuleElement extends Node { ->ModuleElement : ModuleElement ->Node : Node - - _moduleElementBrand: any; ->_moduleElementBrand : any - } - interface ClassLikeDeclaration extends Declaration { ->ClassLikeDeclaration : ClassLikeDeclaration ->Declaration : Declaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->ClassElement : ClassElement - } - interface ClassDeclaration extends ClassLikeDeclaration, Statement { ->ClassDeclaration : ClassDeclaration ->ClassLikeDeclaration : ClassLikeDeclaration ->Statement : Statement - } - interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { ->ClassExpression : ClassExpression ->ClassLikeDeclaration : ClassLikeDeclaration ->PrimaryExpression : PrimaryExpression - } - interface ClassElement extends Declaration { ->ClassElement : ClassElement ->Declaration : Declaration - - _classElementBrand: any; ->_classElementBrand : any - } - interface InterfaceDeclaration extends Declaration, ModuleElement { ->InterfaceDeclaration : InterfaceDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - typeParameters?: NodeArray; ->typeParameters : NodeArray ->NodeArray : NodeArray ->TypeParameterDeclaration : TypeParameterDeclaration - - heritageClauses?: NodeArray; ->heritageClauses : NodeArray ->NodeArray : NodeArray ->HeritageClause : HeritageClause - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->Declaration : Declaration - } - interface HeritageClause extends Node { ->HeritageClause : HeritageClause ->Node : Node - - token: SyntaxKind; ->token : SyntaxKind ->SyntaxKind : SyntaxKind - - types?: NodeArray; ->types : NodeArray ->NodeArray : NodeArray ->HeritageClauseElement : HeritageClauseElement - } - interface TypeAliasDeclaration extends Declaration, ModuleElement { ->TypeAliasDeclaration : TypeAliasDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - type: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface EnumMember extends Declaration { ->EnumMember : EnumMember ->Declaration : Declaration - - name: DeclarationName; ->name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern ->DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern - - initializer?: Expression; ->initializer : Expression ->Expression : Expression - } - interface EnumDeclaration extends Declaration, ModuleElement { ->EnumDeclaration : EnumDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - members: NodeArray; ->members : NodeArray ->NodeArray : NodeArray ->EnumMember : EnumMember - } - interface ModuleDeclaration extends Declaration, ModuleElement { ->ModuleDeclaration : ModuleDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier | LiteralExpression; ->name : Identifier | LiteralExpression ->Identifier : Identifier ->LiteralExpression : LiteralExpression - - body: ModuleBlock | ModuleDeclaration; ->body : ModuleDeclaration | ModuleBlock ->ModuleBlock : ModuleBlock ->ModuleDeclaration : ModuleDeclaration - } - interface ModuleBlock extends Node, ModuleElement { ->ModuleBlock : ModuleBlock ->Node : Node ->ModuleElement : ModuleElement - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - } - interface ImportEqualsDeclaration extends Declaration, ModuleElement { ->ImportEqualsDeclaration : ImportEqualsDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - name: Identifier; ->name : Identifier ->Identifier : Identifier - - moduleReference: EntityName | ExternalModuleReference; ->moduleReference : Identifier | QualifiedName | ExternalModuleReference ->EntityName : Identifier | QualifiedName ->ExternalModuleReference : ExternalModuleReference - } - interface ExternalModuleReference extends Node { ->ExternalModuleReference : ExternalModuleReference ->Node : Node - - expression?: Expression; ->expression : Expression ->Expression : Expression - } - interface ImportDeclaration extends Statement, ModuleElement { ->ImportDeclaration : ImportDeclaration ->Statement : Statement ->ModuleElement : ModuleElement - - importClause?: ImportClause; ->importClause : ImportClause ->ImportClause : ImportClause - - moduleSpecifier: Expression; ->moduleSpecifier : Expression ->Expression : Expression - } - interface ImportClause extends Declaration { ->ImportClause : ImportClause ->Declaration : Declaration - - name?: Identifier; ->name : Identifier ->Identifier : Identifier - - namedBindings?: NamespaceImport | NamedImports; ->namedBindings : NamespaceImport | NamedImportsOrExports ->NamespaceImport : NamespaceImport ->NamedImports : NamedImportsOrExports - } - interface NamespaceImport extends Declaration { ->NamespaceImport : NamespaceImport ->Declaration : Declaration - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - interface ExportDeclaration extends Declaration, ModuleElement { ->ExportDeclaration : ExportDeclaration ->Declaration : Declaration ->ModuleElement : ModuleElement - - exportClause?: NamedExports; ->exportClause : NamedImportsOrExports ->NamedExports : NamedImportsOrExports - - moduleSpecifier?: Expression; ->moduleSpecifier : Expression ->Expression : Expression - } - interface NamedImportsOrExports extends Node { ->NamedImportsOrExports : NamedImportsOrExports ->Node : Node - - elements: NodeArray; ->elements : NodeArray ->NodeArray : NodeArray ->ImportOrExportSpecifier : ImportOrExportSpecifier - } - type NamedImports = NamedImportsOrExports; ->NamedImports : NamedImportsOrExports ->NamedImportsOrExports : NamedImportsOrExports - - type NamedExports = NamedImportsOrExports; ->NamedExports : NamedImportsOrExports ->NamedImportsOrExports : NamedImportsOrExports - - interface ImportOrExportSpecifier extends Declaration { ->ImportOrExportSpecifier : ImportOrExportSpecifier ->Declaration : Declaration - - propertyName?: Identifier; ->propertyName : Identifier ->Identifier : Identifier - - name: Identifier; ->name : Identifier ->Identifier : Identifier - } - type ImportSpecifier = ImportOrExportSpecifier; ->ImportSpecifier : ImportOrExportSpecifier ->ImportOrExportSpecifier : ImportOrExportSpecifier - - type ExportSpecifier = ImportOrExportSpecifier; ->ExportSpecifier : ImportOrExportSpecifier ->ImportOrExportSpecifier : ImportOrExportSpecifier - - interface ExportAssignment extends Declaration, ModuleElement { ->ExportAssignment : ExportAssignment ->Declaration : Declaration ->ModuleElement : ModuleElement - - isExportEquals?: boolean; ->isExportEquals : boolean - - expression?: Expression; ->expression : Expression ->Expression : Expression - - type?: TypeNode; ->type : TypeNode ->TypeNode : TypeNode - } - interface FileReference extends TextRange { ->FileReference : FileReference ->TextRange : TextRange - - fileName: string; ->fileName : string - } - interface CommentRange extends TextRange { ->CommentRange : CommentRange ->TextRange : TextRange - - hasTrailingNewLine?: boolean; ->hasTrailingNewLine : boolean - } - interface SourceFile extends Declaration { ->SourceFile : SourceFile ->Declaration : Declaration - - statements: NodeArray; ->statements : NodeArray ->NodeArray : NodeArray ->ModuleElement : ModuleElement - - endOfFileToken: Node; ->endOfFileToken : Node ->Node : Node - - fileName: string; ->fileName : string - - text: string; ->text : string - - amdDependencies: { ->amdDependencies : { path: string; name: string; }[] - - path: string; ->path : string - - name: string; ->name : string - - }[]; - amdModuleName: string; ->amdModuleName : string - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - hasNoDefaultLib: boolean; ->hasNoDefaultLib : boolean - - externalModuleIndicator: Node; ->externalModuleIndicator : Node ->Node : Node - - languageVersion: ScriptTarget; ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - identifiers: Map; ->identifiers : Map ->Map : Map - } - interface ScriptReferenceHost { ->ScriptReferenceHost : ScriptReferenceHost - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getSourceFile(fileName: string): SourceFile; ->getSourceFile : (fileName: string) => SourceFile ->fileName : string ->SourceFile : SourceFile - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - } - interface WriteFileCallback { ->WriteFileCallback : WriteFileCallback - - (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; ->fileName : string ->data : string ->writeByteOrderMark : boolean ->onError : (message: string) => void ->message : string - } - interface Program extends ScriptReferenceHost { ->Program : Program ->ScriptReferenceHost : ScriptReferenceHost - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - /** - * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then - * the JavaScript and declaration files will be produced for all the files in this program. - * If targetSourceFile is specified, then only the JavaScript and declaration for that - * specific file will be generated. - * - * If writeFile is not specified then the writeFile callback from the compiler host will be - * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter - * will be invoked when writing the JavaScript and declaration files. - */ - emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; ->emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult ->targetSourceFile : SourceFile ->SourceFile : SourceFile ->writeFile : WriteFileCallback ->WriteFileCallback : WriteFileCallback ->EmitResult : EmitResult - - getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getSyntacticDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getGlobalDiagnostics(): Diagnostic[]; ->getGlobalDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getSemanticDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; ->getDeclarationDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Diagnostic : Diagnostic - - getTypeChecker(): TypeChecker; ->getTypeChecker : () => TypeChecker ->TypeChecker : TypeChecker - - getCommonSourceDirectory(): string; ->getCommonSourceDirectory : () => string - } - interface SourceMapSpan { ->SourceMapSpan : SourceMapSpan - - emittedLine: number; ->emittedLine : number - - emittedColumn: number; ->emittedColumn : number - - sourceLine: number; ->sourceLine : number - - sourceColumn: number; ->sourceColumn : number - - nameIndex?: number; ->nameIndex : number - - sourceIndex: number; ->sourceIndex : number - } - interface SourceMapData { ->SourceMapData : SourceMapData - - sourceMapFilePath: string; ->sourceMapFilePath : string - - jsSourceMappingURL: string; ->jsSourceMappingURL : string - - sourceMapFile: string; ->sourceMapFile : string - - sourceMapSourceRoot: string; ->sourceMapSourceRoot : string - - sourceMapSources: string[]; ->sourceMapSources : string[] - - inputSourceFileNames: string[]; ->inputSourceFileNames : string[] - - sourceMapNames?: string[]; ->sourceMapNames : string[] - - sourceMapMappings: string; ->sourceMapMappings : string - - sourceMapDecodedMappings: SourceMapSpan[]; ->sourceMapDecodedMappings : SourceMapSpan[] ->SourceMapSpan : SourceMapSpan - } - enum ExitStatus { ->ExitStatus : ExitStatus - - Success = 0, ->Success : ExitStatus - - DiagnosticsPresent_OutputsSkipped = 1, ->DiagnosticsPresent_OutputsSkipped : ExitStatus - - DiagnosticsPresent_OutputsGenerated = 2, ->DiagnosticsPresent_OutputsGenerated : ExitStatus - } - interface EmitResult { ->EmitResult : EmitResult - - emitSkipped: boolean; ->emitSkipped : boolean - - diagnostics: Diagnostic[]; ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - sourceMaps: SourceMapData[]; ->sourceMaps : SourceMapData[] ->SourceMapData : SourceMapData - } - interface TypeCheckerHost { ->TypeCheckerHost : TypeCheckerHost - - getCompilerOptions(): CompilerOptions; ->getCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getSourceFiles(): SourceFile[]; ->getSourceFiles : () => SourceFile[] ->SourceFile : SourceFile - - getSourceFile(fileName: string): SourceFile; ->getSourceFile : (fileName: string) => SourceFile ->fileName : string ->SourceFile : SourceFile - } - interface TypeChecker { ->TypeChecker : TypeChecker - - getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; ->getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type ->symbol : Symbol ->Symbol : Symbol ->node : Node ->Node : Node ->Type : Type - - getDeclaredTypeOfSymbol(symbol: Symbol): Type; ->getDeclaredTypeOfSymbol : (symbol: Symbol) => Type ->symbol : Symbol ->Symbol : Symbol ->Type : Type - - getPropertiesOfType(type: Type): Symbol[]; ->getPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getPropertyOfType(type: Type, propertyName: string): Symbol; ->getPropertyOfType : (type: Type, propertyName: string) => Symbol ->type : Type ->Type : Type ->propertyName : string ->Symbol : Symbol - - getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; ->getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] ->type : Type ->Type : Type ->kind : SignatureKind ->SignatureKind : SignatureKind ->Signature : Signature - - getIndexTypeOfType(type: Type, kind: IndexKind): Type; ->getIndexTypeOfType : (type: Type, kind: IndexKind) => Type ->type : Type ->Type : Type ->kind : IndexKind ->IndexKind : IndexKind ->Type : Type - - getReturnTypeOfSignature(signature: Signature): Type; ->getReturnTypeOfSignature : (signature: Signature) => Type ->signature : Signature ->Signature : Signature ->Type : Type - - getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; ->getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] ->location : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->Symbol : Symbol - - getSymbolAtLocation(node: Node): Symbol; ->getSymbolAtLocation : (node: Node) => Symbol ->node : Node ->Node : Node ->Symbol : Symbol - - getShorthandAssignmentValueSymbol(location: Node): Symbol; ->getShorthandAssignmentValueSymbol : (location: Node) => Symbol ->location : Node ->Node : Node ->Symbol : Symbol - - getTypeAtLocation(node: Node): Type; ->getTypeAtLocation : (node: Node) => Type ->node : Node ->Node : Node ->Type : Type - - typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; ->typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string ->type : Type ->Type : Type ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; ->symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - - getSymbolDisplayBuilder(): SymbolDisplayBuilder; ->getSymbolDisplayBuilder : () => SymbolDisplayBuilder ->SymbolDisplayBuilder : SymbolDisplayBuilder - - getFullyQualifiedName(symbol: Symbol): string; ->getFullyQualifiedName : (symbol: Symbol) => string ->symbol : Symbol ->Symbol : Symbol - - getAugmentedPropertiesOfType(type: Type): Symbol[]; ->getAugmentedPropertiesOfType : (type: Type) => Symbol[] ->type : Type ->Type : Type ->Symbol : Symbol - - getRootSymbols(symbol: Symbol): Symbol[]; ->getRootSymbols : (symbol: Symbol) => Symbol[] ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getContextualType(node: Expression): Type; ->getContextualType : (node: Expression) => Type ->node : Expression ->Expression : Expression ->Type : Type - - getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; ->getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature ->node : CallExpression | NewExpression | TaggedTemplateExpression ->CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression ->candidatesOutArray : Signature[] ->Signature : Signature ->Signature : Signature - - getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; ->getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->Signature : Signature - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - isUndefinedSymbol(symbol: Symbol): boolean; ->isUndefinedSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - isArgumentsSymbol(symbol: Symbol): boolean; ->isArgumentsSymbol : (symbol: Symbol) => boolean ->symbol : Symbol ->Symbol : Symbol - - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression | EnumMember) => number ->node : PropertyAccessExpression | ElementAccessExpression | EnumMember ->EnumMember : EnumMember ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; ->isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean ->node : QualifiedName | PropertyAccessExpression ->PropertyAccessExpression : PropertyAccessExpression ->QualifiedName : QualifiedName ->propertyName : string - - getAliasedSymbol(symbol: Symbol): Symbol; ->getAliasedSymbol : (symbol: Symbol) => Symbol ->symbol : Symbol ->Symbol : Symbol ->Symbol : Symbol - - getExportsOfExternalModule(node: ImportDeclaration): Symbol[]; ->getExportsOfExternalModule : (node: ImportDeclaration) => Symbol[] ->node : ImportDeclaration ->ImportDeclaration : ImportDeclaration ->Symbol : Symbol - } - interface SymbolDisplayBuilder { ->SymbolDisplayBuilder : SymbolDisplayBuilder - - buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->type : Type ->Type : Type ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; ->buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->flags : SymbolFormatFlags ->SymbolFormatFlags : SymbolFormatFlags - - buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signatures : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameter : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->tp : TypeParameter ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; ->buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void ->symbol : Symbol ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaraiton : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->parameters : Symbol[] ->Symbol : Symbol ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - - buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; ->buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void ->signature : Signature ->Signature : Signature ->writer : SymbolWriter ->SymbolWriter : SymbolWriter ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags - } - interface SymbolWriter { ->SymbolWriter : SymbolWriter - - writeKeyword(text: string): void; ->writeKeyword : (text: string) => void ->text : string - - writeOperator(text: string): void; ->writeOperator : (text: string) => void ->text : string - - writePunctuation(text: string): void; ->writePunctuation : (text: string) => void ->text : string - - writeSpace(text: string): void; ->writeSpace : (text: string) => void ->text : string - - writeStringLiteral(text: string): void; ->writeStringLiteral : (text: string) => void ->text : string - - writeParameter(text: string): void; ->writeParameter : (text: string) => void ->text : string - - writeSymbol(text: string, symbol: Symbol): void; ->writeSymbol : (text: string, symbol: Symbol) => void ->text : string ->symbol : Symbol ->Symbol : Symbol - - writeLine(): void; ->writeLine : () => void - - increaseIndent(): void; ->increaseIndent : () => void - - decreaseIndent(): void; ->decreaseIndent : () => void - - clear(): void; ->clear : () => void - - trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; ->trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags - } - const enum TypeFormatFlags { ->TypeFormatFlags : TypeFormatFlags - - None = 0, ->None : TypeFormatFlags - - WriteArrayAsGenericType = 1, ->WriteArrayAsGenericType : TypeFormatFlags - - UseTypeOfFunction = 2, ->UseTypeOfFunction : TypeFormatFlags - - NoTruncation = 4, ->NoTruncation : TypeFormatFlags - - WriteArrowStyleSignature = 8, ->WriteArrowStyleSignature : TypeFormatFlags - - WriteOwnNameForAnyLike = 16, ->WriteOwnNameForAnyLike : TypeFormatFlags - - WriteTypeArgumentsOfSignature = 32, ->WriteTypeArgumentsOfSignature : TypeFormatFlags - - InElementType = 64, ->InElementType : TypeFormatFlags - - UseFullyQualifiedType = 128, ->UseFullyQualifiedType : TypeFormatFlags - } - const enum SymbolFormatFlags { ->SymbolFormatFlags : SymbolFormatFlags - - None = 0, ->None : SymbolFormatFlags - - WriteTypeParametersOrArguments = 1, ->WriteTypeParametersOrArguments : SymbolFormatFlags - - UseOnlyExternalAliasing = 2, ->UseOnlyExternalAliasing : SymbolFormatFlags - } - const enum SymbolAccessibility { ->SymbolAccessibility : SymbolAccessibility - - Accessible = 0, ->Accessible : SymbolAccessibility - - NotAccessible = 1, ->NotAccessible : SymbolAccessibility - - CannotBeNamed = 2, ->CannotBeNamed : SymbolAccessibility - } - type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; ->AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration ->ImportDeclaration : ImportDeclaration ->ImportEqualsDeclaration : ImportEqualsDeclaration - - interface SymbolVisibilityResult { ->SymbolVisibilityResult : SymbolVisibilityResult - - accessibility: SymbolAccessibility; ->accessibility : SymbolAccessibility ->SymbolAccessibility : SymbolAccessibility - - aliasesToMakeVisible?: AnyImportSyntax[]; ->aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[] ->AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration - - errorSymbolName?: string; ->errorSymbolName : string - - errorNode?: Node; ->errorNode : Node ->Node : Node - } - interface SymbolAccessiblityResult extends SymbolVisibilityResult { ->SymbolAccessiblityResult : SymbolAccessiblityResult ->SymbolVisibilityResult : SymbolVisibilityResult - - errorModuleName?: string; ->errorModuleName : string - } - interface EmitResolver { ->EmitResolver : EmitResolver - - hasGlobalName(name: string): boolean; ->hasGlobalName : (name: string) => boolean ->name : string - - getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string; ->getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string ->node : Identifier ->Identifier : Identifier ->getGeneratedNameForNode : (node: Node) => string ->node : Node ->Node : Node - - isValueAliasDeclaration(node: Node): boolean; ->isValueAliasDeclaration : (node: Node) => boolean ->node : Node ->Node : Node - - isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean; ->isReferencedAliasDeclaration : (node: Node, checkChildren?: boolean) => boolean ->node : Node ->Node : Node ->checkChildren : boolean - - isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; ->isTopLevelValueImportEqualsWithEntityName : (node: ImportEqualsDeclaration) => boolean ->node : ImportEqualsDeclaration ->ImportEqualsDeclaration : ImportEqualsDeclaration - - getNodeCheckFlags(node: Node): NodeCheckFlags; ->getNodeCheckFlags : (node: Node) => NodeCheckFlags ->node : Node ->Node : Node ->NodeCheckFlags : NodeCheckFlags - - isDeclarationVisible(node: Declaration): boolean; ->isDeclarationVisible : (node: Declaration) => boolean ->node : Declaration ->Declaration : Declaration - - collectLinkedAliases(node: Identifier): Node[]; ->collectLinkedAliases : (node: Identifier) => Node[] ->node : Identifier ->Identifier : Identifier ->Node : Node - - isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; ->isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean ->node : FunctionLikeDeclaration ->FunctionLikeDeclaration : FunctionLikeDeclaration - - writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfDeclaration : (declaration: VariableLikeDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->declaration : VariableLikeDeclaration | AccessorDeclaration ->AccessorDeclaration : AccessorDeclaration ->VariableLikeDeclaration : VariableLikeDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->signatureDeclaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; ->writeTypeOfExpression : (expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void ->expr : Expression ->Expression : Expression ->enclosingDeclaration : Node ->Node : Node ->flags : TypeFormatFlags ->TypeFormatFlags : TypeFormatFlags ->writer : SymbolWriter ->SymbolWriter : SymbolWriter - - isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; ->isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult ->symbol : Symbol ->Symbol : Symbol ->enclosingDeclaration : Node ->Node : Node ->meaning : SymbolFlags ->SymbolFlags : SymbolFlags ->SymbolAccessiblityResult : SymbolAccessiblityResult - - isEntityNameVisible(entityName: EntityName | Expression, enclosingDeclaration: Node): SymbolVisibilityResult; ->isEntityNameVisible : (entityName: Expression | Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult ->entityName : Expression | Identifier | QualifiedName ->EntityName : Identifier | QualifiedName ->Expression : Expression ->enclosingDeclaration : Node ->Node : Node ->SymbolVisibilityResult : SymbolVisibilityResult - - getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; ->getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression | EnumMember) => number ->node : PropertyAccessExpression | ElementAccessExpression | EnumMember ->EnumMember : EnumMember ->PropertyAccessExpression : PropertyAccessExpression ->ElementAccessExpression : ElementAccessExpression - - resolvesToSomeValue(location: Node, name: string): boolean; ->resolvesToSomeValue : (location: Node, name: string) => boolean ->location : Node ->Node : Node ->name : string - - getBlockScopedVariableId(node: Identifier): number; ->getBlockScopedVariableId : (node: Identifier) => number ->node : Identifier ->Identifier : Identifier - } - const enum SymbolFlags { ->SymbolFlags : SymbolFlags - - FunctionScopedVariable = 1, ->FunctionScopedVariable : SymbolFlags - - BlockScopedVariable = 2, ->BlockScopedVariable : SymbolFlags - - Property = 4, ->Property : SymbolFlags - - EnumMember = 8, ->EnumMember : SymbolFlags - - Function = 16, ->Function : SymbolFlags - - Class = 32, ->Class : SymbolFlags - - Interface = 64, ->Interface : SymbolFlags - - ConstEnum = 128, ->ConstEnum : SymbolFlags - - RegularEnum = 256, ->RegularEnum : SymbolFlags - - ValueModule = 512, ->ValueModule : SymbolFlags - - NamespaceModule = 1024, ->NamespaceModule : SymbolFlags - - TypeLiteral = 2048, ->TypeLiteral : SymbolFlags - - ObjectLiteral = 4096, ->ObjectLiteral : SymbolFlags - - Method = 8192, ->Method : SymbolFlags - - Constructor = 16384, ->Constructor : SymbolFlags - - GetAccessor = 32768, ->GetAccessor : SymbolFlags - - SetAccessor = 65536, ->SetAccessor : SymbolFlags - - Signature = 131072, ->Signature : SymbolFlags - - TypeParameter = 262144, ->TypeParameter : SymbolFlags - - TypeAlias = 524288, ->TypeAlias : SymbolFlags - - ExportValue = 1048576, ->ExportValue : SymbolFlags - - ExportType = 2097152, ->ExportType : SymbolFlags - - ExportNamespace = 4194304, ->ExportNamespace : SymbolFlags - - Alias = 8388608, ->Alias : SymbolFlags - - Instantiated = 16777216, ->Instantiated : SymbolFlags - - Merged = 33554432, ->Merged : SymbolFlags - - Transient = 67108864, ->Transient : SymbolFlags - - Prototype = 134217728, ->Prototype : SymbolFlags - - UnionProperty = 268435456, ->UnionProperty : SymbolFlags - - Optional = 536870912, ->Optional : SymbolFlags - - ExportStar = 1073741824, ->ExportStar : SymbolFlags - - Enum = 384, ->Enum : SymbolFlags - - Variable = 3, ->Variable : SymbolFlags - - Value = 107455, ->Value : SymbolFlags - - Type = 793056, ->Type : SymbolFlags - - Namespace = 1536, ->Namespace : SymbolFlags - - Module = 1536, ->Module : SymbolFlags - - Accessor = 98304, ->Accessor : SymbolFlags - - FunctionScopedVariableExcludes = 107454, ->FunctionScopedVariableExcludes : SymbolFlags - - BlockScopedVariableExcludes = 107455, ->BlockScopedVariableExcludes : SymbolFlags - - ParameterExcludes = 107455, ->ParameterExcludes : SymbolFlags - - PropertyExcludes = 107455, ->PropertyExcludes : SymbolFlags - - EnumMemberExcludes = 107455, ->EnumMemberExcludes : SymbolFlags - - FunctionExcludes = 106927, ->FunctionExcludes : SymbolFlags - - ClassExcludes = 899583, ->ClassExcludes : SymbolFlags - - InterfaceExcludes = 792992, ->InterfaceExcludes : SymbolFlags - - RegularEnumExcludes = 899327, ->RegularEnumExcludes : SymbolFlags - - ConstEnumExcludes = 899967, ->ConstEnumExcludes : SymbolFlags - - ValueModuleExcludes = 106639, ->ValueModuleExcludes : SymbolFlags - - NamespaceModuleExcludes = 0, ->NamespaceModuleExcludes : SymbolFlags - - MethodExcludes = 99263, ->MethodExcludes : SymbolFlags - - GetAccessorExcludes = 41919, ->GetAccessorExcludes : SymbolFlags - - SetAccessorExcludes = 74687, ->SetAccessorExcludes : SymbolFlags - - TypeParameterExcludes = 530912, ->TypeParameterExcludes : SymbolFlags - - TypeAliasExcludes = 793056, ->TypeAliasExcludes : SymbolFlags - - AliasExcludes = 8388608, ->AliasExcludes : SymbolFlags - - ModuleMember = 8914931, ->ModuleMember : SymbolFlags - - ExportHasLocal = 944, ->ExportHasLocal : SymbolFlags - - HasLocals = 255504, ->HasLocals : SymbolFlags - - HasExports = 1952, ->HasExports : SymbolFlags - - HasMembers = 6240, ->HasMembers : SymbolFlags - - IsContainer = 262128, ->IsContainer : SymbolFlags - - PropertyOrAccessor = 98308, ->PropertyOrAccessor : SymbolFlags - - Export = 7340032, ->Export : SymbolFlags - } - interface Symbol { ->Symbol : Symbol - - flags: SymbolFlags; ->flags : SymbolFlags ->SymbolFlags : SymbolFlags - - name: string; ->name : string - - id?: number; ->id : number - - mergeId?: number; ->mergeId : number - - declarations?: Declaration[]; ->declarations : Declaration[] ->Declaration : Declaration - - parent?: Symbol; ->parent : Symbol ->Symbol : Symbol - - members?: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - exports?: SymbolTable; ->exports : SymbolTable ->SymbolTable : SymbolTable - - exportSymbol?: Symbol; ->exportSymbol : Symbol ->Symbol : Symbol - - valueDeclaration?: Declaration; ->valueDeclaration : Declaration ->Declaration : Declaration - - constEnumOnlyModule?: boolean; ->constEnumOnlyModule : boolean - } - interface SymbolLinks { ->SymbolLinks : SymbolLinks - - target?: Symbol; ->target : Symbol ->Symbol : Symbol - - type?: Type; ->type : Type ->Type : Type - - declaredType?: Type; ->declaredType : Type ->Type : Type - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - referenced?: boolean; ->referenced : boolean - - unionType?: UnionType; ->unionType : UnionType ->UnionType : UnionType - - resolvedExports?: SymbolTable; ->resolvedExports : SymbolTable ->SymbolTable : SymbolTable - - exportsChecked?: boolean; ->exportsChecked : boolean - } - interface TransientSymbol extends Symbol, SymbolLinks { ->TransientSymbol : TransientSymbol ->Symbol : Symbol ->SymbolLinks : SymbolLinks - } - interface SymbolTable { ->SymbolTable : SymbolTable - - [index: string]: Symbol; ->index : string ->Symbol : Symbol - } - const enum NodeCheckFlags { ->NodeCheckFlags : NodeCheckFlags - - TypeChecked = 1, ->TypeChecked : NodeCheckFlags - - LexicalThis = 2, ->LexicalThis : NodeCheckFlags - - CaptureThis = 4, ->CaptureThis : NodeCheckFlags - - EmitExtends = 8, ->EmitExtends : NodeCheckFlags - - SuperInstance = 16, ->SuperInstance : NodeCheckFlags - - SuperStatic = 32, ->SuperStatic : NodeCheckFlags - - ContextChecked = 64, ->ContextChecked : NodeCheckFlags - - EnumValuesComputed = 128, ->EnumValuesComputed : NodeCheckFlags - - BlockScopedBindingInLoop = 256, ->BlockScopedBindingInLoop : NodeCheckFlags - - EmitDecorate = 512, ->EmitDecorate : NodeCheckFlags - } - interface NodeLinks { ->NodeLinks : NodeLinks - - resolvedType?: Type; ->resolvedType : Type ->Type : Type - - resolvedSignature?: Signature; ->resolvedSignature : Signature ->Signature : Signature - - resolvedSymbol?: Symbol; ->resolvedSymbol : Symbol ->Symbol : Symbol - - flags?: NodeCheckFlags; ->flags : NodeCheckFlags ->NodeCheckFlags : NodeCheckFlags - - enumMemberValue?: number; ->enumMemberValue : number - - isIllegalTypeReferenceInConstraint?: boolean; ->isIllegalTypeReferenceInConstraint : boolean - - isVisible?: boolean; ->isVisible : boolean - - generatedName?: string; ->generatedName : string - - generatedNames?: Map; ->generatedNames : Map ->Map : Map - - assignmentChecks?: Map; ->assignmentChecks : Map ->Map : Map - - hasReportedStatementInAmbientContext?: boolean; ->hasReportedStatementInAmbientContext : boolean - - importOnRightSide?: Symbol; ->importOnRightSide : Symbol ->Symbol : Symbol - } - const enum TypeFlags { ->TypeFlags : TypeFlags - - Any = 1, ->Any : TypeFlags - - String = 2, ->String : TypeFlags - - Number = 4, ->Number : TypeFlags - - Boolean = 8, ->Boolean : TypeFlags - - Void = 16, ->Void : TypeFlags - - Undefined = 32, ->Undefined : TypeFlags - - Null = 64, ->Null : TypeFlags - - Enum = 128, ->Enum : TypeFlags - - StringLiteral = 256, ->StringLiteral : TypeFlags - - TypeParameter = 512, ->TypeParameter : TypeFlags - - Class = 1024, ->Class : TypeFlags - - Interface = 2048, ->Interface : TypeFlags - - Reference = 4096, ->Reference : TypeFlags - - Tuple = 8192, ->Tuple : TypeFlags - - Union = 16384, ->Union : TypeFlags - - Anonymous = 32768, ->Anonymous : TypeFlags - - FromSignature = 65536, ->FromSignature : TypeFlags - - ObjectLiteral = 131072, ->ObjectLiteral : TypeFlags - - ContainsUndefinedOrNull = 262144, ->ContainsUndefinedOrNull : TypeFlags - - ContainsObjectLiteral = 524288, ->ContainsObjectLiteral : TypeFlags - - ESSymbol = 1048576, ->ESSymbol : TypeFlags - - Intrinsic = 1048703, ->Intrinsic : TypeFlags - - Primitive = 1049086, ->Primitive : TypeFlags - - StringLike = 258, ->StringLike : TypeFlags - - NumberLike = 132, ->NumberLike : TypeFlags - - ObjectType = 48128, ->ObjectType : TypeFlags - - RequiresWidening = 786432, ->RequiresWidening : TypeFlags - } - interface Type { ->Type : Type - - flags: TypeFlags; ->flags : TypeFlags ->TypeFlags : TypeFlags - - id: number; ->id : number - - symbol?: Symbol; ->symbol : Symbol ->Symbol : Symbol - } - interface IntrinsicType extends Type { ->IntrinsicType : IntrinsicType ->Type : Type - - intrinsicName: string; ->intrinsicName : string - } - interface StringLiteralType extends Type { ->StringLiteralType : StringLiteralType ->Type : Type - - text: string; ->text : string - } - interface ObjectType extends Type { ->ObjectType : ObjectType ->Type : Type - } - interface InterfaceType extends ObjectType { ->InterfaceType : InterfaceType ->ObjectType : ObjectType - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - baseTypes: ObjectType[]; ->baseTypes : ObjectType[] ->ObjectType : ObjectType - - declaredProperties: Symbol[]; ->declaredProperties : Symbol[] ->Symbol : Symbol - - declaredCallSignatures: Signature[]; ->declaredCallSignatures : Signature[] ->Signature : Signature - - declaredConstructSignatures: Signature[]; ->declaredConstructSignatures : Signature[] ->Signature : Signature - - declaredStringIndexType: Type; ->declaredStringIndexType : Type ->Type : Type - - declaredNumberIndexType: Type; ->declaredNumberIndexType : Type ->Type : Type - } - interface TypeReference extends ObjectType { ->TypeReference : TypeReference ->ObjectType : ObjectType - - target: GenericType; ->target : GenericType ->GenericType : GenericType - - typeArguments: Type[]; ->typeArguments : Type[] ->Type : Type - } - interface GenericType extends InterfaceType, TypeReference { ->GenericType : GenericType ->InterfaceType : InterfaceType ->TypeReference : TypeReference - - instantiations: Map; ->instantiations : Map ->Map : Map ->TypeReference : TypeReference - } - interface TupleType extends ObjectType { ->TupleType : TupleType ->ObjectType : ObjectType - - elementTypes: Type[]; ->elementTypes : Type[] ->Type : Type - - baseArrayType: TypeReference; ->baseArrayType : TypeReference ->TypeReference : TypeReference - } - interface UnionType extends Type { ->UnionType : UnionType ->Type : Type - - types: Type[]; ->types : Type[] ->Type : Type - - resolvedProperties: SymbolTable; ->resolvedProperties : SymbolTable ->SymbolTable : SymbolTable - } - interface ResolvedType extends ObjectType, UnionType { ->ResolvedType : ResolvedType ->ObjectType : ObjectType ->UnionType : UnionType - - members: SymbolTable; ->members : SymbolTable ->SymbolTable : SymbolTable - - properties: Symbol[]; ->properties : Symbol[] ->Symbol : Symbol - - callSignatures: Signature[]; ->callSignatures : Signature[] ->Signature : Signature - - constructSignatures: Signature[]; ->constructSignatures : Signature[] ->Signature : Signature - - stringIndexType: Type; ->stringIndexType : Type ->Type : Type - - numberIndexType: Type; ->numberIndexType : Type ->Type : Type - } - interface TypeParameter extends Type { ->TypeParameter : TypeParameter ->Type : Type - - constraint: Type; ->constraint : Type ->Type : Type - - target?: TypeParameter; ->target : TypeParameter ->TypeParameter : TypeParameter - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - } - const enum SignatureKind { ->SignatureKind : SignatureKind - - Call = 0, ->Call : SignatureKind - - Construct = 1, ->Construct : SignatureKind - } - interface Signature { ->Signature : Signature - - declaration: SignatureDeclaration; ->declaration : SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - typeParameters: TypeParameter[]; ->typeParameters : TypeParameter[] ->TypeParameter : TypeParameter - - parameters: Symbol[]; ->parameters : Symbol[] ->Symbol : Symbol - - resolvedReturnType: Type; ->resolvedReturnType : Type ->Type : Type - - minArgumentCount: number; ->minArgumentCount : number - - hasRestParameter: boolean; ->hasRestParameter : boolean - - hasStringLiterals: boolean; ->hasStringLiterals : boolean - - target?: Signature; ->target : Signature ->Signature : Signature - - mapper?: TypeMapper; ->mapper : TypeMapper ->TypeMapper : TypeMapper - - unionSignatures?: Signature[]; ->unionSignatures : Signature[] ->Signature : Signature - - erasedSignatureCache?: Signature; ->erasedSignatureCache : Signature ->Signature : Signature - - isolatedSignatureType?: ObjectType; ->isolatedSignatureType : ObjectType ->ObjectType : ObjectType - } - const enum IndexKind { ->IndexKind : IndexKind - - String = 0, ->String : IndexKind - - Number = 1, ->Number : IndexKind - } - interface TypeMapper { ->TypeMapper : TypeMapper - - (t: Type): Type; ->t : Type ->Type : Type ->Type : Type - } - interface DiagnosticMessage { ->DiagnosticMessage : DiagnosticMessage - - key: string; ->key : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - } - interface DiagnosticMessageChain { ->DiagnosticMessageChain : DiagnosticMessageChain - - messageText: string; ->messageText : string - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - - next?: DiagnosticMessageChain; ->next : DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - } - interface Diagnostic { ->Diagnostic : Diagnostic - - file: SourceFile; ->file : SourceFile ->SourceFile : SourceFile - - start: number; ->start : number - - length: number; ->length : number - - messageText: string | DiagnosticMessageChain; ->messageText : string | DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain - - category: DiagnosticCategory; ->category : DiagnosticCategory ->DiagnosticCategory : DiagnosticCategory - - code: number; ->code : number - } - enum DiagnosticCategory { ->DiagnosticCategory : DiagnosticCategory - - Warning = 0, ->Warning : DiagnosticCategory - - Error = 1, ->Error : DiagnosticCategory - - Message = 2, ->Message : DiagnosticCategory - } - interface CompilerOptions { ->CompilerOptions : CompilerOptions - - allowNonTsExtensions?: boolean; ->allowNonTsExtensions : boolean - - charset?: string; ->charset : string - - declaration?: boolean; ->declaration : boolean - - diagnostics?: boolean; ->diagnostics : boolean - - emitBOM?: boolean; ->emitBOM : boolean - - help?: boolean; ->help : boolean - - listFiles?: boolean; ->listFiles : boolean - - locale?: string; ->locale : string - - mapRoot?: string; ->mapRoot : string - - module?: ModuleKind; ->module : ModuleKind ->ModuleKind : ModuleKind - - noEmit?: boolean; ->noEmit : boolean - - noEmitOnError?: boolean; ->noEmitOnError : boolean - - noErrorTruncation?: boolean; ->noErrorTruncation : boolean - - noImplicitAny?: boolean; ->noImplicitAny : boolean - - noLib?: boolean; ->noLib : boolean - - noResolve?: boolean; ->noResolve : boolean - - out?: string; ->out : string - - outDir?: string; ->outDir : string - - preserveConstEnums?: boolean; ->preserveConstEnums : boolean - - project?: string; ->project : string - - removeComments?: boolean; ->removeComments : boolean - - sourceMap?: boolean; ->sourceMap : boolean - - sourceRoot?: string; ->sourceRoot : string - - suppressImplicitAnyIndexErrors?: boolean; ->suppressImplicitAnyIndexErrors : boolean - - target?: ScriptTarget; ->target : ScriptTarget ->ScriptTarget : ScriptTarget - - version?: boolean; ->version : boolean - - watch?: boolean; ->watch : boolean - - separateCompilation?: boolean; ->separateCompilation : boolean - - [option: string]: string | number | boolean; ->option : string - } - const enum ModuleKind { ->ModuleKind : ModuleKind - - None = 0, ->None : ModuleKind - - CommonJS = 1, ->CommonJS : ModuleKind - - AMD = 2, ->AMD : ModuleKind - } - interface LineAndCharacter { ->LineAndCharacter : LineAndCharacter - - line: number; ->line : number - - character: number; ->character : number - } - const enum ScriptTarget { ->ScriptTarget : ScriptTarget - - ES3 = 0, ->ES3 : ScriptTarget - - ES5 = 1, ->ES5 : ScriptTarget - - ES6 = 2, ->ES6 : ScriptTarget - - Latest = 2, ->Latest : ScriptTarget - } - interface ParsedCommandLine { ->ParsedCommandLine : ParsedCommandLine - - options: CompilerOptions; ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - fileNames: string[]; ->fileNames : string[] - - errors: Diagnostic[]; ->errors : Diagnostic[] ->Diagnostic : Diagnostic - } - interface CommandLineOption { ->CommandLineOption : CommandLineOption - - name: string; ->name : string - - type: string | Map; ->type : string | Map ->Map : Map - - isFilePath?: boolean; ->isFilePath : boolean - - shortName?: string; ->shortName : string - - description?: DiagnosticMessage; ->description : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - paramType?: DiagnosticMessage; ->paramType : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - error?: DiagnosticMessage; ->error : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage - - experimental?: boolean; ->experimental : boolean - } - const enum CharacterCodes { ->CharacterCodes : CharacterCodes - - nullCharacter = 0, ->nullCharacter : CharacterCodes - - maxAsciiCharacter = 127, ->maxAsciiCharacter : CharacterCodes - - lineFeed = 10, ->lineFeed : CharacterCodes - - carriageReturn = 13, ->carriageReturn : CharacterCodes - - lineSeparator = 8232, ->lineSeparator : CharacterCodes - - paragraphSeparator = 8233, ->paragraphSeparator : CharacterCodes - - nextLine = 133, ->nextLine : CharacterCodes - - space = 32, ->space : CharacterCodes - - nonBreakingSpace = 160, ->nonBreakingSpace : CharacterCodes - - enQuad = 8192, ->enQuad : CharacterCodes - - emQuad = 8193, ->emQuad : CharacterCodes - - enSpace = 8194, ->enSpace : CharacterCodes - - emSpace = 8195, ->emSpace : CharacterCodes - - threePerEmSpace = 8196, ->threePerEmSpace : CharacterCodes - - fourPerEmSpace = 8197, ->fourPerEmSpace : CharacterCodes - - sixPerEmSpace = 8198, ->sixPerEmSpace : CharacterCodes - - figureSpace = 8199, ->figureSpace : CharacterCodes - - punctuationSpace = 8200, ->punctuationSpace : CharacterCodes - - thinSpace = 8201, ->thinSpace : CharacterCodes - - hairSpace = 8202, ->hairSpace : CharacterCodes - - zeroWidthSpace = 8203, ->zeroWidthSpace : CharacterCodes - - narrowNoBreakSpace = 8239, ->narrowNoBreakSpace : CharacterCodes - - ideographicSpace = 12288, ->ideographicSpace : CharacterCodes - - mathematicalSpace = 8287, ->mathematicalSpace : CharacterCodes - - ogham = 5760, ->ogham : CharacterCodes - - _ = 95, ->_ : CharacterCodes - - $ = 36, ->$ : CharacterCodes - - _0 = 48, ->_0 : CharacterCodes - - _1 = 49, ->_1 : CharacterCodes - - _2 = 50, ->_2 : CharacterCodes - - _3 = 51, ->_3 : CharacterCodes - - _4 = 52, ->_4 : CharacterCodes - - _5 = 53, ->_5 : CharacterCodes - - _6 = 54, ->_6 : CharacterCodes - - _7 = 55, ->_7 : CharacterCodes - - _8 = 56, ->_8 : CharacterCodes - - _9 = 57, ->_9 : CharacterCodes - - a = 97, ->a : CharacterCodes - - b = 98, ->b : CharacterCodes - - c = 99, ->c : CharacterCodes - - d = 100, ->d : CharacterCodes - - e = 101, ->e : CharacterCodes - - f = 102, ->f : CharacterCodes - - g = 103, ->g : CharacterCodes - - h = 104, ->h : CharacterCodes - - i = 105, ->i : CharacterCodes - - j = 106, ->j : CharacterCodes - - k = 107, ->k : CharacterCodes - - l = 108, ->l : CharacterCodes - - m = 109, ->m : CharacterCodes - - n = 110, ->n : CharacterCodes - - o = 111, ->o : CharacterCodes - - p = 112, ->p : CharacterCodes - - q = 113, ->q : CharacterCodes - - r = 114, ->r : CharacterCodes - - s = 115, ->s : CharacterCodes - - t = 116, ->t : CharacterCodes - - u = 117, ->u : CharacterCodes - - v = 118, ->v : CharacterCodes - - w = 119, ->w : CharacterCodes - - x = 120, ->x : CharacterCodes - - y = 121, ->y : CharacterCodes - - z = 122, ->z : CharacterCodes - - A = 65, ->A : CharacterCodes - - B = 66, ->B : CharacterCodes - - C = 67, ->C : CharacterCodes - - D = 68, ->D : CharacterCodes - - E = 69, ->E : CharacterCodes - - F = 70, ->F : CharacterCodes - - G = 71, ->G : CharacterCodes - - H = 72, ->H : CharacterCodes - - I = 73, ->I : CharacterCodes - - J = 74, ->J : CharacterCodes - - K = 75, ->K : CharacterCodes - - L = 76, ->L : CharacterCodes - - M = 77, ->M : CharacterCodes - - N = 78, ->N : CharacterCodes - - O = 79, ->O : CharacterCodes - - P = 80, ->P : CharacterCodes - - Q = 81, ->Q : CharacterCodes - - R = 82, ->R : CharacterCodes - - S = 83, ->S : CharacterCodes - - T = 84, ->T : CharacterCodes - - U = 85, ->U : CharacterCodes - - V = 86, ->V : CharacterCodes - - W = 87, ->W : CharacterCodes - - X = 88, ->X : CharacterCodes - - Y = 89, ->Y : CharacterCodes - - Z = 90, ->Z : CharacterCodes - - ampersand = 38, ->ampersand : CharacterCodes - - asterisk = 42, ->asterisk : CharacterCodes - - at = 64, ->at : CharacterCodes - - backslash = 92, ->backslash : CharacterCodes - - backtick = 96, ->backtick : CharacterCodes - - bar = 124, ->bar : CharacterCodes - - caret = 94, ->caret : CharacterCodes - - closeBrace = 125, ->closeBrace : CharacterCodes - - closeBracket = 93, ->closeBracket : CharacterCodes - - closeParen = 41, ->closeParen : CharacterCodes - - colon = 58, ->colon : CharacterCodes - - comma = 44, ->comma : CharacterCodes - - dot = 46, ->dot : CharacterCodes - - doubleQuote = 34, ->doubleQuote : CharacterCodes - - equals = 61, ->equals : CharacterCodes - - exclamation = 33, ->exclamation : CharacterCodes - - greaterThan = 62, ->greaterThan : CharacterCodes - - hash = 35, ->hash : CharacterCodes - - lessThan = 60, ->lessThan : CharacterCodes - - minus = 45, ->minus : CharacterCodes - - openBrace = 123, ->openBrace : CharacterCodes - - openBracket = 91, ->openBracket : CharacterCodes - - openParen = 40, ->openParen : CharacterCodes - - percent = 37, ->percent : CharacterCodes - - plus = 43, ->plus : CharacterCodes - - question = 63, ->question : CharacterCodes - - semicolon = 59, ->semicolon : CharacterCodes - - singleQuote = 39, ->singleQuote : CharacterCodes - - slash = 47, ->slash : CharacterCodes - - tilde = 126, ->tilde : CharacterCodes - - backspace = 8, ->backspace : CharacterCodes - - formFeed = 12, ->formFeed : CharacterCodes - - byteOrderMark = 65279, ->byteOrderMark : CharacterCodes - - tab = 9, ->tab : CharacterCodes - - verticalTab = 11, ->verticalTab : CharacterCodes - } - interface CancellationToken { ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - } - interface CompilerHost { ->CompilerHost : CompilerHost - - getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; ->getSourceFile : (fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile ->fileName : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->onError : (message: string) => void ->message : string ->SourceFile : SourceFile - - getDefaultLibFileName(options: CompilerOptions): string; ->getDefaultLibFileName : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - writeFile: WriteFileCallback; ->writeFile : WriteFileCallback ->WriteFileCallback : WriteFileCallback - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getCanonicalFileName(fileName: string): string; ->getCanonicalFileName : (fileName: string) => string ->fileName : string - - useCaseSensitiveFileNames(): boolean; ->useCaseSensitiveFileNames : () => boolean - - getNewLine(): string; ->getNewLine : () => string - } - interface TextSpan { ->TextSpan : TextSpan - - start: number; ->start : number - - length: number; ->length : number - } - interface TextChangeRange { ->TextChangeRange : TextChangeRange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newLength: number; ->newLength : number - } -} -declare module "typescript" { - interface ErrorCallback { ->ErrorCallback : ErrorCallback - - (message: DiagnosticMessage, length: number): void; ->message : DiagnosticMessage ->DiagnosticMessage : DiagnosticMessage ->length : number - } - interface Scanner { ->Scanner : Scanner - - getStartPos(): number; ->getStartPos : () => number - - getToken(): SyntaxKind; ->getToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - getTextPos(): number; ->getTextPos : () => number - - getTokenPos(): number; ->getTokenPos : () => number - - getTokenText(): string; ->getTokenText : () => string - - getTokenValue(): string; ->getTokenValue : () => string - - hasExtendedUnicodeEscape(): boolean; ->hasExtendedUnicodeEscape : () => boolean - - hasPrecedingLineBreak(): boolean; ->hasPrecedingLineBreak : () => boolean - - isIdentifier(): boolean; ->isIdentifier : () => boolean - - isReservedWord(): boolean; ->isReservedWord : () => boolean - - isUnterminated(): boolean; ->isUnterminated : () => boolean - - reScanGreaterToken(): SyntaxKind; ->reScanGreaterToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanSlashToken(): SyntaxKind; ->reScanSlashToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - reScanTemplateToken(): SyntaxKind; ->reScanTemplateToken : () => SyntaxKind ->SyntaxKind : SyntaxKind - - scan(): SyntaxKind; ->scan : () => SyntaxKind ->SyntaxKind : SyntaxKind - - setText(text: string): void; ->setText : (text: string) => void ->text : string - - setTextPos(textPos: number): void; ->setTextPos : (textPos: number) => void ->textPos : number - - lookAhead(callback: () => T): T; ->lookAhead : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - - tryScan(callback: () => T): T; ->tryScan : (callback: () => T) => T ->T : T ->callback : () => T ->T : T ->T : T - } - function tokenToString(t: SyntaxKind): string; ->tokenToString : (t: SyntaxKind) => string ->t : SyntaxKind ->SyntaxKind : SyntaxKind - - function computeLineStarts(text: string): number[]; ->computeLineStarts : (text: string) => number[] ->text : string - - function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; ->getPositionOfLineAndCharacter : (sourceFile: SourceFile, line: number, character: number) => number ->sourceFile : SourceFile ->SourceFile : SourceFile ->line : number ->character : number - - function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number; ->computePositionOfLineAndCharacter : (lineStarts: number[], line: number, character: number) => number ->lineStarts : number[] ->line : number ->character : number - - function getLineStarts(sourceFile: SourceFile): number[]; ->getLineStarts : (sourceFile: SourceFile) => number[] ->sourceFile : SourceFile ->SourceFile : SourceFile - - function computeLineAndCharacterOfPosition(lineStarts: number[], position: number): { ->computeLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } ->lineStarts : number[] ->position : number - - line: number; ->line : number - - character: number; ->character : number - - }; - function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; ->getLineAndCharacterOfPosition : (sourceFile: SourceFile, position: number) => LineAndCharacter ->sourceFile : SourceFile ->SourceFile : SourceFile ->position : number ->LineAndCharacter : LineAndCharacter - - function isWhiteSpace(ch: number): boolean; ->isWhiteSpace : (ch: number) => boolean ->ch : number - - function isLineBreak(ch: number): boolean; ->isLineBreak : (ch: number) => boolean ->ch : number - - function isOctalDigit(ch: number): boolean; ->isOctalDigit : (ch: number) => boolean ->ch : number - - function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; ->skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number ->text : string ->pos : number ->stopAfterLineBreak : boolean - - function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; ->getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; ->getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] ->text : string ->pos : number ->CommentRange : CommentRange - - function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; ->isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean ->ch : number ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget - - function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; ->createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->skipTrivia : boolean ->text : string ->onError : ErrorCallback ->ErrorCallback : ErrorCallback ->Scanner : Scanner -} -declare module "typescript" { - function getNodeConstructor(kind: SyntaxKind): new () => Node; ->getNodeConstructor : (kind: SyntaxKind) => new () => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function createNode(kind: SyntaxKind): Node; ->createNode : (kind: SyntaxKind) => Node ->kind : SyntaxKind ->SyntaxKind : SyntaxKind ->Node : Node - - function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; ->forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T) => T ->T : T ->node : Node ->Node : Node ->cbNode : (node: Node) => T ->node : Node ->Node : Node ->T : T ->cbNodeArray : (nodes: Node[]) => T ->nodes : Node[] ->Node : Node ->T : T ->T : T - - function modifierToFlag(token: SyntaxKind): NodeFlags; ->modifierToFlag : (token: SyntaxKind) => NodeFlags ->token : SyntaxKind ->SyntaxKind : SyntaxKind ->NodeFlags : NodeFlags - - function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; ->updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->newText : string ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->aggressiveChecks : boolean ->SourceFile : SourceFile - - function isEvalOrArgumentsIdentifier(node: Node): boolean; ->isEvalOrArgumentsIdentifier : (node: Node) => boolean ->node : Node ->Node : Node - - function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; ->createSourceFile : (fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean) => SourceFile ->fileName : string ->sourceText : string ->languageVersion : ScriptTarget ->ScriptTarget : ScriptTarget ->setParentNodes : boolean ->SourceFile : SourceFile - - function isLeftHandSideExpression(expr: Expression): boolean; ->isLeftHandSideExpression : (expr: Expression) => boolean ->expr : Expression ->Expression : Expression - - function isAssignmentOperator(token: SyntaxKind): boolean; ->isAssignmentOperator : (token: SyntaxKind) => boolean ->token : SyntaxKind ->SyntaxKind : SyntaxKind -} -declare module "typescript" { - function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; ->createTypeChecker : (host: TypeCheckerHost, produceDiagnostics: boolean) => TypeChecker ->host : TypeCheckerHost ->TypeCheckerHost : TypeCheckerHost ->produceDiagnostics : boolean ->TypeChecker : TypeChecker -} -declare module "typescript" { - /** The version of the TypeScript compiler release */ - let version: string; ->version : string - - function findConfigFile(searchPath: string): string; ->findConfigFile : (searchPath: string) => string ->searchPath : string - - function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; ->createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->setParentNodes : boolean ->CompilerHost : CompilerHost - - function getPreEmitDiagnostics(program: Program): Diagnostic[]; ->getPreEmitDiagnostics : (program: Program) => Diagnostic[] ->program : Program ->Program : Program ->Diagnostic : Diagnostic - - function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; ->flattenDiagnosticMessageText : (messageText: string | DiagnosticMessageChain, newLine: string) => string ->messageText : string | DiagnosticMessageChain ->DiagnosticMessageChain : DiagnosticMessageChain ->newLine : string - - function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; ->createProgram : (rootNames: string[], options: CompilerOptions, host?: CompilerHost) => Program ->rootNames : string[] ->options : CompilerOptions ->CompilerOptions : CompilerOptions ->host : CompilerHost ->CompilerHost : CompilerHost ->Program : Program -} -declare module "typescript" { - /** - * Read tsconfig.json file - * @param fileName The path to the config file - */ - function readConfigFile(fileName: string): any; ->readConfigFile : (fileName: string) => any ->fileName : string - - /** - * Parse the contents of a config file (tsconfig.json). - * @param json The contents of the config file to parse - * @param basePath A root directory to resolve relative path entries in the config - * file to. e.g. outDir - */ - function parseConfigFile(json: any, basePath?: string): ParsedCommandLine; ->parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine ->json : any ->basePath : string ->ParsedCommandLine : ParsedCommandLine -} -declare module "typescript" { - /** The version of the language service API */ - let servicesVersion: string; ->servicesVersion : string - - interface Node { ->Node : Node - - getSourceFile(): SourceFile; ->getSourceFile : () => SourceFile ->SourceFile : SourceFile - - getChildCount(sourceFile?: SourceFile): number; ->getChildCount : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getChildAt(index: number, sourceFile?: SourceFile): Node; ->getChildAt : (index: number, sourceFile?: SourceFile) => Node ->index : number ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getChildren(sourceFile?: SourceFile): Node[]; ->getChildren : (sourceFile?: SourceFile) => Node[] ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getStart(sourceFile?: SourceFile): number; ->getStart : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullStart(): number; ->getFullStart : () => number - - getEnd(): number; ->getEnd : () => number - - getWidth(sourceFile?: SourceFile): number; ->getWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullWidth(): number; ->getFullWidth : () => number - - getLeadingTriviaWidth(sourceFile?: SourceFile): number; ->getLeadingTriviaWidth : (sourceFile?: SourceFile) => number ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFullText(sourceFile?: SourceFile): string; ->getFullText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getText(sourceFile?: SourceFile): string; ->getText : (sourceFile?: SourceFile) => string ->sourceFile : SourceFile ->SourceFile : SourceFile - - getFirstToken(sourceFile?: SourceFile): Node; ->getFirstToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - - getLastToken(sourceFile?: SourceFile): Node; ->getLastToken : (sourceFile?: SourceFile) => Node ->sourceFile : SourceFile ->SourceFile : SourceFile ->Node : Node - } - interface Symbol { ->Symbol : Symbol - - getFlags(): SymbolFlags; ->getFlags : () => SymbolFlags ->SymbolFlags : SymbolFlags - - getName(): string; ->getName : () => string - - getDeclarations(): Declaration[]; ->getDeclarations : () => Declaration[] ->Declaration : Declaration - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface Type { ->Type : Type - - getFlags(): TypeFlags; ->getFlags : () => TypeFlags ->TypeFlags : TypeFlags - - getSymbol(): Symbol; ->getSymbol : () => Symbol ->Symbol : Symbol - - getProperties(): Symbol[]; ->getProperties : () => Symbol[] ->Symbol : Symbol - - getProperty(propertyName: string): Symbol; ->getProperty : (propertyName: string) => Symbol ->propertyName : string ->Symbol : Symbol - - getApparentProperties(): Symbol[]; ->getApparentProperties : () => Symbol[] ->Symbol : Symbol - - getCallSignatures(): Signature[]; ->getCallSignatures : () => Signature[] ->Signature : Signature - - getConstructSignatures(): Signature[]; ->getConstructSignatures : () => Signature[] ->Signature : Signature - - getStringIndexType(): Type; ->getStringIndexType : () => Type ->Type : Type - - getNumberIndexType(): Type; ->getNumberIndexType : () => Type ->Type : Type - } - interface Signature { ->Signature : Signature - - getDeclaration(): SignatureDeclaration; ->getDeclaration : () => SignatureDeclaration ->SignatureDeclaration : SignatureDeclaration - - getTypeParameters(): Type[]; ->getTypeParameters : () => Type[] ->Type : Type - - getParameters(): Symbol[]; ->getParameters : () => Symbol[] ->Symbol : Symbol - - getReturnType(): Type; ->getReturnType : () => Type ->Type : Type - - getDocumentationComment(): SymbolDisplayPart[]; ->getDocumentationComment : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface SourceFile { ->SourceFile : SourceFile - - getNamedDeclarations(): Declaration[]; ->getNamedDeclarations : () => Declaration[] ->Declaration : Declaration - - getLineAndCharacterOfPosition(pos: number): LineAndCharacter; ->getLineAndCharacterOfPosition : (pos: number) => LineAndCharacter ->pos : number ->LineAndCharacter : LineAndCharacter - - getLineStarts(): number[]; ->getLineStarts : () => number[] - - getPositionOfLineAndCharacter(line: number, character: number): number; ->getPositionOfLineAndCharacter : (line: number, character: number) => number ->line : number ->character : number - - update(newText: string, textChangeRange: TextChangeRange): SourceFile; ->update : (newText: string, textChangeRange: TextChangeRange) => SourceFile ->newText : string ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->SourceFile : SourceFile - } - /** - * 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 - * the same values. - */ - interface IScriptSnapshot { ->IScriptSnapshot : IScriptSnapshot - - /** Gets a portion of the script snapshot specified by [start, end). */ - getText(start: number, end: number): string; ->getText : (start: number, end: number) => string ->start : number ->end : number - - /** Gets the length of this script snapshot. */ - getLength(): number; ->getLength : () => number - - /** - * Gets the TextChangeRange that describe how the text changed between this text and - * an older version. This information is used by the incremental parser to determine - * what sections of the script need to be re-parsed. 'undefined' can be returned if the - * change range cannot be determined. However, in that case, incremental parsing will - * not happen and the entire document will be re - parsed. - */ - getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; ->getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange ->oldSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->TextChangeRange : TextChangeRange - } - module ScriptSnapshot { ->ScriptSnapshot : typeof ScriptSnapshot - - function fromString(text: string): IScriptSnapshot; ->fromString : (text: string) => IScriptSnapshot ->text : string ->IScriptSnapshot : IScriptSnapshot - } - interface PreProcessedFileInfo { ->PreProcessedFileInfo : PreProcessedFileInfo - - referencedFiles: FileReference[]; ->referencedFiles : FileReference[] ->FileReference : FileReference - - importedFiles: FileReference[]; ->importedFiles : FileReference[] ->FileReference : FileReference - - isLibFile: boolean; ->isLibFile : boolean - } - interface LanguageServiceHost { ->LanguageServiceHost : LanguageServiceHost - - getCompilationSettings(): CompilerOptions; ->getCompilationSettings : () => CompilerOptions ->CompilerOptions : CompilerOptions - - getNewLine?(): string; ->getNewLine : () => string - - getScriptFileNames(): string[]; ->getScriptFileNames : () => string[] - - getScriptVersion(fileName: string): string; ->getScriptVersion : (fileName: string) => string ->fileName : string - - getScriptSnapshot(fileName: string): IScriptSnapshot; ->getScriptSnapshot : (fileName: string) => IScriptSnapshot ->fileName : string ->IScriptSnapshot : IScriptSnapshot - - getLocalizedDiagnosticMessages?(): any; ->getLocalizedDiagnosticMessages : () => any - - getCancellationToken?(): CancellationToken; ->getCancellationToken : () => CancellationToken ->CancellationToken : CancellationToken - - getCurrentDirectory(): string; ->getCurrentDirectory : () => string - - getDefaultLibFileName(options: CompilerOptions): string; ->getDefaultLibFileName : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions - - log?(s: string): void; ->log : (s: string) => void ->s : string - - trace?(s: string): void; ->trace : (s: string) => void ->s : string - - error?(s: string): void; ->error : (s: string) => void ->s : string - } - interface LanguageService { ->LanguageService : LanguageService - - cleanupSemanticCache(): void; ->cleanupSemanticCache : () => void - - getSyntacticDiagnostics(fileName: string): Diagnostic[]; ->getSyntacticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getSemanticDiagnostics(fileName: string): Diagnostic[]; ->getSemanticDiagnostics : (fileName: string) => Diagnostic[] ->fileName : string ->Diagnostic : Diagnostic - - getCompilerOptionsDiagnostics(): Diagnostic[]; ->getCompilerOptionsDiagnostics : () => Diagnostic[] ->Diagnostic : Diagnostic - - getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; ->getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] ->fileName : string ->span : TextSpan ->TextSpan : TextSpan ->ClassifiedSpan : ClassifiedSpan - - getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; ->getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo ->fileName : string ->position : number ->CompletionInfo : CompletionInfo - - getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; ->getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails ->fileName : string ->position : number ->entryName : string ->CompletionEntryDetails : CompletionEntryDetails - - getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; ->getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo ->fileName : string ->position : number ->QuickInfo : QuickInfo - - getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; ->getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan ->fileName : string ->startPos : number ->endPos : number ->TextSpan : TextSpan - - getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; ->getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan ->fileName : string ->position : number ->TextSpan : TextSpan - - getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; ->getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems ->fileName : string ->position : number ->SignatureHelpItems : SignatureHelpItems - - getRenameInfo(fileName: string, position: number): RenameInfo; ->getRenameInfo : (fileName: string, position: number) => RenameInfo ->fileName : string ->position : number ->RenameInfo : RenameInfo - - findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; ->findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] ->fileName : string ->position : number ->findInStrings : boolean ->findInComments : boolean ->RenameLocation : RenameLocation - - getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; ->getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] ->fileName : string ->position : number ->DefinitionInfo : DefinitionInfo - - getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; ->getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] ->fileName : string ->position : number ->ReferenceEntry : ReferenceEntry - - findReferences(fileName: string, position: number): ReferencedSymbol[]; ->findReferences : (fileName: string, position: number) => ReferencedSymbol[] ->fileName : string ->position : number ->ReferencedSymbol : ReferencedSymbol - - getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; ->getNavigateToItems : (searchValue: string, maxResultCount?: number) => NavigateToItem[] ->searchValue : string ->maxResultCount : number ->NavigateToItem : NavigateToItem - - getNavigationBarItems(fileName: string): NavigationBarItem[]; ->getNavigationBarItems : (fileName: string) => NavigationBarItem[] ->fileName : string ->NavigationBarItem : NavigationBarItem - - getOutliningSpans(fileName: string): OutliningSpan[]; ->getOutliningSpans : (fileName: string) => OutliningSpan[] ->fileName : string ->OutliningSpan : OutliningSpan - - getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; ->getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] ->fileName : string ->descriptors : TodoCommentDescriptor[] ->TodoCommentDescriptor : TodoCommentDescriptor ->TodoComment : TodoComment - - getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; ->getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] ->fileName : string ->position : number ->TextSpan : TextSpan - - getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; ->getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number ->fileName : string ->position : number ->options : EditorOptions ->EditorOptions : EditorOptions - - getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] ->fileName : string ->start : number ->end : number ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; ->getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] ->fileName : string ->position : number ->key : string ->options : FormatCodeOptions ->FormatCodeOptions : FormatCodeOptions ->TextChange : TextChange - - getEmitOutput(fileName: string): EmitOutput; ->getEmitOutput : (fileName: string) => EmitOutput ->fileName : string ->EmitOutput : EmitOutput - - getProgram(): Program; ->getProgram : () => Program ->Program : Program - - getSourceFile(fileName: string): SourceFile; ->getSourceFile : (fileName: string) => SourceFile ->fileName : string ->SourceFile : SourceFile - - dispose(): void; ->dispose : () => void - } - interface ClassifiedSpan { ->ClassifiedSpan : ClassifiedSpan - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - classificationType: string; ->classificationType : string - } - interface NavigationBarItem { ->NavigationBarItem : NavigationBarItem - - text: string; ->text : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - spans: TextSpan[]; ->spans : TextSpan[] ->TextSpan : TextSpan - - childItems: NavigationBarItem[]; ->childItems : NavigationBarItem[] ->NavigationBarItem : NavigationBarItem - - indent: number; ->indent : number - - bolded: boolean; ->bolded : boolean - - grayed: boolean; ->grayed : boolean - } - interface TodoCommentDescriptor { ->TodoCommentDescriptor : TodoCommentDescriptor - - text: string; ->text : string - - priority: number; ->priority : number - } - interface TodoComment { ->TodoComment : TodoComment - - descriptor: TodoCommentDescriptor; ->descriptor : TodoCommentDescriptor ->TodoCommentDescriptor : TodoCommentDescriptor - - message: string; ->message : string - - position: number; ->position : number - } - class TextChange { ->TextChange : TextChange - - span: TextSpan; ->span : TextSpan ->TextSpan : TextSpan - - newText: string; ->newText : string - } - interface RenameLocation { ->RenameLocation : RenameLocation - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - } - interface ReferenceEntry { ->ReferenceEntry : ReferenceEntry - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - fileName: string; ->fileName : string - - isWriteAccess: boolean; ->isWriteAccess : boolean - } - interface NavigateToItem { ->NavigateToItem : NavigateToItem - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - matchKind: string; ->matchKind : string - - isCaseSensitive: boolean; ->isCaseSensitive : boolean - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - containerName: string; ->containerName : string - - containerKind: string; ->containerKind : string - } - interface EditorOptions { ->EditorOptions : EditorOptions - - IndentSize: number; ->IndentSize : number - - TabSize: number; ->TabSize : number - - NewLineCharacter: string; ->NewLineCharacter : string - - ConvertTabsToSpaces: boolean; ->ConvertTabsToSpaces : boolean - } - interface FormatCodeOptions extends EditorOptions { ->FormatCodeOptions : FormatCodeOptions ->EditorOptions : EditorOptions - - InsertSpaceAfterCommaDelimiter: boolean; ->InsertSpaceAfterCommaDelimiter : boolean - - InsertSpaceAfterSemicolonInForStatements: boolean; ->InsertSpaceAfterSemicolonInForStatements : boolean - - InsertSpaceBeforeAndAfterBinaryOperators: boolean; ->InsertSpaceBeforeAndAfterBinaryOperators : boolean - - InsertSpaceAfterKeywordsInControlFlowStatements: boolean; ->InsertSpaceAfterKeywordsInControlFlowStatements : boolean - - InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; ->InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean - - InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; ->InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean - - PlaceOpenBraceOnNewLineForFunctions: boolean; ->PlaceOpenBraceOnNewLineForFunctions : boolean - - PlaceOpenBraceOnNewLineForControlBlocks: boolean; ->PlaceOpenBraceOnNewLineForControlBlocks : boolean - - [s: string]: boolean | number | string; ->s : string - } - interface DefinitionInfo { ->DefinitionInfo : DefinitionInfo - - fileName: string; ->fileName : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - kind: string; ->kind : string - - name: string; ->name : string - - containerKind: string; ->containerKind : string - - containerName: string; ->containerName : string - } - interface ReferencedSymbol { ->ReferencedSymbol : ReferencedSymbol - - definition: DefinitionInfo; ->definition : DefinitionInfo ->DefinitionInfo : DefinitionInfo - - references: ReferenceEntry[]; ->references : ReferenceEntry[] ->ReferenceEntry : ReferenceEntry - } - enum SymbolDisplayPartKind { ->SymbolDisplayPartKind : SymbolDisplayPartKind - - aliasName = 0, ->aliasName : SymbolDisplayPartKind - - className = 1, ->className : SymbolDisplayPartKind - - enumName = 2, ->enumName : SymbolDisplayPartKind - - fieldName = 3, ->fieldName : SymbolDisplayPartKind - - interfaceName = 4, ->interfaceName : SymbolDisplayPartKind - - keyword = 5, ->keyword : SymbolDisplayPartKind - - lineBreak = 6, ->lineBreak : SymbolDisplayPartKind - - numericLiteral = 7, ->numericLiteral : SymbolDisplayPartKind - - stringLiteral = 8, ->stringLiteral : SymbolDisplayPartKind - - localName = 9, ->localName : SymbolDisplayPartKind - - methodName = 10, ->methodName : SymbolDisplayPartKind - - moduleName = 11, ->moduleName : SymbolDisplayPartKind - - operator = 12, ->operator : SymbolDisplayPartKind - - parameterName = 13, ->parameterName : SymbolDisplayPartKind - - propertyName = 14, ->propertyName : SymbolDisplayPartKind - - punctuation = 15, ->punctuation : SymbolDisplayPartKind - - space = 16, ->space : SymbolDisplayPartKind - - text = 17, ->text : SymbolDisplayPartKind - - typeParameterName = 18, ->typeParameterName : SymbolDisplayPartKind - - enumMemberName = 19, ->enumMemberName : SymbolDisplayPartKind - - functionName = 20, ->functionName : SymbolDisplayPartKind - - regularExpressionLiteral = 21, ->regularExpressionLiteral : SymbolDisplayPartKind - } - interface SymbolDisplayPart { ->SymbolDisplayPart : SymbolDisplayPart - - text: string; ->text : string - - kind: string; ->kind : string - } - interface QuickInfo { ->QuickInfo : QuickInfo - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface RenameInfo { ->RenameInfo : RenameInfo - - canRename: boolean; ->canRename : boolean - - localizedErrorMessage: string; ->localizedErrorMessage : string - - displayName: string; ->displayName : string - - fullDisplayName: string; ->fullDisplayName : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - triggerSpan: TextSpan; ->triggerSpan : TextSpan ->TextSpan : TextSpan - } - interface SignatureHelpParameter { ->SignatureHelpParameter : SignatureHelpParameter - - name: string; ->name : string - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - isOptional: boolean; ->isOptional : boolean - } - /** - * Represents a single signature to show in signature help. - * The id is used for subsequent calls into the language service to ask questions about the - * signature help item in the context of any documents that have been updated. i.e. after - * an edit has happened, while signature help is still active, the host can ask important - * questions like 'what parameter is the user currently contained within?'. - */ - interface SignatureHelpItem { ->SignatureHelpItem : SignatureHelpItem - - isVariadic: boolean; ->isVariadic : boolean - - prefixDisplayParts: SymbolDisplayPart[]; ->prefixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - suffixDisplayParts: SymbolDisplayPart[]; ->suffixDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - separatorDisplayParts: SymbolDisplayPart[]; ->separatorDisplayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - parameters: SignatureHelpParameter[]; ->parameters : SignatureHelpParameter[] ->SignatureHelpParameter : SignatureHelpParameter - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - /** - * Represents a set of signature help items, and the preferred item that should be selected. - */ - interface SignatureHelpItems { ->SignatureHelpItems : SignatureHelpItems - - items: SignatureHelpItem[]; ->items : SignatureHelpItem[] ->SignatureHelpItem : SignatureHelpItem - - applicableSpan: TextSpan; ->applicableSpan : TextSpan ->TextSpan : TextSpan - - selectedItemIndex: number; ->selectedItemIndex : number - - argumentIndex: number; ->argumentIndex : number - - argumentCount: number; ->argumentCount : number - } - interface CompletionInfo { ->CompletionInfo : CompletionInfo - - isMemberCompletion: boolean; ->isMemberCompletion : boolean - - isNewIdentifierLocation: boolean; ->isNewIdentifierLocation : boolean - - entries: CompletionEntry[]; ->entries : CompletionEntry[] ->CompletionEntry : CompletionEntry - } - interface CompletionEntry { ->CompletionEntry : CompletionEntry - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - } - interface CompletionEntryDetails { ->CompletionEntryDetails : CompletionEntryDetails - - name: string; ->name : string - - kind: string; ->kind : string - - kindModifiers: string; ->kindModifiers : string - - displayParts: SymbolDisplayPart[]; ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - documentation: SymbolDisplayPart[]; ->documentation : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - interface OutliningSpan { ->OutliningSpan : OutliningSpan - - /** The span of the document to actually collapse. */ - textSpan: TextSpan; ->textSpan : TextSpan ->TextSpan : TextSpan - - /** The span of the document to display when the user hovers over the collapsed span. */ - hintSpan: TextSpan; ->hintSpan : TextSpan ->TextSpan : TextSpan - - /** The text to display in the editor for the collapsed region. */ - bannerText: string; ->bannerText : string - - /** - * Whether or not this region should be automatically collapsed when - * the 'Collapse to Definitions' command is invoked. - */ - autoCollapse: boolean; ->autoCollapse : boolean - } - interface EmitOutput { ->EmitOutput : EmitOutput - - outputFiles: OutputFile[]; ->outputFiles : OutputFile[] ->OutputFile : OutputFile - - emitSkipped: boolean; ->emitSkipped : boolean - } - const enum OutputFileType { ->OutputFileType : OutputFileType - - JavaScript = 0, ->JavaScript : OutputFileType - - SourceMap = 1, ->SourceMap : OutputFileType - - Declaration = 2, ->Declaration : OutputFileType - } - interface OutputFile { ->OutputFile : OutputFile - - name: string; ->name : string - - writeByteOrderMark: boolean; ->writeByteOrderMark : boolean - - text: string; ->text : string - } - const enum EndOfLineState { ->EndOfLineState : EndOfLineState - - Start = 0, ->Start : EndOfLineState - - InMultiLineCommentTrivia = 1, ->InMultiLineCommentTrivia : EndOfLineState - - InSingleQuoteStringLiteral = 2, ->InSingleQuoteStringLiteral : EndOfLineState - - InDoubleQuoteStringLiteral = 3, ->InDoubleQuoteStringLiteral : EndOfLineState - - InTemplateHeadOrNoSubstitutionTemplate = 4, ->InTemplateHeadOrNoSubstitutionTemplate : EndOfLineState - - InTemplateMiddleOrTail = 5, ->InTemplateMiddleOrTail : EndOfLineState - - InTemplateSubstitutionPosition = 6, ->InTemplateSubstitutionPosition : EndOfLineState - } - enum TokenClass { ->TokenClass : TokenClass - - Punctuation = 0, ->Punctuation : TokenClass - - Keyword = 1, ->Keyword : TokenClass - - Operator = 2, ->Operator : TokenClass - - Comment = 3, ->Comment : TokenClass - - Whitespace = 4, ->Whitespace : TokenClass - - Identifier = 5, ->Identifier : TokenClass - - NumberLiteral = 6, ->NumberLiteral : TokenClass - - StringLiteral = 7, ->StringLiteral : TokenClass - - RegExpLiteral = 8, ->RegExpLiteral : TokenClass - } - interface ClassificationResult { ->ClassificationResult : ClassificationResult - - finalLexState: EndOfLineState; ->finalLexState : EndOfLineState ->EndOfLineState : EndOfLineState - - entries: ClassificationInfo[]; ->entries : ClassificationInfo[] ->ClassificationInfo : ClassificationInfo - } - interface ClassificationInfo { ->ClassificationInfo : ClassificationInfo - - length: number; ->length : number - - classification: TokenClass; ->classification : TokenClass ->TokenClass : TokenClass - } - interface Classifier { ->Classifier : Classifier - - /** - * Gives lexical classifications of tokens on a line without any syntactic context. - * For instance, a token consisting of the text 'string' can be either an identifier - * named 'string' or the keyword 'string', however, because this classifier is not aware, - * it relies on certain heuristics to give acceptable results. For classifications where - * speed trumps accuracy, this function is preferable; however, for true accuracy, the - * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the - * lexical, syntactic, and semantic classifiers may issue the best user experience. - * - * @param text The text of a line to classify. - * @param lexState The state of the lexical classifier at the end of the previous line. - * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. - * If there is no syntactic classifier (syntacticClassifierAbsent=true), - * certain heuristics may be used in its place; however, if there is a - * syntactic classifier (syntacticClassifierAbsent=false), certain - * classifications which may be incorrectly categorized will be given - * back as Identifiers in order to allow the syntactic classifier to - * subsume the classification. - */ - getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; ->getClassificationsForLine : (text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean) => ClassificationResult ->text : string ->lexState : EndOfLineState ->EndOfLineState : EndOfLineState ->syntacticClassifierAbsent : boolean ->ClassificationResult : ClassificationResult - } - /** - * The document registry represents a store of SourceFile objects that can be shared between - * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) - * of files in the context. - * SourceFile objects account for most of the memory usage by the language service. Sharing - * the same DocumentRegistry instance between different instances of LanguageService allow - * for more efficient memory utilization since all projects will share at least the library - * file (lib.d.ts). - * - * A more advanced use of the document registry is to serialize sourceFile objects to disk - * and re-hydrate them when needed. - * - * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it - * to all subsequent createLanguageService calls. - */ - interface DocumentRegistry { ->DocumentRegistry : DocumentRegistry - - /** - * Request a stored SourceFile with a given fileName and compilationSettings. - * The first call to acquire will call createLanguageServiceSourceFile to generate - * the SourceFile if was not found in the registry. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @parm scriptSnapshot Text of the file. Only used if the file was not found - * in the registry and a new one was created. - * @parm version Current version of the file. Only used if the file was not found - * in the registry and a new one was created. - */ - acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; ->acquireDocument : (fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string) => SourceFile ->fileName : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->SourceFile : SourceFile - - /** - * Request an updated version of an already existing SourceFile with a given fileName - * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile - * to get an updated SourceFile. - * - * @param fileName The name of the file requested - * @param compilationSettings Some compilation settings like target affects the - * shape of a the resulting SourceFile. This allows the DocumentRegistry to store - * multiple copies of the same file for different compilation settings. - * @param scriptSnapshot Text of the file. - * @param version Current version of the file. - */ - updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; ->updateDocument : (fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string) => SourceFile ->fileName : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->SourceFile : SourceFile - - /** - * Informs the DocumentRegistry that a file is not needed any longer. - * - * Note: It is not allowed to call release on a SourceFile that was not acquired from - * this registry originally. - * - * @param fileName The name of the file to be released - * @param compilationSettings The compilation settings used to acquire the file - */ - releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; ->releaseDocument : (fileName: string, compilationSettings: CompilerOptions) => void ->fileName : string ->compilationSettings : CompilerOptions ->CompilerOptions : CompilerOptions - } - class ScriptElementKind { ->ScriptElementKind : ScriptElementKind - - static unknown: string; ->unknown : string - - static keyword: string; ->keyword : string - - static scriptElement: string; ->scriptElement : string - - static moduleElement: string; ->moduleElement : string - - static classElement: string; ->classElement : string - - static interfaceElement: string; ->interfaceElement : string - - static typeElement: string; ->typeElement : string - - static enumElement: string; ->enumElement : string - - static variableElement: string; ->variableElement : string - - static localVariableElement: string; ->localVariableElement : string - - static functionElement: string; ->functionElement : string - - static localFunctionElement: string; ->localFunctionElement : string - - static memberFunctionElement: string; ->memberFunctionElement : string - - static memberGetAccessorElement: string; ->memberGetAccessorElement : string - - static memberSetAccessorElement: string; ->memberSetAccessorElement : string - - static memberVariableElement: string; ->memberVariableElement : string - - static constructorImplementationElement: string; ->constructorImplementationElement : string - - static callSignatureElement: string; ->callSignatureElement : string - - static indexSignatureElement: string; ->indexSignatureElement : string - - static constructSignatureElement: string; ->constructSignatureElement : string - - static parameterElement: string; ->parameterElement : string - - static typeParameterElement: string; ->typeParameterElement : string - - static primitiveType: string; ->primitiveType : string - - static label: string; ->label : string - - static alias: string; ->alias : string - - static constElement: string; ->constElement : string - - static letElement: string; ->letElement : string - } - class ScriptElementKindModifier { ->ScriptElementKindModifier : ScriptElementKindModifier - - static none: string; ->none : string - - static publicMemberModifier: string; ->publicMemberModifier : string - - static privateMemberModifier: string; ->privateMemberModifier : string - - static protectedMemberModifier: string; ->protectedMemberModifier : string - - static exportedModifier: string; ->exportedModifier : string - - static ambientModifier: string; ->ambientModifier : string - - static staticModifier: string; ->staticModifier : string - } - class ClassificationTypeNames { ->ClassificationTypeNames : ClassificationTypeNames - - static comment: string; ->comment : string - - static identifier: string; ->identifier : string - - static keyword: string; ->keyword : string - - static numericLiteral: string; ->numericLiteral : string - - static operator: string; ->operator : string - - static stringLiteral: string; ->stringLiteral : string - - static whiteSpace: string; ->whiteSpace : string - - static text: string; ->text : string - - static punctuation: string; ->punctuation : string - - static className: string; ->className : string - - static enumName: string; ->enumName : string - - static interfaceName: string; ->interfaceName : string - - static moduleName: string; ->moduleName : string - - static typeParameterName: string; ->typeParameterName : string - - static typeAlias: string; ->typeAlias : string - } - interface DisplayPartsSymbolWriter extends SymbolWriter { ->DisplayPartsSymbolWriter : DisplayPartsSymbolWriter ->SymbolWriter : SymbolWriter - - displayParts(): SymbolDisplayPart[]; ->displayParts : () => SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - } - function displayPartsToString(displayParts: SymbolDisplayPart[]): string; ->displayPartsToString : (displayParts: SymbolDisplayPart[]) => string ->displayParts : SymbolDisplayPart[] ->SymbolDisplayPart : SymbolDisplayPart - - function getDefaultCompilerOptions(): CompilerOptions; ->getDefaultCompilerOptions : () => CompilerOptions ->CompilerOptions : CompilerOptions - - class OperationCanceledException { ->OperationCanceledException : OperationCanceledException - } - class CancellationTokenObject { ->CancellationTokenObject : CancellationTokenObject - - private cancellationToken; ->cancellationToken : any - - static None: CancellationTokenObject; ->None : CancellationTokenObject ->CancellationTokenObject : CancellationTokenObject - - constructor(cancellationToken: CancellationToken); ->cancellationToken : CancellationToken ->CancellationToken : CancellationToken - - isCancellationRequested(): boolean; ->isCancellationRequested : () => boolean - - throwIfCancellationRequested(): void; ->throwIfCancellationRequested : () => void - } - function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[]): string; ->transpile : (input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[]) => string ->input : string ->compilerOptions : CompilerOptions ->CompilerOptions : CompilerOptions ->fileName : string ->diagnostics : Diagnostic[] ->Diagnostic : Diagnostic - - function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; ->createLanguageServiceSourceFile : (fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean) => SourceFile ->fileName : string ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->scriptTarget : ScriptTarget ->ScriptTarget : ScriptTarget ->version : string ->setNodeParents : boolean ->SourceFile : SourceFile - - let disableIncrementalParsing: boolean; ->disableIncrementalParsing : boolean - - function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; ->updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile ->sourceFile : SourceFile ->SourceFile : SourceFile ->scriptSnapshot : IScriptSnapshot ->IScriptSnapshot : IScriptSnapshot ->version : string ->textChangeRange : TextChangeRange ->TextChangeRange : TextChangeRange ->aggressiveChecks : boolean ->SourceFile : SourceFile - - function createDocumentRegistry(): DocumentRegistry; ->createDocumentRegistry : () => DocumentRegistry ->DocumentRegistry : DocumentRegistry - - function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; ->preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo ->sourceText : string ->readImportFiles : boolean ->PreProcessedFileInfo : PreProcessedFileInfo - - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; ->createLanguageService : (host: LanguageServiceHost, documentRegistry?: DocumentRegistry) => LanguageService ->host : LanguageServiceHost ->LanguageServiceHost : LanguageServiceHost ->documentRegistry : DocumentRegistry ->DocumentRegistry : DocumentRegistry ->LanguageService : LanguageService - - function createClassifier(): Classifier; ->createClassifier : () => Classifier ->Classifier : Classifier - - /** - * Get the path of the default library file (lib.d.ts) as distributed with the typescript - * node package. - * The functionality is not supported if the ts module is consumed outside of a node module. - */ - function getDefaultLibFilePath(options: CompilerOptions): string; ->getDefaultLibFilePath : (options: CompilerOptions) => string ->options : CompilerOptions ->CompilerOptions : CompilerOptions -} - diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 63777b515a..19ddebee0b 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -1010,6 +1010,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 4a9810e779..3cc1f47814 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -3285,6 +3285,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier + + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index 9b6dcdde16..c2c5b78f84 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1047,6 +1047,9 @@ declare module "typescript" { getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; resolvesToSomeValue(location: Node, name: string): boolean; getBlockScopedVariableId(node: Identifier): number; + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; } const enum SymbolFlags { FunctionScopedVariable = 1, diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 71c617a5c4..1072b719e5 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -3458,6 +3458,30 @@ declare module "typescript" { >getBlockScopedVariableId : (node: Identifier) => number >node : Identifier >Identifier : Identifier + + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node } const enum SymbolFlags { >SymbolFlags : SymbolFlags diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index 24be251746..c088b667a4 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec], C); + C = __decorate([dec, __metadata('design:paramtypes', [])], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index 92741819e9..c19b849c92 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec], C); + C = __decorate([dec, __metadata('design:paramtypes', [])], C); return C; })(); exports.C = C; diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 766acc4207..667ef93c0a 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -20,9 +20,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec], C); + C = __decorate([dec, __metadata('design:paramtypes', [])], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index 95bde54937..c9d0c1b228 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec()], C); + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index a93d625f49..b27610dc9d 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec()], C); + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index 0e782d45e1..82ccc5af4c 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec()], C); + C = __decorate([dec(), __metadata('design:paramtypes', [])], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index c8a96c4072..a3d314eaec 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -19,6 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } @@ -27,6 +28,6 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index bffbfb4b70..c0e0000811 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -19,6 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } @@ -27,6 +28,6 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 1b4853b69b..6fe9eae401 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -19,6 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } @@ -27,6 +28,6 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index eec246c7ea..6a4bb03a7b 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -19,6 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } @@ -27,6 +28,6 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index 0c86a1ccf7..22330e3f44 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C(p) { } - __decorate([dec], C, void 0, 0); + __decorate([dec, __metadata('design:type', Number)], C, void 0, 0); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index 07dc7cae07..cdf1e22a9c 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C(public, p) { } - __decorate([dec], C, void 0, 1); + __decorate([dec, __metadata('design:type', Number)], C, void 0, 1); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index b7230cca8b..df9df72766 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index 137a0c2839..c12b75a54f 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index ceddff2f15..fb6847bc76 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 55798a2e1d..2a2c5a9dd2 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -19,8 +19,9 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index 2fe671e1b5..beb5586874 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -19,8 +19,9 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec()], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 2e828d6ad4..7e05a53489 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -19,8 +19,9 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 0b0f5abc4f..36f5fd21f2 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -19,8 +19,9 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index 89afc66514..a6dd6e5c7d 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index dcd6c12352..e25e06cc71 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -19,10 +19,11 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } C.prototype.method = function (p) { }; - __decorate([dec], C.prototype, "method", 0); + __decorate([dec, __metadata('design:type', Number)], C.prototype, "method", 0); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index efc6a2c04d..647c255686 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index d55eb71e3c..b97b8c95d0 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec()], C.prototype, "prop"); + __decorate([dec(), __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index 63e5f8d02e..77e7fd36b9 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index d52baa7920..0a78f5f1e6 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index 7f087156bc..d8837c7fa0 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index ba2c8383a2..b845d52c4f 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -19,9 +19,10 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index 81ce9bc60f..e7885dbbb2 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -68,6 +68,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; var Greeter = (function () { function Greeter(greeting) { var b = []; @@ -93,15 +94,15 @@ var Greeter = (function () { configurable: true }); Greeter.x1 = 10; - Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); - __decorate([PropertyDecorator1, PropertyDecorator2(50)], Greeter.prototype, "x"); - __decorate([ParameterDecorator1, ParameterDecorator2(70)], Greeter.prototype, "fn", 0); - __decorate([ParameterDecorator1, ParameterDecorator2(90)], Greeter.prototype, "greetings", 0); - Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); - __decorate([PropertyDecorator1, PropertyDecorator2(60)], Greeter, "x1"); - __decorate([ParameterDecorator1, ParameterDecorator2(20)], Greeter, void 0, 0); - __decorate([ParameterDecorator1, ParameterDecorator2(30)], Greeter, void 0, 1); - Greeter = __decorate([ClassDecorator1, ClassDecorator2(10)], Greeter); + Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); + __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); + __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); + __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); + Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); + __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); + __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); + __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); + Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); return Greeter; })(); //# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index 4cca04a1e3..f90ca15a23 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA,cAFJA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACfA,sBAACA,EAASA;IAOhBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACxBA,0BAACA,EAAQA;IAWTA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACxBA,iCAASA,EAAQA;IATnBA,sBAEIA,8BAASA,cAFZA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACnBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,GACRA,aAAEA,EAAcA;IArB7BA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACjBA,kBAAQA,EAAQA;IAEvBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,GACrBA,kBAACA,EAAUA;IAVpBA,sBAACA,eAAeA,EACfA,eAAeA,CAACA,EAAEA,CAACA,YA6CnBA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA,cAFJA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sHACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACfA,sBAACA,EAASA;IAOhBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,0BAACA,EAAQA;IAWTA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,iCAASA,EAAQA;IATnBA,sBAEIA,8BAASA,cAFZA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACnBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACRA,aAAEA,EAAcA;IArB7BA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACjBA,kBAAQA,EAAQA;IAEvBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,qCACrBA,kBAACA,EAAUA;IAVpBA,sBAACA,eAAeA,EACfA,eAAeA,CAACA,EAAEA,CAACA,+DA6CnBA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index c0b9d97e6f..82e08ee63b 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -21,6 +21,7 @@ sourceFile:sourceMapValidationDecorators.ts >>> } >>> return value; >>>}; +>>>var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; >>>var Greeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> @@ -32,7 +33,7 @@ sourceFile:sourceMapValidationDecorators.ts >declare function ParameterDecorator2(x: number): (target: Function, key: string | symbol, paramIndex: number) => void; > > -1 >Emitted(14, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(15, 1) Source(8, 1) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ @@ -47,9 +48,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(20) > public 3 > greeting: string -1->Emitted(15, 5) Source(11, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(15, 22) Source(14, 14) + SourceIndex(0) name (Greeter) -3 >Emitted(15, 30) Source(14, 30) + SourceIndex(0) name (Greeter) +1->Emitted(16, 5) Source(11, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(16, 22) Source(14, 14) + SourceIndex(0) name (Greeter) +3 >Emitted(16, 30) Source(14, 30) + SourceIndex(0) name (Greeter) --- >>> var b = []; 1 >^^^^^^^^ @@ -61,8 +62,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(16, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(16, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(17, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(17, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^ @@ -83,12 +84,12 @@ sourceFile:sourceMapValidationDecorators.ts 6 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1->Emitted(17, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(17, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(17, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(17, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(17, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(17, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(18, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(18, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(18, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(18, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(18, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +6 >Emitted(18, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> b[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^ @@ -97,8 +98,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(18, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(18, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(19, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(19, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> } >>> this.greeting = greeting; @@ -112,11 +113,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > 4 > greeting 5 > : string -1 >Emitted(20, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(20, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(20, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(20, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(20, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(21, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(21, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(21, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(21, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(21, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) --- >>> } 1 >^^^^ @@ -129,8 +130,8 @@ sourceFile:sourceMapValidationDecorators.ts > ...b: string[]) { > 2 > } -1 >Emitted(21, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(21, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(22, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(22, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -144,9 +145,9 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > greet 3 > -1->Emitted(22, 5) Source(23, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(22, 28) Source(23, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(22, 31) Source(21, 5) + SourceIndex(0) name (Greeter) +1->Emitted(23, 5) Source(23, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(23, 28) Source(23, 10) + SourceIndex(0) name (Greeter) +3 >Emitted(23, 31) Source(21, 5) + SourceIndex(0) name (Greeter) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -174,17 +175,17 @@ sourceFile:sourceMapValidationDecorators.ts 9 > + 10> "" 11> ; -1->Emitted(23, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(23, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) -3 >Emitted(23, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) -4 >Emitted(23, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) -5 >Emitted(23, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) -6 >Emitted(23, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) -7 >Emitted(23, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) -8 >Emitted(23, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) -9 >Emitted(23, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) -10>Emitted(23, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) -11>Emitted(23, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) +1->Emitted(24, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(24, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) +3 >Emitted(24, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) +4 >Emitted(24, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) +5 >Emitted(24, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) +6 >Emitted(24, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) +7 >Emitted(24, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) +8 >Emitted(24, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) +9 >Emitted(24, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) +10>Emitted(24, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) +11>Emitted(24, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) --- >>> }; 1 >^^^^ @@ -193,8 +194,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(24, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(24, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) +1 >Emitted(25, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(25, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) --- >>> Greeter.prototype.fn = function (x) { 1->^^^^ @@ -220,11 +221,11 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(70) > 5 > x: number -1->Emitted(25, 5) Source(35, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(25, 25) Source(35, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(25, 28) Source(35, 5) + SourceIndex(0) name (Greeter) -4 >Emitted(25, 38) Source(38, 7) + SourceIndex(0) name (Greeter) -5 >Emitted(25, 39) Source(38, 16) + SourceIndex(0) name (Greeter) +1->Emitted(26, 5) Source(35, 13) + SourceIndex(0) name (Greeter) +2 >Emitted(26, 25) Source(35, 15) + SourceIndex(0) name (Greeter) +3 >Emitted(26, 28) Source(35, 5) + SourceIndex(0) name (Greeter) +4 >Emitted(26, 38) Source(38, 7) + SourceIndex(0) name (Greeter) +5 >Emitted(26, 39) Source(38, 16) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1 >^^^^^^^^ @@ -242,13 +243,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1 >Emitted(26, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(26, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) -3 >Emitted(26, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) -4 >Emitted(26, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) -5 >Emitted(26, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) -6 >Emitted(26, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) -7 >Emitted(26, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(27, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(27, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) +3 >Emitted(27, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) +4 >Emitted(27, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) +5 >Emitted(27, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) +6 >Emitted(27, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) +7 >Emitted(27, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) --- >>> }; 1 >^^^^ @@ -257,8 +258,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(27, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(27, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(28, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(28, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -271,15 +272,15 @@ sourceFile:sourceMapValidationDecorators.ts > @PropertyDecorator2(80) > get 3 > greetings -1->Emitted(28, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(28, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(28, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +1->Emitted(29, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(29, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(29, 57) Source(44, 18) + SourceIndex(0) name (Greeter) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(29, 14) Source(42, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(30, 14) Source(42, 5) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -299,13 +300,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1->Emitted(30, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(30, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(30, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(30, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(30, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(30, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(30, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(31, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(31, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(31, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(31, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(31, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(31, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(31, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -314,8 +315,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(31, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(31, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(32, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(32, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -330,9 +331,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(90) > 3 > greetings: string -1->Emitted(32, 14) Source(48, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(32, 24) Source(51, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(32, 33) Source(51, 24) + SourceIndex(0) name (Greeter) +1->Emitted(33, 14) Source(48, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(33, 24) Source(51, 7) + SourceIndex(0) name (Greeter) +3 >Emitted(33, 33) Source(51, 24) + SourceIndex(0) name (Greeter) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -350,13 +351,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > = 6 > greetings 7 > ; -1->Emitted(33, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(33, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(33, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(33, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(33, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(33, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(33, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(34, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(34, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(34, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(34, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(34, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(34, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(34, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -365,8 +366,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(34, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(34, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(35, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(35, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> enumerable: true, >>> configurable: true @@ -374,7 +375,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^^-> 1-> -1->Emitted(37, 8) Source(46, 6) + SourceIndex(0) name (Greeter) +1->Emitted(38, 8) Source(46, 6) + SourceIndex(0) name (Greeter) --- >>> Greeter.x1 = 10; 1->^^^^ @@ -382,19 +383,19 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > x1 3 > : number = 4 > 10 5 > ; -1->Emitted(38, 5) Source(33, 20) + SourceIndex(0) name (Greeter) -2 >Emitted(38, 15) Source(33, 22) + SourceIndex(0) name (Greeter) -3 >Emitted(38, 18) Source(33, 33) + SourceIndex(0) name (Greeter) -4 >Emitted(38, 20) Source(33, 35) + SourceIndex(0) name (Greeter) -5 >Emitted(38, 21) Source(33, 36) + SourceIndex(0) name (Greeter) +1->Emitted(39, 5) Source(33, 20) + SourceIndex(0) name (Greeter) +2 >Emitted(39, 15) Source(33, 22) + SourceIndex(0) name (Greeter) +3 >Emitted(39, 18) Source(33, 33) + SourceIndex(0) name (Greeter) +4 >Emitted(39, 20) Source(33, 35) + SourceIndex(0) name (Greeter) +5 >Emitted(39, 21) Source(33, 36) + SourceIndex(0) name (Greeter) --- ->>> Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); +>>> Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -405,11 +406,11 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ^ 9 > ^^ 10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^ 1-> 2 > @PropertyDecorator1 > @PropertyDecorator2(40) @@ -425,29 +426,29 @@ sourceFile:sourceMapValidationDecorators.ts 10> ) 11> > -12> greet -13> -14> greet -15> () { - > return "

" + this.greeting + "

"; - > } -1->Emitted(39, 5) Source(21, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(39, 27) Source(23, 5) + SourceIndex(0) name (Greeter) -3 >Emitted(39, 53) Source(23, 10) + SourceIndex(0) name (Greeter) -4 >Emitted(39, 67) Source(21, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(39, 85) Source(21, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(39, 87) Source(22, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(39, 105) Source(22, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(39, 106) Source(22, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(39, 108) Source(22, 27) + SourceIndex(0) name (Greeter) -10>Emitted(39, 109) Source(22, 28) + SourceIndex(0) name (Greeter) -11>Emitted(39, 112) Source(23, 5) + SourceIndex(0) name (Greeter) -12>Emitted(39, 138) Source(23, 10) + SourceIndex(0) name (Greeter) -13>Emitted(39, 172) Source(23, 5) + SourceIndex(0) name (Greeter) -14>Emitted(39, 198) Source(23, 10) + SourceIndex(0) name (Greeter) -15>Emitted(39, 202) Source(25, 6) + SourceIndex(0) name (Greeter) +12> greet +13> +14> greet +15> () { + > return "

" + this.greeting + "

"; + > } +1->Emitted(40, 5) Source(21, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(40, 27) Source(23, 5) + SourceIndex(0) name (Greeter) +3 >Emitted(40, 53) Source(23, 10) + SourceIndex(0) name (Greeter) +4 >Emitted(40, 67) Source(21, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(40, 85) Source(21, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(40, 87) Source(22, 6) + SourceIndex(0) name (Greeter) +7 >Emitted(40, 105) Source(22, 24) + SourceIndex(0) name (Greeter) +8 >Emitted(40, 106) Source(22, 25) + SourceIndex(0) name (Greeter) +9 >Emitted(40, 108) Source(22, 27) + SourceIndex(0) name (Greeter) +10>Emitted(40, 109) Source(22, 28) + SourceIndex(0) name (Greeter) +11>Emitted(40, 227) Source(23, 5) + SourceIndex(0) name (Greeter) +12>Emitted(40, 253) Source(23, 10) + SourceIndex(0) name (Greeter) +13>Emitted(40, 287) Source(23, 5) + SourceIndex(0) name (Greeter) +14>Emitted(40, 313) Source(23, 10) + SourceIndex(0) name (Greeter) +15>Emitted(40, 317) Source(25, 6) + SourceIndex(0) name (Greeter) --- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(50)], Greeter.prototype, "x"); +>>> __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); 1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^ @@ -456,10 +457,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^-> 1 > > > @@ -473,21 +474,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > private -10> x -11> : string; -1 >Emitted(40, 5) Source(27, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(40, 17) Source(27, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(40, 35) Source(27, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(40, 37) Source(28, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(40, 55) Source(28, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(40, 56) Source(28, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(40, 58) Source(28, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(40, 59) Source(28, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(40, 62) Source(29, 13) + SourceIndex(0) name (Greeter) -10>Emitted(40, 84) Source(29, 14) + SourceIndex(0) name (Greeter) -11>Emitted(40, 86) Source(29, 23) + SourceIndex(0) name (Greeter) +10> x +11> : string; +1 >Emitted(41, 5) Source(27, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(41, 17) Source(27, 6) + SourceIndex(0) name (Greeter) +3 >Emitted(41, 35) Source(27, 24) + SourceIndex(0) name (Greeter) +4 >Emitted(41, 37) Source(28, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(41, 55) Source(28, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(41, 56) Source(28, 25) + SourceIndex(0) name (Greeter) +7 >Emitted(41, 58) Source(28, 27) + SourceIndex(0) name (Greeter) +8 >Emitted(41, 59) Source(28, 28) + SourceIndex(0) name (Greeter) +9 >Emitted(41, 97) Source(29, 13) + SourceIndex(0) name (Greeter) +10>Emitted(41, 119) Source(29, 14) + SourceIndex(0) name (Greeter) +11>Emitted(41, 121) Source(29, 23) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(70)], Greeter.prototype, "fn", 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -496,10 +497,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^-> 1-> > > @PropertyDecorator1 @@ -518,21 +519,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > -10> x -11> : number -1->Emitted(41, 5) Source(36, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(41, 17) Source(36, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(41, 36) Source(36, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(41, 38) Source(37, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(41, 57) Source(37, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(41, 58) Source(37, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(41, 60) Source(37, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(41, 61) Source(37, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(41, 64) Source(38, 7) + SourceIndex(0) name (Greeter) -10>Emitted(41, 90) Source(38, 8) + SourceIndex(0) name (Greeter) -11>Emitted(41, 92) Source(38, 16) + SourceIndex(0) name (Greeter) +10> x +11> : number +1->Emitted(42, 5) Source(36, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(42, 17) Source(36, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(42, 36) Source(36, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(42, 38) Source(37, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(42, 57) Source(37, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(42, 58) Source(37, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(42, 60) Source(37, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(42, 61) Source(37, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(42, 99) Source(38, 7) + SourceIndex(0) name (Greeter) +10>Emitted(42, 125) Source(38, 8) + SourceIndex(0) name (Greeter) +11>Emitted(42, 127) Source(38, 16) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(90)], Greeter.prototype, "greetings", 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -541,10 +542,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1->) { > return this.greeting; > } @@ -567,21 +568,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > -10> greetings -11> : string -1->Emitted(42, 5) Source(49, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(42, 17) Source(49, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(42, 36) Source(49, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(42, 38) Source(50, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(42, 57) Source(50, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(42, 58) Source(50, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(42, 60) Source(50, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(42, 61) Source(50, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(42, 64) Source(51, 7) + SourceIndex(0) name (Greeter) -10>Emitted(42, 97) Source(51, 16) + SourceIndex(0) name (Greeter) -11>Emitted(42, 99) Source(51, 24) + SourceIndex(0) name (Greeter) +10> greetings +11> : string +1->Emitted(43, 5) Source(49, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(43, 17) Source(49, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(43, 36) Source(49, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(43, 38) Source(50, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(43, 57) Source(50, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(43, 58) Source(50, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(43, 60) Source(50, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(43, 61) Source(50, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(43, 99) Source(51, 7) + SourceIndex(0) name (Greeter) +10>Emitted(43, 132) Source(51, 16) + SourceIndex(0) name (Greeter) +11>Emitted(43, 134) Source(51, 24) + SourceIndex(0) name (Greeter) --- ->>> Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); +>>> Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -592,11 +593,11 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ^ 9 > ^^ 10> ^ -11> ^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ +11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +15> ^^^^ 1-> 2 > @PropertyDecorator1 > @PropertyDecorator2(80) @@ -612,29 +613,29 @@ sourceFile:sourceMapValidationDecorators.ts 10> ) 11> > get -12> greetings -13> -14> greetings -15> () { - > return this.greeting; - > } -1->Emitted(43, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(43, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(43, 57) Source(44, 18) + SourceIndex(0) name (Greeter) -4 >Emitted(43, 71) Source(42, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(43, 89) Source(42, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(43, 91) Source(43, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(43, 109) Source(43, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(43, 110) Source(43, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(43, 112) Source(43, 27) + SourceIndex(0) name (Greeter) -10>Emitted(43, 113) Source(43, 28) + SourceIndex(0) name (Greeter) -11>Emitted(43, 116) Source(44, 9) + SourceIndex(0) name (Greeter) -12>Emitted(43, 146) Source(44, 18) + SourceIndex(0) name (Greeter) -13>Emitted(43, 180) Source(44, 9) + SourceIndex(0) name (Greeter) -14>Emitted(43, 210) Source(44, 18) + SourceIndex(0) name (Greeter) -15>Emitted(43, 214) Source(46, 6) + SourceIndex(0) name (Greeter) +12> greetings +13> +14> greetings +15> () { + > return this.greeting; + > } +1->Emitted(44, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(44, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(44, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +4 >Emitted(44, 71) Source(42, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(44, 89) Source(42, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(44, 91) Source(43, 6) + SourceIndex(0) name (Greeter) +7 >Emitted(44, 109) Source(43, 24) + SourceIndex(0) name (Greeter) +8 >Emitted(44, 110) Source(43, 25) + SourceIndex(0) name (Greeter) +9 >Emitted(44, 112) Source(43, 27) + SourceIndex(0) name (Greeter) +10>Emitted(44, 113) Source(43, 28) + SourceIndex(0) name (Greeter) +11>Emitted(44, 151) Source(44, 9) + SourceIndex(0) name (Greeter) +12>Emitted(44, 181) Source(44, 18) + SourceIndex(0) name (Greeter) +13>Emitted(44, 215) Source(44, 9) + SourceIndex(0) name (Greeter) +14>Emitted(44, 245) Source(44, 18) + SourceIndex(0) name (Greeter) +15>Emitted(44, 249) Source(46, 6) + SourceIndex(0) name (Greeter) --- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(60)], Greeter, "x1"); +>>> __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); 1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^ @@ -643,10 +644,10 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^-> 1 > 2 > @ 3 > PropertyDecorator1 @@ -658,21 +659,21 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > private static -10> x1 -11> : number = 10; -1 >Emitted(44, 5) Source(31, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(44, 17) Source(31, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(44, 35) Source(31, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(44, 37) Source(32, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(44, 55) Source(32, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(44, 56) Source(32, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(44, 58) Source(32, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(44, 59) Source(32, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(44, 62) Source(33, 20) + SourceIndex(0) name (Greeter) -10>Emitted(44, 75) Source(33, 22) + SourceIndex(0) name (Greeter) -11>Emitted(44, 77) Source(33, 36) + SourceIndex(0) name (Greeter) +10> x1 +11> : number = 10; +1 >Emitted(45, 5) Source(31, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(45, 17) Source(31, 6) + SourceIndex(0) name (Greeter) +3 >Emitted(45, 35) Source(31, 24) + SourceIndex(0) name (Greeter) +4 >Emitted(45, 37) Source(32, 6) + SourceIndex(0) name (Greeter) +5 >Emitted(45, 55) Source(32, 24) + SourceIndex(0) name (Greeter) +6 >Emitted(45, 56) Source(32, 25) + SourceIndex(0) name (Greeter) +7 >Emitted(45, 58) Source(32, 27) + SourceIndex(0) name (Greeter) +8 >Emitted(45, 59) Source(32, 28) + SourceIndex(0) name (Greeter) +9 >Emitted(45, 97) Source(33, 20) + SourceIndex(0) name (Greeter) +10>Emitted(45, 110) Source(33, 22) + SourceIndex(0) name (Greeter) +11>Emitted(45, 112) Source(33, 36) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(20)], Greeter, void 0, 0); +>>> __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); 1->^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ @@ -681,10 +682,9 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^-> +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^ +11> ^^ 1-> 2 > @ 3 > ParameterDecorator1 @@ -696,22 +696,22 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > public -10> greeting -11> : string -1->Emitted(45, 5) Source(12, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(45, 17) Source(12, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(45, 36) Source(12, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(45, 38) Source(13, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(45, 57) Source(13, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(45, 58) Source(13, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(45, 60) Source(13, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(45, 61) Source(13, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(45, 64) Source(14, 14) + SourceIndex(0) name (Greeter) -10>Emitted(45, 82) Source(14, 22) + SourceIndex(0) name (Greeter) -11>Emitted(45, 84) Source(14, 30) + SourceIndex(0) name (Greeter) +10> greeting +11> : string +1->Emitted(46, 5) Source(12, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(46, 17) Source(12, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(46, 36) Source(12, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(46, 38) Source(13, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(46, 57) Source(13, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(46, 58) Source(13, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(46, 60) Source(13, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(46, 61) Source(13, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(46, 99) Source(14, 14) + SourceIndex(0) name (Greeter) +10>Emitted(46, 117) Source(14, 22) + SourceIndex(0) name (Greeter) +11>Emitted(46, 119) Source(14, 30) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(30)], Greeter, void 0, 1); -1->^^^^ +>>> __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); +1 >^^^^ 2 > ^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^ 4 > ^^ @@ -719,10 +719,11 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -1->, +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +10> ^^^^^^^^^^^^^^^^^^ +11> ^^ +12> ^^^^^^^^^-> +1 >, > > 2 > @ @@ -735,22 +736,22 @@ sourceFile:sourceMapValidationDecorators.ts 8 > ) 9 > > ... -10> b -11> : string[] -1->Emitted(46, 5) Source(16, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(46, 17) Source(16, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(46, 36) Source(16, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(46, 38) Source(17, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(46, 57) Source(17, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(46, 58) Source(17, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(46, 60) Source(17, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(46, 61) Source(17, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(46, 64) Source(18, 10) + SourceIndex(0) name (Greeter) -10>Emitted(46, 82) Source(18, 11) + SourceIndex(0) name (Greeter) -11>Emitted(46, 84) Source(18, 21) + SourceIndex(0) name (Greeter) +10> b +11> : string[] +1 >Emitted(47, 5) Source(16, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(47, 17) Source(16, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(47, 36) Source(16, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(47, 38) Source(17, 8) + SourceIndex(0) name (Greeter) +5 >Emitted(47, 57) Source(17, 27) + SourceIndex(0) name (Greeter) +6 >Emitted(47, 58) Source(17, 28) + SourceIndex(0) name (Greeter) +7 >Emitted(47, 60) Source(17, 30) + SourceIndex(0) name (Greeter) +8 >Emitted(47, 61) Source(17, 31) + SourceIndex(0) name (Greeter) +9 >Emitted(47, 98) Source(18, 10) + SourceIndex(0) name (Greeter) +10>Emitted(47, 116) Source(18, 11) + SourceIndex(0) name (Greeter) +11>Emitted(47, 118) Source(18, 21) + SourceIndex(0) name (Greeter) --- ->>> Greeter = __decorate([ClassDecorator1, ClassDecorator2(10)], Greeter); -1 >^^^^ +>>> Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); +1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^ 4 > ^^ @@ -758,8 +759,8 @@ sourceFile:sourceMapValidationDecorators.ts 6 > ^ 7 > ^^ 8 > ^ -9 > ^^^^^^^^^^^^ -1 > +9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1-> 2 > @ 3 > ClassDecorator1 4 > @@ -814,23 +815,23 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(47, 5) Source(8, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(47, 27) Source(8, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(47, 42) Source(8, 17) + SourceIndex(0) name (Greeter) -4 >Emitted(47, 44) Source(9, 2) + SourceIndex(0) name (Greeter) -5 >Emitted(47, 59) Source(9, 17) + SourceIndex(0) name (Greeter) -6 >Emitted(47, 60) Source(9, 18) + SourceIndex(0) name (Greeter) -7 >Emitted(47, 62) Source(9, 20) + SourceIndex(0) name (Greeter) -8 >Emitted(47, 63) Source(9, 21) + SourceIndex(0) name (Greeter) -9 >Emitted(47, 75) Source(54, 2) + SourceIndex(0) name (Greeter) +1->Emitted(48, 5) Source(8, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(48, 27) Source(8, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(48, 42) Source(8, 17) + SourceIndex(0) name (Greeter) +4 >Emitted(48, 44) Source(9, 2) + SourceIndex(0) name (Greeter) +5 >Emitted(48, 59) Source(9, 17) + SourceIndex(0) name (Greeter) +6 >Emitted(48, 60) Source(9, 18) + SourceIndex(0) name (Greeter) +7 >Emitted(48, 62) Source(9, 20) + SourceIndex(0) name (Greeter) +8 >Emitted(48, 63) Source(9, 21) + SourceIndex(0) name (Greeter) +9 >Emitted(48, 126) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>> return Greeter; 1 >^^^^ 2 > ^^^^^^^^^^^^^^ 1 > 2 > } -1 >Emitted(48, 5) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(48, 19) Source(54, 2) + SourceIndex(0) name (Greeter) +1 >Emitted(49, 5) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(49, 19) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>>})(); 1 > @@ -888,9 +889,9 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(49, 1) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(49, 2) Source(54, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(49, 2) Source(8, 1) + SourceIndex(0) -4 >Emitted(49, 6) Source(54, 2) + SourceIndex(0) +1 >Emitted(50, 1) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(50, 2) Source(54, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(50, 2) Source(8, 1) + SourceIndex(0) +4 >Emitted(50, 6) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file From f556d468045d64968734d91fbb068266499216ef Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 25 Mar 2015 18:12:57 -0700 Subject: [PATCH 06/16] Minor emit cleanup --- src/compiler/emitter.ts | 10 +- .../reference/APISample_linter.types.pull | 6457 +++++++++++++++++ .../baselines/reference/decoratorOnClass1.js | 2 +- .../baselines/reference/decoratorOnClass2.js | 2 +- .../baselines/reference/decoratorOnClass3.js | 2 +- .../baselines/reference/decoratorOnClass4.js | 2 +- .../baselines/reference/decoratorOnClass5.js | 2 +- .../baselines/reference/decoratorOnClass8.js | 2 +- .../reference/decoratorOnClassAccessor1.js | 2 +- .../reference/decoratorOnClassAccessor2.js | 2 +- .../reference/decoratorOnClassAccessor4.js | 2 +- .../reference/decoratorOnClassAccessor5.js | 2 +- .../decoratorOnClassConstructorParameter1.js | 2 +- .../decoratorOnClassConstructorParameter4.js | 2 +- .../reference/decoratorOnClassMethod1.js | 2 +- .../reference/decoratorOnClassMethod10.js | 2 +- .../reference/decoratorOnClassMethod2.js | 2 +- .../reference/decoratorOnClassMethod4.js | 2 +- .../reference/decoratorOnClassMethod5.js | 2 +- .../reference/decoratorOnClassMethod6.js | 2 +- .../reference/decoratorOnClassMethod7.js | 2 +- .../reference/decoratorOnClassMethod8.js | 2 +- .../decoratorOnClassMethodParameter1.js | 2 +- .../reference/decoratorOnClassProperty1.js | 2 +- .../reference/decoratorOnClassProperty10.js | 2 +- .../reference/decoratorOnClassProperty11.js | 2 +- .../reference/decoratorOnClassProperty2.js | 2 +- .../reference/decoratorOnClassProperty6.js | 2 +- .../reference/decoratorOnClassProperty7.js | 2 +- .../sourceMapValidationDecorators.js | 2 +- ...ourceMapValidationDecorators.sourcemap.txt | 2 +- 31 files changed, 6491 insertions(+), 34 deletions(-) create mode 100644 tests/baselines/reference/APISample_linter.types.pull diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 68705a0b81..6971e5f723 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3900,15 +3900,15 @@ module ts { write("], "); } - function formatPathSegment(location: Node, path: string[], index: number): string { + function serializeTypeNameSegment(location: Node, path: string[], index: number): string { switch (index) { case 0: return `typeof ${path[index]} !== 'undefined' && ${path[index]}`; case 1: - return `${formatPathSegment(location, path, index - 1) }.${path[index]}`; + return `${serializeTypeNameSegment(location, path, index - 1) }.${path[index]}`; default: let temp = createAndRecordTempVariable(TempFlags.Auto).text; - return `(${temp} = ${formatPathSegment(location, path, index - 1) }) && ${temp}.${path[index]}`; + return `(${temp} = ${serializeTypeNameSegment(location, path, index - 1) }) && ${temp}.${path[index]}`; } } @@ -3981,7 +3981,7 @@ module ts { } else { Debug.assert(name.length > 0, "Invalid type name path for serialization"); - write(`(${formatPathSegment(location, name, name.length - 1) }) || Object`); + write(`(${serializeTypeNameSegment(location, name, name.length - 1) }) || Object`); } } function emitInterfaceDeclaration(node: InterfaceDeclaration) { @@ -4666,7 +4666,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } };`); +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } };`); decorateEmitted = true; } if (isExternalModule(node)) { diff --git a/tests/baselines/reference/APISample_linter.types.pull b/tests/baselines/reference/APISample_linter.types.pull new file mode 100644 index 0000000000..c89fc179e4 --- /dev/null +++ b/tests/baselines/reference/APISample_linter.types.pull @@ -0,0 +1,6457 @@ +=== tests/cases/compiler/APISample_linter.ts === + +/* + * Note: This test is a public API sample. The sample sources can be found + at: https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#traversing-the-ast-with-a-little-linter + * Please log a "breaking change" issue for any API breaking change affecting this issue + */ + +declare var process: any; +>process : any + +declare var console: any; +>console : any + +declare var fs: any; +>fs : any + +import ts = require("typescript"); +>ts : typeof ts + +export function delint(sourceFile: ts.SourceFile) { +>delint : (sourceFile: ts.SourceFile) => void +>sourceFile : ts.SourceFile +>ts : unknown +>SourceFile : ts.SourceFile + + delintNode(sourceFile); +>delintNode(sourceFile) : void +>delintNode : (node: ts.Node) => void +>sourceFile : ts.SourceFile + + function delintNode(node: ts.Node) { +>delintNode : (node: ts.Node) => void +>node : ts.Node +>ts : unknown +>Node : ts.Node + + switch (node.kind) { +>node.kind : ts.SyntaxKind +>node : ts.Node +>kind : ts.SyntaxKind + + case ts.SyntaxKind.ForStatement: +>ts.SyntaxKind.ForStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>ForStatement : ts.SyntaxKind + + case ts.SyntaxKind.ForInStatement: +>ts.SyntaxKind.ForInStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>ForInStatement : ts.SyntaxKind + + case ts.SyntaxKind.WhileStatement: +>ts.SyntaxKind.WhileStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>WhileStatement : ts.SyntaxKind + + case ts.SyntaxKind.DoStatement: +>ts.SyntaxKind.DoStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>DoStatement : ts.SyntaxKind + + if ((node).statement.kind !== ts.SyntaxKind.Block) { +>(node).statement.kind !== ts.SyntaxKind.Block : boolean +>(node).statement.kind : ts.SyntaxKind +>(node).statement : ts.Statement +>(node) : ts.IterationStatement +>node : ts.IterationStatement +>ts : unknown +>IterationStatement : ts.IterationStatement +>node : ts.Node +>statement : ts.Statement +>kind : ts.SyntaxKind +>ts.SyntaxKind.Block : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>Block : ts.SyntaxKind + + report(node, "A looping statement's contents should be wrapped in a block body."); +>report(node, "A looping statement's contents should be wrapped in a block body.") : void +>report : (node: ts.Node, message: string) => void +>node : ts.Node + } + break; + case ts.SyntaxKind.IfStatement: +>ts.SyntaxKind.IfStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>IfStatement : ts.SyntaxKind + + var ifStatement = (node); +>ifStatement : ts.IfStatement +>(node) : ts.IfStatement +>node : ts.IfStatement +>ts : unknown +>IfStatement : ts.IfStatement +>node : ts.Node + + if (ifStatement.thenStatement.kind !== ts.SyntaxKind.Block) { +>ifStatement.thenStatement.kind !== ts.SyntaxKind.Block : boolean +>ifStatement.thenStatement.kind : ts.SyntaxKind +>ifStatement.thenStatement : ts.Statement +>ifStatement : ts.IfStatement +>thenStatement : ts.Statement +>kind : ts.SyntaxKind +>ts.SyntaxKind.Block : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>Block : ts.SyntaxKind + + report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body."); +>report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.") : void +>report : (node: ts.Node, message: string) => void +>ifStatement.thenStatement : ts.Statement +>ifStatement : ts.IfStatement +>thenStatement : ts.Statement + } + if (ifStatement.elseStatement && +>ifStatement.elseStatement && ifStatement.elseStatement.kind !== ts.SyntaxKind.Block && ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement : boolean +>ifStatement.elseStatement && ifStatement.elseStatement.kind !== ts.SyntaxKind.Block : boolean +>ifStatement.elseStatement : ts.Statement +>ifStatement : ts.IfStatement +>elseStatement : ts.Statement + + ifStatement.elseStatement.kind !== ts.SyntaxKind.Block && ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement) { +>ifStatement.elseStatement.kind !== ts.SyntaxKind.Block : boolean +>ifStatement.elseStatement.kind : ts.SyntaxKind +>ifStatement.elseStatement : ts.Statement +>ifStatement : ts.IfStatement +>elseStatement : ts.Statement +>kind : ts.SyntaxKind +>ts.SyntaxKind.Block : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>Block : ts.SyntaxKind +>ifStatement.elseStatement.kind !== ts.SyntaxKind.IfStatement : boolean +>ifStatement.elseStatement.kind : ts.SyntaxKind +>ifStatement.elseStatement : ts.Statement +>ifStatement : ts.IfStatement +>elseStatement : ts.Statement +>kind : ts.SyntaxKind +>ts.SyntaxKind.IfStatement : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>IfStatement : ts.SyntaxKind + + report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body."); +>report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.") : void +>report : (node: ts.Node, message: string) => void +>ifStatement.elseStatement : ts.Statement +>ifStatement : ts.IfStatement +>elseStatement : ts.Statement + } + break; + + case ts.SyntaxKind.BinaryExpression: +>ts.SyntaxKind.BinaryExpression : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>BinaryExpression : ts.SyntaxKind + + var op = (node).operatorToken.kind; +>op : ts.SyntaxKind +>(node).operatorToken.kind : ts.SyntaxKind +>(node).operatorToken : ts.Node +>(node) : ts.BinaryExpression +>node : ts.BinaryExpression +>ts : unknown +>BinaryExpression : ts.BinaryExpression +>node : ts.Node +>operatorToken : ts.Node +>kind : ts.SyntaxKind + + if (op === ts.SyntaxKind.EqualsEqualsToken || op === ts.SyntaxKind.ExclamationEqualsToken) { +>op === ts.SyntaxKind.EqualsEqualsToken || op === ts.SyntaxKind.ExclamationEqualsToken : boolean +>op === ts.SyntaxKind.EqualsEqualsToken : boolean +>op : ts.SyntaxKind +>ts.SyntaxKind.EqualsEqualsToken : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>EqualsEqualsToken : ts.SyntaxKind +>op === ts.SyntaxKind.ExclamationEqualsToken : boolean +>op : ts.SyntaxKind +>ts.SyntaxKind.ExclamationEqualsToken : ts.SyntaxKind +>ts.SyntaxKind : typeof ts.SyntaxKind +>ts : typeof ts +>SyntaxKind : typeof ts.SyntaxKind +>ExclamationEqualsToken : ts.SyntaxKind + + report(node, "Use '===' and '!=='.") +>report(node, "Use '===' and '!=='.") : void +>report : (node: ts.Node, message: string) => void +>node : ts.Node + } + break; + } + + ts.forEachChild(node, delintNode); +>ts.forEachChild(node, delintNode) : void +>ts.forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T +>ts : typeof ts +>forEachChild : (node: ts.Node, cbNode: (node: ts.Node) => T, cbNodeArray?: (nodes: ts.Node[]) => T) => T +>node : ts.Node +>delintNode : (node: ts.Node) => void + } + + function report(node: ts.Node, message: string) { +>report : (node: ts.Node, message: string) => void +>node : ts.Node +>ts : unknown +>Node : ts.Node +>message : string + + var lineChar = sourceFile.getLineAndCharacterOfPosition(node.getStart()); +>lineChar : ts.LineAndCharacter +>sourceFile.getLineAndCharacterOfPosition(node.getStart()) : ts.LineAndCharacter +>sourceFile.getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter +>sourceFile : ts.SourceFile +>getLineAndCharacterOfPosition : (pos: number) => ts.LineAndCharacter +>node.getStart() : number +>node.getStart : (sourceFile?: ts.SourceFile) => number +>node : ts.Node +>getStart : (sourceFile?: ts.SourceFile) => number + + console.log(`${sourceFile.fileName} (${lineChar.line + 1},${lineChar.character + 1}): ${message}`) +>console.log(`${sourceFile.fileName} (${lineChar.line + 1},${lineChar.character + 1}): ${message}`) : any +>console.log : any +>console : any +>log : any +>sourceFile.fileName : string +>sourceFile : ts.SourceFile +>fileName : string +>lineChar.line + 1 : number +>lineChar.line : number +>lineChar : ts.LineAndCharacter +>line : number +>lineChar.character + 1 : number +>lineChar.character : number +>lineChar : ts.LineAndCharacter +>character : number +>message : string + } +} + +var fileNames = process.argv.slice(2); +>fileNames : any +>process.argv.slice(2) : any +>process.argv.slice : any +>process.argv : any +>process : any +>argv : any +>slice : any + +fileNames.forEach(fileName => { +>fileNames.forEach(fileName => { // Parse a file var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); // delint it delint(sourceFile);}) : any +>fileNames.forEach : any +>fileNames : any +>forEach : any +>fileName => { // Parse a file var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); // delint it delint(sourceFile);} : (fileName: any) => void +>fileName : any + + // Parse a file + var sourceFile = ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true); +>sourceFile : ts.SourceFile +>ts.createSourceFile(fileName, fs.readFileSync(fileName).toString(), ts.ScriptTarget.ES6, /*setParentNodes */ true) : ts.SourceFile +>ts.createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile +>ts : typeof ts +>createSourceFile : (fileName: string, sourceText: string, languageVersion: ts.ScriptTarget, setParentNodes?: boolean) => ts.SourceFile +>fileName : any +>fs.readFileSync(fileName).toString() : any +>fs.readFileSync(fileName).toString : any +>fs.readFileSync(fileName) : any +>fs.readFileSync : any +>fs : any +>readFileSync : any +>fileName : any +>toString : any +>ts.ScriptTarget.ES6 : ts.ScriptTarget +>ts.ScriptTarget : typeof ts.ScriptTarget +>ts : typeof ts +>ScriptTarget : typeof ts.ScriptTarget +>ES6 : ts.ScriptTarget + + // delint it + delint(sourceFile); +>delint(sourceFile) : void +>delint : (sourceFile: ts.SourceFile) => void +>sourceFile : ts.SourceFile + +}); + +=== typescript.d.ts === +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ + +declare module "typescript" { + interface Map { +>Map : Map +>T : T + + [index: string]: T; +>index : string +>T : T + } + interface TextRange { +>TextRange : TextRange + + pos: number; +>pos : number + + end: number; +>end : number + } + const enum SyntaxKind { +>SyntaxKind : SyntaxKind + + Unknown = 0, +>Unknown : SyntaxKind + + EndOfFileToken = 1, +>EndOfFileToken : SyntaxKind + + SingleLineCommentTrivia = 2, +>SingleLineCommentTrivia : SyntaxKind + + MultiLineCommentTrivia = 3, +>MultiLineCommentTrivia : SyntaxKind + + NewLineTrivia = 4, +>NewLineTrivia : SyntaxKind + + WhitespaceTrivia = 5, +>WhitespaceTrivia : SyntaxKind + + ConflictMarkerTrivia = 6, +>ConflictMarkerTrivia : SyntaxKind + + NumericLiteral = 7, +>NumericLiteral : SyntaxKind + + StringLiteral = 8, +>StringLiteral : SyntaxKind + + RegularExpressionLiteral = 9, +>RegularExpressionLiteral : SyntaxKind + + NoSubstitutionTemplateLiteral = 10, +>NoSubstitutionTemplateLiteral : SyntaxKind + + TemplateHead = 11, +>TemplateHead : SyntaxKind + + TemplateMiddle = 12, +>TemplateMiddle : SyntaxKind + + TemplateTail = 13, +>TemplateTail : SyntaxKind + + OpenBraceToken = 14, +>OpenBraceToken : SyntaxKind + + CloseBraceToken = 15, +>CloseBraceToken : SyntaxKind + + OpenParenToken = 16, +>OpenParenToken : SyntaxKind + + CloseParenToken = 17, +>CloseParenToken : SyntaxKind + + OpenBracketToken = 18, +>OpenBracketToken : SyntaxKind + + CloseBracketToken = 19, +>CloseBracketToken : SyntaxKind + + DotToken = 20, +>DotToken : SyntaxKind + + DotDotDotToken = 21, +>DotDotDotToken : SyntaxKind + + SemicolonToken = 22, +>SemicolonToken : SyntaxKind + + CommaToken = 23, +>CommaToken : SyntaxKind + + LessThanToken = 24, +>LessThanToken : SyntaxKind + + GreaterThanToken = 25, +>GreaterThanToken : SyntaxKind + + LessThanEqualsToken = 26, +>LessThanEqualsToken : SyntaxKind + + GreaterThanEqualsToken = 27, +>GreaterThanEqualsToken : SyntaxKind + + EqualsEqualsToken = 28, +>EqualsEqualsToken : SyntaxKind + + ExclamationEqualsToken = 29, +>ExclamationEqualsToken : SyntaxKind + + EqualsEqualsEqualsToken = 30, +>EqualsEqualsEqualsToken : SyntaxKind + + ExclamationEqualsEqualsToken = 31, +>ExclamationEqualsEqualsToken : SyntaxKind + + EqualsGreaterThanToken = 32, +>EqualsGreaterThanToken : SyntaxKind + + PlusToken = 33, +>PlusToken : SyntaxKind + + MinusToken = 34, +>MinusToken : SyntaxKind + + AsteriskToken = 35, +>AsteriskToken : SyntaxKind + + SlashToken = 36, +>SlashToken : SyntaxKind + + PercentToken = 37, +>PercentToken : SyntaxKind + + PlusPlusToken = 38, +>PlusPlusToken : SyntaxKind + + MinusMinusToken = 39, +>MinusMinusToken : SyntaxKind + + LessThanLessThanToken = 40, +>LessThanLessThanToken : SyntaxKind + + GreaterThanGreaterThanToken = 41, +>GreaterThanGreaterThanToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanToken = 42, +>GreaterThanGreaterThanGreaterThanToken : SyntaxKind + + AmpersandToken = 43, +>AmpersandToken : SyntaxKind + + BarToken = 44, +>BarToken : SyntaxKind + + CaretToken = 45, +>CaretToken : SyntaxKind + + ExclamationToken = 46, +>ExclamationToken : SyntaxKind + + TildeToken = 47, +>TildeToken : SyntaxKind + + AmpersandAmpersandToken = 48, +>AmpersandAmpersandToken : SyntaxKind + + BarBarToken = 49, +>BarBarToken : SyntaxKind + + QuestionToken = 50, +>QuestionToken : SyntaxKind + + ColonToken = 51, +>ColonToken : SyntaxKind + + AtToken = 52, +>AtToken : SyntaxKind + + EqualsToken = 53, +>EqualsToken : SyntaxKind + + PlusEqualsToken = 54, +>PlusEqualsToken : SyntaxKind + + MinusEqualsToken = 55, +>MinusEqualsToken : SyntaxKind + + AsteriskEqualsToken = 56, +>AsteriskEqualsToken : SyntaxKind + + SlashEqualsToken = 57, +>SlashEqualsToken : SyntaxKind + + PercentEqualsToken = 58, +>PercentEqualsToken : SyntaxKind + + LessThanLessThanEqualsToken = 59, +>LessThanLessThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanEqualsToken = 60, +>GreaterThanGreaterThanEqualsToken : SyntaxKind + + GreaterThanGreaterThanGreaterThanEqualsToken = 61, +>GreaterThanGreaterThanGreaterThanEqualsToken : SyntaxKind + + AmpersandEqualsToken = 62, +>AmpersandEqualsToken : SyntaxKind + + BarEqualsToken = 63, +>BarEqualsToken : SyntaxKind + + CaretEqualsToken = 64, +>CaretEqualsToken : SyntaxKind + + Identifier = 65, +>Identifier : SyntaxKind + + BreakKeyword = 66, +>BreakKeyword : SyntaxKind + + CaseKeyword = 67, +>CaseKeyword : SyntaxKind + + CatchKeyword = 68, +>CatchKeyword : SyntaxKind + + ClassKeyword = 69, +>ClassKeyword : SyntaxKind + + ConstKeyword = 70, +>ConstKeyword : SyntaxKind + + ContinueKeyword = 71, +>ContinueKeyword : SyntaxKind + + DebuggerKeyword = 72, +>DebuggerKeyword : SyntaxKind + + DefaultKeyword = 73, +>DefaultKeyword : SyntaxKind + + DeleteKeyword = 74, +>DeleteKeyword : SyntaxKind + + DoKeyword = 75, +>DoKeyword : SyntaxKind + + ElseKeyword = 76, +>ElseKeyword : SyntaxKind + + EnumKeyword = 77, +>EnumKeyword : SyntaxKind + + ExportKeyword = 78, +>ExportKeyword : SyntaxKind + + ExtendsKeyword = 79, +>ExtendsKeyword : SyntaxKind + + FalseKeyword = 80, +>FalseKeyword : SyntaxKind + + FinallyKeyword = 81, +>FinallyKeyword : SyntaxKind + + ForKeyword = 82, +>ForKeyword : SyntaxKind + + FunctionKeyword = 83, +>FunctionKeyword : SyntaxKind + + IfKeyword = 84, +>IfKeyword : SyntaxKind + + ImportKeyword = 85, +>ImportKeyword : SyntaxKind + + InKeyword = 86, +>InKeyword : SyntaxKind + + InstanceOfKeyword = 87, +>InstanceOfKeyword : SyntaxKind + + NewKeyword = 88, +>NewKeyword : SyntaxKind + + NullKeyword = 89, +>NullKeyword : SyntaxKind + + ReturnKeyword = 90, +>ReturnKeyword : SyntaxKind + + SuperKeyword = 91, +>SuperKeyword : SyntaxKind + + SwitchKeyword = 92, +>SwitchKeyword : SyntaxKind + + ThisKeyword = 93, +>ThisKeyword : SyntaxKind + + ThrowKeyword = 94, +>ThrowKeyword : SyntaxKind + + TrueKeyword = 95, +>TrueKeyword : SyntaxKind + + TryKeyword = 96, +>TryKeyword : SyntaxKind + + TypeOfKeyword = 97, +>TypeOfKeyword : SyntaxKind + + VarKeyword = 98, +>VarKeyword : SyntaxKind + + VoidKeyword = 99, +>VoidKeyword : SyntaxKind + + WhileKeyword = 100, +>WhileKeyword : SyntaxKind + + WithKeyword = 101, +>WithKeyword : SyntaxKind + + AsKeyword = 102, +>AsKeyword : SyntaxKind + + ImplementsKeyword = 103, +>ImplementsKeyword : SyntaxKind + + InterfaceKeyword = 104, +>InterfaceKeyword : SyntaxKind + + LetKeyword = 105, +>LetKeyword : SyntaxKind + + PackageKeyword = 106, +>PackageKeyword : SyntaxKind + + PrivateKeyword = 107, +>PrivateKeyword : SyntaxKind + + ProtectedKeyword = 108, +>ProtectedKeyword : SyntaxKind + + PublicKeyword = 109, +>PublicKeyword : SyntaxKind + + StaticKeyword = 110, +>StaticKeyword : SyntaxKind + + YieldKeyword = 111, +>YieldKeyword : SyntaxKind + + AnyKeyword = 112, +>AnyKeyword : SyntaxKind + + BooleanKeyword = 113, +>BooleanKeyword : SyntaxKind + + ConstructorKeyword = 114, +>ConstructorKeyword : SyntaxKind + + DeclareKeyword = 115, +>DeclareKeyword : SyntaxKind + + GetKeyword = 116, +>GetKeyword : SyntaxKind + + ModuleKeyword = 117, +>ModuleKeyword : SyntaxKind + + RequireKeyword = 118, +>RequireKeyword : SyntaxKind + + NumberKeyword = 119, +>NumberKeyword : SyntaxKind + + SetKeyword = 120, +>SetKeyword : SyntaxKind + + StringKeyword = 121, +>StringKeyword : SyntaxKind + + SymbolKeyword = 122, +>SymbolKeyword : SyntaxKind + + TypeKeyword = 123, +>TypeKeyword : SyntaxKind + + FromKeyword = 124, +>FromKeyword : SyntaxKind + + OfKeyword = 125, +>OfKeyword : SyntaxKind + + QualifiedName = 126, +>QualifiedName : SyntaxKind + + ComputedPropertyName = 127, +>ComputedPropertyName : SyntaxKind + + TypeParameter = 128, +>TypeParameter : SyntaxKind + + Parameter = 129, +>Parameter : SyntaxKind + + Decorator = 130, +>Decorator : SyntaxKind + + PropertySignature = 131, +>PropertySignature : SyntaxKind + + PropertyDeclaration = 132, +>PropertyDeclaration : SyntaxKind + + MethodSignature = 133, +>MethodSignature : SyntaxKind + + MethodDeclaration = 134, +>MethodDeclaration : SyntaxKind + + Constructor = 135, +>Constructor : SyntaxKind + + GetAccessor = 136, +>GetAccessor : SyntaxKind + + SetAccessor = 137, +>SetAccessor : SyntaxKind + + CallSignature = 138, +>CallSignature : SyntaxKind + + ConstructSignature = 139, +>ConstructSignature : SyntaxKind + + IndexSignature = 140, +>IndexSignature : SyntaxKind + + TypeReference = 141, +>TypeReference : SyntaxKind + + FunctionType = 142, +>FunctionType : SyntaxKind + + ConstructorType = 143, +>ConstructorType : SyntaxKind + + TypeQuery = 144, +>TypeQuery : SyntaxKind + + TypeLiteral = 145, +>TypeLiteral : SyntaxKind + + ArrayType = 146, +>ArrayType : SyntaxKind + + TupleType = 147, +>TupleType : SyntaxKind + + UnionType = 148, +>UnionType : SyntaxKind + + ParenthesizedType = 149, +>ParenthesizedType : SyntaxKind + + ObjectBindingPattern = 150, +>ObjectBindingPattern : SyntaxKind + + ArrayBindingPattern = 151, +>ArrayBindingPattern : SyntaxKind + + BindingElement = 152, +>BindingElement : SyntaxKind + + ArrayLiteralExpression = 153, +>ArrayLiteralExpression : SyntaxKind + + ObjectLiteralExpression = 154, +>ObjectLiteralExpression : SyntaxKind + + PropertyAccessExpression = 155, +>PropertyAccessExpression : SyntaxKind + + ElementAccessExpression = 156, +>ElementAccessExpression : SyntaxKind + + CallExpression = 157, +>CallExpression : SyntaxKind + + NewExpression = 158, +>NewExpression : SyntaxKind + + TaggedTemplateExpression = 159, +>TaggedTemplateExpression : SyntaxKind + + TypeAssertionExpression = 160, +>TypeAssertionExpression : SyntaxKind + + ParenthesizedExpression = 161, +>ParenthesizedExpression : SyntaxKind + + FunctionExpression = 162, +>FunctionExpression : SyntaxKind + + ArrowFunction = 163, +>ArrowFunction : SyntaxKind + + DeleteExpression = 164, +>DeleteExpression : SyntaxKind + + TypeOfExpression = 165, +>TypeOfExpression : SyntaxKind + + VoidExpression = 166, +>VoidExpression : SyntaxKind + + PrefixUnaryExpression = 167, +>PrefixUnaryExpression : SyntaxKind + + PostfixUnaryExpression = 168, +>PostfixUnaryExpression : SyntaxKind + + BinaryExpression = 169, +>BinaryExpression : SyntaxKind + + ConditionalExpression = 170, +>ConditionalExpression : SyntaxKind + + TemplateExpression = 171, +>TemplateExpression : SyntaxKind + + YieldExpression = 172, +>YieldExpression : SyntaxKind + + SpreadElementExpression = 173, +>SpreadElementExpression : SyntaxKind + + ClassExpression = 174, +>ClassExpression : SyntaxKind + + OmittedExpression = 175, +>OmittedExpression : SyntaxKind + + TemplateSpan = 176, +>TemplateSpan : SyntaxKind + + HeritageClauseElement = 177, +>HeritageClauseElement : SyntaxKind + + SemicolonClassElement = 178, +>SemicolonClassElement : SyntaxKind + + Block = 179, +>Block : SyntaxKind + + VariableStatement = 180, +>VariableStatement : SyntaxKind + + EmptyStatement = 181, +>EmptyStatement : SyntaxKind + + ExpressionStatement = 182, +>ExpressionStatement : SyntaxKind + + IfStatement = 183, +>IfStatement : SyntaxKind + + DoStatement = 184, +>DoStatement : SyntaxKind + + WhileStatement = 185, +>WhileStatement : SyntaxKind + + ForStatement = 186, +>ForStatement : SyntaxKind + + ForInStatement = 187, +>ForInStatement : SyntaxKind + + ForOfStatement = 188, +>ForOfStatement : SyntaxKind + + ContinueStatement = 189, +>ContinueStatement : SyntaxKind + + BreakStatement = 190, +>BreakStatement : SyntaxKind + + ReturnStatement = 191, +>ReturnStatement : SyntaxKind + + WithStatement = 192, +>WithStatement : SyntaxKind + + SwitchStatement = 193, +>SwitchStatement : SyntaxKind + + LabeledStatement = 194, +>LabeledStatement : SyntaxKind + + ThrowStatement = 195, +>ThrowStatement : SyntaxKind + + TryStatement = 196, +>TryStatement : SyntaxKind + + DebuggerStatement = 197, +>DebuggerStatement : SyntaxKind + + VariableDeclaration = 198, +>VariableDeclaration : SyntaxKind + + VariableDeclarationList = 199, +>VariableDeclarationList : SyntaxKind + + FunctionDeclaration = 200, +>FunctionDeclaration : SyntaxKind + + ClassDeclaration = 201, +>ClassDeclaration : SyntaxKind + + InterfaceDeclaration = 202, +>InterfaceDeclaration : SyntaxKind + + TypeAliasDeclaration = 203, +>TypeAliasDeclaration : SyntaxKind + + EnumDeclaration = 204, +>EnumDeclaration : SyntaxKind + + ModuleDeclaration = 205, +>ModuleDeclaration : SyntaxKind + + ModuleBlock = 206, +>ModuleBlock : SyntaxKind + + CaseBlock = 207, +>CaseBlock : SyntaxKind + + ImportEqualsDeclaration = 208, +>ImportEqualsDeclaration : SyntaxKind + + ImportDeclaration = 209, +>ImportDeclaration : SyntaxKind + + ImportClause = 210, +>ImportClause : SyntaxKind + + NamespaceImport = 211, +>NamespaceImport : SyntaxKind + + NamedImports = 212, +>NamedImports : SyntaxKind + + ImportSpecifier = 213, +>ImportSpecifier : SyntaxKind + + ExportAssignment = 214, +>ExportAssignment : SyntaxKind + + ExportDeclaration = 215, +>ExportDeclaration : SyntaxKind + + NamedExports = 216, +>NamedExports : SyntaxKind + + ExportSpecifier = 217, +>ExportSpecifier : SyntaxKind + + MissingDeclaration = 218, +>MissingDeclaration : SyntaxKind + + ExternalModuleReference = 219, +>ExternalModuleReference : SyntaxKind + + CaseClause = 220, +>CaseClause : SyntaxKind + + DefaultClause = 221, +>DefaultClause : SyntaxKind + + HeritageClause = 222, +>HeritageClause : SyntaxKind + + CatchClause = 223, +>CatchClause : SyntaxKind + + PropertyAssignment = 224, +>PropertyAssignment : SyntaxKind + + ShorthandPropertyAssignment = 225, +>ShorthandPropertyAssignment : SyntaxKind + + EnumMember = 226, +>EnumMember : SyntaxKind + + SourceFile = 227, +>SourceFile : SyntaxKind + + SyntaxList = 228, +>SyntaxList : SyntaxKind + + Count = 229, +>Count : SyntaxKind + + FirstAssignment = 53, +>FirstAssignment : SyntaxKind + + LastAssignment = 64, +>LastAssignment : SyntaxKind + + FirstReservedWord = 66, +>FirstReservedWord : SyntaxKind + + LastReservedWord = 101, +>LastReservedWord : SyntaxKind + + FirstKeyword = 66, +>FirstKeyword : SyntaxKind + + LastKeyword = 125, +>LastKeyword : SyntaxKind + + FirstFutureReservedWord = 103, +>FirstFutureReservedWord : SyntaxKind + + LastFutureReservedWord = 111, +>LastFutureReservedWord : SyntaxKind + + FirstTypeNode = 141, +>FirstTypeNode : SyntaxKind + + LastTypeNode = 149, +>LastTypeNode : SyntaxKind + + FirstPunctuation = 14, +>FirstPunctuation : SyntaxKind + + LastPunctuation = 64, +>LastPunctuation : SyntaxKind + + FirstToken = 0, +>FirstToken : SyntaxKind + + LastToken = 125, +>LastToken : SyntaxKind + + FirstTriviaToken = 2, +>FirstTriviaToken : SyntaxKind + + LastTriviaToken = 6, +>LastTriviaToken : SyntaxKind + + FirstLiteralToken = 7, +>FirstLiteralToken : SyntaxKind + + LastLiteralToken = 10, +>LastLiteralToken : SyntaxKind + + FirstTemplateToken = 10, +>FirstTemplateToken : SyntaxKind + + LastTemplateToken = 13, +>LastTemplateToken : SyntaxKind + + FirstBinaryOperator = 24, +>FirstBinaryOperator : SyntaxKind + + LastBinaryOperator = 64, +>LastBinaryOperator : SyntaxKind + + FirstNode = 126, +>FirstNode : SyntaxKind + } + const enum NodeFlags { +>NodeFlags : NodeFlags + + Export = 1, +>Export : NodeFlags + + Ambient = 2, +>Ambient : NodeFlags + + Public = 16, +>Public : NodeFlags + + Private = 32, +>Private : NodeFlags + + Protected = 64, +>Protected : NodeFlags + + Static = 128, +>Static : NodeFlags + + Default = 256, +>Default : NodeFlags + + MultiLine = 512, +>MultiLine : NodeFlags + + Synthetic = 1024, +>Synthetic : NodeFlags + + DeclarationFile = 2048, +>DeclarationFile : NodeFlags + + Let = 4096, +>Let : NodeFlags + + Const = 8192, +>Const : NodeFlags + + OctalLiteral = 16384, +>OctalLiteral : NodeFlags + + ExportContext = 32768, +>ExportContext : NodeFlags + + Modifier = 499, +>Modifier : NodeFlags + + AccessibilityModifier = 112, +>AccessibilityModifier : NodeFlags + + BlockScoped = 12288, +>BlockScoped : NodeFlags + } + const enum ParserContextFlags { +>ParserContextFlags : ParserContextFlags + + StrictMode = 1, +>StrictMode : ParserContextFlags + + DisallowIn = 2, +>DisallowIn : ParserContextFlags + + Yield = 4, +>Yield : ParserContextFlags + + GeneratorParameter = 8, +>GeneratorParameter : ParserContextFlags + + Decorator = 16, +>Decorator : ParserContextFlags + + ThisNodeHasError = 32, +>ThisNodeHasError : ParserContextFlags + + ParserGeneratedFlags = 63, +>ParserGeneratedFlags : ParserContextFlags + + ThisNodeOrAnySubNodesHasError = 64, +>ThisNodeOrAnySubNodesHasError : ParserContextFlags + + HasAggregatedChildData = 128, +>HasAggregatedChildData : ParserContextFlags + } + const enum RelationComparisonResult { +>RelationComparisonResult : RelationComparisonResult + + Succeeded = 1, +>Succeeded : RelationComparisonResult + + Failed = 2, +>Failed : RelationComparisonResult + + FailedAndReported = 3, +>FailedAndReported : RelationComparisonResult + } + interface Node extends TextRange { +>Node : Node +>TextRange : TextRange + + kind: SyntaxKind; +>kind : SyntaxKind +>SyntaxKind : SyntaxKind + + flags: NodeFlags; +>flags : NodeFlags +>NodeFlags : NodeFlags + + parserContextFlags?: ParserContextFlags; +>parserContextFlags : ParserContextFlags +>ParserContextFlags : ParserContextFlags + + decorators?: NodeArray; +>decorators : NodeArray +>NodeArray : NodeArray +>Decorator : Decorator + + modifiers?: ModifiersArray; +>modifiers : ModifiersArray +>ModifiersArray : ModifiersArray + + id?: number; +>id : number + + parent?: Node; +>parent : Node +>Node : Node + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + + locals?: SymbolTable; +>locals : SymbolTable +>SymbolTable : SymbolTable + + nextContainer?: Node; +>nextContainer : Node +>Node : Node + + localSymbol?: Symbol; +>localSymbol : Symbol +>Symbol : Symbol + } + interface NodeArray extends Array, TextRange { +>NodeArray : NodeArray +>T : T +>Array : T[] +>T : T +>TextRange : TextRange + + hasTrailingComma?: boolean; +>hasTrailingComma : boolean + } + interface ModifiersArray extends NodeArray { +>ModifiersArray : ModifiersArray +>NodeArray : NodeArray +>Node : Node + + flags: number; +>flags : number + } + interface Identifier extends PrimaryExpression { +>Identifier : Identifier +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + } + interface QualifiedName extends Node { +>QualifiedName : QualifiedName +>Node : Node + + left: EntityName; +>left : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + right: Identifier; +>right : Identifier +>Identifier : Identifier + } + type EntityName = Identifier | QualifiedName; +>EntityName : Identifier | QualifiedName +>Identifier : Identifier +>QualifiedName : QualifiedName + + type DeclarationName = Identifier | LiteralExpression | ComputedPropertyName | BindingPattern; +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>Identifier : Identifier +>LiteralExpression : LiteralExpression +>ComputedPropertyName : ComputedPropertyName +>BindingPattern : BindingPattern + + interface Declaration extends Node { +>Declaration : Declaration +>Node : Node + + _declarationBrand: any; +>_declarationBrand : any + + name?: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + } + interface ComputedPropertyName extends Node { +>ComputedPropertyName : ComputedPropertyName +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface Decorator extends Node { +>Decorator : Decorator +>Node : Node + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + } + interface TypeParameterDeclaration extends Declaration { +>TypeParameterDeclaration : TypeParameterDeclaration +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + constraint?: TypeNode; +>constraint : TypeNode +>TypeNode : TypeNode + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface SignatureDeclaration extends Declaration { +>SignatureDeclaration : SignatureDeclaration +>Declaration : Declaration + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + parameters: NodeArray; +>parameters : NodeArray +>NodeArray : NodeArray +>ParameterDeclaration : ParameterDeclaration + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface VariableDeclaration extends Declaration { +>VariableDeclaration : VariableDeclaration +>Declaration : Declaration + + parent?: VariableDeclarationList; +>parent : VariableDeclarationList +>VariableDeclarationList : VariableDeclarationList + + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern +>Identifier : Identifier +>BindingPattern : BindingPattern + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface VariableDeclarationList extends Node { +>VariableDeclarationList : VariableDeclarationList +>Node : Node + + declarations: NodeArray; +>declarations : NodeArray +>NodeArray : NodeArray +>VariableDeclaration : VariableDeclaration + } + interface ParameterDeclaration extends Declaration { +>ParameterDeclaration : ParameterDeclaration +>Declaration : Declaration + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern +>Identifier : Identifier +>BindingPattern : BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface BindingElement extends Declaration { +>BindingElement : BindingElement +>Declaration : Declaration + + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: Identifier | BindingPattern; +>name : Identifier | BindingPattern +>Identifier : Identifier +>BindingPattern : BindingPattern + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface PropertyDeclaration extends Declaration, ClassElement { +>PropertyDeclaration : PropertyDeclaration +>Declaration : Declaration +>ClassElement : ClassElement + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface ObjectLiteralElement extends Declaration { +>ObjectLiteralElement : ObjectLiteralElement +>Declaration : Declaration + + _objectLiteralBrandBrand: any; +>_objectLiteralBrandBrand : any + } + interface PropertyAssignment extends ObjectLiteralElement { +>PropertyAssignment : PropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + _propertyAssignmentBrand: any; +>_propertyAssignmentBrand : any + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + initializer: Expression; +>initializer : Expression +>Expression : Expression + } + interface ShorthandPropertyAssignment extends ObjectLiteralElement { +>ShorthandPropertyAssignment : ShorthandPropertyAssignment +>ObjectLiteralElement : ObjectLiteralElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + questionToken?: Node; +>questionToken : Node +>Node : Node + } + interface VariableLikeDeclaration extends Declaration { +>VariableLikeDeclaration : VariableLikeDeclaration +>Declaration : Declaration + + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + dotDotDotToken?: Node; +>dotDotDotToken : Node +>Node : Node + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + questionToken?: Node; +>questionToken : Node +>Node : Node + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface BindingPattern extends Node { +>BindingPattern : BindingPattern +>Node : Node + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>BindingElement : BindingElement + } + /** + * Several node kinds share function-like features such as a signature, + * a name, and a body. These nodes should extend FunctionLikeDeclaration. + * Examples: + * FunctionDeclaration + * MethodDeclaration + * AccessorDeclaration + */ + interface FunctionLikeDeclaration extends SignatureDeclaration { +>FunctionLikeDeclaration : FunctionLikeDeclaration +>SignatureDeclaration : SignatureDeclaration + + _functionLikeDeclarationBrand: any; +>_functionLikeDeclarationBrand : any + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + questionToken?: Node; +>questionToken : Node +>Node : Node + + body?: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface FunctionDeclaration extends FunctionLikeDeclaration, Statement { +>FunctionDeclaration : FunctionDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>Statement : Statement + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body?: Block; +>body : Block +>Block : Block + } + interface MethodDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>MethodDeclaration : MethodDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + body?: Block; +>body : Block +>Block : Block + } + interface ConstructorDeclaration extends FunctionLikeDeclaration, ClassElement { +>ConstructorDeclaration : ConstructorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement + + body?: Block; +>body : Block +>Block : Block + } + interface SemicolonClassElement extends ClassElement { +>SemicolonClassElement : SemicolonClassElement +>ClassElement : ClassElement + + _semicolonClassElementBrand: any; +>_semicolonClassElementBrand : any + } + interface AccessorDeclaration extends FunctionLikeDeclaration, ClassElement, ObjectLiteralElement { +>AccessorDeclaration : AccessorDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration +>ClassElement : ClassElement +>ObjectLiteralElement : ObjectLiteralElement + + _accessorDeclarationBrand: any; +>_accessorDeclarationBrand : any + + body: Block; +>body : Block +>Block : Block + } + interface IndexSignatureDeclaration extends SignatureDeclaration, ClassElement { +>IndexSignatureDeclaration : IndexSignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>ClassElement : ClassElement + + _indexSignatureDeclarationBrand: any; +>_indexSignatureDeclarationBrand : any + } + interface TypeNode extends Node { +>TypeNode : TypeNode +>Node : Node + + _typeNodeBrand: any; +>_typeNodeBrand : any + } + interface FunctionOrConstructorTypeNode extends TypeNode, SignatureDeclaration { +>FunctionOrConstructorTypeNode : FunctionOrConstructorTypeNode +>TypeNode : TypeNode +>SignatureDeclaration : SignatureDeclaration + + _functionOrConstructorTypeNodeBrand: any; +>_functionOrConstructorTypeNodeBrand : any + } + interface TypeReferenceNode extends TypeNode { +>TypeReferenceNode : TypeReferenceNode +>TypeNode : TypeNode + + typeName: EntityName; +>typeName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface TypeQueryNode extends TypeNode { +>TypeQueryNode : TypeQueryNode +>TypeNode : TypeNode + + exprName: EntityName; +>exprName : Identifier | QualifiedName +>EntityName : Identifier | QualifiedName + } + interface TypeLiteralNode extends TypeNode, Declaration { +>TypeLiteralNode : TypeLiteralNode +>TypeNode : TypeNode +>Declaration : Declaration + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Node : Node + } + interface ArrayTypeNode extends TypeNode { +>ArrayTypeNode : ArrayTypeNode +>TypeNode : TypeNode + + elementType: TypeNode; +>elementType : TypeNode +>TypeNode : TypeNode + } + interface TupleTypeNode extends TypeNode { +>TupleTypeNode : TupleTypeNode +>TypeNode : TypeNode + + elementTypes: NodeArray; +>elementTypes : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface UnionTypeNode extends TypeNode { +>UnionTypeNode : UnionTypeNode +>TypeNode : TypeNode + + types: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface ParenthesizedTypeNode extends TypeNode { +>ParenthesizedTypeNode : ParenthesizedTypeNode +>TypeNode : TypeNode + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface StringLiteralTypeNode extends LiteralExpression, TypeNode { +>StringLiteralTypeNode : StringLiteralTypeNode +>LiteralExpression : LiteralExpression +>TypeNode : TypeNode + } + interface Expression extends Node { +>Expression : Expression +>Node : Node + + _expressionBrand: any; +>_expressionBrand : any + + contextualType?: Type; +>contextualType : Type +>Type : Type + } + interface UnaryExpression extends Expression { +>UnaryExpression : UnaryExpression +>Expression : Expression + + _unaryExpressionBrand: any; +>_unaryExpressionBrand : any + } + interface PrefixUnaryExpression extends UnaryExpression { +>PrefixUnaryExpression : PrefixUnaryExpression +>UnaryExpression : UnaryExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + + operand: UnaryExpression; +>operand : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface PostfixUnaryExpression extends PostfixExpression { +>PostfixUnaryExpression : PostfixUnaryExpression +>PostfixExpression : PostfixExpression + + operand: LeftHandSideExpression; +>operand : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + operator: SyntaxKind; +>operator : SyntaxKind +>SyntaxKind : SyntaxKind + } + interface PostfixExpression extends UnaryExpression { +>PostfixExpression : PostfixExpression +>UnaryExpression : UnaryExpression + + _postfixExpressionBrand: any; +>_postfixExpressionBrand : any + } + interface LeftHandSideExpression extends PostfixExpression { +>LeftHandSideExpression : LeftHandSideExpression +>PostfixExpression : PostfixExpression + + _leftHandSideExpressionBrand: any; +>_leftHandSideExpressionBrand : any + } + interface MemberExpression extends LeftHandSideExpression { +>MemberExpression : MemberExpression +>LeftHandSideExpression : LeftHandSideExpression + + _memberExpressionBrand: any; +>_memberExpressionBrand : any + } + interface PrimaryExpression extends MemberExpression { +>PrimaryExpression : PrimaryExpression +>MemberExpression : MemberExpression + + _primaryExpressionBrand: any; +>_primaryExpressionBrand : any + } + interface DeleteExpression extends UnaryExpression { +>DeleteExpression : DeleteExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface TypeOfExpression extends UnaryExpression { +>TypeOfExpression : TypeOfExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface VoidExpression extends UnaryExpression { +>VoidExpression : VoidExpression +>UnaryExpression : UnaryExpression + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface YieldExpression extends Expression { +>YieldExpression : YieldExpression +>Expression : Expression + + asteriskToken?: Node; +>asteriskToken : Node +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BinaryExpression extends Expression { +>BinaryExpression : BinaryExpression +>Expression : Expression + + left: Expression; +>left : Expression +>Expression : Expression + + operatorToken: Node; +>operatorToken : Node +>Node : Node + + right: Expression; +>right : Expression +>Expression : Expression + } + interface ConditionalExpression extends Expression { +>ConditionalExpression : ConditionalExpression +>Expression : Expression + + condition: Expression; +>condition : Expression +>Expression : Expression + + questionToken: Node; +>questionToken : Node +>Node : Node + + whenTrue: Expression; +>whenTrue : Expression +>Expression : Expression + + colonToken: Node; +>colonToken : Node +>Node : Node + + whenFalse: Expression; +>whenFalse : Expression +>Expression : Expression + } + interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclaration { +>FunctionExpression : FunctionExpression +>PrimaryExpression : PrimaryExpression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + body: Block | Expression; +>body : Expression | Block +>Block : Block +>Expression : Expression + } + interface ArrowFunction extends Expression, FunctionLikeDeclaration { +>ArrowFunction : ArrowFunction +>Expression : Expression +>FunctionLikeDeclaration : FunctionLikeDeclaration + + equalsGreaterThanToken: Node; +>equalsGreaterThanToken : Node +>Node : Node + } + interface LiteralExpression extends PrimaryExpression { +>LiteralExpression : LiteralExpression +>PrimaryExpression : PrimaryExpression + + text: string; +>text : string + + isUnterminated?: boolean; +>isUnterminated : boolean + + hasExtendedUnicodeEscape?: boolean; +>hasExtendedUnicodeEscape : boolean + } + interface StringLiteralExpression extends LiteralExpression { +>StringLiteralExpression : StringLiteralExpression +>LiteralExpression : LiteralExpression + + _stringLiteralExpressionBrand: any; +>_stringLiteralExpressionBrand : any + } + interface TemplateExpression extends PrimaryExpression { +>TemplateExpression : TemplateExpression +>PrimaryExpression : PrimaryExpression + + head: LiteralExpression; +>head : LiteralExpression +>LiteralExpression : LiteralExpression + + templateSpans: NodeArray; +>templateSpans : NodeArray +>NodeArray : NodeArray +>TemplateSpan : TemplateSpan + } + interface TemplateSpan extends Node { +>TemplateSpan : TemplateSpan +>Node : Node + + expression: Expression; +>expression : Expression +>Expression : Expression + + literal: LiteralExpression; +>literal : LiteralExpression +>LiteralExpression : LiteralExpression + } + interface ParenthesizedExpression extends PrimaryExpression { +>ParenthesizedExpression : ParenthesizedExpression +>PrimaryExpression : PrimaryExpression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ArrayLiteralExpression extends PrimaryExpression { +>ArrayLiteralExpression : ArrayLiteralExpression +>PrimaryExpression : PrimaryExpression + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface SpreadElementExpression extends Expression { +>SpreadElementExpression : SpreadElementExpression +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ObjectLiteralExpression extends PrimaryExpression, Declaration { +>ObjectLiteralExpression : ObjectLiteralExpression +>PrimaryExpression : PrimaryExpression +>Declaration : Declaration + + properties: NodeArray; +>properties : NodeArray +>NodeArray : NodeArray +>ObjectLiteralElement : ObjectLiteralElement + } + interface PropertyAccessExpression extends MemberExpression { +>PropertyAccessExpression : PropertyAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + dotToken: Node; +>dotToken : Node +>Node : Node + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ElementAccessExpression extends MemberExpression { +>ElementAccessExpression : ElementAccessExpression +>MemberExpression : MemberExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + argumentExpression?: Expression; +>argumentExpression : Expression +>Expression : Expression + } + interface CallExpression extends LeftHandSideExpression { +>CallExpression : CallExpression +>LeftHandSideExpression : LeftHandSideExpression + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + + arguments: NodeArray; +>arguments : NodeArray +>NodeArray : NodeArray +>Expression : Expression + } + interface HeritageClauseElement extends Node { +>HeritageClauseElement : HeritageClauseElement +>Node : Node + + expression: LeftHandSideExpression; +>expression : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + typeArguments?: NodeArray; +>typeArguments : NodeArray +>NodeArray : NodeArray +>TypeNode : TypeNode + } + interface NewExpression extends CallExpression, PrimaryExpression { +>NewExpression : NewExpression +>CallExpression : CallExpression +>PrimaryExpression : PrimaryExpression + } + interface TaggedTemplateExpression extends MemberExpression { +>TaggedTemplateExpression : TaggedTemplateExpression +>MemberExpression : MemberExpression + + tag: LeftHandSideExpression; +>tag : LeftHandSideExpression +>LeftHandSideExpression : LeftHandSideExpression + + template: LiteralExpression | TemplateExpression; +>template : LiteralExpression | TemplateExpression +>LiteralExpression : LiteralExpression +>TemplateExpression : TemplateExpression + } + type CallLikeExpression = CallExpression | NewExpression | TaggedTemplateExpression; +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>CallExpression : CallExpression +>NewExpression : NewExpression +>TaggedTemplateExpression : TaggedTemplateExpression + + interface TypeAssertion extends UnaryExpression { +>TypeAssertion : TypeAssertion +>UnaryExpression : UnaryExpression + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + + expression: UnaryExpression; +>expression : UnaryExpression +>UnaryExpression : UnaryExpression + } + interface Statement extends Node, ModuleElement { +>Statement : Statement +>Node : Node +>ModuleElement : ModuleElement + + _statementBrand: any; +>_statementBrand : any + } + interface Block extends Statement { +>Block : Block +>Statement : Statement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface VariableStatement extends Statement { +>VariableStatement : VariableStatement +>Statement : Statement + + declarationList: VariableDeclarationList; +>declarationList : VariableDeclarationList +>VariableDeclarationList : VariableDeclarationList + } + interface ExpressionStatement extends Statement { +>ExpressionStatement : ExpressionStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface IfStatement extends Statement { +>IfStatement : IfStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + thenStatement: Statement; +>thenStatement : Statement +>Statement : Statement + + elseStatement?: Statement; +>elseStatement : Statement +>Statement : Statement + } + interface IterationStatement extends Statement { +>IterationStatement : IterationStatement +>Statement : Statement + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface DoStatement extends IterationStatement { +>DoStatement : DoStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface WhileStatement extends IterationStatement { +>WhileStatement : WhileStatement +>IterationStatement : IterationStatement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForStatement extends IterationStatement { +>ForStatement : ForStatement +>IterationStatement : IterationStatement + + initializer?: VariableDeclarationList | Expression; +>initializer : Expression | VariableDeclarationList +>VariableDeclarationList : VariableDeclarationList +>Expression : Expression + + condition?: Expression; +>condition : Expression +>Expression : Expression + + iterator?: Expression; +>iterator : Expression +>Expression : Expression + } + interface ForInStatement extends IterationStatement { +>ForInStatement : ForInStatement +>IterationStatement : IterationStatement + + initializer: VariableDeclarationList | Expression; +>initializer : Expression | VariableDeclarationList +>VariableDeclarationList : VariableDeclarationList +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface ForOfStatement extends IterationStatement { +>ForOfStatement : ForOfStatement +>IterationStatement : IterationStatement + + initializer: VariableDeclarationList | Expression; +>initializer : Expression | VariableDeclarationList +>VariableDeclarationList : VariableDeclarationList +>Expression : Expression + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface BreakOrContinueStatement extends Statement { +>BreakOrContinueStatement : BreakOrContinueStatement +>Statement : Statement + + label?: Identifier; +>label : Identifier +>Identifier : Identifier + } + interface ReturnStatement extends Statement { +>ReturnStatement : ReturnStatement +>Statement : Statement + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface WithStatement extends Statement { +>WithStatement : WithStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface SwitchStatement extends Statement { +>SwitchStatement : SwitchStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + + caseBlock: CaseBlock; +>caseBlock : CaseBlock +>CaseBlock : CaseBlock + } + interface CaseBlock extends Node { +>CaseBlock : CaseBlock +>Node : Node + + clauses: NodeArray; +>clauses : NodeArray +>NodeArray : NodeArray +>CaseOrDefaultClause : CaseClause | DefaultClause + } + interface CaseClause extends Node { +>CaseClause : CaseClause +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + interface DefaultClause extends Node { +>DefaultClause : DefaultClause +>Node : Node + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>Statement : Statement + } + type CaseOrDefaultClause = CaseClause | DefaultClause; +>CaseOrDefaultClause : CaseClause | DefaultClause +>CaseClause : CaseClause +>DefaultClause : DefaultClause + + interface LabeledStatement extends Statement { +>LabeledStatement : LabeledStatement +>Statement : Statement + + label: Identifier; +>label : Identifier +>Identifier : Identifier + + statement: Statement; +>statement : Statement +>Statement : Statement + } + interface ThrowStatement extends Statement { +>ThrowStatement : ThrowStatement +>Statement : Statement + + expression: Expression; +>expression : Expression +>Expression : Expression + } + interface TryStatement extends Statement { +>TryStatement : TryStatement +>Statement : Statement + + tryBlock: Block; +>tryBlock : Block +>Block : Block + + catchClause?: CatchClause; +>catchClause : CatchClause +>CatchClause : CatchClause + + finallyBlock?: Block; +>finallyBlock : Block +>Block : Block + } + interface CatchClause extends Node { +>CatchClause : CatchClause +>Node : Node + + variableDeclaration: VariableDeclaration; +>variableDeclaration : VariableDeclaration +>VariableDeclaration : VariableDeclaration + + block: Block; +>block : Block +>Block : Block + } + interface ModuleElement extends Node { +>ModuleElement : ModuleElement +>Node : Node + + _moduleElementBrand: any; +>_moduleElementBrand : any + } + interface ClassLikeDeclaration extends Declaration { +>ClassLikeDeclaration : ClassLikeDeclaration +>Declaration : Declaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>ClassElement : ClassElement + } + interface ClassDeclaration extends ClassLikeDeclaration, Statement { +>ClassDeclaration : ClassDeclaration +>ClassLikeDeclaration : ClassLikeDeclaration +>Statement : Statement + } + interface ClassExpression extends ClassLikeDeclaration, PrimaryExpression { +>ClassExpression : ClassExpression +>ClassLikeDeclaration : ClassLikeDeclaration +>PrimaryExpression : PrimaryExpression + } + interface ClassElement extends Declaration { +>ClassElement : ClassElement +>Declaration : Declaration + + _classElementBrand: any; +>_classElementBrand : any + } + interface InterfaceDeclaration extends Declaration, ModuleElement { +>InterfaceDeclaration : InterfaceDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + typeParameters?: NodeArray; +>typeParameters : NodeArray +>NodeArray : NodeArray +>TypeParameterDeclaration : TypeParameterDeclaration + + heritageClauses?: NodeArray; +>heritageClauses : NodeArray +>NodeArray : NodeArray +>HeritageClause : HeritageClause + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>Declaration : Declaration + } + interface HeritageClause extends Node { +>HeritageClause : HeritageClause +>Node : Node + + token: SyntaxKind; +>token : SyntaxKind +>SyntaxKind : SyntaxKind + + types?: NodeArray; +>types : NodeArray +>NodeArray : NodeArray +>HeritageClauseElement : HeritageClauseElement + } + interface TypeAliasDeclaration extends Declaration, ModuleElement { +>TypeAliasDeclaration : TypeAliasDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + type: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface EnumMember extends Declaration { +>EnumMember : EnumMember +>Declaration : Declaration + + name: DeclarationName; +>name : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern +>DeclarationName : Identifier | LiteralExpression | ComputedPropertyName | BindingPattern + + initializer?: Expression; +>initializer : Expression +>Expression : Expression + } + interface EnumDeclaration extends Declaration, ModuleElement { +>EnumDeclaration : EnumDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + members: NodeArray; +>members : NodeArray +>NodeArray : NodeArray +>EnumMember : EnumMember + } + interface ModuleDeclaration extends Declaration, ModuleElement { +>ModuleDeclaration : ModuleDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier | LiteralExpression; +>name : Identifier | LiteralExpression +>Identifier : Identifier +>LiteralExpression : LiteralExpression + + body: ModuleBlock | ModuleDeclaration; +>body : ModuleDeclaration | ModuleBlock +>ModuleBlock : ModuleBlock +>ModuleDeclaration : ModuleDeclaration + } + interface ModuleBlock extends Node, ModuleElement { +>ModuleBlock : ModuleBlock +>Node : Node +>ModuleElement : ModuleElement + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + } + interface ImportEqualsDeclaration extends Declaration, ModuleElement { +>ImportEqualsDeclaration : ImportEqualsDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + name: Identifier; +>name : Identifier +>Identifier : Identifier + + moduleReference: EntityName | ExternalModuleReference; +>moduleReference : Identifier | QualifiedName | ExternalModuleReference +>EntityName : Identifier | QualifiedName +>ExternalModuleReference : ExternalModuleReference + } + interface ExternalModuleReference extends Node { +>ExternalModuleReference : ExternalModuleReference +>Node : Node + + expression?: Expression; +>expression : Expression +>Expression : Expression + } + interface ImportDeclaration extends Statement, ModuleElement { +>ImportDeclaration : ImportDeclaration +>Statement : Statement +>ModuleElement : ModuleElement + + importClause?: ImportClause; +>importClause : ImportClause +>ImportClause : ImportClause + + moduleSpecifier: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface ImportClause extends Declaration { +>ImportClause : ImportClause +>Declaration : Declaration + + name?: Identifier; +>name : Identifier +>Identifier : Identifier + + namedBindings?: NamespaceImport | NamedImports; +>namedBindings : NamespaceImport | NamedImportsOrExports +>NamespaceImport : NamespaceImport +>NamedImports : NamedImportsOrExports + } + interface NamespaceImport extends Declaration { +>NamespaceImport : NamespaceImport +>Declaration : Declaration + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + interface ExportDeclaration extends Declaration, ModuleElement { +>ExportDeclaration : ExportDeclaration +>Declaration : Declaration +>ModuleElement : ModuleElement + + exportClause?: NamedExports; +>exportClause : NamedImportsOrExports +>NamedExports : NamedImportsOrExports + + moduleSpecifier?: Expression; +>moduleSpecifier : Expression +>Expression : Expression + } + interface NamedImportsOrExports extends Node { +>NamedImportsOrExports : NamedImportsOrExports +>Node : Node + + elements: NodeArray; +>elements : NodeArray +>NodeArray : NodeArray +>ImportOrExportSpecifier : ImportOrExportSpecifier + } + type NamedImports = NamedImportsOrExports; +>NamedImports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + type NamedExports = NamedImportsOrExports; +>NamedExports : NamedImportsOrExports +>NamedImportsOrExports : NamedImportsOrExports + + interface ImportOrExportSpecifier extends Declaration { +>ImportOrExportSpecifier : ImportOrExportSpecifier +>Declaration : Declaration + + propertyName?: Identifier; +>propertyName : Identifier +>Identifier : Identifier + + name: Identifier; +>name : Identifier +>Identifier : Identifier + } + type ImportSpecifier = ImportOrExportSpecifier; +>ImportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + type ExportSpecifier = ImportOrExportSpecifier; +>ExportSpecifier : ImportOrExportSpecifier +>ImportOrExportSpecifier : ImportOrExportSpecifier + + interface ExportAssignment extends Declaration, ModuleElement { +>ExportAssignment : ExportAssignment +>Declaration : Declaration +>ModuleElement : ModuleElement + + isExportEquals?: boolean; +>isExportEquals : boolean + + expression?: Expression; +>expression : Expression +>Expression : Expression + + type?: TypeNode; +>type : TypeNode +>TypeNode : TypeNode + } + interface FileReference extends TextRange { +>FileReference : FileReference +>TextRange : TextRange + + fileName: string; +>fileName : string + } + interface CommentRange extends TextRange { +>CommentRange : CommentRange +>TextRange : TextRange + + hasTrailingNewLine?: boolean; +>hasTrailingNewLine : boolean + } + interface SourceFile extends Declaration { +>SourceFile : SourceFile +>Declaration : Declaration + + statements: NodeArray; +>statements : NodeArray +>NodeArray : NodeArray +>ModuleElement : ModuleElement + + endOfFileToken: Node; +>endOfFileToken : Node +>Node : Node + + fileName: string; +>fileName : string + + text: string; +>text : string + + amdDependencies: { +>amdDependencies : { path: string; name: string; }[] + + path: string; +>path : string + + name: string; +>name : string + + }[]; + amdModuleName: string; +>amdModuleName : string + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + hasNoDefaultLib: boolean; +>hasNoDefaultLib : boolean + + externalModuleIndicator: Node; +>externalModuleIndicator : Node +>Node : Node + + languageVersion: ScriptTarget; +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + identifiers: Map; +>identifiers : Map +>Map : Map + } + interface ScriptReferenceHost { +>ScriptReferenceHost : ScriptReferenceHost + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getSourceFile(fileName: string): SourceFile; +>getSourceFile : (fileName: string) => SourceFile +>fileName : string +>SourceFile : SourceFile + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + } + interface WriteFileCallback { +>WriteFileCallback : WriteFileCallback + + (fileName: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void; +>fileName : string +>data : string +>writeByteOrderMark : boolean +>onError : (message: string) => void +>message : string + } + interface Program extends ScriptReferenceHost { +>Program : Program +>ScriptReferenceHost : ScriptReferenceHost + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + /** + * Emits the JavaScript and declaration files. If targetSourceFile is not specified, then + * the JavaScript and declaration files will be produced for all the files in this program. + * If targetSourceFile is specified, then only the JavaScript and declaration for that + * specific file will be generated. + * + * If writeFile is not specified then the writeFile callback from the compiler host will be + * used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter + * will be invoked when writing the JavaScript and declaration files. + */ + emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback): EmitResult; +>emit : (targetSourceFile?: SourceFile, writeFile?: WriteFileCallback) => EmitResult +>targetSourceFile : SourceFile +>SourceFile : SourceFile +>writeFile : WriteFileCallback +>WriteFileCallback : WriteFileCallback +>EmitResult : EmitResult + + getSyntacticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getSyntacticDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getGlobalDiagnostics(): Diagnostic[]; +>getGlobalDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSemanticDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getSemanticDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getDeclarationDiagnostics(sourceFile?: SourceFile): Diagnostic[]; +>getDeclarationDiagnostics : (sourceFile?: SourceFile) => Diagnostic[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Diagnostic : Diagnostic + + getTypeChecker(): TypeChecker; +>getTypeChecker : () => TypeChecker +>TypeChecker : TypeChecker + + getCommonSourceDirectory(): string; +>getCommonSourceDirectory : () => string + } + interface SourceMapSpan { +>SourceMapSpan : SourceMapSpan + + emittedLine: number; +>emittedLine : number + + emittedColumn: number; +>emittedColumn : number + + sourceLine: number; +>sourceLine : number + + sourceColumn: number; +>sourceColumn : number + + nameIndex?: number; +>nameIndex : number + + sourceIndex: number; +>sourceIndex : number + } + interface SourceMapData { +>SourceMapData : SourceMapData + + sourceMapFilePath: string; +>sourceMapFilePath : string + + jsSourceMappingURL: string; +>jsSourceMappingURL : string + + sourceMapFile: string; +>sourceMapFile : string + + sourceMapSourceRoot: string; +>sourceMapSourceRoot : string + + sourceMapSources: string[]; +>sourceMapSources : string[] + + inputSourceFileNames: string[]; +>inputSourceFileNames : string[] + + sourceMapNames?: string[]; +>sourceMapNames : string[] + + sourceMapMappings: string; +>sourceMapMappings : string + + sourceMapDecodedMappings: SourceMapSpan[]; +>sourceMapDecodedMappings : SourceMapSpan[] +>SourceMapSpan : SourceMapSpan + } + enum ExitStatus { +>ExitStatus : ExitStatus + + Success = 0, +>Success : ExitStatus + + DiagnosticsPresent_OutputsSkipped = 1, +>DiagnosticsPresent_OutputsSkipped : ExitStatus + + DiagnosticsPresent_OutputsGenerated = 2, +>DiagnosticsPresent_OutputsGenerated : ExitStatus + } + interface EmitResult { +>EmitResult : EmitResult + + emitSkipped: boolean; +>emitSkipped : boolean + + diagnostics: Diagnostic[]; +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + sourceMaps: SourceMapData[]; +>sourceMaps : SourceMapData[] +>SourceMapData : SourceMapData + } + interface TypeCheckerHost { +>TypeCheckerHost : TypeCheckerHost + + getCompilerOptions(): CompilerOptions; +>getCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getSourceFiles(): SourceFile[]; +>getSourceFiles : () => SourceFile[] +>SourceFile : SourceFile + + getSourceFile(fileName: string): SourceFile; +>getSourceFile : (fileName: string) => SourceFile +>fileName : string +>SourceFile : SourceFile + } + interface TypeChecker { +>TypeChecker : TypeChecker + + getTypeOfSymbolAtLocation(symbol: Symbol, node: Node): Type; +>getTypeOfSymbolAtLocation : (symbol: Symbol, node: Node) => Type +>symbol : Symbol +>Symbol : Symbol +>node : Node +>Node : Node +>Type : Type + + getDeclaredTypeOfSymbol(symbol: Symbol): Type; +>getDeclaredTypeOfSymbol : (symbol: Symbol) => Type +>symbol : Symbol +>Symbol : Symbol +>Type : Type + + getPropertiesOfType(type: Type): Symbol[]; +>getPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getPropertyOfType(type: Type, propertyName: string): Symbol; +>getPropertyOfType : (type: Type, propertyName: string) => Symbol +>type : Type +>Type : Type +>propertyName : string +>Symbol : Symbol + + getSignaturesOfType(type: Type, kind: SignatureKind): Signature[]; +>getSignaturesOfType : (type: Type, kind: SignatureKind) => Signature[] +>type : Type +>Type : Type +>kind : SignatureKind +>SignatureKind : SignatureKind +>Signature : Signature + + getIndexTypeOfType(type: Type, kind: IndexKind): Type; +>getIndexTypeOfType : (type: Type, kind: IndexKind) => Type +>type : Type +>Type : Type +>kind : IndexKind +>IndexKind : IndexKind +>Type : Type + + getReturnTypeOfSignature(signature: Signature): Type; +>getReturnTypeOfSignature : (signature: Signature) => Type +>signature : Signature +>Signature : Signature +>Type : Type + + getSymbolsInScope(location: Node, meaning: SymbolFlags): Symbol[]; +>getSymbolsInScope : (location: Node, meaning: SymbolFlags) => Symbol[] +>location : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>Symbol : Symbol + + getSymbolAtLocation(node: Node): Symbol; +>getSymbolAtLocation : (node: Node) => Symbol +>node : Node +>Node : Node +>Symbol : Symbol + + getShorthandAssignmentValueSymbol(location: Node): Symbol; +>getShorthandAssignmentValueSymbol : (location: Node) => Symbol +>location : Node +>Node : Node +>Symbol : Symbol + + getTypeAtLocation(node: Node): Type; +>getTypeAtLocation : (node: Node) => Type +>node : Node +>Node : Node +>Type : Type + + typeToString(type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags): string; +>typeToString : (type: Type, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => string +>type : Type +>Type : Type +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + symbolToString(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): string; +>symbolToString : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => string +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + + getSymbolDisplayBuilder(): SymbolDisplayBuilder; +>getSymbolDisplayBuilder : () => SymbolDisplayBuilder +>SymbolDisplayBuilder : SymbolDisplayBuilder + + getFullyQualifiedName(symbol: Symbol): string; +>getFullyQualifiedName : (symbol: Symbol) => string +>symbol : Symbol +>Symbol : Symbol + + getAugmentedPropertiesOfType(type: Type): Symbol[]; +>getAugmentedPropertiesOfType : (type: Type) => Symbol[] +>type : Type +>Type : Type +>Symbol : Symbol + + getRootSymbols(symbol: Symbol): Symbol[]; +>getRootSymbols : (symbol: Symbol) => Symbol[] +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getContextualType(node: Expression): Type; +>getContextualType : (node: Expression) => Type +>node : Expression +>Expression : Expression +>Type : Type + + getResolvedSignature(node: CallLikeExpression, candidatesOutArray?: Signature[]): Signature; +>getResolvedSignature : (node: CallExpression | NewExpression | TaggedTemplateExpression, candidatesOutArray?: Signature[]) => Signature +>node : CallExpression | NewExpression | TaggedTemplateExpression +>CallLikeExpression : CallExpression | NewExpression | TaggedTemplateExpression +>candidatesOutArray : Signature[] +>Signature : Signature +>Signature : Signature + + getSignatureFromDeclaration(declaration: SignatureDeclaration): Signature; +>getSignatureFromDeclaration : (declaration: SignatureDeclaration) => Signature +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>Signature : Signature + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + isUndefinedSymbol(symbol: Symbol): boolean; +>isUndefinedSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + isArgumentsSymbol(symbol: Symbol): boolean; +>isArgumentsSymbol : (symbol: Symbol) => boolean +>symbol : Symbol +>Symbol : Symbol + + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression | EnumMember) => number +>node : PropertyAccessExpression | ElementAccessExpression | EnumMember +>EnumMember : EnumMember +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean; +>isValidPropertyAccess : (node: QualifiedName | PropertyAccessExpression, propertyName: string) => boolean +>node : QualifiedName | PropertyAccessExpression +>PropertyAccessExpression : PropertyAccessExpression +>QualifiedName : QualifiedName +>propertyName : string + + getAliasedSymbol(symbol: Symbol): Symbol; +>getAliasedSymbol : (symbol: Symbol) => Symbol +>symbol : Symbol +>Symbol : Symbol +>Symbol : Symbol + + getExportsOfExternalModule(node: ImportDeclaration): Symbol[]; +>getExportsOfExternalModule : (node: ImportDeclaration) => Symbol[] +>node : ImportDeclaration +>ImportDeclaration : ImportDeclaration +>Symbol : Symbol + } + interface SymbolDisplayBuilder { +>SymbolDisplayBuilder : SymbolDisplayBuilder + + buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeDisplay : (type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>type : Type +>Type : Type +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildSymbolDisplay(symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags): void; +>buildSymbolDisplay : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, meaning?: SymbolFlags, flags?: SymbolFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>flags : SymbolFormatFlags +>SymbolFormatFlags : SymbolFormatFlags + + buildSignatureDisplay(signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildSignatureDisplay : (signatures: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signatures : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildParameterDisplay(parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildParameterDisplay : (parameter: Symbol, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameter : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplay(tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplay : (tp: TypeParameter, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>tp : TypeParameter +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildTypeParameterDisplayFromSymbol(symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags): void; +>buildTypeParameterDisplayFromSymbol : (symbol: Symbol, writer: SymbolWriter, enclosingDeclaraiton?: Node, flags?: TypeFormatFlags) => void +>symbol : Symbol +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaraiton : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForParametersAndDelimiters(parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForParametersAndDelimiters : (parameters: Symbol[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>parameters : Symbol[] +>Symbol : Symbol +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildDisplayForTypeParametersAndDelimiters(typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildDisplayForTypeParametersAndDelimiters : (typeParameters: TypeParameter[], writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + + buildReturnTypeDisplay(signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags): void; +>buildReturnTypeDisplay : (signature: Signature, writer: SymbolWriter, enclosingDeclaration?: Node, flags?: TypeFormatFlags) => void +>signature : Signature +>Signature : Signature +>writer : SymbolWriter +>SymbolWriter : SymbolWriter +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags + } + interface SymbolWriter { +>SymbolWriter : SymbolWriter + + writeKeyword(text: string): void; +>writeKeyword : (text: string) => void +>text : string + + writeOperator(text: string): void; +>writeOperator : (text: string) => void +>text : string + + writePunctuation(text: string): void; +>writePunctuation : (text: string) => void +>text : string + + writeSpace(text: string): void; +>writeSpace : (text: string) => void +>text : string + + writeStringLiteral(text: string): void; +>writeStringLiteral : (text: string) => void +>text : string + + writeParameter(text: string): void; +>writeParameter : (text: string) => void +>text : string + + writeSymbol(text: string, symbol: Symbol): void; +>writeSymbol : (text: string, symbol: Symbol) => void +>text : string +>symbol : Symbol +>Symbol : Symbol + + writeLine(): void; +>writeLine : () => void + + increaseIndent(): void; +>increaseIndent : () => void + + decreaseIndent(): void; +>decreaseIndent : () => void + + clear(): void; +>clear : () => void + + trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; +>trackSymbol : (symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags) => void +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags + } + const enum TypeFormatFlags { +>TypeFormatFlags : TypeFormatFlags + + None = 0, +>None : TypeFormatFlags + + WriteArrayAsGenericType = 1, +>WriteArrayAsGenericType : TypeFormatFlags + + UseTypeOfFunction = 2, +>UseTypeOfFunction : TypeFormatFlags + + NoTruncation = 4, +>NoTruncation : TypeFormatFlags + + WriteArrowStyleSignature = 8, +>WriteArrowStyleSignature : TypeFormatFlags + + WriteOwnNameForAnyLike = 16, +>WriteOwnNameForAnyLike : TypeFormatFlags + + WriteTypeArgumentsOfSignature = 32, +>WriteTypeArgumentsOfSignature : TypeFormatFlags + + InElementType = 64, +>InElementType : TypeFormatFlags + + UseFullyQualifiedType = 128, +>UseFullyQualifiedType : TypeFormatFlags + } + const enum SymbolFormatFlags { +>SymbolFormatFlags : SymbolFormatFlags + + None = 0, +>None : SymbolFormatFlags + + WriteTypeParametersOrArguments = 1, +>WriteTypeParametersOrArguments : SymbolFormatFlags + + UseOnlyExternalAliasing = 2, +>UseOnlyExternalAliasing : SymbolFormatFlags + } + const enum SymbolAccessibility { +>SymbolAccessibility : SymbolAccessibility + + Accessible = 0, +>Accessible : SymbolAccessibility + + NotAccessible = 1, +>NotAccessible : SymbolAccessibility + + CannotBeNamed = 2, +>CannotBeNamed : SymbolAccessibility + } + type AnyImportSyntax = ImportDeclaration | ImportEqualsDeclaration; +>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration +>ImportDeclaration : ImportDeclaration +>ImportEqualsDeclaration : ImportEqualsDeclaration + + interface SymbolVisibilityResult { +>SymbolVisibilityResult : SymbolVisibilityResult + + accessibility: SymbolAccessibility; +>accessibility : SymbolAccessibility +>SymbolAccessibility : SymbolAccessibility + + aliasesToMakeVisible?: AnyImportSyntax[]; +>aliasesToMakeVisible : (ImportEqualsDeclaration | ImportDeclaration)[] +>AnyImportSyntax : ImportEqualsDeclaration | ImportDeclaration + + errorSymbolName?: string; +>errorSymbolName : string + + errorNode?: Node; +>errorNode : Node +>Node : Node + } + interface SymbolAccessiblityResult extends SymbolVisibilityResult { +>SymbolAccessiblityResult : SymbolAccessiblityResult +>SymbolVisibilityResult : SymbolVisibilityResult + + errorModuleName?: string; +>errorModuleName : string + } + interface EmitResolver { +>EmitResolver : EmitResolver + + hasGlobalName(name: string): boolean; +>hasGlobalName : (name: string) => boolean +>name : string + + getExpressionNameSubstitution(node: Identifier, getGeneratedNameForNode: (node: Node) => string): string; +>getExpressionNameSubstitution : (node: Identifier, getGeneratedNameForNode: (node: Node) => string) => string +>node : Identifier +>Identifier : Identifier +>getGeneratedNameForNode : (node: Node) => string +>node : Node +>Node : Node + + isValueAliasDeclaration(node: Node): boolean; +>isValueAliasDeclaration : (node: Node) => boolean +>node : Node +>Node : Node + + isReferencedAliasDeclaration(node: Node, checkChildren?: boolean): boolean; +>isReferencedAliasDeclaration : (node: Node, checkChildren?: boolean) => boolean +>node : Node +>Node : Node +>checkChildren : boolean + + isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean; +>isTopLevelValueImportEqualsWithEntityName : (node: ImportEqualsDeclaration) => boolean +>node : ImportEqualsDeclaration +>ImportEqualsDeclaration : ImportEqualsDeclaration + + getNodeCheckFlags(node: Node): NodeCheckFlags; +>getNodeCheckFlags : (node: Node) => NodeCheckFlags +>node : Node +>Node : Node +>NodeCheckFlags : NodeCheckFlags + + isDeclarationVisible(node: Declaration): boolean; +>isDeclarationVisible : (node: Declaration) => boolean +>node : Declaration +>Declaration : Declaration + + collectLinkedAliases(node: Identifier): Node[]; +>collectLinkedAliases : (node: Identifier) => Node[] +>node : Identifier +>Identifier : Identifier +>Node : Node + + isImplementationOfOverload(node: FunctionLikeDeclaration): boolean; +>isImplementationOfOverload : (node: FunctionLikeDeclaration) => boolean +>node : FunctionLikeDeclaration +>FunctionLikeDeclaration : FunctionLikeDeclaration + + writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfDeclaration : (declaration: VariableLikeDeclaration | AccessorDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>declaration : VariableLikeDeclaration | AccessorDeclaration +>AccessorDeclaration : AccessorDeclaration +>VariableLikeDeclaration : VariableLikeDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeReturnTypeOfSignatureDeclaration(signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeReturnTypeOfSignatureDeclaration : (signatureDeclaration: SignatureDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>signatureDeclaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + writeTypeOfExpression(expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter): void; +>writeTypeOfExpression : (expr: Expression, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) => void +>expr : Expression +>Expression : Expression +>enclosingDeclaration : Node +>Node : Node +>flags : TypeFormatFlags +>TypeFormatFlags : TypeFormatFlags +>writer : SymbolWriter +>SymbolWriter : SymbolWriter + + isSymbolAccessible(symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags): SymbolAccessiblityResult; +>isSymbolAccessible : (symbol: Symbol, enclosingDeclaration: Node, meaning: SymbolFlags) => SymbolAccessiblityResult +>symbol : Symbol +>Symbol : Symbol +>enclosingDeclaration : Node +>Node : Node +>meaning : SymbolFlags +>SymbolFlags : SymbolFlags +>SymbolAccessiblityResult : SymbolAccessiblityResult + + isEntityNameVisible(entityName: EntityName | Expression, enclosingDeclaration: Node): SymbolVisibilityResult; +>isEntityNameVisible : (entityName: Expression | Identifier | QualifiedName, enclosingDeclaration: Node) => SymbolVisibilityResult +>entityName : Expression | Identifier | QualifiedName +>EntityName : Identifier | QualifiedName +>Expression : Expression +>enclosingDeclaration : Node +>Node : Node +>SymbolVisibilityResult : SymbolVisibilityResult + + getConstantValue(node: EnumMember | PropertyAccessExpression | ElementAccessExpression): number; +>getConstantValue : (node: PropertyAccessExpression | ElementAccessExpression | EnumMember) => number +>node : PropertyAccessExpression | ElementAccessExpression | EnumMember +>EnumMember : EnumMember +>PropertyAccessExpression : PropertyAccessExpression +>ElementAccessExpression : ElementAccessExpression + + resolvesToSomeValue(location: Node, name: string): boolean; +>resolvesToSomeValue : (location: Node, name: string) => boolean +>location : Node +>Node : Node +>name : string + + getBlockScopedVariableId(node: Identifier): number; +>getBlockScopedVariableId : (node: Identifier) => number +>node : Identifier +>Identifier : Identifier + + serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[]; +>serializeParameterTypesOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => (string | string[])[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + + serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[]; +>serializeReturnTypeOfNode : (node: Node, getGeneratedNameForNode: (Node: Node) => string) => string | string[] +>node : Node +>Node : Node +>getGeneratedNameForNode : (Node: Node) => string +>Node : Node +>Node : Node + } + const enum SymbolFlags { +>SymbolFlags : SymbolFlags + + FunctionScopedVariable = 1, +>FunctionScopedVariable : SymbolFlags + + BlockScopedVariable = 2, +>BlockScopedVariable : SymbolFlags + + Property = 4, +>Property : SymbolFlags + + EnumMember = 8, +>EnumMember : SymbolFlags + + Function = 16, +>Function : SymbolFlags + + Class = 32, +>Class : SymbolFlags + + Interface = 64, +>Interface : SymbolFlags + + ConstEnum = 128, +>ConstEnum : SymbolFlags + + RegularEnum = 256, +>RegularEnum : SymbolFlags + + ValueModule = 512, +>ValueModule : SymbolFlags + + NamespaceModule = 1024, +>NamespaceModule : SymbolFlags + + TypeLiteral = 2048, +>TypeLiteral : SymbolFlags + + ObjectLiteral = 4096, +>ObjectLiteral : SymbolFlags + + Method = 8192, +>Method : SymbolFlags + + Constructor = 16384, +>Constructor : SymbolFlags + + GetAccessor = 32768, +>GetAccessor : SymbolFlags + + SetAccessor = 65536, +>SetAccessor : SymbolFlags + + Signature = 131072, +>Signature : SymbolFlags + + TypeParameter = 262144, +>TypeParameter : SymbolFlags + + TypeAlias = 524288, +>TypeAlias : SymbolFlags + + ExportValue = 1048576, +>ExportValue : SymbolFlags + + ExportType = 2097152, +>ExportType : SymbolFlags + + ExportNamespace = 4194304, +>ExportNamespace : SymbolFlags + + Alias = 8388608, +>Alias : SymbolFlags + + Instantiated = 16777216, +>Instantiated : SymbolFlags + + Merged = 33554432, +>Merged : SymbolFlags + + Transient = 67108864, +>Transient : SymbolFlags + + Prototype = 134217728, +>Prototype : SymbolFlags + + UnionProperty = 268435456, +>UnionProperty : SymbolFlags + + Optional = 536870912, +>Optional : SymbolFlags + + ExportStar = 1073741824, +>ExportStar : SymbolFlags + + Enum = 384, +>Enum : SymbolFlags + + Variable = 3, +>Variable : SymbolFlags + + Value = 107455, +>Value : SymbolFlags + + Type = 793056, +>Type : SymbolFlags + + Namespace = 1536, +>Namespace : SymbolFlags + + Module = 1536, +>Module : SymbolFlags + + Accessor = 98304, +>Accessor : SymbolFlags + + FunctionScopedVariableExcludes = 107454, +>FunctionScopedVariableExcludes : SymbolFlags + + BlockScopedVariableExcludes = 107455, +>BlockScopedVariableExcludes : SymbolFlags + + ParameterExcludes = 107455, +>ParameterExcludes : SymbolFlags + + PropertyExcludes = 107455, +>PropertyExcludes : SymbolFlags + + EnumMemberExcludes = 107455, +>EnumMemberExcludes : SymbolFlags + + FunctionExcludes = 106927, +>FunctionExcludes : SymbolFlags + + ClassExcludes = 899583, +>ClassExcludes : SymbolFlags + + InterfaceExcludes = 792992, +>InterfaceExcludes : SymbolFlags + + RegularEnumExcludes = 899327, +>RegularEnumExcludes : SymbolFlags + + ConstEnumExcludes = 899967, +>ConstEnumExcludes : SymbolFlags + + ValueModuleExcludes = 106639, +>ValueModuleExcludes : SymbolFlags + + NamespaceModuleExcludes = 0, +>NamespaceModuleExcludes : SymbolFlags + + MethodExcludes = 99263, +>MethodExcludes : SymbolFlags + + GetAccessorExcludes = 41919, +>GetAccessorExcludes : SymbolFlags + + SetAccessorExcludes = 74687, +>SetAccessorExcludes : SymbolFlags + + TypeParameterExcludes = 530912, +>TypeParameterExcludes : SymbolFlags + + TypeAliasExcludes = 793056, +>TypeAliasExcludes : SymbolFlags + + AliasExcludes = 8388608, +>AliasExcludes : SymbolFlags + + ModuleMember = 8914931, +>ModuleMember : SymbolFlags + + ExportHasLocal = 944, +>ExportHasLocal : SymbolFlags + + HasLocals = 255504, +>HasLocals : SymbolFlags + + HasExports = 1952, +>HasExports : SymbolFlags + + HasMembers = 6240, +>HasMembers : SymbolFlags + + IsContainer = 262128, +>IsContainer : SymbolFlags + + PropertyOrAccessor = 98308, +>PropertyOrAccessor : SymbolFlags + + Export = 7340032, +>Export : SymbolFlags + } + interface Symbol { +>Symbol : Symbol + + flags: SymbolFlags; +>flags : SymbolFlags +>SymbolFlags : SymbolFlags + + name: string; +>name : string + + id?: number; +>id : number + + mergeId?: number; +>mergeId : number + + declarations?: Declaration[]; +>declarations : Declaration[] +>Declaration : Declaration + + parent?: Symbol; +>parent : Symbol +>Symbol : Symbol + + members?: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + exports?: SymbolTable; +>exports : SymbolTable +>SymbolTable : SymbolTable + + exportSymbol?: Symbol; +>exportSymbol : Symbol +>Symbol : Symbol + + valueDeclaration?: Declaration; +>valueDeclaration : Declaration +>Declaration : Declaration + + constEnumOnlyModule?: boolean; +>constEnumOnlyModule : boolean + } + interface SymbolLinks { +>SymbolLinks : SymbolLinks + + target?: Symbol; +>target : Symbol +>Symbol : Symbol + + type?: Type; +>type : Type +>Type : Type + + declaredType?: Type; +>declaredType : Type +>Type : Type + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + referenced?: boolean; +>referenced : boolean + + unionType?: UnionType; +>unionType : UnionType +>UnionType : UnionType + + resolvedExports?: SymbolTable; +>resolvedExports : SymbolTable +>SymbolTable : SymbolTable + + exportsChecked?: boolean; +>exportsChecked : boolean + } + interface TransientSymbol extends Symbol, SymbolLinks { +>TransientSymbol : TransientSymbol +>Symbol : Symbol +>SymbolLinks : SymbolLinks + } + interface SymbolTable { +>SymbolTable : SymbolTable + + [index: string]: Symbol; +>index : string +>Symbol : Symbol + } + const enum NodeCheckFlags { +>NodeCheckFlags : NodeCheckFlags + + TypeChecked = 1, +>TypeChecked : NodeCheckFlags + + LexicalThis = 2, +>LexicalThis : NodeCheckFlags + + CaptureThis = 4, +>CaptureThis : NodeCheckFlags + + EmitExtends = 8, +>EmitExtends : NodeCheckFlags + + SuperInstance = 16, +>SuperInstance : NodeCheckFlags + + SuperStatic = 32, +>SuperStatic : NodeCheckFlags + + ContextChecked = 64, +>ContextChecked : NodeCheckFlags + + EnumValuesComputed = 128, +>EnumValuesComputed : NodeCheckFlags + + BlockScopedBindingInLoop = 256, +>BlockScopedBindingInLoop : NodeCheckFlags + + EmitDecorate = 512, +>EmitDecorate : NodeCheckFlags + } + interface NodeLinks { +>NodeLinks : NodeLinks + + resolvedType?: Type; +>resolvedType : Type +>Type : Type + + resolvedSignature?: Signature; +>resolvedSignature : Signature +>Signature : Signature + + resolvedSymbol?: Symbol; +>resolvedSymbol : Symbol +>Symbol : Symbol + + flags?: NodeCheckFlags; +>flags : NodeCheckFlags +>NodeCheckFlags : NodeCheckFlags + + enumMemberValue?: number; +>enumMemberValue : number + + isIllegalTypeReferenceInConstraint?: boolean; +>isIllegalTypeReferenceInConstraint : boolean + + isVisible?: boolean; +>isVisible : boolean + + generatedName?: string; +>generatedName : string + + generatedNames?: Map; +>generatedNames : Map +>Map : Map + + assignmentChecks?: Map; +>assignmentChecks : Map +>Map : Map + + hasReportedStatementInAmbientContext?: boolean; +>hasReportedStatementInAmbientContext : boolean + + importOnRightSide?: Symbol; +>importOnRightSide : Symbol +>Symbol : Symbol + } + const enum TypeFlags { +>TypeFlags : TypeFlags + + Any = 1, +>Any : TypeFlags + + String = 2, +>String : TypeFlags + + Number = 4, +>Number : TypeFlags + + Boolean = 8, +>Boolean : TypeFlags + + Void = 16, +>Void : TypeFlags + + Undefined = 32, +>Undefined : TypeFlags + + Null = 64, +>Null : TypeFlags + + Enum = 128, +>Enum : TypeFlags + + StringLiteral = 256, +>StringLiteral : TypeFlags + + TypeParameter = 512, +>TypeParameter : TypeFlags + + Class = 1024, +>Class : TypeFlags + + Interface = 2048, +>Interface : TypeFlags + + Reference = 4096, +>Reference : TypeFlags + + Tuple = 8192, +>Tuple : TypeFlags + + Union = 16384, +>Union : TypeFlags + + Anonymous = 32768, +>Anonymous : TypeFlags + + FromSignature = 65536, +>FromSignature : TypeFlags + + ObjectLiteral = 131072, +>ObjectLiteral : TypeFlags + + ContainsUndefinedOrNull = 262144, +>ContainsUndefinedOrNull : TypeFlags + + ContainsObjectLiteral = 524288, +>ContainsObjectLiteral : TypeFlags + + ESSymbol = 1048576, +>ESSymbol : TypeFlags + + Intrinsic = 1048703, +>Intrinsic : TypeFlags + + Primitive = 1049086, +>Primitive : TypeFlags + + StringLike = 258, +>StringLike : TypeFlags + + NumberLike = 132, +>NumberLike : TypeFlags + + ObjectType = 48128, +>ObjectType : TypeFlags + + RequiresWidening = 786432, +>RequiresWidening : TypeFlags + } + interface Type { +>Type : Type + + flags: TypeFlags; +>flags : TypeFlags +>TypeFlags : TypeFlags + + id: number; +>id : number + + symbol?: Symbol; +>symbol : Symbol +>Symbol : Symbol + } + interface IntrinsicType extends Type { +>IntrinsicType : IntrinsicType +>Type : Type + + intrinsicName: string; +>intrinsicName : string + } + interface StringLiteralType extends Type { +>StringLiteralType : StringLiteralType +>Type : Type + + text: string; +>text : string + } + interface ObjectType extends Type { +>ObjectType : ObjectType +>Type : Type + } + interface InterfaceType extends ObjectType { +>InterfaceType : InterfaceType +>ObjectType : ObjectType + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + baseTypes: ObjectType[]; +>baseTypes : ObjectType[] +>ObjectType : ObjectType + + declaredProperties: Symbol[]; +>declaredProperties : Symbol[] +>Symbol : Symbol + + declaredCallSignatures: Signature[]; +>declaredCallSignatures : Signature[] +>Signature : Signature + + declaredConstructSignatures: Signature[]; +>declaredConstructSignatures : Signature[] +>Signature : Signature + + declaredStringIndexType: Type; +>declaredStringIndexType : Type +>Type : Type + + declaredNumberIndexType: Type; +>declaredNumberIndexType : Type +>Type : Type + } + interface TypeReference extends ObjectType { +>TypeReference : TypeReference +>ObjectType : ObjectType + + target: GenericType; +>target : GenericType +>GenericType : GenericType + + typeArguments: Type[]; +>typeArguments : Type[] +>Type : Type + } + interface GenericType extends InterfaceType, TypeReference { +>GenericType : GenericType +>InterfaceType : InterfaceType +>TypeReference : TypeReference + + instantiations: Map; +>instantiations : Map +>Map : Map +>TypeReference : TypeReference + } + interface TupleType extends ObjectType { +>TupleType : TupleType +>ObjectType : ObjectType + + elementTypes: Type[]; +>elementTypes : Type[] +>Type : Type + + baseArrayType: TypeReference; +>baseArrayType : TypeReference +>TypeReference : TypeReference + } + interface UnionType extends Type { +>UnionType : UnionType +>Type : Type + + types: Type[]; +>types : Type[] +>Type : Type + + resolvedProperties: SymbolTable; +>resolvedProperties : SymbolTable +>SymbolTable : SymbolTable + } + interface ResolvedType extends ObjectType, UnionType { +>ResolvedType : ResolvedType +>ObjectType : ObjectType +>UnionType : UnionType + + members: SymbolTable; +>members : SymbolTable +>SymbolTable : SymbolTable + + properties: Symbol[]; +>properties : Symbol[] +>Symbol : Symbol + + callSignatures: Signature[]; +>callSignatures : Signature[] +>Signature : Signature + + constructSignatures: Signature[]; +>constructSignatures : Signature[] +>Signature : Signature + + stringIndexType: Type; +>stringIndexType : Type +>Type : Type + + numberIndexType: Type; +>numberIndexType : Type +>Type : Type + } + interface TypeParameter extends Type { +>TypeParameter : TypeParameter +>Type : Type + + constraint: Type; +>constraint : Type +>Type : Type + + target?: TypeParameter; +>target : TypeParameter +>TypeParameter : TypeParameter + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + } + const enum SignatureKind { +>SignatureKind : SignatureKind + + Call = 0, +>Call : SignatureKind + + Construct = 1, +>Construct : SignatureKind + } + interface Signature { +>Signature : Signature + + declaration: SignatureDeclaration; +>declaration : SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + typeParameters: TypeParameter[]; +>typeParameters : TypeParameter[] +>TypeParameter : TypeParameter + + parameters: Symbol[]; +>parameters : Symbol[] +>Symbol : Symbol + + resolvedReturnType: Type; +>resolvedReturnType : Type +>Type : Type + + minArgumentCount: number; +>minArgumentCount : number + + hasRestParameter: boolean; +>hasRestParameter : boolean + + hasStringLiterals: boolean; +>hasStringLiterals : boolean + + target?: Signature; +>target : Signature +>Signature : Signature + + mapper?: TypeMapper; +>mapper : TypeMapper +>TypeMapper : TypeMapper + + unionSignatures?: Signature[]; +>unionSignatures : Signature[] +>Signature : Signature + + erasedSignatureCache?: Signature; +>erasedSignatureCache : Signature +>Signature : Signature + + isolatedSignatureType?: ObjectType; +>isolatedSignatureType : ObjectType +>ObjectType : ObjectType + } + const enum IndexKind { +>IndexKind : IndexKind + + String = 0, +>String : IndexKind + + Number = 1, +>Number : IndexKind + } + interface TypeMapper { +>TypeMapper : TypeMapper + + (t: Type): Type; +>t : Type +>Type : Type +>Type : Type + } + interface DiagnosticMessage { +>DiagnosticMessage : DiagnosticMessage + + key: string; +>key : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + } + interface DiagnosticMessageChain { +>DiagnosticMessageChain : DiagnosticMessageChain + + messageText: string; +>messageText : string + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + + next?: DiagnosticMessageChain; +>next : DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + } + interface Diagnostic { +>Diagnostic : Diagnostic + + file: SourceFile; +>file : SourceFile +>SourceFile : SourceFile + + start: number; +>start : number + + length: number; +>length : number + + messageText: string | DiagnosticMessageChain; +>messageText : string | DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain + + category: DiagnosticCategory; +>category : DiagnosticCategory +>DiagnosticCategory : DiagnosticCategory + + code: number; +>code : number + } + enum DiagnosticCategory { +>DiagnosticCategory : DiagnosticCategory + + Warning = 0, +>Warning : DiagnosticCategory + + Error = 1, +>Error : DiagnosticCategory + + Message = 2, +>Message : DiagnosticCategory + } + interface CompilerOptions { +>CompilerOptions : CompilerOptions + + allowNonTsExtensions?: boolean; +>allowNonTsExtensions : boolean + + charset?: string; +>charset : string + + declaration?: boolean; +>declaration : boolean + + diagnostics?: boolean; +>diagnostics : boolean + + emitBOM?: boolean; +>emitBOM : boolean + + help?: boolean; +>help : boolean + + listFiles?: boolean; +>listFiles : boolean + + locale?: string; +>locale : string + + mapRoot?: string; +>mapRoot : string + + module?: ModuleKind; +>module : ModuleKind +>ModuleKind : ModuleKind + + noEmit?: boolean; +>noEmit : boolean + + noEmitOnError?: boolean; +>noEmitOnError : boolean + + noErrorTruncation?: boolean; +>noErrorTruncation : boolean + + noImplicitAny?: boolean; +>noImplicitAny : boolean + + noLib?: boolean; +>noLib : boolean + + noResolve?: boolean; +>noResolve : boolean + + out?: string; +>out : string + + outDir?: string; +>outDir : string + + preserveConstEnums?: boolean; +>preserveConstEnums : boolean + + project?: string; +>project : string + + removeComments?: boolean; +>removeComments : boolean + + sourceMap?: boolean; +>sourceMap : boolean + + sourceRoot?: string; +>sourceRoot : string + + suppressImplicitAnyIndexErrors?: boolean; +>suppressImplicitAnyIndexErrors : boolean + + target?: ScriptTarget; +>target : ScriptTarget +>ScriptTarget : ScriptTarget + + version?: boolean; +>version : boolean + + watch?: boolean; +>watch : boolean + + separateCompilation?: boolean; +>separateCompilation : boolean + + [option: string]: string | number | boolean; +>option : string + } + const enum ModuleKind { +>ModuleKind : ModuleKind + + None = 0, +>None : ModuleKind + + CommonJS = 1, +>CommonJS : ModuleKind + + AMD = 2, +>AMD : ModuleKind + } + interface LineAndCharacter { +>LineAndCharacter : LineAndCharacter + + line: number; +>line : number + + character: number; +>character : number + } + const enum ScriptTarget { +>ScriptTarget : ScriptTarget + + ES3 = 0, +>ES3 : ScriptTarget + + ES5 = 1, +>ES5 : ScriptTarget + + ES6 = 2, +>ES6 : ScriptTarget + + Latest = 2, +>Latest : ScriptTarget + } + interface ParsedCommandLine { +>ParsedCommandLine : ParsedCommandLine + + options: CompilerOptions; +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + fileNames: string[]; +>fileNames : string[] + + errors: Diagnostic[]; +>errors : Diagnostic[] +>Diagnostic : Diagnostic + } + interface CommandLineOption { +>CommandLineOption : CommandLineOption + + name: string; +>name : string + + type: string | Map; +>type : string | Map +>Map : Map + + isFilePath?: boolean; +>isFilePath : boolean + + shortName?: string; +>shortName : string + + description?: DiagnosticMessage; +>description : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + paramType?: DiagnosticMessage; +>paramType : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + error?: DiagnosticMessage; +>error : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage + + experimental?: boolean; +>experimental : boolean + } + const enum CharacterCodes { +>CharacterCodes : CharacterCodes + + nullCharacter = 0, +>nullCharacter : CharacterCodes + + maxAsciiCharacter = 127, +>maxAsciiCharacter : CharacterCodes + + lineFeed = 10, +>lineFeed : CharacterCodes + + carriageReturn = 13, +>carriageReturn : CharacterCodes + + lineSeparator = 8232, +>lineSeparator : CharacterCodes + + paragraphSeparator = 8233, +>paragraphSeparator : CharacterCodes + + nextLine = 133, +>nextLine : CharacterCodes + + space = 32, +>space : CharacterCodes + + nonBreakingSpace = 160, +>nonBreakingSpace : CharacterCodes + + enQuad = 8192, +>enQuad : CharacterCodes + + emQuad = 8193, +>emQuad : CharacterCodes + + enSpace = 8194, +>enSpace : CharacterCodes + + emSpace = 8195, +>emSpace : CharacterCodes + + threePerEmSpace = 8196, +>threePerEmSpace : CharacterCodes + + fourPerEmSpace = 8197, +>fourPerEmSpace : CharacterCodes + + sixPerEmSpace = 8198, +>sixPerEmSpace : CharacterCodes + + figureSpace = 8199, +>figureSpace : CharacterCodes + + punctuationSpace = 8200, +>punctuationSpace : CharacterCodes + + thinSpace = 8201, +>thinSpace : CharacterCodes + + hairSpace = 8202, +>hairSpace : CharacterCodes + + zeroWidthSpace = 8203, +>zeroWidthSpace : CharacterCodes + + narrowNoBreakSpace = 8239, +>narrowNoBreakSpace : CharacterCodes + + ideographicSpace = 12288, +>ideographicSpace : CharacterCodes + + mathematicalSpace = 8287, +>mathematicalSpace : CharacterCodes + + ogham = 5760, +>ogham : CharacterCodes + + _ = 95, +>_ : CharacterCodes + + $ = 36, +>$ : CharacterCodes + + _0 = 48, +>_0 : CharacterCodes + + _1 = 49, +>_1 : CharacterCodes + + _2 = 50, +>_2 : CharacterCodes + + _3 = 51, +>_3 : CharacterCodes + + _4 = 52, +>_4 : CharacterCodes + + _5 = 53, +>_5 : CharacterCodes + + _6 = 54, +>_6 : CharacterCodes + + _7 = 55, +>_7 : CharacterCodes + + _8 = 56, +>_8 : CharacterCodes + + _9 = 57, +>_9 : CharacterCodes + + a = 97, +>a : CharacterCodes + + b = 98, +>b : CharacterCodes + + c = 99, +>c : CharacterCodes + + d = 100, +>d : CharacterCodes + + e = 101, +>e : CharacterCodes + + f = 102, +>f : CharacterCodes + + g = 103, +>g : CharacterCodes + + h = 104, +>h : CharacterCodes + + i = 105, +>i : CharacterCodes + + j = 106, +>j : CharacterCodes + + k = 107, +>k : CharacterCodes + + l = 108, +>l : CharacterCodes + + m = 109, +>m : CharacterCodes + + n = 110, +>n : CharacterCodes + + o = 111, +>o : CharacterCodes + + p = 112, +>p : CharacterCodes + + q = 113, +>q : CharacterCodes + + r = 114, +>r : CharacterCodes + + s = 115, +>s : CharacterCodes + + t = 116, +>t : CharacterCodes + + u = 117, +>u : CharacterCodes + + v = 118, +>v : CharacterCodes + + w = 119, +>w : CharacterCodes + + x = 120, +>x : CharacterCodes + + y = 121, +>y : CharacterCodes + + z = 122, +>z : CharacterCodes + + A = 65, +>A : CharacterCodes + + B = 66, +>B : CharacterCodes + + C = 67, +>C : CharacterCodes + + D = 68, +>D : CharacterCodes + + E = 69, +>E : CharacterCodes + + F = 70, +>F : CharacterCodes + + G = 71, +>G : CharacterCodes + + H = 72, +>H : CharacterCodes + + I = 73, +>I : CharacterCodes + + J = 74, +>J : CharacterCodes + + K = 75, +>K : CharacterCodes + + L = 76, +>L : CharacterCodes + + M = 77, +>M : CharacterCodes + + N = 78, +>N : CharacterCodes + + O = 79, +>O : CharacterCodes + + P = 80, +>P : CharacterCodes + + Q = 81, +>Q : CharacterCodes + + R = 82, +>R : CharacterCodes + + S = 83, +>S : CharacterCodes + + T = 84, +>T : CharacterCodes + + U = 85, +>U : CharacterCodes + + V = 86, +>V : CharacterCodes + + W = 87, +>W : CharacterCodes + + X = 88, +>X : CharacterCodes + + Y = 89, +>Y : CharacterCodes + + Z = 90, +>Z : CharacterCodes + + ampersand = 38, +>ampersand : CharacterCodes + + asterisk = 42, +>asterisk : CharacterCodes + + at = 64, +>at : CharacterCodes + + backslash = 92, +>backslash : CharacterCodes + + backtick = 96, +>backtick : CharacterCodes + + bar = 124, +>bar : CharacterCodes + + caret = 94, +>caret : CharacterCodes + + closeBrace = 125, +>closeBrace : CharacterCodes + + closeBracket = 93, +>closeBracket : CharacterCodes + + closeParen = 41, +>closeParen : CharacterCodes + + colon = 58, +>colon : CharacterCodes + + comma = 44, +>comma : CharacterCodes + + dot = 46, +>dot : CharacterCodes + + doubleQuote = 34, +>doubleQuote : CharacterCodes + + equals = 61, +>equals : CharacterCodes + + exclamation = 33, +>exclamation : CharacterCodes + + greaterThan = 62, +>greaterThan : CharacterCodes + + hash = 35, +>hash : CharacterCodes + + lessThan = 60, +>lessThan : CharacterCodes + + minus = 45, +>minus : CharacterCodes + + openBrace = 123, +>openBrace : CharacterCodes + + openBracket = 91, +>openBracket : CharacterCodes + + openParen = 40, +>openParen : CharacterCodes + + percent = 37, +>percent : CharacterCodes + + plus = 43, +>plus : CharacterCodes + + question = 63, +>question : CharacterCodes + + semicolon = 59, +>semicolon : CharacterCodes + + singleQuote = 39, +>singleQuote : CharacterCodes + + slash = 47, +>slash : CharacterCodes + + tilde = 126, +>tilde : CharacterCodes + + backspace = 8, +>backspace : CharacterCodes + + formFeed = 12, +>formFeed : CharacterCodes + + byteOrderMark = 65279, +>byteOrderMark : CharacterCodes + + tab = 9, +>tab : CharacterCodes + + verticalTab = 11, +>verticalTab : CharacterCodes + } + interface CancellationToken { +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + } + interface CompilerHost { +>CompilerHost : CompilerHost + + getSourceFile(fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile; +>getSourceFile : (fileName: string, languageVersion: ScriptTarget, onError?: (message: string) => void) => SourceFile +>fileName : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>onError : (message: string) => void +>message : string +>SourceFile : SourceFile + + getDefaultLibFileName(options: CompilerOptions): string; +>getDefaultLibFileName : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + writeFile: WriteFileCallback; +>writeFile : WriteFileCallback +>WriteFileCallback : WriteFileCallback + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getCanonicalFileName(fileName: string): string; +>getCanonicalFileName : (fileName: string) => string +>fileName : string + + useCaseSensitiveFileNames(): boolean; +>useCaseSensitiveFileNames : () => boolean + + getNewLine(): string; +>getNewLine : () => string + } + interface TextSpan { +>TextSpan : TextSpan + + start: number; +>start : number + + length: number; +>length : number + } + interface TextChangeRange { +>TextChangeRange : TextChangeRange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newLength: number; +>newLength : number + } +} +declare module "typescript" { + interface ErrorCallback { +>ErrorCallback : ErrorCallback + + (message: DiagnosticMessage, length: number): void; +>message : DiagnosticMessage +>DiagnosticMessage : DiagnosticMessage +>length : number + } + interface Scanner { +>Scanner : Scanner + + getStartPos(): number; +>getStartPos : () => number + + getToken(): SyntaxKind; +>getToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + getTextPos(): number; +>getTextPos : () => number + + getTokenPos(): number; +>getTokenPos : () => number + + getTokenText(): string; +>getTokenText : () => string + + getTokenValue(): string; +>getTokenValue : () => string + + hasExtendedUnicodeEscape(): boolean; +>hasExtendedUnicodeEscape : () => boolean + + hasPrecedingLineBreak(): boolean; +>hasPrecedingLineBreak : () => boolean + + isIdentifier(): boolean; +>isIdentifier : () => boolean + + isReservedWord(): boolean; +>isReservedWord : () => boolean + + isUnterminated(): boolean; +>isUnterminated : () => boolean + + reScanGreaterToken(): SyntaxKind; +>reScanGreaterToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanSlashToken(): SyntaxKind; +>reScanSlashToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + reScanTemplateToken(): SyntaxKind; +>reScanTemplateToken : () => SyntaxKind +>SyntaxKind : SyntaxKind + + scan(): SyntaxKind; +>scan : () => SyntaxKind +>SyntaxKind : SyntaxKind + + setText(text: string): void; +>setText : (text: string) => void +>text : string + + setTextPos(textPos: number): void; +>setTextPos : (textPos: number) => void +>textPos : number + + lookAhead(callback: () => T): T; +>lookAhead : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + + tryScan(callback: () => T): T; +>tryScan : (callback: () => T) => T +>T : T +>callback : () => T +>T : T +>T : T + } + function tokenToString(t: SyntaxKind): string; +>tokenToString : (t: SyntaxKind) => string +>t : SyntaxKind +>SyntaxKind : SyntaxKind + + function computeLineStarts(text: string): number[]; +>computeLineStarts : (text: string) => number[] +>text : string + + function getPositionOfLineAndCharacter(sourceFile: SourceFile, line: number, character: number): number; +>getPositionOfLineAndCharacter : (sourceFile: SourceFile, line: number, character: number) => number +>sourceFile : SourceFile +>SourceFile : SourceFile +>line : number +>character : number + + function computePositionOfLineAndCharacter(lineStarts: number[], line: number, character: number): number; +>computePositionOfLineAndCharacter : (lineStarts: number[], line: number, character: number) => number +>lineStarts : number[] +>line : number +>character : number + + function getLineStarts(sourceFile: SourceFile): number[]; +>getLineStarts : (sourceFile: SourceFile) => number[] +>sourceFile : SourceFile +>SourceFile : SourceFile + + function computeLineAndCharacterOfPosition(lineStarts: number[], position: number): { +>computeLineAndCharacterOfPosition : (lineStarts: number[], position: number) => { line: number; character: number; } +>lineStarts : number[] +>position : number + + line: number; +>line : number + + character: number; +>character : number + + }; + function getLineAndCharacterOfPosition(sourceFile: SourceFile, position: number): LineAndCharacter; +>getLineAndCharacterOfPosition : (sourceFile: SourceFile, position: number) => LineAndCharacter +>sourceFile : SourceFile +>SourceFile : SourceFile +>position : number +>LineAndCharacter : LineAndCharacter + + function isWhiteSpace(ch: number): boolean; +>isWhiteSpace : (ch: number) => boolean +>ch : number + + function isLineBreak(ch: number): boolean; +>isLineBreak : (ch: number) => boolean +>ch : number + + function isOctalDigit(ch: number): boolean; +>isOctalDigit : (ch: number) => boolean +>ch : number + + function skipTrivia(text: string, pos: number, stopAfterLineBreak?: boolean): number; +>skipTrivia : (text: string, pos: number, stopAfterLineBreak?: boolean) => number +>text : string +>pos : number +>stopAfterLineBreak : boolean + + function getLeadingCommentRanges(text: string, pos: number): CommentRange[]; +>getLeadingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function getTrailingCommentRanges(text: string, pos: number): CommentRange[]; +>getTrailingCommentRanges : (text: string, pos: number) => CommentRange[] +>text : string +>pos : number +>CommentRange : CommentRange + + function isIdentifierStart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierStart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function isIdentifierPart(ch: number, languageVersion: ScriptTarget): boolean; +>isIdentifierPart : (ch: number, languageVersion: ScriptTarget) => boolean +>ch : number +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget + + function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback): Scanner; +>createScanner : (languageVersion: ScriptTarget, skipTrivia: boolean, text?: string, onError?: ErrorCallback) => Scanner +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>skipTrivia : boolean +>text : string +>onError : ErrorCallback +>ErrorCallback : ErrorCallback +>Scanner : Scanner +} +declare module "typescript" { + function getNodeConstructor(kind: SyntaxKind): new () => Node; +>getNodeConstructor : (kind: SyntaxKind) => new () => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function createNode(kind: SyntaxKind): Node; +>createNode : (kind: SyntaxKind) => Node +>kind : SyntaxKind +>SyntaxKind : SyntaxKind +>Node : Node + + function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T; +>forEachChild : (node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T) => T +>T : T +>node : Node +>Node : Node +>cbNode : (node: Node) => T +>node : Node +>Node : Node +>T : T +>cbNodeArray : (nodes: Node[]) => T +>nodes : Node[] +>Node : Node +>T : T +>T : T + + function modifierToFlag(token: SyntaxKind): NodeFlags; +>modifierToFlag : (token: SyntaxKind) => NodeFlags +>token : SyntaxKind +>SyntaxKind : SyntaxKind +>NodeFlags : NodeFlags + + function updateSourceFile(sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateSourceFile : (sourceFile: SourceFile, newText: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>newText : string +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>aggressiveChecks : boolean +>SourceFile : SourceFile + + function isEvalOrArgumentsIdentifier(node: Node): boolean; +>isEvalOrArgumentsIdentifier : (node: Node) => boolean +>node : Node +>Node : Node + + function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean): SourceFile; +>createSourceFile : (fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes?: boolean) => SourceFile +>fileName : string +>sourceText : string +>languageVersion : ScriptTarget +>ScriptTarget : ScriptTarget +>setParentNodes : boolean +>SourceFile : SourceFile + + function isLeftHandSideExpression(expr: Expression): boolean; +>isLeftHandSideExpression : (expr: Expression) => boolean +>expr : Expression +>Expression : Expression + + function isAssignmentOperator(token: SyntaxKind): boolean; +>isAssignmentOperator : (token: SyntaxKind) => boolean +>token : SyntaxKind +>SyntaxKind : SyntaxKind +} +declare module "typescript" { + function createTypeChecker(host: TypeCheckerHost, produceDiagnostics: boolean): TypeChecker; +>createTypeChecker : (host: TypeCheckerHost, produceDiagnostics: boolean) => TypeChecker +>host : TypeCheckerHost +>TypeCheckerHost : TypeCheckerHost +>produceDiagnostics : boolean +>TypeChecker : TypeChecker +} +declare module "typescript" { + /** The version of the TypeScript compiler release */ + let version: string; +>version : string + + function findConfigFile(searchPath: string): string; +>findConfigFile : (searchPath: string) => string +>searchPath : string + + function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost; +>createCompilerHost : (options: CompilerOptions, setParentNodes?: boolean) => CompilerHost +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>setParentNodes : boolean +>CompilerHost : CompilerHost + + function getPreEmitDiagnostics(program: Program): Diagnostic[]; +>getPreEmitDiagnostics : (program: Program) => Diagnostic[] +>program : Program +>Program : Program +>Diagnostic : Diagnostic + + function flattenDiagnosticMessageText(messageText: string | DiagnosticMessageChain, newLine: string): string; +>flattenDiagnosticMessageText : (messageText: string | DiagnosticMessageChain, newLine: string) => string +>messageText : string | DiagnosticMessageChain +>DiagnosticMessageChain : DiagnosticMessageChain +>newLine : string + + function createProgram(rootNames: string[], options: CompilerOptions, host?: CompilerHost): Program; +>createProgram : (rootNames: string[], options: CompilerOptions, host?: CompilerHost) => Program +>rootNames : string[] +>options : CompilerOptions +>CompilerOptions : CompilerOptions +>host : CompilerHost +>CompilerHost : CompilerHost +>Program : Program +} +declare module "typescript" { + /** + * Read tsconfig.json file + * @param fileName The path to the config file + */ + function readConfigFile(fileName: string): any; +>readConfigFile : (fileName: string) => any +>fileName : string + + /** + * Parse the contents of a config file (tsconfig.json). + * @param json The contents of the config file to parse + * @param basePath A root directory to resolve relative path entries in the config + * file to. e.g. outDir + */ + function parseConfigFile(json: any, basePath?: string): ParsedCommandLine; +>parseConfigFile : (json: any, basePath?: string) => ParsedCommandLine +>json : any +>basePath : string +>ParsedCommandLine : ParsedCommandLine +} +declare module "typescript" { + /** The version of the language service API */ + let servicesVersion: string; +>servicesVersion : string + + interface Node { +>Node : Node + + getSourceFile(): SourceFile; +>getSourceFile : () => SourceFile +>SourceFile : SourceFile + + getChildCount(sourceFile?: SourceFile): number; +>getChildCount : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getChildAt(index: number, sourceFile?: SourceFile): Node; +>getChildAt : (index: number, sourceFile?: SourceFile) => Node +>index : number +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getChildren(sourceFile?: SourceFile): Node[]; +>getChildren : (sourceFile?: SourceFile) => Node[] +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getStart(sourceFile?: SourceFile): number; +>getStart : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullStart(): number; +>getFullStart : () => number + + getEnd(): number; +>getEnd : () => number + + getWidth(sourceFile?: SourceFile): number; +>getWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullWidth(): number; +>getFullWidth : () => number + + getLeadingTriviaWidth(sourceFile?: SourceFile): number; +>getLeadingTriviaWidth : (sourceFile?: SourceFile) => number +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFullText(sourceFile?: SourceFile): string; +>getFullText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getText(sourceFile?: SourceFile): string; +>getText : (sourceFile?: SourceFile) => string +>sourceFile : SourceFile +>SourceFile : SourceFile + + getFirstToken(sourceFile?: SourceFile): Node; +>getFirstToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + + getLastToken(sourceFile?: SourceFile): Node; +>getLastToken : (sourceFile?: SourceFile) => Node +>sourceFile : SourceFile +>SourceFile : SourceFile +>Node : Node + } + interface Symbol { +>Symbol : Symbol + + getFlags(): SymbolFlags; +>getFlags : () => SymbolFlags +>SymbolFlags : SymbolFlags + + getName(): string; +>getName : () => string + + getDeclarations(): Declaration[]; +>getDeclarations : () => Declaration[] +>Declaration : Declaration + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface Type { +>Type : Type + + getFlags(): TypeFlags; +>getFlags : () => TypeFlags +>TypeFlags : TypeFlags + + getSymbol(): Symbol; +>getSymbol : () => Symbol +>Symbol : Symbol + + getProperties(): Symbol[]; +>getProperties : () => Symbol[] +>Symbol : Symbol + + getProperty(propertyName: string): Symbol; +>getProperty : (propertyName: string) => Symbol +>propertyName : string +>Symbol : Symbol + + getApparentProperties(): Symbol[]; +>getApparentProperties : () => Symbol[] +>Symbol : Symbol + + getCallSignatures(): Signature[]; +>getCallSignatures : () => Signature[] +>Signature : Signature + + getConstructSignatures(): Signature[]; +>getConstructSignatures : () => Signature[] +>Signature : Signature + + getStringIndexType(): Type; +>getStringIndexType : () => Type +>Type : Type + + getNumberIndexType(): Type; +>getNumberIndexType : () => Type +>Type : Type + } + interface Signature { +>Signature : Signature + + getDeclaration(): SignatureDeclaration; +>getDeclaration : () => SignatureDeclaration +>SignatureDeclaration : SignatureDeclaration + + getTypeParameters(): Type[]; +>getTypeParameters : () => Type[] +>Type : Type + + getParameters(): Symbol[]; +>getParameters : () => Symbol[] +>Symbol : Symbol + + getReturnType(): Type; +>getReturnType : () => Type +>Type : Type + + getDocumentationComment(): SymbolDisplayPart[]; +>getDocumentationComment : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface SourceFile { +>SourceFile : SourceFile + + getNamedDeclarations(): Declaration[]; +>getNamedDeclarations : () => Declaration[] +>Declaration : Declaration + + getLineAndCharacterOfPosition(pos: number): LineAndCharacter; +>getLineAndCharacterOfPosition : (pos: number) => LineAndCharacter +>pos : number +>LineAndCharacter : LineAndCharacter + + getLineStarts(): number[]; +>getLineStarts : () => number[] + + getPositionOfLineAndCharacter(line: number, character: number): number; +>getPositionOfLineAndCharacter : (line: number, character: number) => number +>line : number +>character : number + + update(newText: string, textChangeRange: TextChangeRange): SourceFile; +>update : (newText: string, textChangeRange: TextChangeRange) => SourceFile +>newText : string +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>SourceFile : SourceFile + } + /** + * 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 + * the same values. + */ + interface IScriptSnapshot { +>IScriptSnapshot : IScriptSnapshot + + /** Gets a portion of the script snapshot specified by [start, end). */ + getText(start: number, end: number): string; +>getText : (start: number, end: number) => string +>start : number +>end : number + + /** Gets the length of this script snapshot. */ + getLength(): number; +>getLength : () => number + + /** + * Gets the TextChangeRange that describe how the text changed between this text and + * an older version. This information is used by the incremental parser to determine + * what sections of the script need to be re-parsed. 'undefined' can be returned if the + * change range cannot be determined. However, in that case, incremental parsing will + * not happen and the entire document will be re - parsed. + */ + getChangeRange(oldSnapshot: IScriptSnapshot): TextChangeRange; +>getChangeRange : (oldSnapshot: IScriptSnapshot) => TextChangeRange +>oldSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>TextChangeRange : TextChangeRange + } + module ScriptSnapshot { +>ScriptSnapshot : typeof ScriptSnapshot + + function fromString(text: string): IScriptSnapshot; +>fromString : (text: string) => IScriptSnapshot +>text : string +>IScriptSnapshot : IScriptSnapshot + } + interface PreProcessedFileInfo { +>PreProcessedFileInfo : PreProcessedFileInfo + + referencedFiles: FileReference[]; +>referencedFiles : FileReference[] +>FileReference : FileReference + + importedFiles: FileReference[]; +>importedFiles : FileReference[] +>FileReference : FileReference + + isLibFile: boolean; +>isLibFile : boolean + } + interface LanguageServiceHost { +>LanguageServiceHost : LanguageServiceHost + + getCompilationSettings(): CompilerOptions; +>getCompilationSettings : () => CompilerOptions +>CompilerOptions : CompilerOptions + + getNewLine?(): string; +>getNewLine : () => string + + getScriptFileNames(): string[]; +>getScriptFileNames : () => string[] + + getScriptVersion(fileName: string): string; +>getScriptVersion : (fileName: string) => string +>fileName : string + + getScriptSnapshot(fileName: string): IScriptSnapshot; +>getScriptSnapshot : (fileName: string) => IScriptSnapshot +>fileName : string +>IScriptSnapshot : IScriptSnapshot + + getLocalizedDiagnosticMessages?(): any; +>getLocalizedDiagnosticMessages : () => any + + getCancellationToken?(): CancellationToken; +>getCancellationToken : () => CancellationToken +>CancellationToken : CancellationToken + + getCurrentDirectory(): string; +>getCurrentDirectory : () => string + + getDefaultLibFileName(options: CompilerOptions): string; +>getDefaultLibFileName : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions + + log?(s: string): void; +>log : (s: string) => void +>s : string + + trace?(s: string): void; +>trace : (s: string) => void +>s : string + + error?(s: string): void; +>error : (s: string) => void +>s : string + } + interface LanguageService { +>LanguageService : LanguageService + + cleanupSemanticCache(): void; +>cleanupSemanticCache : () => void + + getSyntacticDiagnostics(fileName: string): Diagnostic[]; +>getSyntacticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getSemanticDiagnostics(fileName: string): Diagnostic[]; +>getSemanticDiagnostics : (fileName: string) => Diagnostic[] +>fileName : string +>Diagnostic : Diagnostic + + getCompilerOptionsDiagnostics(): Diagnostic[]; +>getCompilerOptionsDiagnostics : () => Diagnostic[] +>Diagnostic : Diagnostic + + getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSyntacticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; +>getSemanticClassifications : (fileName: string, span: TextSpan) => ClassifiedSpan[] +>fileName : string +>span : TextSpan +>TextSpan : TextSpan +>ClassifiedSpan : ClassifiedSpan + + getCompletionsAtPosition(fileName: string, position: number): CompletionInfo; +>getCompletionsAtPosition : (fileName: string, position: number) => CompletionInfo +>fileName : string +>position : number +>CompletionInfo : CompletionInfo + + getCompletionEntryDetails(fileName: string, position: number, entryName: string): CompletionEntryDetails; +>getCompletionEntryDetails : (fileName: string, position: number, entryName: string) => CompletionEntryDetails +>fileName : string +>position : number +>entryName : string +>CompletionEntryDetails : CompletionEntryDetails + + getQuickInfoAtPosition(fileName: string, position: number): QuickInfo; +>getQuickInfoAtPosition : (fileName: string, position: number) => QuickInfo +>fileName : string +>position : number +>QuickInfo : QuickInfo + + getNameOrDottedNameSpan(fileName: string, startPos: number, endPos: number): TextSpan; +>getNameOrDottedNameSpan : (fileName: string, startPos: number, endPos: number) => TextSpan +>fileName : string +>startPos : number +>endPos : number +>TextSpan : TextSpan + + getBreakpointStatementAtPosition(fileName: string, position: number): TextSpan; +>getBreakpointStatementAtPosition : (fileName: string, position: number) => TextSpan +>fileName : string +>position : number +>TextSpan : TextSpan + + getSignatureHelpItems(fileName: string, position: number): SignatureHelpItems; +>getSignatureHelpItems : (fileName: string, position: number) => SignatureHelpItems +>fileName : string +>position : number +>SignatureHelpItems : SignatureHelpItems + + getRenameInfo(fileName: string, position: number): RenameInfo; +>getRenameInfo : (fileName: string, position: number) => RenameInfo +>fileName : string +>position : number +>RenameInfo : RenameInfo + + findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean): RenameLocation[]; +>findRenameLocations : (fileName: string, position: number, findInStrings: boolean, findInComments: boolean) => RenameLocation[] +>fileName : string +>position : number +>findInStrings : boolean +>findInComments : boolean +>RenameLocation : RenameLocation + + getDefinitionAtPosition(fileName: string, position: number): DefinitionInfo[]; +>getDefinitionAtPosition : (fileName: string, position: number) => DefinitionInfo[] +>fileName : string +>position : number +>DefinitionInfo : DefinitionInfo + + getReferencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getReferencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + getOccurrencesAtPosition(fileName: string, position: number): ReferenceEntry[]; +>getOccurrencesAtPosition : (fileName: string, position: number) => ReferenceEntry[] +>fileName : string +>position : number +>ReferenceEntry : ReferenceEntry + + findReferences(fileName: string, position: number): ReferencedSymbol[]; +>findReferences : (fileName: string, position: number) => ReferencedSymbol[] +>fileName : string +>position : number +>ReferencedSymbol : ReferencedSymbol + + getNavigateToItems(searchValue: string, maxResultCount?: number): NavigateToItem[]; +>getNavigateToItems : (searchValue: string, maxResultCount?: number) => NavigateToItem[] +>searchValue : string +>maxResultCount : number +>NavigateToItem : NavigateToItem + + getNavigationBarItems(fileName: string): NavigationBarItem[]; +>getNavigationBarItems : (fileName: string) => NavigationBarItem[] +>fileName : string +>NavigationBarItem : NavigationBarItem + + getOutliningSpans(fileName: string): OutliningSpan[]; +>getOutliningSpans : (fileName: string) => OutliningSpan[] +>fileName : string +>OutliningSpan : OutliningSpan + + getTodoComments(fileName: string, descriptors: TodoCommentDescriptor[]): TodoComment[]; +>getTodoComments : (fileName: string, descriptors: TodoCommentDescriptor[]) => TodoComment[] +>fileName : string +>descriptors : TodoCommentDescriptor[] +>TodoCommentDescriptor : TodoCommentDescriptor +>TodoComment : TodoComment + + getBraceMatchingAtPosition(fileName: string, position: number): TextSpan[]; +>getBraceMatchingAtPosition : (fileName: string, position: number) => TextSpan[] +>fileName : string +>position : number +>TextSpan : TextSpan + + getIndentationAtPosition(fileName: string, position: number, options: EditorOptions): number; +>getIndentationAtPosition : (fileName: string, position: number, options: EditorOptions) => number +>fileName : string +>position : number +>options : EditorOptions +>EditorOptions : EditorOptions + + getFormattingEditsForRange(fileName: string, start: number, end: number, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForRange : (fileName: string, start: number, end: number, options: FormatCodeOptions) => TextChange[] +>fileName : string +>start : number +>end : number +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsForDocument(fileName: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsForDocument : (fileName: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getFormattingEditsAfterKeystroke(fileName: string, position: number, key: string, options: FormatCodeOptions): TextChange[]; +>getFormattingEditsAfterKeystroke : (fileName: string, position: number, key: string, options: FormatCodeOptions) => TextChange[] +>fileName : string +>position : number +>key : string +>options : FormatCodeOptions +>FormatCodeOptions : FormatCodeOptions +>TextChange : TextChange + + getEmitOutput(fileName: string): EmitOutput; +>getEmitOutput : (fileName: string) => EmitOutput +>fileName : string +>EmitOutput : EmitOutput + + getProgram(): Program; +>getProgram : () => Program +>Program : Program + + getSourceFile(fileName: string): SourceFile; +>getSourceFile : (fileName: string) => SourceFile +>fileName : string +>SourceFile : SourceFile + + dispose(): void; +>dispose : () => void + } + interface ClassifiedSpan { +>ClassifiedSpan : ClassifiedSpan + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + classificationType: string; +>classificationType : string + } + interface NavigationBarItem { +>NavigationBarItem : NavigationBarItem + + text: string; +>text : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + spans: TextSpan[]; +>spans : TextSpan[] +>TextSpan : TextSpan + + childItems: NavigationBarItem[]; +>childItems : NavigationBarItem[] +>NavigationBarItem : NavigationBarItem + + indent: number; +>indent : number + + bolded: boolean; +>bolded : boolean + + grayed: boolean; +>grayed : boolean + } + interface TodoCommentDescriptor { +>TodoCommentDescriptor : TodoCommentDescriptor + + text: string; +>text : string + + priority: number; +>priority : number + } + interface TodoComment { +>TodoComment : TodoComment + + descriptor: TodoCommentDescriptor; +>descriptor : TodoCommentDescriptor +>TodoCommentDescriptor : TodoCommentDescriptor + + message: string; +>message : string + + position: number; +>position : number + } + class TextChange { +>TextChange : TextChange + + span: TextSpan; +>span : TextSpan +>TextSpan : TextSpan + + newText: string; +>newText : string + } + interface RenameLocation { +>RenameLocation : RenameLocation + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + } + interface ReferenceEntry { +>ReferenceEntry : ReferenceEntry + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + fileName: string; +>fileName : string + + isWriteAccess: boolean; +>isWriteAccess : boolean + } + interface NavigateToItem { +>NavigateToItem : NavigateToItem + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + matchKind: string; +>matchKind : string + + isCaseSensitive: boolean; +>isCaseSensitive : boolean + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + containerName: string; +>containerName : string + + containerKind: string; +>containerKind : string + } + interface EditorOptions { +>EditorOptions : EditorOptions + + IndentSize: number; +>IndentSize : number + + TabSize: number; +>TabSize : number + + NewLineCharacter: string; +>NewLineCharacter : string + + ConvertTabsToSpaces: boolean; +>ConvertTabsToSpaces : boolean + } + interface FormatCodeOptions extends EditorOptions { +>FormatCodeOptions : FormatCodeOptions +>EditorOptions : EditorOptions + + InsertSpaceAfterCommaDelimiter: boolean; +>InsertSpaceAfterCommaDelimiter : boolean + + InsertSpaceAfterSemicolonInForStatements: boolean; +>InsertSpaceAfterSemicolonInForStatements : boolean + + InsertSpaceBeforeAndAfterBinaryOperators: boolean; +>InsertSpaceBeforeAndAfterBinaryOperators : boolean + + InsertSpaceAfterKeywordsInControlFlowStatements: boolean; +>InsertSpaceAfterKeywordsInControlFlowStatements : boolean + + InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; +>InsertSpaceAfterFunctionKeywordForAnonymousFunctions : boolean + + InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; +>InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis : boolean + + PlaceOpenBraceOnNewLineForFunctions: boolean; +>PlaceOpenBraceOnNewLineForFunctions : boolean + + PlaceOpenBraceOnNewLineForControlBlocks: boolean; +>PlaceOpenBraceOnNewLineForControlBlocks : boolean + + [s: string]: boolean | number | string; +>s : string + } + interface DefinitionInfo { +>DefinitionInfo : DefinitionInfo + + fileName: string; +>fileName : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + kind: string; +>kind : string + + name: string; +>name : string + + containerKind: string; +>containerKind : string + + containerName: string; +>containerName : string + } + interface ReferencedSymbol { +>ReferencedSymbol : ReferencedSymbol + + definition: DefinitionInfo; +>definition : DefinitionInfo +>DefinitionInfo : DefinitionInfo + + references: ReferenceEntry[]; +>references : ReferenceEntry[] +>ReferenceEntry : ReferenceEntry + } + enum SymbolDisplayPartKind { +>SymbolDisplayPartKind : SymbolDisplayPartKind + + aliasName = 0, +>aliasName : SymbolDisplayPartKind + + className = 1, +>className : SymbolDisplayPartKind + + enumName = 2, +>enumName : SymbolDisplayPartKind + + fieldName = 3, +>fieldName : SymbolDisplayPartKind + + interfaceName = 4, +>interfaceName : SymbolDisplayPartKind + + keyword = 5, +>keyword : SymbolDisplayPartKind + + lineBreak = 6, +>lineBreak : SymbolDisplayPartKind + + numericLiteral = 7, +>numericLiteral : SymbolDisplayPartKind + + stringLiteral = 8, +>stringLiteral : SymbolDisplayPartKind + + localName = 9, +>localName : SymbolDisplayPartKind + + methodName = 10, +>methodName : SymbolDisplayPartKind + + moduleName = 11, +>moduleName : SymbolDisplayPartKind + + operator = 12, +>operator : SymbolDisplayPartKind + + parameterName = 13, +>parameterName : SymbolDisplayPartKind + + propertyName = 14, +>propertyName : SymbolDisplayPartKind + + punctuation = 15, +>punctuation : SymbolDisplayPartKind + + space = 16, +>space : SymbolDisplayPartKind + + text = 17, +>text : SymbolDisplayPartKind + + typeParameterName = 18, +>typeParameterName : SymbolDisplayPartKind + + enumMemberName = 19, +>enumMemberName : SymbolDisplayPartKind + + functionName = 20, +>functionName : SymbolDisplayPartKind + + regularExpressionLiteral = 21, +>regularExpressionLiteral : SymbolDisplayPartKind + } + interface SymbolDisplayPart { +>SymbolDisplayPart : SymbolDisplayPart + + text: string; +>text : string + + kind: string; +>kind : string + } + interface QuickInfo { +>QuickInfo : QuickInfo + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface RenameInfo { +>RenameInfo : RenameInfo + + canRename: boolean; +>canRename : boolean + + localizedErrorMessage: string; +>localizedErrorMessage : string + + displayName: string; +>displayName : string + + fullDisplayName: string; +>fullDisplayName : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + triggerSpan: TextSpan; +>triggerSpan : TextSpan +>TextSpan : TextSpan + } + interface SignatureHelpParameter { +>SignatureHelpParameter : SignatureHelpParameter + + name: string; +>name : string + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + isOptional: boolean; +>isOptional : boolean + } + /** + * Represents a single signature to show in signature help. + * The id is used for subsequent calls into the language service to ask questions about the + * signature help item in the context of any documents that have been updated. i.e. after + * an edit has happened, while signature help is still active, the host can ask important + * questions like 'what parameter is the user currently contained within?'. + */ + interface SignatureHelpItem { +>SignatureHelpItem : SignatureHelpItem + + isVariadic: boolean; +>isVariadic : boolean + + prefixDisplayParts: SymbolDisplayPart[]; +>prefixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + suffixDisplayParts: SymbolDisplayPart[]; +>suffixDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + separatorDisplayParts: SymbolDisplayPart[]; +>separatorDisplayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + parameters: SignatureHelpParameter[]; +>parameters : SignatureHelpParameter[] +>SignatureHelpParameter : SignatureHelpParameter + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + /** + * Represents a set of signature help items, and the preferred item that should be selected. + */ + interface SignatureHelpItems { +>SignatureHelpItems : SignatureHelpItems + + items: SignatureHelpItem[]; +>items : SignatureHelpItem[] +>SignatureHelpItem : SignatureHelpItem + + applicableSpan: TextSpan; +>applicableSpan : TextSpan +>TextSpan : TextSpan + + selectedItemIndex: number; +>selectedItemIndex : number + + argumentIndex: number; +>argumentIndex : number + + argumentCount: number; +>argumentCount : number + } + interface CompletionInfo { +>CompletionInfo : CompletionInfo + + isMemberCompletion: boolean; +>isMemberCompletion : boolean + + isNewIdentifierLocation: boolean; +>isNewIdentifierLocation : boolean + + entries: CompletionEntry[]; +>entries : CompletionEntry[] +>CompletionEntry : CompletionEntry + } + interface CompletionEntry { +>CompletionEntry : CompletionEntry + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + } + interface CompletionEntryDetails { +>CompletionEntryDetails : CompletionEntryDetails + + name: string; +>name : string + + kind: string; +>kind : string + + kindModifiers: string; +>kindModifiers : string + + displayParts: SymbolDisplayPart[]; +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + documentation: SymbolDisplayPart[]; +>documentation : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + interface OutliningSpan { +>OutliningSpan : OutliningSpan + + /** The span of the document to actually collapse. */ + textSpan: TextSpan; +>textSpan : TextSpan +>TextSpan : TextSpan + + /** The span of the document to display when the user hovers over the collapsed span. */ + hintSpan: TextSpan; +>hintSpan : TextSpan +>TextSpan : TextSpan + + /** The text to display in the editor for the collapsed region. */ + bannerText: string; +>bannerText : string + + /** + * Whether or not this region should be automatically collapsed when + * the 'Collapse to Definitions' command is invoked. + */ + autoCollapse: boolean; +>autoCollapse : boolean + } + interface EmitOutput { +>EmitOutput : EmitOutput + + outputFiles: OutputFile[]; +>outputFiles : OutputFile[] +>OutputFile : OutputFile + + emitSkipped: boolean; +>emitSkipped : boolean + } + const enum OutputFileType { +>OutputFileType : OutputFileType + + JavaScript = 0, +>JavaScript : OutputFileType + + SourceMap = 1, +>SourceMap : OutputFileType + + Declaration = 2, +>Declaration : OutputFileType + } + interface OutputFile { +>OutputFile : OutputFile + + name: string; +>name : string + + writeByteOrderMark: boolean; +>writeByteOrderMark : boolean + + text: string; +>text : string + } + const enum EndOfLineState { +>EndOfLineState : EndOfLineState + + Start = 0, +>Start : EndOfLineState + + InMultiLineCommentTrivia = 1, +>InMultiLineCommentTrivia : EndOfLineState + + InSingleQuoteStringLiteral = 2, +>InSingleQuoteStringLiteral : EndOfLineState + + InDoubleQuoteStringLiteral = 3, +>InDoubleQuoteStringLiteral : EndOfLineState + + InTemplateHeadOrNoSubstitutionTemplate = 4, +>InTemplateHeadOrNoSubstitutionTemplate : EndOfLineState + + InTemplateMiddleOrTail = 5, +>InTemplateMiddleOrTail : EndOfLineState + + InTemplateSubstitutionPosition = 6, +>InTemplateSubstitutionPosition : EndOfLineState + } + enum TokenClass { +>TokenClass : TokenClass + + Punctuation = 0, +>Punctuation : TokenClass + + Keyword = 1, +>Keyword : TokenClass + + Operator = 2, +>Operator : TokenClass + + Comment = 3, +>Comment : TokenClass + + Whitespace = 4, +>Whitespace : TokenClass + + Identifier = 5, +>Identifier : TokenClass + + NumberLiteral = 6, +>NumberLiteral : TokenClass + + StringLiteral = 7, +>StringLiteral : TokenClass + + RegExpLiteral = 8, +>RegExpLiteral : TokenClass + } + interface ClassificationResult { +>ClassificationResult : ClassificationResult + + finalLexState: EndOfLineState; +>finalLexState : EndOfLineState +>EndOfLineState : EndOfLineState + + entries: ClassificationInfo[]; +>entries : ClassificationInfo[] +>ClassificationInfo : ClassificationInfo + } + interface ClassificationInfo { +>ClassificationInfo : ClassificationInfo + + length: number; +>length : number + + classification: TokenClass; +>classification : TokenClass +>TokenClass : TokenClass + } + interface Classifier { +>Classifier : Classifier + + /** + * Gives lexical classifications of tokens on a line without any syntactic context. + * For instance, a token consisting of the text 'string' can be either an identifier + * named 'string' or the keyword 'string', however, because this classifier is not aware, + * it relies on certain heuristics to give acceptable results. For classifications where + * speed trumps accuracy, this function is preferable; however, for true accuracy, the + * syntactic classifier is ideal. In fact, in certain editing scenarios, combining the + * lexical, syntactic, and semantic classifiers may issue the best user experience. + * + * @param text The text of a line to classify. + * @param lexState The state of the lexical classifier at the end of the previous line. + * @param syntacticClassifierAbsent Whether the client is *not* using a syntactic classifier. + * If there is no syntactic classifier (syntacticClassifierAbsent=true), + * certain heuristics may be used in its place; however, if there is a + * syntactic classifier (syntacticClassifierAbsent=false), certain + * classifications which may be incorrectly categorized will be given + * back as Identifiers in order to allow the syntactic classifier to + * subsume the classification. + */ + getClassificationsForLine(text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean): ClassificationResult; +>getClassificationsForLine : (text: string, lexState: EndOfLineState, syntacticClassifierAbsent: boolean) => ClassificationResult +>text : string +>lexState : EndOfLineState +>EndOfLineState : EndOfLineState +>syntacticClassifierAbsent : boolean +>ClassificationResult : ClassificationResult + } + /** + * The document registry represents a store of SourceFile objects that can be shared between + * multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST) + * of files in the context. + * SourceFile objects account for most of the memory usage by the language service. Sharing + * the same DocumentRegistry instance between different instances of LanguageService allow + * for more efficient memory utilization since all projects will share at least the library + * file (lib.d.ts). + * + * A more advanced use of the document registry is to serialize sourceFile objects to disk + * and re-hydrate them when needed. + * + * To create a default DocumentRegistry, use createDocumentRegistry to create one, and pass it + * to all subsequent createLanguageService calls. + */ + interface DocumentRegistry { +>DocumentRegistry : DocumentRegistry + + /** + * Request a stored SourceFile with a given fileName and compilationSettings. + * The first call to acquire will call createLanguageServiceSourceFile to generate + * the SourceFile if was not found in the registry. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @parm scriptSnapshot Text of the file. Only used if the file was not found + * in the registry and a new one was created. + * @parm version Current version of the file. Only used if the file was not found + * in the registry and a new one was created. + */ + acquireDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; +>acquireDocument : (fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string) => SourceFile +>fileName : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>SourceFile : SourceFile + + /** + * Request an updated version of an already existing SourceFile with a given fileName + * and compilationSettings. The update will in-turn call updateLanguageServiceSourceFile + * to get an updated SourceFile. + * + * @param fileName The name of the file requested + * @param compilationSettings Some compilation settings like target affects the + * shape of a the resulting SourceFile. This allows the DocumentRegistry to store + * multiple copies of the same file for different compilation settings. + * @param scriptSnapshot Text of the file. + * @param version Current version of the file. + */ + updateDocument(fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string): SourceFile; +>updateDocument : (fileName: string, compilationSettings: CompilerOptions, scriptSnapshot: IScriptSnapshot, version: string) => SourceFile +>fileName : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>SourceFile : SourceFile + + /** + * Informs the DocumentRegistry that a file is not needed any longer. + * + * Note: It is not allowed to call release on a SourceFile that was not acquired from + * this registry originally. + * + * @param fileName The name of the file to be released + * @param compilationSettings The compilation settings used to acquire the file + */ + releaseDocument(fileName: string, compilationSettings: CompilerOptions): void; +>releaseDocument : (fileName: string, compilationSettings: CompilerOptions) => void +>fileName : string +>compilationSettings : CompilerOptions +>CompilerOptions : CompilerOptions + } + class ScriptElementKind { +>ScriptElementKind : ScriptElementKind + + static unknown: string; +>unknown : string + + static keyword: string; +>keyword : string + + static scriptElement: string; +>scriptElement : string + + static moduleElement: string; +>moduleElement : string + + static classElement: string; +>classElement : string + + static interfaceElement: string; +>interfaceElement : string + + static typeElement: string; +>typeElement : string + + static enumElement: string; +>enumElement : string + + static variableElement: string; +>variableElement : string + + static localVariableElement: string; +>localVariableElement : string + + static functionElement: string; +>functionElement : string + + static localFunctionElement: string; +>localFunctionElement : string + + static memberFunctionElement: string; +>memberFunctionElement : string + + static memberGetAccessorElement: string; +>memberGetAccessorElement : string + + static memberSetAccessorElement: string; +>memberSetAccessorElement : string + + static memberVariableElement: string; +>memberVariableElement : string + + static constructorImplementationElement: string; +>constructorImplementationElement : string + + static callSignatureElement: string; +>callSignatureElement : string + + static indexSignatureElement: string; +>indexSignatureElement : string + + static constructSignatureElement: string; +>constructSignatureElement : string + + static parameterElement: string; +>parameterElement : string + + static typeParameterElement: string; +>typeParameterElement : string + + static primitiveType: string; +>primitiveType : string + + static label: string; +>label : string + + static alias: string; +>alias : string + + static constElement: string; +>constElement : string + + static letElement: string; +>letElement : string + } + class ScriptElementKindModifier { +>ScriptElementKindModifier : ScriptElementKindModifier + + static none: string; +>none : string + + static publicMemberModifier: string; +>publicMemberModifier : string + + static privateMemberModifier: string; +>privateMemberModifier : string + + static protectedMemberModifier: string; +>protectedMemberModifier : string + + static exportedModifier: string; +>exportedModifier : string + + static ambientModifier: string; +>ambientModifier : string + + static staticModifier: string; +>staticModifier : string + } + class ClassificationTypeNames { +>ClassificationTypeNames : ClassificationTypeNames + + static comment: string; +>comment : string + + static identifier: string; +>identifier : string + + static keyword: string; +>keyword : string + + static numericLiteral: string; +>numericLiteral : string + + static operator: string; +>operator : string + + static stringLiteral: string; +>stringLiteral : string + + static whiteSpace: string; +>whiteSpace : string + + static text: string; +>text : string + + static punctuation: string; +>punctuation : string + + static className: string; +>className : string + + static enumName: string; +>enumName : string + + static interfaceName: string; +>interfaceName : string + + static moduleName: string; +>moduleName : string + + static typeParameterName: string; +>typeParameterName : string + + static typeAlias: string; +>typeAlias : string + } + interface DisplayPartsSymbolWriter extends SymbolWriter { +>DisplayPartsSymbolWriter : DisplayPartsSymbolWriter +>SymbolWriter : SymbolWriter + + displayParts(): SymbolDisplayPart[]; +>displayParts : () => SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + } + function displayPartsToString(displayParts: SymbolDisplayPart[]): string; +>displayPartsToString : (displayParts: SymbolDisplayPart[]) => string +>displayParts : SymbolDisplayPart[] +>SymbolDisplayPart : SymbolDisplayPart + + function getDefaultCompilerOptions(): CompilerOptions; +>getDefaultCompilerOptions : () => CompilerOptions +>CompilerOptions : CompilerOptions + + class OperationCanceledException { +>OperationCanceledException : OperationCanceledException + } + class CancellationTokenObject { +>CancellationTokenObject : CancellationTokenObject + + private cancellationToken; +>cancellationToken : any + + static None: CancellationTokenObject; +>None : CancellationTokenObject +>CancellationTokenObject : CancellationTokenObject + + constructor(cancellationToken: CancellationToken); +>cancellationToken : CancellationToken +>CancellationToken : CancellationToken + + isCancellationRequested(): boolean; +>isCancellationRequested : () => boolean + + throwIfCancellationRequested(): void; +>throwIfCancellationRequested : () => void + } + function transpile(input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[]): string; +>transpile : (input: string, compilerOptions?: CompilerOptions, fileName?: string, diagnostics?: Diagnostic[]) => string +>input : string +>compilerOptions : CompilerOptions +>CompilerOptions : CompilerOptions +>fileName : string +>diagnostics : Diagnostic[] +>Diagnostic : Diagnostic + + function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean): SourceFile; +>createLanguageServiceSourceFile : (fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean) => SourceFile +>fileName : string +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>scriptTarget : ScriptTarget +>ScriptTarget : ScriptTarget +>version : string +>setNodeParents : boolean +>SourceFile : SourceFile + + let disableIncrementalParsing: boolean; +>disableIncrementalParsing : boolean + + function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean): SourceFile; +>updateLanguageServiceSourceFile : (sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange, aggressiveChecks?: boolean) => SourceFile +>sourceFile : SourceFile +>SourceFile : SourceFile +>scriptSnapshot : IScriptSnapshot +>IScriptSnapshot : IScriptSnapshot +>version : string +>textChangeRange : TextChangeRange +>TextChangeRange : TextChangeRange +>aggressiveChecks : boolean +>SourceFile : SourceFile + + function createDocumentRegistry(): DocumentRegistry; +>createDocumentRegistry : () => DocumentRegistry +>DocumentRegistry : DocumentRegistry + + function preProcessFile(sourceText: string, readImportFiles?: boolean): PreProcessedFileInfo; +>preProcessFile : (sourceText: string, readImportFiles?: boolean) => PreProcessedFileInfo +>sourceText : string +>readImportFiles : boolean +>PreProcessedFileInfo : PreProcessedFileInfo + + function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry): LanguageService; +>createLanguageService : (host: LanguageServiceHost, documentRegistry?: DocumentRegistry) => LanguageService +>host : LanguageServiceHost +>LanguageServiceHost : LanguageServiceHost +>documentRegistry : DocumentRegistry +>DocumentRegistry : DocumentRegistry +>LanguageService : LanguageService + + function createClassifier(): Classifier; +>createClassifier : () => Classifier +>Classifier : Classifier + + /** + * Get the path of the default library file (lib.d.ts) as distributed with the typescript + * node package. + * The functionality is not supported if the ts module is consumed outside of a node module. + */ + function getDefaultLibFilePath(options: CompilerOptions): string; +>getDefaultLibFilePath : (options: CompilerOptions) => string +>options : CompilerOptions +>CompilerOptions : CompilerOptions +} + diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index c088b667a4..eff31559ba 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index c19b849c92..b90db23abf 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 667ef93c0a..990adc775e 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -20,7 +20,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index c9d0c1b228..89afb51bf7 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index b27610dc9d..264397450a 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index 82ccc5af4c..87334f216a 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index a3d314eaec..102dc2d1b2 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index c0e0000811..400fd67c9f 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 6fe9eae401..7564913f9a 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index 6a4bb03a7b..ffb88034d9 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index 22330e3f44..4f32240a4f 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C(p) { } diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index cdf1e22a9c..a9e5f2b9d6 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C(public, p) { } diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index df9df72766..a1e61fafea 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index c12b75a54f..8fb57de0bf 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index fb6847bc76..469fb23ebf 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 2a2c5a9dd2..271a4c9dfe 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index beb5586874..ff79324755 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 7e05a53489..c55bfeef42 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 36f5fd21f2..76df57ecb0 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index a6dd6e5c7d..c9bd395fcb 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index e25e06cc71..c8907ce883 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index 647c255686..c8c8132f7a 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index b97b8c95d0..d53f0a2d5d 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index 77e7fd36b9..8d31376b00 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index 0a78f5f1e6..78c53b3eb3 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index d8837c7fa0..d1751ca315 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index b845d52c4f..bc381ec5cf 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -19,7 +19,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index e7885dbbb2..eae494a440 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -68,7 +68,7 @@ var __decorate = this.__decorate || function (decorators, target, key, value) { } return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var Greeter = (function () { function Greeter(greeting) { var b = []; diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index 82e08ee63b..bd57077959 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -21,7 +21,7 @@ sourceFile:sourceMapValidationDecorators.ts >>> } >>> return value; >>>}; ->>>var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +>>>var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; >>>var Greeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> From ce5910edd3d3d0b77bccfbb7583d2328cffd8471 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Tue, 17 Mar 2015 17:09:39 -0700 Subject: [PATCH 07/16] Updated baselines --- .../reference/decoratorOnClassMethod4.js | 23 +++++++++++++++++++ .../reference/decoratorOnClassMethod5.js | 23 +++++++++++++++++++ .../reference/decoratorOnClassMethod6.js | 23 +++++++++++++++++++ .../reference/decoratorOnClassMethod7.js | 23 +++++++++++++++++++ 4 files changed, 92 insertions(+) diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 271a4c9dfe..628ce51772 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod4.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index ff79324755..83d1e6c45f 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod5.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index c55bfeef42..6844b720c2 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod6.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 76df57ecb0..ad8a1e33dd 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -6,6 +6,7 @@ class C { } //// [decoratorOnClassMethod7.js] +<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -25,3 +26,25 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; +======= +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { + var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; + if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); + for (var i = decorators.length - 1; i >= 0; --i) { + var decorator = decorators[i]; + result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; + } + if (kind == 2 && result) Object.defineProperty(target, key, result); + if (kind == 0) return result; +}; +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; +var C = (function() { + class C { + [_a = "method"]() { + } + } + __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); + return C; + var _a; +})(); +>>>>>>> Updated baselines From c5f49deb5637ac6b0ae5b89896424f56fc2eae7e Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 25 Mar 2015 18:12:57 -0700 Subject: [PATCH 08/16] Minor emit cleanup --- .../reference/decoratorOnClassMethod4.js | 23 ------------------- .../reference/decoratorOnClassMethod5.js | 23 ------------------- .../reference/decoratorOnClassMethod6.js | 23 ------------------- .../reference/decoratorOnClassMethod7.js | 23 ------------------- 4 files changed, 92 deletions(-) diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 628ce51772..271a4c9dfe 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod4.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -26,25 +25,3 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index 83d1e6c45f..ff79324755 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod5.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -26,25 +25,3 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index 6844b720c2..c55bfeef42 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod6.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -26,25 +25,3 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index ad8a1e33dd..76df57ecb0 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -6,7 +6,6 @@ class C { } //// [decoratorOnClassMethod7.js] -<<<<<<< HEAD var __decorate = this.__decorate || function (decorators, target, key, value) { var kind = typeof (arguments.length == 2 ? value = target : value); for (var i = decorators.length - 1; i >= 0; --i) { @@ -26,25 +25,3 @@ class C { } Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; -======= -var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key) { - var kind = key == null ? 0 : typeof key == "number" ? 1 : 2, result = target; - if (kind == 2) result = Object.getOwnPropertyDescriptor(target, typeof key == "symbol" ? key : key = String(key)); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - result = (kind == 0 ? decorator(result) : kind == 1 ? decorator(target, key) : decorator(target, key, result)) || result; - } - if (kind == 2 && result) Object.defineProperty(target, key, result); - if (kind == 0) return result; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function (metadataKey, metadataValue) { return function() { } }; -var C = (function() { - class C { - [_a = "method"]() { - } - } - __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a); - return C; - var _a; -})(); ->>>>>>> Updated baselines From 98afb9254dbeed6aaa3c026574bb6f4a09e36dfe Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 1 Apr 2015 13:56:23 -0700 Subject: [PATCH 09/16] Cleanup emit for type metadata for #2577 --- src/compiler/emitter.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 6971e5f723..1e234123e6 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -3918,7 +3918,6 @@ module ts { case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: case SyntaxKind.PropertyDeclaration: - case SyntaxKind.Parameter: return true; } return false; From c804f5b035e2eb83846246d9d53fda1f433cf171 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 1 Apr 2015 14:00:20 -0700 Subject: [PATCH 10/16] Fix for checking type nodes with separate compilation, removed duplicate functions due to merge conflict --- src/compiler/checker.ts | 200 +--------------------------------------- 1 file changed, 4 insertions(+), 196 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index e02f2c19bd..154eee2ef3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8747,11 +8747,12 @@ module ts { /** Checks a type reference node as an expression. */ function checkTypeNodeAsExpression(node: TypeNode | LiteralExpression) { if (node && node.kind === SyntaxKind.TypeReference) { - var type = getTypeFromTypeNodeOrHeritageClauseElement(node); - if (!type || type.flags & (TypeFlags.Intrinsic | TypeFlags.NumberLike | TypeFlags.StringLike)) { + let type = getTypeFromTypeNodeOrHeritageClauseElement(node); + let shouldCheckIfUnknownType = type === unknownType && compilerOptions.separateCompilation; + if (!type || (!shouldCheckIfUnknownType && type.flags & (TypeFlags.Intrinsic | TypeFlags.NumberLike | TypeFlags.StringLike))) { return; } - if (type.symbol.valueDeclaration) { + if (shouldCheckIfUnknownType || type.symbol.valueDeclaration) { checkExpressionOrQualifiedName((node).typeName); } } @@ -11693,199 +11694,6 @@ module ts { return "void 0"; } - /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ - function serializeEntityName(node: EntityName, getGeneratedNameForNode: (Node: Node) => string, fallbackPath?: string[]): string { - if (node.kind === SyntaxKind.Identifier) { - var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); - var text = substitution || (node).text; - if (fallbackPath) { - fallbackPath.push(text); - } - else { - return text; - } - } - else { - var left = serializeEntityName((node).left, getGeneratedNameForNode, fallbackPath); - var right = serializeEntityName((node).right, getGeneratedNameForNode, fallbackPath); - if (!fallbackPath) { - return left + "." + right; - } - } - } - - /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ - function serializeTypeReferenceNode(node: TypeReferenceNode, getGeneratedNameForNode: (Node: Node) => string): string | string[] { - // serialization of a TypeReferenceNode uses the following rules: - // - // * The serialized type of a TypeReference that is `void` is "void 0". - // * The serialized type of a TypeReference that is a `boolean` is "Boolean". - // * The serialized type of a TypeReference that is an enum or `number` is "Number". - // * The serialized type of a TypeReference that is a string literal or `string` is "String". - // * The serialized type of a TypeReference that is a tuple is "Array". - // * The serialized type of a TypeReference that is a `symbol` is "Symbol". - // * The serialized type of a TypeReference with a value declaration is its entity name. - // * The serialized type of a TypeReference with a call or construct signature is "Function". - // * The serialized type of any other type is "Object". - let type = getTypeFromTypeReferenceNode(node); - if (type.flags & TypeFlags.Void) { - return "void 0"; - } - else if (type.flags & TypeFlags.Boolean) { - return "Boolean"; - } - else if (type.flags & TypeFlags.NumberLike) { - return "Number"; - } - else if (type.flags & TypeFlags.StringLike) { - return "String"; - } - else if (type.flags & TypeFlags.Tuple) { - return "Array"; - } - else if (type.flags & TypeFlags.ESSymbol) { - return "Symbol"; - } - else if (type === unknownType) { - var fallbackPath: string[] = []; - serializeEntityName(node.typeName, getGeneratedNameForNode, fallbackPath); - return fallbackPath; - } - else if (type.symbol && type.symbol.valueDeclaration) { - return serializeEntityName(node.typeName, getGeneratedNameForNode); - } - else if (typeHasCallOrConstructSignatures(type)) { - return "Function"; - } - - return "Object"; - } - - /** Serializes a TypeNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ - function serializeTypeNode(node: TypeNode | LiteralExpression, getGeneratedNameForNode: (Node: Node) => string): string | string[] { - // serialization of a TypeNode uses the following rules: - // - // * The serialized type of `void` is "void 0" (undefined). - // * The serialized type of a parenthesized type is the serialized type of its nested type. - // * The serialized type of a Function or Constructor type is "Function". - // * The serialized type of an Array or Tuple type is "Array". - // * The serialized type of `boolean` is "Boolean". - // * The serialized type of `string` or a string-literal type is "String". - // * The serialized type of a type reference is handled by `serializeTypeReferenceNode`. - // * The serialized type of any other type node is "Object". - if (node) { - switch (node.kind) { - case SyntaxKind.VoidKeyword: - return "void 0"; - case SyntaxKind.ParenthesizedType: - return serializeTypeNode((node).type, getGeneratedNameForNode); - case SyntaxKind.FunctionType: - case SyntaxKind.ConstructorType: - return "Function"; - case SyntaxKind.ArrayType: - case SyntaxKind.TupleType: - return "Array"; - case SyntaxKind.BooleanKeyword: - return "Boolean"; - case SyntaxKind.StringKeyword: - case SyntaxKind.StringLiteral: - return "String"; - case SyntaxKind.NumberKeyword: - return "Number"; - case SyntaxKind.TypeReference: - return serializeTypeReferenceNode(node, getGeneratedNameForNode); - case SyntaxKind.TypeQuery: - case SyntaxKind.TypeLiteral: - case SyntaxKind.UnionType: - case SyntaxKind.AnyKeyword: - default: - break; - } - } - - return "Object"; - } - - /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the `@type` and `@paramtypes` decorators. */ - function serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { - // serialization of the type of a declaration uses the following rules: - // - // * The serialized type of a ClassDeclaration is the class name (see serializeEntityName). - // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. - // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. - // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. - // * The serialized type of any other FunctionLikeDeclaration is "Function". - // * The serialized type of any other node is "void 0". - // - // For rules on serializing type annotations, see `serializeTypeNode`. - switch (node.kind) { - case SyntaxKind.ClassDeclaration: return "Function"; - case SyntaxKind.PropertyDeclaration: return serializeTypeNode((node).type, getGeneratedNameForNode); - case SyntaxKind.Parameter: return serializeTypeNode((node).type, getGeneratedNameForNode); - case SyntaxKind.GetAccessor: return serializeTypeNode((node).type, getGeneratedNameForNode); - case SyntaxKind.SetAccessor: return serializeTypeNode(getSetAccessorTypeAnnotationNode(node), getGeneratedNameForNode); - } - if (isFunctionLike(node)) { - return "Function"; - } - return "void 0"; - } - - /** Serializes the parameter types of a function or the constructor of a class. Used by the `@paramtypes` decorator. */ - function serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[] { - // serialization of parameter types uses the following rules: - // - // * If the declaration is a class, the parameters of the first constructor with a body are used. - // * If the declaration is function-like and has a body, the parameters of the function are used. - // - // For the rules on serializing the type of each parameter declaration, see `serializeTypeOfDeclaration`. - if (node) { - var valueDeclaration: FunctionLikeDeclaration; - if (node.kind === SyntaxKind.ClassDeclaration) { - valueDeclaration = getFirstConstructorWithBody(node); - } - else if (isFunctionLike(node) && nodeIsPresent((node).body)) { - valueDeclaration = node; - } - if (valueDeclaration) { - var result: (string | string[])[]; - var parameters = valueDeclaration.parameters; - var parameterCount = parameters.length; - if (parameterCount > 0) { - result = new Array(parameterCount); - for (var i = 0; i < parameterCount; i++) { - if (parameters[i].dotDotDotToken) { - var parameterType = parameters[i].type; - if (parameterType.kind === SyntaxKind.ArrayType) { - parameterType = (parameterType).elementType; - } - else if (parameterType.kind === SyntaxKind.TypeReference && (parameterType).typeArguments && (parameterType).typeArguments.length === 1) { - parameterType = (parameterType).typeArguments[0]; - } - else { - parameterType = undefined; - } - result[i] = serializeTypeNode(parameterType, getGeneratedNameForNode); - } - else { - result[i] = serializeTypeOfNode(parameters[i], getGeneratedNameForNode); - } - } - return result; - } - } - } - return emptyArray; - } - - /** Serializes the return type of function. Used by the `@returntype` decorator. */ - function serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { - if (node && isFunctionLike(node)) { - return serializeTypeNode((node).type, getGeneratedNameForNode); - } - return "void 0"; - } - function writeTypeOfDeclaration(declaration: AccessorDeclaration | VariableLikeDeclaration, enclosingDeclaration: Node, flags: TypeFormatFlags, writer: SymbolWriter) { // Get type of the symbol if this is the valid symbol otherwise get type at location let symbol = getSymbolOfNode(declaration); From 5c440384ba3438dee399ca7ddbb61af27f7f64d4 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Wed, 1 Apr 2015 17:58:28 -0700 Subject: [PATCH 11/16] Added __param helper for parameter decorators and cleaned up __decorate and __metadata --- src/compiler/checker.ts | 9 + src/compiler/commandLineParser.ts | 5 + src/compiler/emitter.ts | 457 +++---- src/compiler/types.ts | 2 + src/compiler/utilities.ts | 12 + .../baselines/reference/APISample_compile.js | 2 + .../reference/APISample_compile.types | 6 + tests/baselines/reference/APISample_linter.js | 2 + .../reference/APISample_linter.types | 6 + .../reference/APISample_transform.js | 2 + .../reference/APISample_transform.types | 6 + .../baselines/reference/APISample_watcher.js | 2 + .../reference/APISample_watcher.types | 6 + .../baselines/reference/decoratorOnClass1.js | 21 +- .../baselines/reference/decoratorOnClass2.js | 21 +- .../baselines/reference/decoratorOnClass3.js | 21 +- .../baselines/reference/decoratorOnClass4.js | 21 +- .../baselines/reference/decoratorOnClass5.js | 21 +- .../baselines/reference/decoratorOnClass8.js | 21 +- .../reference/decoratorOnClassAccessor1.js | 22 +- .../reference/decoratorOnClassAccessor2.js | 22 +- .../reference/decoratorOnClassAccessor4.js | 22 +- .../reference/decoratorOnClassAccessor5.js | 22 +- .../decoratorOnClassConstructorParameter1.js | 22 +- .../decoratorOnClassConstructorParameter4.js | 22 +- .../reference/decoratorOnClassMethod1.js | 22 +- .../reference/decoratorOnClassMethod10.js | 22 +- .../reference/decoratorOnClassMethod2.js | 22 +- .../reference/decoratorOnClassMethod4.js | 22 +- .../reference/decoratorOnClassMethod5.js | 22 +- .../reference/decoratorOnClassMethod6.js | 22 +- .../reference/decoratorOnClassMethod7.js | 22 +- .../reference/decoratorOnClassMethod8.js | 22 +- .../decoratorOnClassMethodParameter1.js | 23 +- .../reference/decoratorOnClassProperty1.js | 21 +- .../reference/decoratorOnClassProperty10.js | 21 +- .../reference/decoratorOnClassProperty11.js | 21 +- .../reference/decoratorOnClassProperty2.js | 21 +- .../reference/decoratorOnClassProperty6.js | 21 +- .../reference/decoratorOnClassProperty7.js | 21 +- .../sourceMapValidationDecorators.js | 60 +- .../sourceMapValidationDecorators.js.map | 2 +- ...ourceMapValidationDecorators.sourcemap.txt | 1070 +++++++++-------- 43 files changed, 1150 insertions(+), 1082 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 154eee2ef3..35d50c213b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -126,6 +126,7 @@ module ts { let stringLiteralTypes: Map = {}; let emitExtends = false; let emitDecorate = false; + let emitParam = false; let mergedSymbols: Symbol[] = []; let symbolLinks: SymbolLinks[] = []; @@ -8810,6 +8811,10 @@ module ts { } emitDecorate = true; + if (node.kind === SyntaxKind.Parameter) { + emitParam = true; + } + forEach(node.decorators, checkDecorator); } @@ -10823,6 +10828,10 @@ module ts { links.flags |= NodeCheckFlags.EmitDecorate; } + if (emitParam) { + links.flags |= NodeCheckFlags.EmitParam; + } + links.flags |= NodeCheckFlags.TypeChecked; } } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 2f3b15f377..48817798d8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -156,6 +156,11 @@ module ts { shortName: "w", type: "boolean", description: Diagnostics.Watch_input_files, + }, + { + name: "emitDecoratorMetadata", + type: "boolean", + experimental: true } ]; diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 1e234123e6..c50d745949 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -23,6 +23,33 @@ module ts { // @internal // targetSourceFile is when users only want one file in entire project to be emitted. This is used in compileOnSave feature export function emitFiles(resolver: EmitResolver, host: EmitHost, targetSourceFile: SourceFile): EmitResult { + // emit output for the __extends helper function + const extendsHelper = ` +var __extends = this.__extends || function (d, b) { + for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; + function __() { this.constructor = d; } + __.prototype = b.prototype; + d.prototype = new __(); +};`; + + // emit output for the __decorate helper function + const decorateHelper = ` +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); + } +};`; + + // emit output for the __metadata helper function + const metadataHelper = ` +var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { };`; + + // emit output for the __param helper function + const paramHelper = ` +var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } };`; + let compilerOptions = host.getCompilerOptions(); let languageVersion = compilerOptions.target || ScriptTarget.ES3; let sourceMapDataList: SourceMapData[] = compilerOptions.sourceMap ? [] : undefined; @@ -98,6 +125,7 @@ module ts { let extendsEmitted = false; let decorateEmitted = false; + let paramEmitted = false; let tempFlags = 0; let tempVariables: Identifier[]; let tempParameters: Identifier[]; @@ -3697,12 +3725,12 @@ module ts { } function emitDecoratorsOfConstructor(node: ClassLikeDeclaration) { + let decorators = node.decorators; let constructor = getFirstConstructorWithBody(node); - if (constructor) { - emitDecoratorsOfParameters(node, constructor); - } + let hasDecoratedParameters = constructor && forEach(constructor.parameters, nodeIsDecorated); - if (!nodeIsDecorated(node)) { + // skip decoration of the constructor if neither it nor its parameters are decorated + if (!decorators && !hasDecoratedParameters) { return; } @@ -3720,8 +3748,18 @@ module ts { writeLine(); emitStart(node); emitDeclarationName(node); - write(" = "); - emitDecorateStart(node); + write(" = __decorate(["); + increaseIndent(); + writeLine(); + + let writeComma = false; + writeComma = emitDecoratorArray(decorators, writeComma); + writeComma = emitDecoratorsOfParameters(constructor, writeComma); + emitSerializedTypeMetadata(node, writeComma); + + decreaseIndent(); + writeLine(); + write("], "); emitDeclarationName(node); write(");"); emitEnd(node); @@ -3729,72 +3767,80 @@ module ts { } function emitDecoratorsOfMembers(node: ClassLikeDeclaration, staticFlag: NodeFlags) { - forEach(node.members, member => { + for (let member of node.members) { + // only emit members in the correct group if ((member.flags & NodeFlags.Static) !== staticFlag) { - return; + continue; } + // skip members that cannot be decorated (such as the constructor) + if (!nodeCanBeDecorated(member)) { + continue; + } + + // skip a member if it or any of its parameters are not decorated + if (!nodeOrChildIsDecorated(member)) { + continue; + } + + // skip an accessor declaration if it is not the first accessor let decorators: NodeArray; - switch (member.kind) { - case SyntaxKind.MethodDeclaration: - // emit decorators of the method's parameters - emitDecoratorsOfParameters(node, member); - decorators = member.decorators; - break; + let functionLikeMember: FunctionLikeDeclaration; + if (isAccessor(member)) { + let accessors = getAllAccessorDeclarations(node.members, member); + if (member !== accessors.firstAccessor) { + continue; + } - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - let accessors = getAllAccessorDeclarations(node.members, member); - if (member !== accessors.firstAccessor) { - // skip the second accessor as we processed it with the first. - return; - } + // get the decorators from the first accessor with decorators + decorators = accessors.firstAccessor.decorators; + if (!decorators && accessors.secondAccessor) { + decorators = accessors.secondAccessor.decorators; + } - if (accessors.setAccessor) { - // emit decorators of the set accessor parameter - emitDecoratorsOfParameters(node, accessors.setAccessor); - } - - // get the decorators from the first decorated accessor. - decorators = accessors.firstAccessor.decorators; - if (!decorators && accessors.secondAccessor) { - decorators = accessors.secondAccessor.decorators; - } - break; - - case SyntaxKind.PropertyDeclaration: - decorators = member.decorators; - break; - - default: - // Constructor cannot be decorated, and its parameters are handled in emitDecoratorsOfConstructor - // Other members (i.e. IndexSignature) cannot be decorated. - return; + // we only decorate parameters of the set accessor + functionLikeMember = accessors.setAccessor; } + else { + decorators = member.decorators; - if (!decorators) { - return; + // we only decorate the parameters here if this is a method + if (member.kind === SyntaxKind.MethodDeclaration) { + functionLikeMember = member; + } } // Emit the call to __decorate. Given the following: // // class C { - // @dec method() {} + // @dec method(@dec2 x) {} // @dec get accessor() {} // @dec prop; // } // // The emit for a method is: // - // Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + // Object.defineProperty(C.prototype, "method", + // __decorate([ + // dec, + // __param(0, dec2), + // __metadata("design:type", Function), + // __metadata("design:paramtypes", [Object]), + // __metadata("design:returntype", void 0) + // ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); // // The emit for an accessor is: // - // Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + // Object.defineProperty(C.prototype, "accessor", + // __decorate([ + // dec + // ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); // // The emit for a property is: // - // __decorate([dec], C.prototype, "prop"); + // __decorate([ + // dec + // ], C.prototype, "prop"); // writeLine(); @@ -3806,10 +3852,23 @@ module ts { write(", "); emitExpressionForPropertyName(member.name); emitEnd(member.name); - write(", "); + write(","); + increaseIndent(); + writeLine(); } - emitDecorateStart(member); + write("__decorate(["); + increaseIndent(); + writeLine(); + + let writeComma = false; + writeComma = emitDecoratorArray(decorators, writeComma); + writeComma = emitDecoratorsOfParameters(functionLikeMember, writeComma); + emitSerializedTypeMetadata(member, writeComma); + + decreaseIndent(); + writeLine(); + write("], "); emitStart(member.name); emitClassMemberPrefix(node, member); write(", "); @@ -3824,80 +3883,135 @@ module ts { emitExpressionForPropertyName(member.name); emitEnd(member.name); write("))"); + decreaseIndent(); } write(");"); emitEnd(member); writeLine(); - }); - } - - function emitDecoratorsOfParameters(node: ClassLikeDeclaration, member: FunctionLikeDeclaration) { - forEach(member.parameters, (parameter, parameterIndex) => { - if (!nodeIsDecorated(parameter)) { - return; - } - - // Emit the decorators for a parameter. Given the following: - // - // class C { - // constructor(@dec p) { } - // method(@dec p) { } - // set accessor(@dec value) { } - // } - // - // The emit for a constructor is: - // - // __decorate([dec], C, void 0, 0); - // - // The emit for a parameter is: - // - // __decorate([dec], C.prototype, "method", 0); - // - // The emit for an accessor is: - // - // __decorate([dec], C.prototype, "accessor", 0); - // - - writeLine(); - emitStart(parameter); - emitDecorateStart(parameter); - emitStart(parameter.name); - - if (member.kind === SyntaxKind.Constructor) { - emitDeclarationName(node); - write(", void 0"); - } - else { - emitClassMemberPrefix(node, member); - write(", "); - emitExpressionForPropertyName(member.name); - } - - write(", "); - write(String(parameterIndex)); - emitEnd(parameter.name); - write(");"); - emitEnd(parameter); - writeLine(); - }); - } - - function emitDecorateStart(node: Declaration): void { - write("__decorate(["); - let decorators = node.decorators; - let decoratorCount = decorators.length; - for (let i = 0; i < decoratorCount; i++) { - if (i > 0) { - write(", "); - } - let decorator = decorators[i]; - emitStart(decorator); - emit(decorator.expression); - emitEnd(decorator); } - emitSerializedTypeMetadata(node); - write("], "); + } + + function emitDecoratorsOfParameters(node: FunctionLikeDeclaration, writeComma: boolean): boolean { + if (node) { + let parameterIndex = 0; + for (let parameter of node.parameters) { + if (nodeIsDecorated(parameter)) { + writeComma = emitDecoratorArray(parameter.decorators, writeComma, `__param(${parameterIndex}, `, ")"); + } + ++parameterIndex; + } + } + return writeComma; + } + + function emitDecoratorArray(decorators: NodeArray, writeComma: boolean, prefix?: string, postfix?: string): boolean { + if (decorators) { + let decoratorCount = decorators ? decorators.length : 0; + for (let i = 0; i < decoratorCount; i++) { + if (writeComma) { + write(","); + } + writeLine(); + + let decorator = decorators[i]; + emitStart(decorator); + write(prefix); + emit(decorator.expression); + write(postfix); + emitEnd(decorator); + writeComma = true; + } + } + return writeComma; + } + + function shouldEmitTypeMetadata(node: Declaration): boolean { + if (!compilerOptions.emitDecoratorMetadata) { + return false; + } + + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + case SyntaxKind.PropertyDeclaration: + return true; + } + + return false; + } + + function shouldEmitReturnTypeMetadata(node: Declaration): boolean { + if (!compilerOptions.emitDecoratorMetadata) { + return false; + } + + switch (node.kind) { + case SyntaxKind.MethodDeclaration: + return true; + } + return false; + } + + function shouldEmitParamTypesMetadata(node: Declaration): boolean { + if (!compilerOptions.emitDecoratorMetadata) { + return false; + } + + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + case SyntaxKind.MethodDeclaration: + case SyntaxKind.SetAccessor: + return true; + } + return false; + } + + function emitSerializedTypeMetadata(node: Declaration, writeComma: boolean): void { + if (shouldEmitTypeMetadata(node)) { + var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + if (writeComma) { + write(", "); + } + writeLine(); + write("__metadata('design:type', "); + emitSerializedType(node, serializedType); + write(")"); + writeComma = true; + } + } + if (shouldEmitParamTypesMetadata(node)) { + var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); + if (serializedTypes) { + if (writeComma) { + write(", "); + } + writeLine(); + write("__metadata('design:paramtypes', ["); + for (var i = 0; i < serializedTypes.length; ++i) { + if (i > 0) { + write(", "); + } + emitSerializedType(node, serializedTypes[i]); + } + write("])"); + writeComma = true; + } + } + if (shouldEmitReturnTypeMetadata(node)) { + var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + if (writeComma) { + write(", "); + } + writeLine(); + write("__metadata('design:returntype', "); + emitSerializedType(node, serializedType); + write(")"); + } + } } function serializeTypeNameSegment(location: Node, path: string[], index: number): string { @@ -3912,77 +4026,17 @@ module ts { } } - function shouldEmitTypeMetadata(node: Declaration): boolean { - switch (node.kind) { - case SyntaxKind.MethodDeclaration: - case SyntaxKind.GetAccessor: - case SyntaxKind.SetAccessor: - case SyntaxKind.PropertyDeclaration: - return true; - } - return false; - } - - function shouldEmitReturnTypeMetadata(node: Declaration): boolean { - switch (node.kind) { - case SyntaxKind.MethodDeclaration: - return true; - } - return false; - } - - function shouldEmitParamTypesMetadata(node: Declaration): boolean { - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - case SyntaxKind.MethodDeclaration: - case SyntaxKind.SetAccessor: - return true; - } - return false; - } - - function emitSerializedTypeMetadata(node: Declaration): void { - if (shouldEmitTypeMetadata(node)) { - var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); - if (serializedType) { - write(", __metadata('design:type', "); - emitSerializedType(node, serializedType); - write(")"); - } - } - if (shouldEmitParamTypesMetadata(node)) { - var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); - if (serializedTypes) { - write(", __metadata('design:paramtypes', ["); - for (var i = 0; i < serializedTypes.length; ++i) { - if (i > 0) { - write(", "); - } - emitSerializedType(node, serializedTypes[i]); - } - write("])"); - } - } - if (shouldEmitReturnTypeMetadata(node)) { - var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); - if (serializedType) { - write(", __metadata('design:returntype', "); - emitSerializedType(node, serializedType); - write(")"); - } - } - } - function emitSerializedType(location: Node, name: string | string[]): void { if (typeof name === "string") { write(name); return; } else { - Debug.assert(name.length > 0, "Invalid type name path for serialization"); + Debug.assert(name.length > 0, "Invalid serialized type name"); write(`(${serializeTypeNameSegment(location, name, name.length - 1) }) || Object`); } } + function emitInterfaceDeclaration(node: InterfaceDeclaration) { emitOnlyPinnedOrTripleSlashComments(node); } @@ -4613,7 +4667,7 @@ module ts { return statements.length; } - function writeHelper(text: string): void { + function writeLines(text: string): void { let lines = text.split(/\r\n|\r|\n/g); for (let i = 0; i < lines.length; ++i) { let line = lines[i]; @@ -4632,42 +4686,25 @@ module ts { // emit prologue directives prior to __extends var startIndex = emitDirectivePrologues(node.statements, /*startWithNewLine*/ false); // Only Emit __extends function when target ES5. - // For target ES6 and above, we can emit classDeclaration as if. + // For target ES6 and above, we can emit classDeclaration as is. if ((languageVersion < ScriptTarget.ES6) && (!extendsEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitExtends)) { - writeLine(); - write("var __extends = this.__extends || function (d, b) {"); - increaseIndent(); - writeLine(); - write("for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];"); - writeLine(); - write("function __() { this.constructor = d; }"); - writeLine(); - write("__.prototype = b.prototype;"); - writeLine(); - write("d.prototype = new __();"); - decreaseIndent(); - writeLine(); - write("};"); + writeLines(extendsHelper); extendsEmitted = true; } + if (!decorateEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitDecorate) { - writeHelper(` -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } - } - return value; -}; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } };`); + writeLines(decorateHelper); + if (compilerOptions.emitDecoratorMetadata) { + writeLines(metadataHelper); + } decorateEmitted = true; } + + if (!paramEmitted && resolver.getNodeCheckFlags(node) & NodeCheckFlags.EmitParam) { + writeLines(paramHelper); + paramEmitted = true; + } + if (isExternalModule(node)) { if (languageVersion >= ScriptTarget.ES6) { emitES6Module(node, startIndex); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 5e206a05e0..3337ea45b8 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -1383,6 +1383,7 @@ module ts { EnumValuesComputed = 0x00000080, BlockScopedBindingInLoop = 0x00000100, EmitDecorate = 0x00000200, // Emit __decorate + EmitParam = 0x00000400, // Emit __param helper for decorators } export interface NodeLinks { @@ -1608,6 +1609,7 @@ module ts { version?: boolean; watch?: boolean; separateCompilation?: boolean; + emitDecoratorMetadata?: boolean; /* @internal */ stripInternal?: boolean; [option: string]: string | number | boolean; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 1deb9ce97e..e3efd12de0 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -449,6 +449,18 @@ module ts { return false; } + export function isAccessor(node: Node): boolean { + if (node) { + switch (node.kind) { + case SyntaxKind.GetAccessor: + case SyntaxKind.SetAccessor: + return true; + } + } + + return false; + } + export function isFunctionLike(node: Node): boolean { if (node) { switch (node.kind) { diff --git a/tests/baselines/reference/APISample_compile.js b/tests/baselines/reference/APISample_compile.js index 7fb5427c42..3486dfc129 100644 --- a/tests/baselines/reference/APISample_compile.js +++ b/tests/baselines/reference/APISample_compile.js @@ -1087,6 +1087,7 @@ declare module "typescript" { EnumValuesComputed = 128, BlockScopedBindingInLoop = 256, EmitDecorate = 512, + EmitParam = 1024, } interface NodeLinks { resolvedType?: Type; @@ -1259,6 +1260,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; separateCompilation?: boolean; + emitDecoratorMetadata?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { diff --git a/tests/baselines/reference/APISample_compile.types b/tests/baselines/reference/APISample_compile.types index 5ceacea486..e58e358451 100644 --- a/tests/baselines/reference/APISample_compile.types +++ b/tests/baselines/reference/APISample_compile.types @@ -3529,6 +3529,9 @@ declare module "typescript" { EmitDecorate = 512, >EmitDecorate : NodeCheckFlags + + EmitParam = 1024, +>EmitParam : NodeCheckFlags } interface NodeLinks { >NodeLinks : NodeLinks @@ -4044,6 +4047,9 @@ declare module "typescript" { separateCompilation?: boolean; >separateCompilation : boolean + emitDecoratorMetadata?: boolean; +>emitDecoratorMetadata : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_linter.js b/tests/baselines/reference/APISample_linter.js index 86d526e79b..5b6eb70e21 100644 --- a/tests/baselines/reference/APISample_linter.js +++ b/tests/baselines/reference/APISample_linter.js @@ -1118,6 +1118,7 @@ declare module "typescript" { EnumValuesComputed = 128, BlockScopedBindingInLoop = 256, EmitDecorate = 512, + EmitParam = 1024, } interface NodeLinks { resolvedType?: Type; @@ -1290,6 +1291,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; separateCompilation?: boolean; + emitDecoratorMetadata?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { diff --git a/tests/baselines/reference/APISample_linter.types b/tests/baselines/reference/APISample_linter.types index 38ae459eac..57955508c8 100644 --- a/tests/baselines/reference/APISample_linter.types +++ b/tests/baselines/reference/APISample_linter.types @@ -3675,6 +3675,9 @@ declare module "typescript" { EmitDecorate = 512, >EmitDecorate : NodeCheckFlags + + EmitParam = 1024, +>EmitParam : NodeCheckFlags } interface NodeLinks { >NodeLinks : NodeLinks @@ -4190,6 +4193,9 @@ declare module "typescript" { separateCompilation?: boolean; >separateCompilation : boolean + emitDecoratorMetadata?: boolean; +>emitDecoratorMetadata : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_transform.js b/tests/baselines/reference/APISample_transform.js index 19ddebee0b..7ee34063cd 100644 --- a/tests/baselines/reference/APISample_transform.js +++ b/tests/baselines/reference/APISample_transform.js @@ -1119,6 +1119,7 @@ declare module "typescript" { EnumValuesComputed = 128, BlockScopedBindingInLoop = 256, EmitDecorate = 512, + EmitParam = 1024, } interface NodeLinks { resolvedType?: Type; @@ -1291,6 +1292,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; separateCompilation?: boolean; + emitDecoratorMetadata?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { diff --git a/tests/baselines/reference/APISample_transform.types b/tests/baselines/reference/APISample_transform.types index 3cc1f47814..9bc9f38a99 100644 --- a/tests/baselines/reference/APISample_transform.types +++ b/tests/baselines/reference/APISample_transform.types @@ -3625,6 +3625,9 @@ declare module "typescript" { EmitDecorate = 512, >EmitDecorate : NodeCheckFlags + + EmitParam = 1024, +>EmitParam : NodeCheckFlags } interface NodeLinks { >NodeLinks : NodeLinks @@ -4140,6 +4143,9 @@ declare module "typescript" { separateCompilation?: boolean; >separateCompilation : boolean + emitDecoratorMetadata?: boolean; +>emitDecoratorMetadata : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/APISample_watcher.js b/tests/baselines/reference/APISample_watcher.js index c2c5b78f84..cd4cea9726 100644 --- a/tests/baselines/reference/APISample_watcher.js +++ b/tests/baselines/reference/APISample_watcher.js @@ -1156,6 +1156,7 @@ declare module "typescript" { EnumValuesComputed = 128, BlockScopedBindingInLoop = 256, EmitDecorate = 512, + EmitParam = 1024, } interface NodeLinks { resolvedType?: Type; @@ -1328,6 +1329,7 @@ declare module "typescript" { version?: boolean; watch?: boolean; separateCompilation?: boolean; + emitDecoratorMetadata?: boolean; [option: string]: string | number | boolean; } const enum ModuleKind { diff --git a/tests/baselines/reference/APISample_watcher.types b/tests/baselines/reference/APISample_watcher.types index 1072b719e5..2b2f8d83f5 100644 --- a/tests/baselines/reference/APISample_watcher.types +++ b/tests/baselines/reference/APISample_watcher.types @@ -3798,6 +3798,9 @@ declare module "typescript" { EmitDecorate = 512, >EmitDecorate : NodeCheckFlags + + EmitParam = 1024, +>EmitParam : NodeCheckFlags } interface NodeLinks { >NodeLinks : NodeLinks @@ -4313,6 +4316,9 @@ declare module "typescript" { separateCompilation?: boolean; >separateCompilation : boolean + emitDecoratorMetadata?: boolean; +>emitDecoratorMetadata : boolean + [option: string]: string | number | boolean; >option : string } diff --git a/tests/baselines/reference/decoratorOnClass1.js b/tests/baselines/reference/decoratorOnClass1.js index eff31559ba..cd5c51e7a9 100644 --- a/tests/baselines/reference/decoratorOnClass1.js +++ b/tests/baselines/reference/decoratorOnClass1.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClass1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec, __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass2.js b/tests/baselines/reference/decoratorOnClass2.js index b90db23abf..fbd9a106dd 100644 --- a/tests/baselines/reference/decoratorOnClass2.js +++ b/tests/baselines/reference/decoratorOnClass2.js @@ -6,24 +6,19 @@ export class C { } //// [decoratorOnClass2.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec, __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec + ], C); return C; })(); exports.C = C; diff --git a/tests/baselines/reference/decoratorOnClass3.js b/tests/baselines/reference/decoratorOnClass3.js index 990adc775e..2153602809 100644 --- a/tests/baselines/reference/decoratorOnClass3.js +++ b/tests/baselines/reference/decoratorOnClass3.js @@ -7,23 +7,18 @@ class C { } //// [decoratorOnClass3.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec, __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass4.js b/tests/baselines/reference/decoratorOnClass4.js index 89afb51bf7..5099d16b5b 100644 --- a/tests/baselines/reference/decoratorOnClass4.js +++ b/tests/baselines/reference/decoratorOnClass4.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClass4.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec(), __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec() + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass5.js b/tests/baselines/reference/decoratorOnClass5.js index 264397450a..0555f618e7 100644 --- a/tests/baselines/reference/decoratorOnClass5.js +++ b/tests/baselines/reference/decoratorOnClass5.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClass5.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec(), __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec() + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClass8.js b/tests/baselines/reference/decoratorOnClass8.js index 87334f216a..fad73c0c8f 100644 --- a/tests/baselines/reference/decoratorOnClass8.js +++ b/tests/baselines/reference/decoratorOnClass8.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClass8.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - C = __decorate([dec(), __metadata('design:paramtypes', [])], C); + C = __decorate([ + dec() + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor1.js b/tests/baselines/reference/decoratorOnClassAccessor1.js index 102dc2d1b2..68fa7ccec0 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor1.js +++ b/tests/baselines/reference/decoratorOnClassAccessor1.js @@ -6,20 +6,13 @@ class C { } //// [decoratorOnClassAccessor1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -28,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor2.js b/tests/baselines/reference/decoratorOnClassAccessor2.js index 400fd67c9f..17d3e2e422 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor2.js +++ b/tests/baselines/reference/decoratorOnClassAccessor2.js @@ -6,20 +6,13 @@ class C { } //// [decoratorOnClassAccessor2.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -28,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Object)], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor4.js b/tests/baselines/reference/decoratorOnClassAccessor4.js index 7564913f9a..77bcb568fe 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor4.js +++ b/tests/baselines/reference/decoratorOnClassAccessor4.js @@ -6,20 +6,13 @@ class C { } //// [decoratorOnClassAccessor4.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -28,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor5.js b/tests/baselines/reference/decoratorOnClassAccessor5.js index ffb88034d9..37fc33abef 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor5.js +++ b/tests/baselines/reference/decoratorOnClassAccessor5.js @@ -6,20 +6,13 @@ class C { } //// [decoratorOnClassAccessor5.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } @@ -28,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec, __metadata('design:type', Number), __metadata('design:paramtypes', [Number])], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js index 4f32240a4f..a1748a725b 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter1.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter1.js @@ -6,23 +6,19 @@ class C { } //// [decoratorOnClassConstructorParameter1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; +var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } }; var C = (function () { function C(p) { } - __decorate([dec, __metadata('design:type', Number)], C, void 0, 0); + C = __decorate([ + __param(0, dec) + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js index a9e5f2b9d6..9d2b4a690a 100644 --- a/tests/baselines/reference/decoratorOnClassConstructorParameter4.js +++ b/tests/baselines/reference/decoratorOnClassConstructorParameter4.js @@ -6,23 +6,19 @@ class C { } //// [decoratorOnClassConstructorParameter4.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; +var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } }; var C = (function () { function C(public, p) { } - __decorate([dec, __metadata('design:type', Number)], C, void 0, 1); + C = __decorate([ + __param(1, dec) + ], C); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod1.js b/tests/baselines/reference/decoratorOnClassMethod1.js index a1e61fafea..23be109430 100644 --- a/tests/baselines/reference/decoratorOnClassMethod1.js +++ b/tests/baselines/reference/decoratorOnClassMethod1.js @@ -6,24 +6,20 @@ class C { } //// [decoratorOnClassMethod1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", + __decorate([ + dec + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod10.js b/tests/baselines/reference/decoratorOnClassMethod10.js index 8fb57de0bf..f87e313777 100644 --- a/tests/baselines/reference/decoratorOnClassMethod10.js +++ b/tests/baselines/reference/decoratorOnClassMethod10.js @@ -6,24 +6,20 @@ class C { } //// [decoratorOnClassMethod10.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", + __decorate([ + dec + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod2.js b/tests/baselines/reference/decoratorOnClassMethod2.js index 469fb23ebf..33a22f419d 100644 --- a/tests/baselines/reference/decoratorOnClassMethod2.js +++ b/tests/baselines/reference/decoratorOnClassMethod2.js @@ -6,24 +6,20 @@ class C { } //// [decoratorOnClassMethod2.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", + __decorate([ + dec + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod4.js b/tests/baselines/reference/decoratorOnClassMethod4.js index 271a4c9dfe..038432f2cf 100644 --- a/tests/baselines/reference/decoratorOnClassMethod4.js +++ b/tests/baselines/reference/decoratorOnClassMethod4.js @@ -6,22 +6,18 @@ class C { } //// [decoratorOnClassMethod4.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, + __decorate([ + dec + ], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod5.js b/tests/baselines/reference/decoratorOnClassMethod5.js index ff79324755..460c11f145 100644 --- a/tests/baselines/reference/decoratorOnClassMethod5.js +++ b/tests/baselines/reference/decoratorOnClassMethod5.js @@ -6,22 +6,18 @@ class C { } //// [decoratorOnClassMethod5.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec(), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, + __decorate([ + dec() + ], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod6.js b/tests/baselines/reference/decoratorOnClassMethod6.js index c55bfeef42..9f12059918 100644 --- a/tests/baselines/reference/decoratorOnClassMethod6.js +++ b/tests/baselines/reference/decoratorOnClassMethod6.js @@ -6,22 +6,18 @@ class C { } //// [decoratorOnClassMethod6.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, + __decorate([ + dec + ], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod7.js b/tests/baselines/reference/decoratorOnClassMethod7.js index 76df57ecb0..6ab01e68bb 100644 --- a/tests/baselines/reference/decoratorOnClassMethod7.js +++ b/tests/baselines/reference/decoratorOnClassMethod7.js @@ -6,22 +6,18 @@ class C { } //// [decoratorOnClassMethod7.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; class C { [_a = "method"]() { } } -Object.defineProperty(C.prototype, _a, __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); +Object.defineProperty(C.prototype, _a, + __decorate([ + dec + ], C.prototype, _a, Object.getOwnPropertyDescriptor(C.prototype, _a))); var _a; diff --git a/tests/baselines/reference/decoratorOnClassMethod8.js b/tests/baselines/reference/decoratorOnClassMethod8.js index c9bd395fcb..3e88f8c279 100644 --- a/tests/baselines/reference/decoratorOnClassMethod8.js +++ b/tests/baselines/reference/decoratorOnClassMethod8.js @@ -6,24 +6,20 @@ class C { } //// [decoratorOnClassMethod8.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec, __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", + __decorate([ + dec + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethodParameter1.js b/tests/baselines/reference/decoratorOnClassMethodParameter1.js index c8907ce883..d228ed9302 100644 --- a/tests/baselines/reference/decoratorOnClassMethodParameter1.js +++ b/tests/baselines/reference/decoratorOnClassMethodParameter1.js @@ -6,24 +6,21 @@ class C { } //// [decoratorOnClassMethodParameter1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; +var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } }; var C = (function () { function C() { } C.prototype.method = function (p) { }; - __decorate([dec, __metadata('design:type', Number)], C.prototype, "method", 0); + Object.defineProperty(C.prototype, "method", + __decorate([ + __param(0, dec) + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty1.js b/tests/baselines/reference/decoratorOnClassProperty1.js index c8c8132f7a..aa38252b99 100644 --- a/tests/baselines/reference/decoratorOnClassProperty1.js +++ b/tests/baselines/reference/decoratorOnClassProperty1.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty10.js b/tests/baselines/reference/decoratorOnClassProperty10.js index d53f0a2d5d..bccbc0bb73 100644 --- a/tests/baselines/reference/decoratorOnClassProperty10.js +++ b/tests/baselines/reference/decoratorOnClassProperty10.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty10.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec(), __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec() + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty11.js b/tests/baselines/reference/decoratorOnClassProperty11.js index 8d31376b00..f31e40d3c4 100644 --- a/tests/baselines/reference/decoratorOnClassProperty11.js +++ b/tests/baselines/reference/decoratorOnClassProperty11.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty11.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty2.js b/tests/baselines/reference/decoratorOnClassProperty2.js index 78c53b3eb3..477320b40f 100644 --- a/tests/baselines/reference/decoratorOnClassProperty2.js +++ b/tests/baselines/reference/decoratorOnClassProperty2.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty2.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty6.js b/tests/baselines/reference/decoratorOnClassProperty6.js index d1751ca315..46e2d5fc06 100644 --- a/tests/baselines/reference/decoratorOnClassProperty6.js +++ b/tests/baselines/reference/decoratorOnClassProperty6.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty6.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty7.js b/tests/baselines/reference/decoratorOnClassProperty7.js index bc381ec5cf..14ca0612cb 100644 --- a/tests/baselines/reference/decoratorOnClassProperty7.js +++ b/tests/baselines/reference/decoratorOnClassProperty7.js @@ -6,23 +6,18 @@ class C { } //// [decoratorOnClassProperty7.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; var C = (function () { function C() { } - __decorate([dec, __metadata('design:type', Object)], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })(); diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js b/tests/baselines/reference/sourceMapValidationDecorators.js index eae494a440..5577a6967c 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js +++ b/tests/baselines/reference/sourceMapValidationDecorators.js @@ -55,20 +55,14 @@ class Greeter { } //// [sourceMapValidationDecorators.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; -var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; +var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } }; var Greeter = (function () { function Greeter(greeting) { var b = []; @@ -94,15 +88,39 @@ var Greeter = (function () { configurable: true }); Greeter.x1 = 10; - Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); - __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); - __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); - __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); - Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); - __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); - __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); - __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); - Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); + Object.defineProperty(Greeter.prototype, "greet", + __decorate([ + PropertyDecorator1, + PropertyDecorator2(40) + ], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); + __decorate([ + PropertyDecorator1, + PropertyDecorator2(50) + ], Greeter.prototype, "x"); + Object.defineProperty(Greeter.prototype, "fn", + __decorate([ + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(70)) + ], Greeter.prototype, "fn", Object.getOwnPropertyDescriptor(Greeter.prototype, "fn"))); + Object.defineProperty(Greeter.prototype, "greetings", + __decorate([ + PropertyDecorator1, + PropertyDecorator2(80), + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(90)) + ], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); + __decorate([ + PropertyDecorator1, + PropertyDecorator2(60) + ], Greeter, "x1"); + Greeter = __decorate([ + ClassDecorator1, + ClassDecorator2(10), + __param(0, ParameterDecorator1), + __param(0, ParameterDecorator2(20)), + __param(1, ParameterDecorator1), + __param(1, ParameterDecorator2(30)) + ], Greeter); return Greeter; })(); //# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.js.map b/tests/baselines/reference/sourceMapValidationDecorators.js.map index f90ca15a23..84ebad316f 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.js.map +++ b/tests/baselines/reference/sourceMapValidationDecorators.js.map @@ -1,2 +1,2 @@ //// [sourceMapValidationDecorators.js.map] -{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA,cAFJA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sHACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACfA,sBAACA,EAASA;IAOhBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,0BAACA,EAAQA;IAWTA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACxBA,iCAASA,EAAQA;IATnBA,sBAEIA,8BAASA,cAFZA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACnBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA,YAACA,kBAAkBA,EAClBA,kBAAkBA,CAACA,EAAEA,CAACA,sCACRA,aAAEA,EAAcA;IArB7BA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,sCACjBA,kBAAQA,EAAQA;IAEvBA,YAACA,mBAAmBA,EACnBA,mBAAmBA,CAACA,EAAEA,CAACA,qCACrBA,kBAACA,EAAUA;IAVpBA,sBAACA,eAAeA,EACfA,eAAeA,CAACA,EAAEA,CAACA,+DA6CnBA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file +{"version":3,"file":"sourceMapValidationDecorators.js","sourceRoot":"","sources":["sourceMapValidationDecorators.ts"],"names":["Greeter","Greeter.constructor","Greeter.greet","Greeter.fn","Greeter.greetings"],"mappings":";;;;;;;;AAOA;IAGIA,iBAGSA,QAAgBA;QAEvBC,WAEcA;aAFdA,WAEcA,CAFdA,sBAEcA,CAFdA,IAEcA;YAFdA,0BAEcA;;QAJPA,aAAQA,GAARA,QAAQA,CAAQA;IAKzBA,CAACA;IAIDD,uBAAKA,GAFLA;QAGIE,MAAMA,CAACA,MAAMA,GAAGA,IAAIA,CAACA,QAAQA,GAAGA,OAAOA,CAACA;IAC5CA,CAACA;IAUOF,oBAAEA,GAAVA,UAGEA,CAASA;QACPG,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;IACzBA,CAACA;IAEDH,sBAEIA,8BAASA;aAFbA;YAGII,MAAMA,CAACA,IAAIA,CAACA,QAAQA,CAACA;QACzBA,CAACA;aAEDJ,UAGEA,SAAiBA;YACfI,IAAIA,CAACA,QAAQA,GAAGA,SAASA,CAACA;QAC9BA,CAACA;;;OAPAJ;IAbcA,UAAEA,GAAWA,EAAEA,CAACA;IAZ/BA,sBAEAA,0BAAKA;;YAFJA,kBAAkBA;YAClBA,kBAAkBA,CAACA,EAAEA,CAACA;WACvBA,0BAAKA,kCAALA,0BAAKA,IAEJA;IAEDA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;OACfA,sBAACA,EAASA;IAMlBA,sBAAQA,uBAAEA;;YACRA,WAACA,mBAAmBA,CAAAA;YACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;WAFlBA,uBAAEA,kCAAFA,uBAAEA,IAKTA;IAEDA,sBAEIA,8BAASA;;YAFZA,kBAAkBA;YAClBA,kBAAkBA,CAACA,EAAEA,CAACA;YAMrBA,WAACA,mBAAmBA,CAAAA;YACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;WANtBA,8BAASA,kCAATA,8BAASA,IAEZA;IAfDA;QAACA,kBAAkBA;QAClBA,kBAAkBA,CAACA,EAAEA,CAACA;OACRA,aAAEA,EAAcA;IAzBnCA;QAACA,eAAeA;QACfA,eAAeA,CAACA,EAAEA,CAACA;QAGdA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;QAGxBA,WAACA,mBAAmBA,CAAAA;QACpBA,WAACA,mBAAmBA,CAACA,EAAEA,CAACA,CAAAA;gBAqC7BA;IAADA,cAACA;AAADA,CAACA,AA9CD,IA8CC"} \ No newline at end of file diff --git a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt index bd57077959..f4c64c4957 100644 --- a/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt +++ b/tests/baselines/reference/sourceMapValidationDecorators.sourcemap.txt @@ -8,20 +8,14 @@ sources: sourceMapValidationDecorators.ts emittedFile:tests/cases/compiler/sourceMapValidationDecorators.js sourceFile:sourceMapValidationDecorators.ts ------------------------------------------------------------------- ->>>var __decorate = this.__decorate || function (decorators, target, key, value) { ->>> var kind = typeof (arguments.length == 2 ? value = target : value); ->>> for (var i = decorators.length - 1; i >= 0; --i) { ->>> var decorator = decorators[i]; ->>> switch (kind) { ->>> case "function": value = decorator(value) || value; break; ->>> case "number": decorator(target, key, value); break; ->>> case "undefined": decorator(target, key); break; ->>> case "object": value = decorator(target, key, value) || value; break; ->>> } +>>>var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { +>>> switch (arguments.length) { +>>> case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); +>>> case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); +>>> case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); >>> } ->>> return value; >>>}; ->>>var __metadata = this.__metadata || (typeof Reflect === "object" && Reflect.metadata) || function () { return function() { } }; +>>>var __param = this.__param || function(index, decorator) { return function (target, key) { decorator(target, key, index); } }; >>>var Greeter = (function () { 1 > 2 >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> @@ -33,7 +27,7 @@ sourceFile:sourceMapValidationDecorators.ts >declare function ParameterDecorator2(x: number): (target: Function, key: string | symbol, paramIndex: number) => void; > > -1 >Emitted(15, 1) Source(8, 1) + SourceIndex(0) +1 >Emitted(9, 1) Source(8, 1) + SourceIndex(0) --- >>> function Greeter(greeting) { 1->^^^^ @@ -48,9 +42,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(20) > public 3 > greeting: string -1->Emitted(16, 5) Source(11, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(16, 22) Source(14, 14) + SourceIndex(0) name (Greeter) -3 >Emitted(16, 30) Source(14, 30) + SourceIndex(0) name (Greeter) +1->Emitted(10, 5) Source(11, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(10, 22) Source(14, 14) + SourceIndex(0) name (Greeter) +3 >Emitted(10, 30) Source(14, 30) + SourceIndex(0) name (Greeter) --- >>> var b = []; 1 >^^^^^^^^ @@ -62,8 +56,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(17, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(17, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(11, 9) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(11, 20) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> for (var _i = 1; _i < arguments.length; _i++) { 1->^^^^^^^^^^^^^ @@ -84,12 +78,12 @@ sourceFile:sourceMapValidationDecorators.ts 6 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1->Emitted(18, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(18, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(18, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(18, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(18, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -6 >Emitted(18, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1->Emitted(12, 14) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(12, 25) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(12, 26) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(12, 48) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(12, 49) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +6 >Emitted(12, 53) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> b[_i - 1] = arguments[_i]; 1 >^^^^^^^^^^^^ @@ -98,8 +92,8 @@ sourceFile:sourceMapValidationDecorators.ts 2 > @ParameterDecorator1 > @ParameterDecorator2(30) > ...b: string[] -1 >Emitted(19, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(19, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(13, 13) Source(16, 7) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(13, 39) Source(18, 21) + SourceIndex(0) name (Greeter.constructor) --- >>> } >>> this.greeting = greeting; @@ -113,11 +107,11 @@ sourceFile:sourceMapValidationDecorators.ts 3 > 4 > greeting 5 > : string -1 >Emitted(21, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(21, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -3 >Emitted(21, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) -4 >Emitted(21, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) -5 >Emitted(21, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(15, 9) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(15, 22) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +3 >Emitted(15, 25) Source(14, 14) + SourceIndex(0) name (Greeter.constructor) +4 >Emitted(15, 33) Source(14, 22) + SourceIndex(0) name (Greeter.constructor) +5 >Emitted(15, 34) Source(14, 30) + SourceIndex(0) name (Greeter.constructor) --- >>> } 1 >^^^^ @@ -130,8 +124,8 @@ sourceFile:sourceMapValidationDecorators.ts > ...b: string[]) { > 2 > } -1 >Emitted(22, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) -2 >Emitted(22, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) +1 >Emitted(16, 5) Source(19, 5) + SourceIndex(0) name (Greeter.constructor) +2 >Emitted(16, 6) Source(19, 6) + SourceIndex(0) name (Greeter.constructor) --- >>> Greeter.prototype.greet = function () { 1->^^^^ @@ -145,9 +139,9 @@ sourceFile:sourceMapValidationDecorators.ts > 2 > greet 3 > -1->Emitted(23, 5) Source(23, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(23, 28) Source(23, 10) + SourceIndex(0) name (Greeter) -3 >Emitted(23, 31) Source(21, 5) + SourceIndex(0) name (Greeter) +1->Emitted(17, 5) Source(23, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(17, 28) Source(23, 10) + SourceIndex(0) name (Greeter) +3 >Emitted(17, 31) Source(21, 5) + SourceIndex(0) name (Greeter) --- >>> return "

" + this.greeting + "

"; 1->^^^^^^^^ @@ -175,17 +169,17 @@ sourceFile:sourceMapValidationDecorators.ts 9 > + 10> "" 11> ; -1->Emitted(24, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(24, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) -3 >Emitted(24, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) -4 >Emitted(24, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) -5 >Emitted(24, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) -6 >Emitted(24, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) -7 >Emitted(24, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) -8 >Emitted(24, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) -9 >Emitted(24, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) -10>Emitted(24, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) -11>Emitted(24, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) +1->Emitted(18, 9) Source(24, 9) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(18, 15) Source(24, 15) + SourceIndex(0) name (Greeter.greet) +3 >Emitted(18, 16) Source(24, 16) + SourceIndex(0) name (Greeter.greet) +4 >Emitted(18, 22) Source(24, 22) + SourceIndex(0) name (Greeter.greet) +5 >Emitted(18, 25) Source(24, 25) + SourceIndex(0) name (Greeter.greet) +6 >Emitted(18, 29) Source(24, 29) + SourceIndex(0) name (Greeter.greet) +7 >Emitted(18, 30) Source(24, 30) + SourceIndex(0) name (Greeter.greet) +8 >Emitted(18, 38) Source(24, 38) + SourceIndex(0) name (Greeter.greet) +9 >Emitted(18, 41) Source(24, 41) + SourceIndex(0) name (Greeter.greet) +10>Emitted(18, 48) Source(24, 48) + SourceIndex(0) name (Greeter.greet) +11>Emitted(18, 49) Source(24, 49) + SourceIndex(0) name (Greeter.greet) --- >>> }; 1 >^^^^ @@ -194,8 +188,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(25, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) -2 >Emitted(25, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) +1 >Emitted(19, 5) Source(25, 5) + SourceIndex(0) name (Greeter.greet) +2 >Emitted(19, 6) Source(25, 6) + SourceIndex(0) name (Greeter.greet) --- >>> Greeter.prototype.fn = function (x) { 1->^^^^ @@ -221,11 +215,11 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(70) > 5 > x: number -1->Emitted(26, 5) Source(35, 13) + SourceIndex(0) name (Greeter) -2 >Emitted(26, 25) Source(35, 15) + SourceIndex(0) name (Greeter) -3 >Emitted(26, 28) Source(35, 5) + SourceIndex(0) name (Greeter) -4 >Emitted(26, 38) Source(38, 7) + SourceIndex(0) name (Greeter) -5 >Emitted(26, 39) Source(38, 16) + SourceIndex(0) name (Greeter) +1->Emitted(20, 5) Source(35, 13) + SourceIndex(0) name (Greeter) +2 >Emitted(20, 25) Source(35, 15) + SourceIndex(0) name (Greeter) +3 >Emitted(20, 28) Source(35, 5) + SourceIndex(0) name (Greeter) +4 >Emitted(20, 38) Source(38, 7) + SourceIndex(0) name (Greeter) +5 >Emitted(20, 39) Source(38, 16) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1 >^^^^^^^^ @@ -243,13 +237,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1 >Emitted(27, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(27, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) -3 >Emitted(27, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) -4 >Emitted(27, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) -5 >Emitted(27, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) -6 >Emitted(27, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) -7 >Emitted(27, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(21, 9) Source(39, 9) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(21, 15) Source(39, 15) + SourceIndex(0) name (Greeter.fn) +3 >Emitted(21, 16) Source(39, 16) + SourceIndex(0) name (Greeter.fn) +4 >Emitted(21, 20) Source(39, 20) + SourceIndex(0) name (Greeter.fn) +5 >Emitted(21, 21) Source(39, 21) + SourceIndex(0) name (Greeter.fn) +6 >Emitted(21, 29) Source(39, 29) + SourceIndex(0) name (Greeter.fn) +7 >Emitted(21, 30) Source(39, 30) + SourceIndex(0) name (Greeter.fn) --- >>> }; 1 >^^^^ @@ -258,8 +252,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(28, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) -2 >Emitted(28, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) +1 >Emitted(22, 5) Source(40, 5) + SourceIndex(0) name (Greeter.fn) +2 >Emitted(22, 6) Source(40, 6) + SourceIndex(0) name (Greeter.fn) --- >>> Object.defineProperty(Greeter.prototype, "greetings", { 1->^^^^ @@ -272,15 +266,15 @@ sourceFile:sourceMapValidationDecorators.ts > @PropertyDecorator2(80) > get 3 > greetings -1->Emitted(29, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(29, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(29, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +1->Emitted(23, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(23, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(23, 57) Source(44, 18) + SourceIndex(0) name (Greeter) --- >>> get: function () { 1 >^^^^^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > -1 >Emitted(30, 14) Source(42, 5) + SourceIndex(0) name (Greeter) +1 >Emitted(24, 14) Source(42, 5) + SourceIndex(0) name (Greeter) --- >>> return this.greeting; 1->^^^^^^^^^^^^ @@ -300,13 +294,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > . 6 > greeting 7 > ; -1->Emitted(31, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(31, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(31, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(31, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(31, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(31, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(31, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(25, 13) Source(45, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(25, 19) Source(45, 15) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(25, 20) Source(45, 16) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(25, 24) Source(45, 20) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(25, 25) Source(45, 21) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(25, 33) Source(45, 29) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(25, 34) Source(45, 30) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -315,8 +309,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(32, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(32, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(26, 9) Source(46, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(26, 10) Source(46, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> set: function (greetings) { 1->^^^^^^^^^^^^^ @@ -331,9 +325,9 @@ sourceFile:sourceMapValidationDecorators.ts > @ParameterDecorator2(90) > 3 > greetings: string -1->Emitted(33, 14) Source(48, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(33, 24) Source(51, 7) + SourceIndex(0) name (Greeter) -3 >Emitted(33, 33) Source(51, 24) + SourceIndex(0) name (Greeter) +1->Emitted(27, 14) Source(48, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(27, 24) Source(51, 7) + SourceIndex(0) name (Greeter) +3 >Emitted(27, 33) Source(51, 24) + SourceIndex(0) name (Greeter) --- >>> this.greeting = greetings; 1->^^^^^^^^^^^^ @@ -351,13 +345,13 @@ sourceFile:sourceMapValidationDecorators.ts 5 > = 6 > greetings 7 > ; -1->Emitted(34, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(34, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) -3 >Emitted(34, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) -4 >Emitted(34, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) -5 >Emitted(34, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) -6 >Emitted(34, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) -7 >Emitted(34, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) +1->Emitted(28, 13) Source(52, 9) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(28, 17) Source(52, 13) + SourceIndex(0) name (Greeter.greetings) +3 >Emitted(28, 18) Source(52, 14) + SourceIndex(0) name (Greeter.greetings) +4 >Emitted(28, 26) Source(52, 22) + SourceIndex(0) name (Greeter.greetings) +5 >Emitted(28, 29) Source(52, 25) + SourceIndex(0) name (Greeter.greetings) +6 >Emitted(28, 38) Source(52, 34) + SourceIndex(0) name (Greeter.greetings) +7 >Emitted(28, 39) Source(52, 35) + SourceIndex(0) name (Greeter.greetings) --- >>> }, 1 >^^^^^^^^ @@ -366,8 +360,8 @@ sourceFile:sourceMapValidationDecorators.ts 1 > > 2 > } -1 >Emitted(35, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) -2 >Emitted(35, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) +1 >Emitted(29, 9) Source(53, 5) + SourceIndex(0) name (Greeter.greetings) +2 >Emitted(29, 10) Source(53, 6) + SourceIndex(0) name (Greeter.greetings) --- >>> enumerable: true, >>> configurable: true @@ -375,7 +369,7 @@ sourceFile:sourceMapValidationDecorators.ts 1->^^^^^^^ 2 > ^^^^^^^^^^^^^^-> 1-> -1->Emitted(38, 8) Source(46, 6) + SourceIndex(0) name (Greeter) +1->Emitted(32, 8) Source(46, 6) + SourceIndex(0) name (Greeter) --- >>> Greeter.x1 = 10; 1->^^^^ @@ -383,170 +377,508 @@ sourceFile:sourceMapValidationDecorators.ts 3 > ^^^ 4 > ^^ 5 > ^ -6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1-> 2 > x1 3 > : number = 4 > 10 5 > ; -1->Emitted(39, 5) Source(33, 20) + SourceIndex(0) name (Greeter) -2 >Emitted(39, 15) Source(33, 22) + SourceIndex(0) name (Greeter) -3 >Emitted(39, 18) Source(33, 33) + SourceIndex(0) name (Greeter) -4 >Emitted(39, 20) Source(33, 35) + SourceIndex(0) name (Greeter) -5 >Emitted(39, 21) Source(33, 36) + SourceIndex(0) name (Greeter) +1->Emitted(33, 5) Source(33, 20) + SourceIndex(0) name (Greeter) +2 >Emitted(33, 15) Source(33, 22) + SourceIndex(0) name (Greeter) +3 >Emitted(33, 18) Source(33, 33) + SourceIndex(0) name (Greeter) +4 >Emitted(33, 20) Source(33, 35) + SourceIndex(0) name (Greeter) +5 >Emitted(33, 21) Source(33, 36) + SourceIndex(0) name (Greeter) --- ->>> Object.defineProperty(Greeter.prototype, "greet", __decorate([PropertyDecorator1, PropertyDecorator2(40), __metadata('design:type', Function), __metadata('design:paramtypes', []), __metadata('design:returntype', Object)], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); +>>> Object.defineProperty(Greeter.prototype, "greet", 1->^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^ 3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ 1-> 2 > @PropertyDecorator1 > @PropertyDecorator2(40) > 3 > greet -4 > -5 > PropertyDecorator1 -6 > - > @ -7 > PropertyDecorator2 -8 > ( -9 > 40 -10> ) -11> - > -12> greet -13> -14> greet -15> () { - > return "

" + this.greeting + "

"; - > } -1->Emitted(40, 5) Source(21, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(40, 27) Source(23, 5) + SourceIndex(0) name (Greeter) -3 >Emitted(40, 53) Source(23, 10) + SourceIndex(0) name (Greeter) -4 >Emitted(40, 67) Source(21, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(40, 85) Source(21, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(40, 87) Source(22, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(40, 105) Source(22, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(40, 106) Source(22, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(40, 108) Source(22, 27) + SourceIndex(0) name (Greeter) -10>Emitted(40, 109) Source(22, 28) + SourceIndex(0) name (Greeter) -11>Emitted(40, 227) Source(23, 5) + SourceIndex(0) name (Greeter) -12>Emitted(40, 253) Source(23, 10) + SourceIndex(0) name (Greeter) -13>Emitted(40, 287) Source(23, 5) + SourceIndex(0) name (Greeter) -14>Emitted(40, 313) Source(23, 10) + SourceIndex(0) name (Greeter) -15>Emitted(40, 317) Source(25, 6) + SourceIndex(0) name (Greeter) +1->Emitted(34, 5) Source(21, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(34, 27) Source(23, 5) + SourceIndex(0) name (Greeter) +3 >Emitted(34, 53) Source(23, 10) + SourceIndex(0) name (Greeter) --- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(50), __metadata('design:type', String)], Greeter.prototype, "x"); +>>> __decorate([ +>>> PropertyDecorator1, +1 >^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> +1 > +2 > PropertyDecorator1 +1 >Emitted(36, 13) Source(21, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(36, 31) Source(21, 24) + SourceIndex(0) name (Greeter) +--- +>>> PropertyDecorator2(40) +1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > @ +2 > PropertyDecorator2 +3 > ( +4 > 40 +5 > ) +1->Emitted(37, 13) Source(22, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(37, 31) Source(22, 24) + SourceIndex(0) name (Greeter) +3 >Emitted(37, 32) Source(22, 25) + SourceIndex(0) name (Greeter) +4 >Emitted(37, 34) Source(22, 27) + SourceIndex(0) name (Greeter) +5 >Emitted(37, 35) Source(22, 28) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter.prototype, "greet", Object.getOwnPropertyDescriptor(Greeter.prototype, "greet"))); +1->^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^ +1-> + > +2 > greet +3 > +4 > greet +5 > () { + > return "

" + this.greeting + "

"; + > } +1->Emitted(38, 12) Source(23, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(38, 38) Source(23, 10) + SourceIndex(0) name (Greeter) +3 >Emitted(38, 72) Source(23, 5) + SourceIndex(0) name (Greeter) +4 >Emitted(38, 98) Source(23, 10) + SourceIndex(0) name (Greeter) +5 >Emitted(38, 102) Source(25, 6) + SourceIndex(0) name (Greeter) +--- +>>> __decorate([ 1 >^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > > > -2 > @ -3 > PropertyDecorator1 -4 > - > @ -5 > PropertyDecorator2 -6 > ( -7 > 50 -8 > ) -9 > - > private -10> x -11> : string; -1 >Emitted(41, 5) Source(27, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(41, 17) Source(27, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(41, 35) Source(27, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(41, 37) Source(28, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(41, 55) Source(28, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(41, 56) Source(28, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(41, 58) Source(28, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(41, 59) Source(28, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(41, 97) Source(29, 13) + SourceIndex(0) name (Greeter) -10>Emitted(41, 119) Source(29, 14) + SourceIndex(0) name (Greeter) -11>Emitted(41, 121) Source(29, 23) + SourceIndex(0) name (Greeter) +1 >Emitted(39, 5) Source(27, 5) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(70), __metadata('design:type', Number)], Greeter.prototype, "fn", 0); +>>> PropertyDecorator1, +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> +1->@ +2 > PropertyDecorator1 +1->Emitted(40, 9) Source(27, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(40, 27) Source(27, 24) + SourceIndex(0) name (Greeter) +--- +>>> PropertyDecorator2(50) +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^-> +1-> + > @ +2 > PropertyDecorator2 +3 > ( +4 > 50 +5 > ) +1->Emitted(41, 9) Source(28, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(41, 27) Source(28, 24) + SourceIndex(0) name (Greeter) +3 >Emitted(41, 28) Source(28, 25) + SourceIndex(0) name (Greeter) +4 >Emitted(41, 30) Source(28, 27) + SourceIndex(0) name (Greeter) +5 >Emitted(41, 31) Source(28, 28) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter.prototype, "x"); +1->^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^^^^^^^^^^^^^^^^-> +1-> + > private +2 > x +3 > : string; +1->Emitted(42, 8) Source(29, 13) + SourceIndex(0) name (Greeter) +2 >Emitted(42, 30) Source(29, 14) + SourceIndex(0) name (Greeter) +3 >Emitted(42, 32) Source(29, 23) + SourceIndex(0) name (Greeter) +--- +>>> Object.defineProperty(Greeter.prototype, "fn", 1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^ 1-> > > @PropertyDecorator1 > @PropertyDecorator2(60) > private static x1: number = 10; > - > private fn( - > -2 > @ -3 > ParameterDecorator1 -4 > - > @ -5 > ParameterDecorator2 -6 > ( -7 > 70 -8 > ) -9 > - > -10> x -11> : number -1->Emitted(42, 5) Source(36, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(42, 17) Source(36, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(42, 36) Source(36, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(42, 38) Source(37, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(42, 57) Source(37, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(42, 58) Source(37, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(42, 60) Source(37, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(42, 61) Source(37, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(42, 99) Source(38, 7) + SourceIndex(0) name (Greeter) -10>Emitted(42, 125) Source(38, 8) + SourceIndex(0) name (Greeter) -11>Emitted(42, 127) Source(38, 16) + SourceIndex(0) name (Greeter) + > +2 > private +3 > fn +1->Emitted(43, 5) Source(35, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(43, 27) Source(35, 13) + SourceIndex(0) name (Greeter) +3 >Emitted(43, 50) Source(35, 15) + SourceIndex(0) name (Greeter) --- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(90), __metadata('design:type', String)], Greeter.prototype, "greetings", 0); +>>> __decorate([ +>>> __param(0, ParameterDecorator1), +1 >^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^-> +1 >( + > +2 > @ +3 > ParameterDecorator1 +4 > +1 >Emitted(45, 13) Source(36, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(45, 24) Source(36, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(45, 43) Source(36, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(45, 44) Source(36, 27) + SourceIndex(0) name (Greeter) +--- +>>> __param(0, ParameterDecorator2(70)) +1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 > @ +3 > ParameterDecorator2 +4 > ( +5 > 70 +6 > ) +7 > +1->Emitted(46, 13) Source(37, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(46, 24) Source(37, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(46, 43) Source(37, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(46, 44) Source(37, 28) + SourceIndex(0) name (Greeter) +5 >Emitted(46, 46) Source(37, 30) + SourceIndex(0) name (Greeter) +6 >Emitted(46, 47) Source(37, 31) + SourceIndex(0) name (Greeter) +7 >Emitted(46, 48) Source(37, 31) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter.prototype, "fn", Object.getOwnPropertyDescriptor(Greeter.prototype, "fn"))); +1->^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^ +1-> +2 > fn +3 > +4 > fn +5 > ( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { + > return this.greeting; + > } +1->Emitted(47, 12) Source(35, 13) + SourceIndex(0) name (Greeter) +2 >Emitted(47, 35) Source(35, 15) + SourceIndex(0) name (Greeter) +3 >Emitted(47, 69) Source(35, 13) + SourceIndex(0) name (Greeter) +4 >Emitted(47, 92) Source(35, 15) + SourceIndex(0) name (Greeter) +5 >Emitted(47, 96) Source(40, 6) + SourceIndex(0) name (Greeter) +--- +>>> Object.defineProperty(Greeter.prototype, "greetings", +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +1 > + > + > +2 > @PropertyDecorator1 + > @PropertyDecorator2(80) + > get +3 > greetings +1 >Emitted(48, 5) Source(42, 5) + SourceIndex(0) name (Greeter) +2 >Emitted(48, 27) Source(44, 9) + SourceIndex(0) name (Greeter) +3 >Emitted(48, 57) Source(44, 18) + SourceIndex(0) name (Greeter) +--- +>>> __decorate([ +>>> PropertyDecorator1, +1 >^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^-> +1 > +2 > PropertyDecorator1 +1 >Emitted(50, 13) Source(42, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(50, 31) Source(42, 24) + SourceIndex(0) name (Greeter) +--- +>>> PropertyDecorator2(80), +1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^-> +1-> + > @ +2 > PropertyDecorator2 +3 > ( +4 > 80 +5 > ) +1->Emitted(51, 13) Source(43, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(51, 31) Source(43, 24) + SourceIndex(0) name (Greeter) +3 >Emitted(51, 32) Source(43, 25) + SourceIndex(0) name (Greeter) +4 >Emitted(51, 34) Source(43, 27) + SourceIndex(0) name (Greeter) +5 >Emitted(51, 35) Source(43, 28) + SourceIndex(0) name (Greeter) +--- +>>> __param(0, ParameterDecorator1), +1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^-> +1-> + > get greetings() { + > return this.greeting; + > } + > + > set greetings( + > +2 > @ +3 > ParameterDecorator1 +4 > +1->Emitted(52, 13) Source(49, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(52, 24) Source(49, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(52, 43) Source(49, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(52, 44) Source(49, 27) + SourceIndex(0) name (Greeter) +--- +>>> __param(0, ParameterDecorator2(90)) +1->^^^^^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +8 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> +1-> + > +2 > @ +3 > ParameterDecorator2 +4 > ( +5 > 90 +6 > ) +7 > +1->Emitted(53, 13) Source(50, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(53, 24) Source(50, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(53, 43) Source(50, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(53, 44) Source(50, 28) + SourceIndex(0) name (Greeter) +5 >Emitted(53, 46) Source(50, 30) + SourceIndex(0) name (Greeter) +6 >Emitted(53, 47) Source(50, 31) + SourceIndex(0) name (Greeter) +7 >Emitted(53, 48) Source(50, 31) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); +1->^^^^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +4 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +5 > ^^^^ +1-> +2 > greetings +3 > +4 > greetings +5 > () { + > return this.greeting; + > } +1->Emitted(54, 12) Source(44, 9) + SourceIndex(0) name (Greeter) +2 >Emitted(54, 42) Source(44, 18) + SourceIndex(0) name (Greeter) +3 >Emitted(54, 76) Source(44, 9) + SourceIndex(0) name (Greeter) +4 >Emitted(54, 106) Source(44, 18) + SourceIndex(0) name (Greeter) +5 >Emitted(54, 110) Source(46, 6) + SourceIndex(0) name (Greeter) +--- +>>> __decorate([ +1 >^^^^ +2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> +1 > +1 >Emitted(55, 5) Source(31, 5) + SourceIndex(0) name (Greeter) +--- +>>> PropertyDecorator1, +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^^^^^-> +1->@ +2 > PropertyDecorator1 +1->Emitted(56, 9) Source(31, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(56, 27) Source(31, 24) + SourceIndex(0) name (Greeter) +--- +>>> PropertyDecorator2(60) +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +1-> + > @ +2 > PropertyDecorator2 +3 > ( +4 > 60 +5 > ) +1->Emitted(57, 9) Source(32, 6) + SourceIndex(0) name (Greeter) +2 >Emitted(57, 27) Source(32, 24) + SourceIndex(0) name (Greeter) +3 >Emitted(57, 28) Source(32, 25) + SourceIndex(0) name (Greeter) +4 >Emitted(57, 30) Source(32, 27) + SourceIndex(0) name (Greeter) +5 >Emitted(57, 31) Source(32, 28) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter, "x1"); +1 >^^^^^^^ +2 > ^^^^^^^^^^^^^ +3 > ^^ +4 > ^^^^^-> +1 > + > private static +2 > x1 +3 > : number = 10; +1 >Emitted(58, 8) Source(33, 20) + SourceIndex(0) name (Greeter) +2 >Emitted(58, 21) Source(33, 22) + SourceIndex(0) name (Greeter) +3 >Emitted(58, 23) Source(33, 36) + SourceIndex(0) name (Greeter) +--- +>>> Greeter = __decorate([ 1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1->) { +2 > ^^^^^^^^^^^^^^^^^^^^^-> +1-> +1->Emitted(59, 5) Source(8, 1) + SourceIndex(0) name (Greeter) +--- +>>> ClassDecorator1, +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^^^^^^-> +1->@ +2 > ClassDecorator1 +1->Emitted(60, 9) Source(8, 2) + SourceIndex(0) name (Greeter) +2 >Emitted(60, 24) Source(8, 17) + SourceIndex(0) name (Greeter) +--- +>>> ClassDecorator2(10), +1->^^^^^^^^ +2 > ^^^^^^^^^^^^^^^ +3 > ^ +4 > ^^ +5 > ^ +6 > ^^^^^^^^^^^^^^-> +1-> + >@ +2 > ClassDecorator2 +3 > ( +4 > 10 +5 > ) +1->Emitted(61, 9) Source(9, 2) + SourceIndex(0) name (Greeter) +2 >Emitted(61, 24) Source(9, 17) + SourceIndex(0) name (Greeter) +3 >Emitted(61, 25) Source(9, 18) + SourceIndex(0) name (Greeter) +4 >Emitted(61, 27) Source(9, 20) + SourceIndex(0) name (Greeter) +5 >Emitted(61, 28) Source(9, 21) + SourceIndex(0) name (Greeter) +--- +>>> __param(0, ParameterDecorator1), +1->^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^^-> +1-> + >class Greeter { + > constructor( + > +2 > @ +3 > ParameterDecorator1 +4 > +1->Emitted(62, 9) Source(12, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(62, 20) Source(12, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(62, 39) Source(12, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(62, 40) Source(12, 27) + SourceIndex(0) name (Greeter) +--- +>>> __param(0, ParameterDecorator2(20)), +1->^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1-> + > +2 > @ +3 > ParameterDecorator2 +4 > ( +5 > 20 +6 > ) +7 > +1->Emitted(63, 9) Source(13, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(63, 20) Source(13, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(63, 39) Source(13, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(63, 40) Source(13, 28) + SourceIndex(0) name (Greeter) +5 >Emitted(63, 42) Source(13, 30) + SourceIndex(0) name (Greeter) +6 >Emitted(63, 43) Source(13, 31) + SourceIndex(0) name (Greeter) +7 >Emitted(63, 44) Source(13, 31) + SourceIndex(0) name (Greeter) +--- +>>> __param(1, ParameterDecorator1), +1 >^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^^^^-> +1 > + > public greeting: string, + > + > +2 > @ +3 > ParameterDecorator1 +4 > +1 >Emitted(64, 9) Source(16, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(64, 20) Source(16, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(64, 39) Source(16, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(64, 40) Source(16, 27) + SourceIndex(0) name (Greeter) +--- +>>> __param(1, ParameterDecorator2(30)) +1->^^^^^^^^ +2 > ^^^^^^^^^^^ +3 > ^^^^^^^^^^^^^^^^^^^ +4 > ^ +5 > ^^ +6 > ^ +7 > ^ +1-> + > +2 > @ +3 > ParameterDecorator2 +4 > ( +5 > 30 +6 > ) +7 > +1->Emitted(65, 9) Source(17, 7) + SourceIndex(0) name (Greeter) +2 >Emitted(65, 20) Source(17, 8) + SourceIndex(0) name (Greeter) +3 >Emitted(65, 39) Source(17, 27) + SourceIndex(0) name (Greeter) +4 >Emitted(65, 40) Source(17, 28) + SourceIndex(0) name (Greeter) +5 >Emitted(65, 42) Source(17, 30) + SourceIndex(0) name (Greeter) +6 >Emitted(65, 43) Source(17, 31) + SourceIndex(0) name (Greeter) +7 >Emitted(65, 44) Source(17, 31) + SourceIndex(0) name (Greeter) +--- +>>> ], Greeter); +1 >^^^^^^^^^^^^^^^^ +2 > ^^^^-> +1 > + > ...b: string[]) { + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(40) + > greet() { + > return "

" + this.greeting + "

"; + > } + > + > @PropertyDecorator1 + > @PropertyDecorator2(50) + > private x: string; + > + > @PropertyDecorator1 + > @PropertyDecorator2(60) + > private static x1: number = 10; + > + > private fn( + > @ParameterDecorator1 + > @ParameterDecorator2(70) + > x: number) { > return this.greeting; > } > @@ -557,281 +889,21 @@ sourceFile:sourceMapValidationDecorators.ts > } > > set greetings( - > -2 > @ -3 > ParameterDecorator1 -4 > - > @ -5 > ParameterDecorator2 -6 > ( -7 > 90 -8 > ) -9 > - > -10> greetings -11> : string -1->Emitted(43, 5) Source(49, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(43, 17) Source(49, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(43, 36) Source(49, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(43, 38) Source(50, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(43, 57) Source(50, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(43, 58) Source(50, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(43, 60) Source(50, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(43, 61) Source(50, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(43, 99) Source(51, 7) + SourceIndex(0) name (Greeter) -10>Emitted(43, 132) Source(51, 16) + SourceIndex(0) name (Greeter) -11>Emitted(43, 134) Source(51, 24) + SourceIndex(0) name (Greeter) ---- ->>> Object.defineProperty(Greeter.prototype, "greetings", __decorate([PropertyDecorator1, PropertyDecorator2(80), __metadata('design:type', Object)], Greeter.prototype, "greetings", Object.getOwnPropertyDescriptor(Greeter.prototype, "greetings"))); -1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -4 > ^^^^^^^^^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^^ -7 > ^^^^^^^^^^^^^^^^^^ -8 > ^ -9 > ^^ -10> ^ -11> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -12> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -13> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -14> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -15> ^^^^ -1-> -2 > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get -3 > greetings -4 > -5 > PropertyDecorator1 -6 > - > @ -7 > PropertyDecorator2 -8 > ( -9 > 80 -10> ) -11> - > get -12> greetings -13> -14> greetings -15> () { - > return this.greeting; - > } -1->Emitted(44, 5) Source(42, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(44, 27) Source(44, 9) + SourceIndex(0) name (Greeter) -3 >Emitted(44, 57) Source(44, 18) + SourceIndex(0) name (Greeter) -4 >Emitted(44, 71) Source(42, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(44, 89) Source(42, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(44, 91) Source(43, 6) + SourceIndex(0) name (Greeter) -7 >Emitted(44, 109) Source(43, 24) + SourceIndex(0) name (Greeter) -8 >Emitted(44, 110) Source(43, 25) + SourceIndex(0) name (Greeter) -9 >Emitted(44, 112) Source(43, 27) + SourceIndex(0) name (Greeter) -10>Emitted(44, 113) Source(43, 28) + SourceIndex(0) name (Greeter) -11>Emitted(44, 151) Source(44, 9) + SourceIndex(0) name (Greeter) -12>Emitted(44, 181) Source(44, 18) + SourceIndex(0) name (Greeter) -13>Emitted(44, 215) Source(44, 9) + SourceIndex(0) name (Greeter) -14>Emitted(44, 245) Source(44, 18) + SourceIndex(0) name (Greeter) -15>Emitted(44, 249) Source(46, 6) + SourceIndex(0) name (Greeter) ---- ->>> __decorate([PropertyDecorator1, PropertyDecorator2(60), __metadata('design:type', Number)], Greeter, "x1"); -1 >^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^-> -1 > -2 > @ -3 > PropertyDecorator1 -4 > - > @ -5 > PropertyDecorator2 -6 > ( -7 > 60 -8 > ) -9 > - > private static -10> x1 -11> : number = 10; -1 >Emitted(45, 5) Source(31, 5) + SourceIndex(0) name (Greeter) -2 >Emitted(45, 17) Source(31, 6) + SourceIndex(0) name (Greeter) -3 >Emitted(45, 35) Source(31, 24) + SourceIndex(0) name (Greeter) -4 >Emitted(45, 37) Source(32, 6) + SourceIndex(0) name (Greeter) -5 >Emitted(45, 55) Source(32, 24) + SourceIndex(0) name (Greeter) -6 >Emitted(45, 56) Source(32, 25) + SourceIndex(0) name (Greeter) -7 >Emitted(45, 58) Source(32, 27) + SourceIndex(0) name (Greeter) -8 >Emitted(45, 59) Source(32, 28) + SourceIndex(0) name (Greeter) -9 >Emitted(45, 97) Source(33, 20) + SourceIndex(0) name (Greeter) -10>Emitted(45, 110) Source(33, 22) + SourceIndex(0) name (Greeter) -11>Emitted(45, 112) Source(33, 36) + SourceIndex(0) name (Greeter) ---- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(20), __metadata('design:type', String)], Greeter, void 0, 0); -1->^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -1-> -2 > @ -3 > ParameterDecorator1 -4 > - > @ -5 > ParameterDecorator2 -6 > ( -7 > 20 -8 > ) -9 > - > public -10> greeting -11> : string -1->Emitted(46, 5) Source(12, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(46, 17) Source(12, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(46, 36) Source(12, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(46, 38) Source(13, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(46, 57) Source(13, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(46, 58) Source(13, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(46, 60) Source(13, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(46, 61) Source(13, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(46, 99) Source(14, 14) + SourceIndex(0) name (Greeter) -10>Emitted(46, 117) Source(14, 22) + SourceIndex(0) name (Greeter) -11>Emitted(46, 119) Source(14, 30) + SourceIndex(0) name (Greeter) ---- ->>> __decorate([ParameterDecorator1, ParameterDecorator2(30), __metadata('design:type', Array)], Greeter, void 0, 1); -1 >^^^^ -2 > ^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -10> ^^^^^^^^^^^^^^^^^^ -11> ^^ -12> ^^^^^^^^^-> -1 >, - > - > -2 > @ -3 > ParameterDecorator1 -4 > - > @ -5 > ParameterDecorator2 -6 > ( -7 > 30 -8 > ) -9 > - > ... -10> b -11> : string[] -1 >Emitted(47, 5) Source(16, 7) + SourceIndex(0) name (Greeter) -2 >Emitted(47, 17) Source(16, 8) + SourceIndex(0) name (Greeter) -3 >Emitted(47, 36) Source(16, 27) + SourceIndex(0) name (Greeter) -4 >Emitted(47, 38) Source(17, 8) + SourceIndex(0) name (Greeter) -5 >Emitted(47, 57) Source(17, 27) + SourceIndex(0) name (Greeter) -6 >Emitted(47, 58) Source(17, 28) + SourceIndex(0) name (Greeter) -7 >Emitted(47, 60) Source(17, 30) + SourceIndex(0) name (Greeter) -8 >Emitted(47, 61) Source(17, 31) + SourceIndex(0) name (Greeter) -9 >Emitted(47, 98) Source(18, 10) + SourceIndex(0) name (Greeter) -10>Emitted(47, 116) Source(18, 11) + SourceIndex(0) name (Greeter) -11>Emitted(47, 118) Source(18, 21) + SourceIndex(0) name (Greeter) ---- ->>> Greeter = __decorate([ClassDecorator1, ClassDecorator2(10), __metadata('design:paramtypes', [String, String])], Greeter); -1->^^^^ -2 > ^^^^^^^^^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^ -4 > ^^ -5 > ^^^^^^^^^^^^^^^ -6 > ^ -7 > ^^ -8 > ^ -9 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1-> -2 > @ -3 > ClassDecorator1 -4 > - > @ -5 > ClassDecorator2 -6 > ( -7 > 10 -8 > ) -9 > - > class Greeter { - > constructor( - > @ParameterDecorator1 - > @ParameterDecorator2(20) - > public greeting: string, - > - > @ParameterDecorator1 - > @ParameterDecorator2(30) - > ...b: string[]) { - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(40) - > greet() { - > return "

" + this.greeting + "

"; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(50) - > private x: string; - > - > @PropertyDecorator1 - > @PropertyDecorator2(60) - > private static x1: number = 10; - > - > private fn( - > @ParameterDecorator1 - > @ParameterDecorator2(70) - > x: number) { - > return this.greeting; - > } - > - > @PropertyDecorator1 - > @PropertyDecorator2(80) - > get greetings() { - > return this.greeting; - > } - > - > set greetings( - > @ParameterDecorator1 - > @ParameterDecorator2(90) - > greetings: string) { - > this.greeting = greetings; - > } - > } -1->Emitted(48, 5) Source(8, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(48, 27) Source(8, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(48, 42) Source(8, 17) + SourceIndex(0) name (Greeter) -4 >Emitted(48, 44) Source(9, 2) + SourceIndex(0) name (Greeter) -5 >Emitted(48, 59) Source(9, 17) + SourceIndex(0) name (Greeter) -6 >Emitted(48, 60) Source(9, 18) + SourceIndex(0) name (Greeter) -7 >Emitted(48, 62) Source(9, 20) + SourceIndex(0) name (Greeter) -8 >Emitted(48, 63) Source(9, 21) + SourceIndex(0) name (Greeter) -9 >Emitted(48, 126) Source(54, 2) + SourceIndex(0) name (Greeter) + > @ParameterDecorator1 + > @ParameterDecorator2(90) + > greetings: string) { + > this.greeting = greetings; + > } + >} +1 >Emitted(66, 17) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>> return Greeter; -1 >^^^^ +1->^^^^ 2 > ^^^^^^^^^^^^^^ -1 > +1-> 2 > } -1 >Emitted(49, 5) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(49, 19) Source(54, 2) + SourceIndex(0) name (Greeter) +1->Emitted(67, 5) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(67, 19) Source(54, 2) + SourceIndex(0) name (Greeter) --- >>>})(); 1 > @@ -889,9 +961,9 @@ sourceFile:sourceMapValidationDecorators.ts > this.greeting = greetings; > } > } -1 >Emitted(50, 1) Source(54, 1) + SourceIndex(0) name (Greeter) -2 >Emitted(50, 2) Source(54, 2) + SourceIndex(0) name (Greeter) -3 >Emitted(50, 2) Source(8, 1) + SourceIndex(0) -4 >Emitted(50, 6) Source(54, 2) + SourceIndex(0) +1 >Emitted(68, 1) Source(54, 1) + SourceIndex(0) name (Greeter) +2 >Emitted(68, 2) Source(54, 2) + SourceIndex(0) name (Greeter) +3 >Emitted(68, 2) Source(8, 1) + SourceIndex(0) +4 >Emitted(68, 6) Source(54, 2) + SourceIndex(0) --- >>>//# sourceMappingURL=sourceMapValidationDecorators.js.map \ No newline at end of file From d9078e9eaa706cd0cba601dbd317125340de7068 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 2 Apr 2015 11:32:26 -0700 Subject: [PATCH 12/16] Updated baseline --- tests/baselines/reference/APISample_linter.types.pull | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/baselines/reference/APISample_linter.types.pull b/tests/baselines/reference/APISample_linter.types.pull index c89fc179e4..69a86e6fb3 100644 --- a/tests/baselines/reference/APISample_linter.types.pull +++ b/tests/baselines/reference/APISample_linter.types.pull @@ -3675,6 +3675,9 @@ declare module "typescript" { EmitDecorate = 512, >EmitDecorate : NodeCheckFlags + + EmitParam = 1024, +>EmitParam : NodeCheckFlags } interface NodeLinks { >NodeLinks : NodeLinks @@ -4190,6 +4193,9 @@ declare module "typescript" { separateCompilation?: boolean; >separateCompilation : boolean + emitDecoratorMetadata?: boolean; +>emitDecoratorMetadata : boolean + [option: string]: string | number | boolean; >option : string } From f15ff32d5c5b0a89ee7f22ca404463562ebcbfa5 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 2 Apr 2015 12:05:56 -0700 Subject: [PATCH 13/16] Fix for #2561 --- src/compiler/checker.ts | 6 +++--- .../reference/decoratorOnClassConstructor1.errors.txt | 2 +- tests/baselines/reference/decoratorOnEnum.errors.txt | 6 +++--- .../reference/decoratorOnFunctionDeclaration.errors.txt | 6 +++--- .../reference/decoratorOnImportEquals1.errors.txt | 5 ++--- .../reference/decoratorOnImportEquals2.errors.txt | 5 ++--- tests/baselines/reference/decoratorOnInterface.errors.txt | 6 +++--- .../reference/decoratorOnInternalModule.errors.txt | 6 +++--- tests/baselines/reference/decoratorOnTypeAlias.errors.txt | 7 +++---- tests/baselines/reference/decoratorOnVar.errors.txt | 7 +++---- 10 files changed, 26 insertions(+), 30 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 35d50c213b..8c41d97c7b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11857,15 +11857,15 @@ module ts { return false; } if (!nodeCanBeDecorated(node)) { - return grammarErrorOnNode(node, Diagnostics.Decorators_are_not_valid_here); + return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_not_valid_here); } else if (languageVersion < ScriptTarget.ES5) { - return grammarErrorOnNode(node, Diagnostics.Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher); + return grammarErrorOnFirstToken(node, Diagnostics.Decorators_are_only_available_when_targeting_ECMAScript_5_and_higher); } else if (node.kind === SyntaxKind.GetAccessor || node.kind === SyntaxKind.SetAccessor) { let accessors = getAllAccessorDeclarations((node.parent).members, node); if (accessors.firstAccessor.decorators && node === accessors.secondAccessor) { - return grammarErrorOnNode(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); + return grammarErrorOnFirstToken(node, Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name); } } return false; diff --git a/tests/baselines/reference/decoratorOnClassConstructor1.errors.txt b/tests/baselines/reference/decoratorOnClassConstructor1.errors.txt index 14a164eccb..279cf38894 100644 --- a/tests/baselines/reference/decoratorOnClassConstructor1.errors.txt +++ b/tests/baselines/reference/decoratorOnClassConstructor1.errors.txt @@ -6,6 +6,6 @@ tests/cases/conformance/decorators/class/constructor/decoratorOnClassConstructor class C { @dec constructor() {} - ~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS1206: Decorators are not valid here. } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnEnum.errors.txt b/tests/baselines/reference/decoratorOnEnum.errors.txt index 21a6d39aab..8adf03e548 100644 --- a/tests/baselines/reference/decoratorOnEnum.errors.txt +++ b/tests/baselines/reference/decoratorOnEnum.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/decorators/invalid/decoratorOnEnum.ts(4,6): error TS1206: Decorators are not valid here. +tests/cases/conformance/decorators/invalid/decoratorOnEnum.ts(3,1): error TS1206: Decorators are not valid here. ==== tests/cases/conformance/decorators/invalid/decoratorOnEnum.ts (1 errors) ==== declare function dec(target: T): T; @dec - enum E { - ~ + ~ !!! error TS1206: Decorators are not valid here. + enum E { } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnFunctionDeclaration.errors.txt b/tests/baselines/reference/decoratorOnFunctionDeclaration.errors.txt index bda00f1a85..24d5eb3509 100644 --- a/tests/baselines/reference/decoratorOnFunctionDeclaration.errors.txt +++ b/tests/baselines/reference/decoratorOnFunctionDeclaration.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/decorators/invalid/decoratorOnFunctionDeclaration.ts(4,10): error TS1206: Decorators are not valid here. +tests/cases/conformance/decorators/invalid/decoratorOnFunctionDeclaration.ts(3,1): error TS1206: Decorators are not valid here. ==== tests/cases/conformance/decorators/invalid/decoratorOnFunctionDeclaration.ts (1 errors) ==== declare function dec(target: T): T; @dec - function F() { - ~ + ~ !!! error TS1206: Decorators are not valid here. + function F() { } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnImportEquals1.errors.txt b/tests/baselines/reference/decoratorOnImportEquals1.errors.txt index a09a0b0142..cc75018ca4 100644 --- a/tests/baselines/reference/decoratorOnImportEquals1.errors.txt +++ b/tests/baselines/reference/decoratorOnImportEquals1.errors.txt @@ -10,8 +10,7 @@ tests/cases/conformance/decorators/invalid/decoratorOnImportEquals1.ts(8,5): err module M2 { @dec - ~~~~ - import X = M1.X; - ~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS1206: Decorators are not valid here. + import X = M1.X; } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnImportEquals2.errors.txt b/tests/baselines/reference/decoratorOnImportEquals2.errors.txt index 5701afe569..0c64db354e 100644 --- a/tests/baselines/reference/decoratorOnImportEquals2.errors.txt +++ b/tests/baselines/reference/decoratorOnImportEquals2.errors.txt @@ -3,10 +3,9 @@ tests/cases/conformance/decorators/invalid/decoratorOnImportEquals2_1.ts(1,1): e ==== tests/cases/conformance/decorators/invalid/decoratorOnImportEquals2_1.ts (1 errors) ==== @dec - ~~~~ - import lib = require('./decoratorOnImportEquals2_0'); - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~ !!! error TS1206: Decorators are not valid here. + import lib = require('./decoratorOnImportEquals2_0'); declare function dec(target: T): T; ==== tests/cases/conformance/decorators/invalid/decoratorOnImportEquals2_0.ts (0 errors) ==== diff --git a/tests/baselines/reference/decoratorOnInterface.errors.txt b/tests/baselines/reference/decoratorOnInterface.errors.txt index 055b43fa87..65aec166d7 100644 --- a/tests/baselines/reference/decoratorOnInterface.errors.txt +++ b/tests/baselines/reference/decoratorOnInterface.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/decorators/invalid/decoratorOnInterface.ts(4,11): error TS1206: Decorators are not valid here. +tests/cases/conformance/decorators/invalid/decoratorOnInterface.ts(3,1): error TS1206: Decorators are not valid here. ==== tests/cases/conformance/decorators/invalid/decoratorOnInterface.ts (1 errors) ==== declare function dec(target: T): T; @dec - interface I { - ~ + ~ !!! error TS1206: Decorators are not valid here. + interface I { } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnInternalModule.errors.txt b/tests/baselines/reference/decoratorOnInternalModule.errors.txt index 2fd92dfb25..e34e381d9e 100644 --- a/tests/baselines/reference/decoratorOnInternalModule.errors.txt +++ b/tests/baselines/reference/decoratorOnInternalModule.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts(4,8): error TS1206: Decorators are not valid here. +tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts(3,1): error TS1206: Decorators are not valid here. ==== tests/cases/conformance/decorators/invalid/decoratorOnInternalModule.ts (1 errors) ==== declare function dec(target: T): T; @dec - module M { - ~ + ~ !!! error TS1206: Decorators are not valid here. + module M { } \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnTypeAlias.errors.txt b/tests/baselines/reference/decoratorOnTypeAlias.errors.txt index 0d3109fe46..6d76a0b30d 100644 --- a/tests/baselines/reference/decoratorOnTypeAlias.errors.txt +++ b/tests/baselines/reference/decoratorOnTypeAlias.errors.txt @@ -5,7 +5,6 @@ tests/cases/conformance/decorators/invalid/decoratorOnTypeAlias.ts(3,1): error T declare function dec(target: T): T; @dec - ~~~~ - type T = number; - ~~~~~~~~~~~~~~~~ -!!! error TS1206: Decorators are not valid here. \ No newline at end of file + ~ +!!! error TS1206: Decorators are not valid here. + type T = number; \ No newline at end of file diff --git a/tests/baselines/reference/decoratorOnVar.errors.txt b/tests/baselines/reference/decoratorOnVar.errors.txt index bd87357eda..a2262adf74 100644 --- a/tests/baselines/reference/decoratorOnVar.errors.txt +++ b/tests/baselines/reference/decoratorOnVar.errors.txt @@ -5,7 +5,6 @@ tests/cases/conformance/decorators/invalid/decoratorOnVar.ts(3,1): error TS1206: declare function dec(target: T): T; @dec - ~~~~ - var x: number; - ~~~~~~~~~~~~~~ -!!! error TS1206: Decorators are not valid here. \ No newline at end of file + ~ +!!! error TS1206: Decorators are not valid here. + var x: number; \ No newline at end of file From 9a590dbbe5d6f03e6b06c91d144d91a952645f37 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Thu, 2 Apr 2015 15:22:53 -0700 Subject: [PATCH 14/16] PR feedback --- src/compiler/checker.ts | 61 +++++++------ src/compiler/emitter.ts | 185 +++++++++++++++++++++------------------- 2 files changed, 132 insertions(+), 114 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8c41d97c7b..0ff961ea5b 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8747,6 +8747,9 @@ module ts { /** Checks a type reference node as an expression. */ function checkTypeNodeAsExpression(node: TypeNode | LiteralExpression) { + // When we are emitting type metadata for decorators, we need to try to check the type + // as if it were an expression so that we can emit the type in a value position when we + // serialize the type metadata. if (node && node.kind === SyntaxKind.TypeReference) { let type = getTypeFromTypeNodeOrHeritageClauseElement(node); let shouldCheckIfUnknownType = type === unknownType && compilerOptions.separateCompilation; @@ -8785,29 +8788,35 @@ module ts { function checkDecorators(node: Node): void { if (!node.decorators) { return; - } + } - switch (node.kind) { - case SyntaxKind.ClassDeclaration: - var constructor = getFirstConstructorWithBody(node); - if (constructor) { - checkParameterTypeAnnotationsAsExpressions(constructor); - } - break; + // skip this check for nodes that cannot have decorators. These should have already had an error reported by + // checkGrammarDecorators. + if (!nodeCanBeDecorated(node)) { + return; + } - case SyntaxKind.MethodDeclaration: - checkParameterTypeAnnotationsAsExpressions(node); - // fall-through + if (compilerOptions.emitDecoratorMetadata) { + // we only need to perform these checks if we are emitting serialized type metadata for the target of a decorator. + switch (node.kind) { + case SyntaxKind.ClassDeclaration: + var constructor = getFirstConstructorWithBody(node); + if (constructor) { + checkParameterTypeAnnotationsAsExpressions(constructor); + } + break; - case SyntaxKind.SetAccessor: - case SyntaxKind.GetAccessor: - case SyntaxKind.PropertyDeclaration: - case SyntaxKind.Parameter: - checkTypeAnnotationAsExpression(node); - break; + case SyntaxKind.MethodDeclaration: + checkParameterTypeAnnotationsAsExpressions(node); + // fall-through - default: - return; + case SyntaxKind.SetAccessor: + case SyntaxKind.GetAccessor: + case SyntaxKind.PropertyDeclaration: + case SyntaxKind.Parameter: + checkTypeAnnotationAsExpression(node); + break; + } } emitDecorate = true; @@ -11510,7 +11519,7 @@ module ts { return undefined; } - /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + /** Serializes an EntityName (with substitutions) to an appropriate JS constructor value. Used by the __metadata decorator. */ function serializeEntityName(node: EntityName, getGeneratedNameForNode: (Node: Node) => string, fallbackPath?: string[]): string { if (node.kind === SyntaxKind.Identifier) { var substitution = getExpressionNameSubstitution(node, getGeneratedNameForNode); @@ -11531,7 +11540,7 @@ module ts { } } - /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + /** Serializes a TypeReferenceNode to an appropriate JS constructor value. Used by the __metadata decorator. */ function serializeTypeReferenceNode(node: TypeReferenceNode, getGeneratedNameForNode: (Node: Node) => string): string | string[] { // serialization of a TypeReferenceNode uses the following rules: // @@ -11578,7 +11587,7 @@ module ts { return "Object"; } - /** Serializes a TypeNode to an appropriate JS constructor value. Used by the `@type`, `@paramtypes`, and `@returntype` decorators. */ + /** Serializes a TypeNode to an appropriate JS constructor value. Used by the __metadata decorator. */ function serializeTypeNode(node: TypeNode | LiteralExpression, getGeneratedNameForNode: (Node: Node) => string): string | string[] { // serialization of a TypeNode uses the following rules: // @@ -11623,11 +11632,11 @@ module ts { return "Object"; } - /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the `@type` and `@paramtypes` decorators. */ + /** Serializes the type of a declaration to an appropriate JS constructor value. Used by the __metadata decorator for a class member. */ function serializeTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { // serialization of the type of a declaration uses the following rules: // - // * The serialized type of a ClassDeclaration is the class name (see serializeEntityName). + // * The serialized type of a ClassDeclaration is "Function" // * The serialized type of a ParameterDeclaration is the serialized type of its type annotation. // * The serialized type of a PropertyDeclaration is the serialized type of its type annotation. // * The serialized type of an AccessorDeclaration is the serialized type of the return type annotation of its getter or parameter type annotation of its setter. @@ -11648,7 +11657,7 @@ module ts { return "void 0"; } - /** Serializes the parameter types of a function or the constructor of a class. Used by the `@paramtypes` decorator. */ + /** Serializes the parameter types of a function or the constructor of a class. Used by the __metadata decorator for a method or set accessor. */ function serializeParameterTypesOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): (string | string[])[] { // serialization of parameter types uses the following rules: // @@ -11695,7 +11704,7 @@ module ts { return emptyArray; } - /** Serializes the return type of function. Used by the `@returntype` decorator. */ + /** Serializes the return type of function. Used by the __metadata decorator for a method. */ function serializeReturnTypeOfNode(node: Node, getGeneratedNameForNode: (Node: Node) => string): string | string[] { if (node && isFunctionLike(node)) { return serializeTypeNode((node).type, getGeneratedNameForNode); diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index c50d745949..cae95ed0f9 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -796,27 +796,34 @@ var __param = this.__param || function(index, decorator) { return function (targ } } - function emitList(nodes: Node[], start: number, count: number, multiLine: boolean, trailingComma: boolean) { + function emitList(nodes: TNode[], start: number, count: number, multiLine: boolean, trailingComma: boolean, leadingComma?: boolean, noTrailingNewLine?: boolean, emitNode?: (node: TNode) => void): number { + if (!emitNode) { + emitNode = emit; + } + for (let i = 0; i < count; i++) { if (multiLine) { - if (i) { + if (i || leadingComma) { write(","); } writeLine(); } else { - if (i) { + if (i || leadingComma) { write(", "); } } - emit(nodes[start + i]); + emitNode(nodes[start + i]); + leadingComma = true; } if (trailingComma) { write(","); } - if (multiLine) { + if (multiLine && !noTrailingNewLine) { writeLine(); } + + return count; } function emitCommaList(nodes: Node[]) { @@ -3752,10 +3759,15 @@ var __param = this.__param || function(index, decorator) { return function (targ increaseIndent(); writeLine(); - let writeComma = false; - writeComma = emitDecoratorArray(decorators, writeComma); - writeComma = emitDecoratorsOfParameters(constructor, writeComma); - emitSerializedTypeMetadata(node, writeComma); + let decoratorCount = decorators ? decorators.length : 0; + let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, decorator => { + emitStart(decorator); + emit(decorator.expression); + emitEnd(decorator); + }); + + argumentsWritten += emitDecoratorsOfParameters(constructor, /*leadingComma*/ argumentsWritten > 0); + emitSerializedTypeMetadata(node, /*leadingComma*/ argumentsWritten >= 0); decreaseIndent(); writeLine(); @@ -3861,10 +3873,15 @@ var __param = this.__param || function(index, decorator) { return function (targ increaseIndent(); writeLine(); - let writeComma = false; - writeComma = emitDecoratorArray(decorators, writeComma); - writeComma = emitDecoratorsOfParameters(functionLikeMember, writeComma); - emitSerializedTypeMetadata(member, writeComma); + let decoratorCount = decorators ? decorators.length : 0; + let argumentsWritten = emitList(decorators, 0, decoratorCount, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ false, /*noTrailingNewLine*/ true, decorator => { + emitStart(decorator); + emit(decorator.expression); + emitEnd(decorator); + }); + + argumentsWritten += emitDecoratorsOfParameters(functionLikeMember, argumentsWritten > 0); + emitSerializedTypeMetadata(member, argumentsWritten > 0); decreaseIndent(); writeLine(); @@ -3892,45 +3909,32 @@ var __param = this.__param || function(index, decorator) { return function (targ } } - function emitDecoratorsOfParameters(node: FunctionLikeDeclaration, writeComma: boolean): boolean { + function emitDecoratorsOfParameters(node: FunctionLikeDeclaration, leadingComma: boolean): number { + let argumentsWritten = 0; if (node) { let parameterIndex = 0; for (let parameter of node.parameters) { if (nodeIsDecorated(parameter)) { - writeComma = emitDecoratorArray(parameter.decorators, writeComma, `__param(${parameterIndex}, `, ")"); + let decorators = parameter.decorators; + argumentsWritten += emitList(decorators, 0, decorators.length, /*multiLine*/ true, /*trailingComma*/ false, /*leadingComma*/ leadingComma, /*noTrailingNewLine*/ true, decorator => { + emitStart(decorator); + write(`__param(${parameterIndex}, `); + emit(decorator.expression); + write(")"); + emitEnd(decorator); + }); + leadingComma = true; } ++parameterIndex; } } - return writeComma; - } - - function emitDecoratorArray(decorators: NodeArray, writeComma: boolean, prefix?: string, postfix?: string): boolean { - if (decorators) { - let decoratorCount = decorators ? decorators.length : 0; - for (let i = 0; i < decoratorCount; i++) { - if (writeComma) { - write(","); - } - writeLine(); - - let decorator = decorators[i]; - emitStart(decorator); - write(prefix); - emit(decorator.expression); - write(postfix); - emitEnd(decorator); - writeComma = true; - } - } - return writeComma; + return argumentsWritten; } function shouldEmitTypeMetadata(node: Declaration): boolean { - if (!compilerOptions.emitDecoratorMetadata) { - return false; - } - + // This method determines whether to emit the "design:type" metadata based on the node's kind. + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // compiler option is set. switch (node.kind) { case SyntaxKind.MethodDeclaration: case SyntaxKind.GetAccessor: @@ -3943,10 +3947,9 @@ var __param = this.__param || function(index, decorator) { return function (targ } function shouldEmitReturnTypeMetadata(node: Declaration): boolean { - if (!compilerOptions.emitDecoratorMetadata) { - return false; - } - + // This method determines whether to emit the "design:returntype" metadata based on the node's kind. + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // compiler option is set. switch (node.kind) { case SyntaxKind.MethodDeclaration: return true; @@ -3955,10 +3958,9 @@ var __param = this.__param || function(index, decorator) { return function (targ } function shouldEmitParamTypesMetadata(node: Declaration): boolean { - if (!compilerOptions.emitDecoratorMetadata) { - return false; - } - + // This method determines whether to emit the "design:paramtypes" metadata based on the node's kind. + // The caller should have already tested whether the node has decorators and whether the emitDecoratorMetadata + // compiler option is set. switch (node.kind) { case SyntaxKind.ClassDeclaration: case SyntaxKind.MethodDeclaration: @@ -3968,50 +3970,57 @@ var __param = this.__param || function(index, decorator) { return function (targ return false; } - function emitSerializedTypeMetadata(node: Declaration, writeComma: boolean): void { - if (shouldEmitTypeMetadata(node)) { - var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); - if (serializedType) { - if (writeComma) { - write(", "); - } - writeLine(); - write("__metadata('design:type', "); - emitSerializedType(node, serializedType); - write(")"); - writeComma = true; - } - } - if (shouldEmitParamTypesMetadata(node)) { - var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); - if (serializedTypes) { - if (writeComma) { - write(", "); - } - writeLine(); - write("__metadata('design:paramtypes', ["); - for (var i = 0; i < serializedTypes.length; ++i) { - if (i > 0) { + function emitSerializedTypeMetadata(node: Declaration, writeComma: boolean): number { + // This method emits the serialized type metadata for a decorator target. + // The caller should have already tested whether the node has decorators. + let argumentsWritten = 0; + if (compilerOptions.emitDecoratorMetadata) { + if (shouldEmitTypeMetadata(node)) { + var serializedType = resolver.serializeTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + if (writeComma) { write(", "); } - emitSerializedType(node, serializedTypes[i]); + writeLine(); + write("__metadata('design:type', "); + emitSerializedType(node, serializedType); + write(")"); + argumentsWritten++; + } + } + if (shouldEmitParamTypesMetadata(node)) { + var serializedTypes = resolver.serializeParameterTypesOfNode(node, getGeneratedNameForNode); + if (serializedTypes) { + if (writeComma || argumentsWritten) { + write(", "); + } + writeLine(); + write("__metadata('design:paramtypes', ["); + for (var i = 0; i < serializedTypes.length; ++i) { + if (i > 0) { + write(", "); + } + emitSerializedType(node, serializedTypes[i]); + } + write("])"); + argumentsWritten++; + } + } + if (shouldEmitReturnTypeMetadata(node)) { + var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); + if (serializedType) { + if (writeComma || argumentsWritten) { + write(", "); + } + writeLine(); + write("__metadata('design:returntype', "); + emitSerializedType(node, serializedType); + write(")"); + argumentsWritten++; } - write("])"); - writeComma = true; - } - } - if (shouldEmitReturnTypeMetadata(node)) { - var serializedType = resolver.serializeReturnTypeOfNode(node, getGeneratedNameForNode); - if (serializedType) { - if (writeComma) { - write(", "); - } - writeLine(); - write("__metadata('design:returntype', "); - emitSerializedType(node, serializedType); - write(")"); } } + return argumentsWritten; } function serializeTypeNameSegment(location: Node, path: string[], index: number): string { From 98c56ae9a8aac5bc5024a4ebd8db943418530755 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 6 Apr 2015 10:42:58 -0700 Subject: [PATCH 15/16] PR feedback --- src/compiler/checker.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 0ff961ea5b..9b4b7c1209 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -8768,19 +8768,28 @@ module ts { */ function checkTypeAnnotationAsExpression(node: AccessorDeclaration | PropertyDeclaration | ParameterDeclaration | MethodDeclaration) { switch (node.kind) { - case SyntaxKind.PropertyDeclaration: return checkTypeNodeAsExpression((node).type); - case SyntaxKind.Parameter: return checkTypeNodeAsExpression((node).type); - case SyntaxKind.MethodDeclaration: return checkTypeNodeAsExpression((node).type); - case SyntaxKind.GetAccessor: return checkTypeNodeAsExpression((node).type); - case SyntaxKind.SetAccessor: return checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); + case SyntaxKind.PropertyDeclaration: + checkTypeNodeAsExpression((node).type); + break; + case SyntaxKind.Parameter: checkTypeNodeAsExpression((node).type); + break; + case SyntaxKind.MethodDeclaration: + checkTypeNodeAsExpression((node).type); + break; + case SyntaxKind.GetAccessor: + checkTypeNodeAsExpression((node).type); + break; + case SyntaxKind.SetAccessor: + checkTypeNodeAsExpression(getSetAccessorTypeAnnotationNode(node)); + break; } } /** Checks the type annotation of the parameters of a function/method or the constructor of a class as expressions */ function checkParameterTypeAnnotationsAsExpressions(node: FunctionLikeDeclaration) { // ensure all type annotations with a value declaration are checked as an expression - if (node) { - forEach(node.parameters, checkTypeAnnotationAsExpression); + for (let parameter of node.parameters) { + checkTypeAnnotationAsExpression(parameter); } } @@ -11624,7 +11633,9 @@ module ts { case SyntaxKind.TypeLiteral: case SyntaxKind.UnionType: case SyntaxKind.AnyKeyword: + break; default: + Debug.fail("Cannot serialize unexpected type node."); break; } } From 1bab2339a34ce2673f78ccd43b23b19201f84295 Mon Sep 17 00:00:00 2001 From: Ron Buckton Date: Mon, 6 Apr 2015 11:13:02 -0700 Subject: [PATCH 16/16] Updated baselines --- .../classExpressionWithDecorator1.js | 20 +++++++----------- .../reference/decoratorOnClassAccessor3.js | 21 ++++++++----------- .../reference/decoratorOnClassAccessor6.js | 21 ++++++++----------- .../reference/decoratorOnClassMethod3.js | 21 ++++++++----------- .../reference/decoratorOnClassProperty3.js | 20 +++++++----------- 5 files changed, 43 insertions(+), 60 deletions(-) diff --git a/tests/baselines/reference/classExpressionWithDecorator1.js b/tests/baselines/reference/classExpressionWithDecorator1.js index fd15941996..3e25539890 100644 --- a/tests/baselines/reference/classExpressionWithDecorator1.js +++ b/tests/baselines/reference/classExpressionWithDecorator1.js @@ -2,25 +2,21 @@ var v = @decorate class C { static p = 1 }; //// [classExpressionWithDecorator1.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; var v = ; var C = (function () { function C() { } C.p = 1; - C = __decorate([decorate], C); + C = __decorate([ + decorate + ], C); return C; })(); ; diff --git a/tests/baselines/reference/decoratorOnClassAccessor3.js b/tests/baselines/reference/decoratorOnClassAccessor3.js index a2a2221a11..23e689f311 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor3.js +++ b/tests/baselines/reference/decoratorOnClassAccessor3.js @@ -6,18 +6,12 @@ class C { } //// [decoratorOnClassAccessor3.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; var C = (function () { function C() { @@ -27,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassAccessor6.js b/tests/baselines/reference/decoratorOnClassAccessor6.js index ce9776bfc6..465e13ebb1 100644 --- a/tests/baselines/reference/decoratorOnClassAccessor6.js +++ b/tests/baselines/reference/decoratorOnClassAccessor6.js @@ -6,18 +6,12 @@ class C { } //// [decoratorOnClassAccessor6.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; var C = (function () { function C() { @@ -27,6 +21,9 @@ var C = (function () { enumerable: true, configurable: true }); - Object.defineProperty(C.prototype, "accessor", __decorate([dec], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); + Object.defineProperty(C.prototype, "accessor", + __decorate([ + dec + ], C.prototype, "accessor", Object.getOwnPropertyDescriptor(C.prototype, "accessor"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassMethod3.js b/tests/baselines/reference/decoratorOnClassMethod3.js index 7e13f91d86..f93b7d7a6b 100644 --- a/tests/baselines/reference/decoratorOnClassMethod3.js +++ b/tests/baselines/reference/decoratorOnClassMethod3.js @@ -6,23 +6,20 @@ class C { } //// [decoratorOnClassMethod3.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; var C = (function () { function C() { } C.prototype.method = function () { }; - Object.defineProperty(C.prototype, "method", __decorate([dec], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); + Object.defineProperty(C.prototype, "method", + __decorate([ + dec + ], C.prototype, "method", Object.getOwnPropertyDescriptor(C.prototype, "method"))); return C; })(); diff --git a/tests/baselines/reference/decoratorOnClassProperty3.js b/tests/baselines/reference/decoratorOnClassProperty3.js index f8a2cce27d..05476c66e7 100644 --- a/tests/baselines/reference/decoratorOnClassProperty3.js +++ b/tests/baselines/reference/decoratorOnClassProperty3.js @@ -6,22 +6,18 @@ class C { } //// [decoratorOnClassProperty3.js] -var __decorate = this.__decorate || function (decorators, target, key, value) { - var kind = typeof (arguments.length == 2 ? value = target : value); - for (var i = decorators.length - 1; i >= 0; --i) { - var decorator = decorators[i]; - switch (kind) { - case "function": value = decorator(value) || value; break; - case "number": decorator(target, key, value); break; - case "undefined": decorator(target, key); break; - case "object": value = decorator(target, key, value) || value; break; - } +var __decorate = this.__decorate || (typeof Reflect === "object" && Reflect.decorate) || function (decorators, target, key, desc) { + switch (arguments.length) { + case 2: return decorators.reduceRight(function(o, d) { return (d && d(o)) || o; }, target); + case 3: return decorators.reduceRight(function(o, d) { return (d && d(target, key)), void 0; }, void 0); + case 4: return decorators.reduceRight(function(o, d) { return (d && d(target, key, o)) || o; }, desc); } - return value; }; var C = (function () { function C() { } - __decorate([dec], C.prototype, "prop"); + __decorate([ + dec + ], C.prototype, "prop"); return C; })();