diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 7f3c1cfc43d16..f180f9e544b6a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -29904,7 +29904,6 @@ namespace ts { } function checkKindsOfPropertyMemberOverrides(type: InterfaceType, baseType: BaseType): void { - // TypeScript 1.0 spec (April 2014): 8.2.3 // A derived class inherits all members from its base class it doesn't override. // Inheritance means that a derived class implicitly contains all non - overridden members of the base class. @@ -29938,7 +29937,6 @@ namespace ts { // type declaration, derived and base resolve to the same symbol even in the case of generic classes. if (derived === base) { // derived class inherits base without override/redeclaration - const derivedClassDecl = getClassLikeDeclarationOfSymbol(type.symbol)!; // It is an error to inherit an abstract member without implementing it or being declared abstract. @@ -29975,14 +29973,53 @@ namespace ts { continue; } - if (isPrototypeProperty(base) || base.flags & SymbolFlags.PropertyOrAccessor && derived.flags & SymbolFlags.PropertyOrAccessor) { - // method is overridden with method or property/accessor is overridden with property/accessor - correct case - continue; - } - let errorMessage: DiagnosticMessage; - if (isPrototypeProperty(base)) { - if (derived.flags & SymbolFlags.Accessor) { + const basePropertyFlags = base.flags & SymbolFlags.PropertyOrAccessor; + const derivedPropertyFlags = derived.flags & SymbolFlags.PropertyOrAccessor; + if (basePropertyFlags && derivedPropertyFlags) { + // property/accessor is overridden with property/accessor + if (!compilerOptions.useDefineForClassFields + || baseDeclarationFlags & ModifierFlags.Abstract && !(base.valueDeclaration && isPropertyDeclaration(base.valueDeclaration) && base.valueDeclaration.initializer) + || base.valueDeclaration && base.valueDeclaration.parent.kind === SyntaxKind.InterfaceDeclaration + || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) { + // when the base property is abstract or from an interface, base/derived flags don't need to match + // same when the derived property is from an assignment + continue; + } + if (basePropertyFlags !== SymbolFlags.Property && derivedPropertyFlags === SymbolFlags.Property) { + errorMessage = Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_property; + } + else if (basePropertyFlags === SymbolFlags.Property && derivedPropertyFlags !== SymbolFlags.Property) { + errorMessage = Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_accessor; + } + else { + const uninitialized = find(derived.declarations, d => d.kind === SyntaxKind.PropertyDeclaration && !(d as PropertyDeclaration).initializer); + if (uninitialized + && !(derived.flags & SymbolFlags.Transient) + && !(baseDeclarationFlags & ModifierFlags.Abstract) + && !(derivedDeclarationFlags & ModifierFlags.Abstract) + && !derived.declarations.some(d => d.flags & NodeFlags.Ambient)) { + const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol)!); + const propName = (uninitialized as PropertyDeclaration).name; + if ((uninitialized as PropertyDeclaration).exclamationToken + || !constructor + || !isIdentifier(propName) + || !strictNullChecks + || !isPropertyInitializedInConstructor(propName, type, constructor)) { + const errorMessage = Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration; + error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, symbolToString(base), typeToString(baseType)); + } + } + // correct case + continue; + } + } + else if (isPrototypeProperty(base)) { + if (isPrototypeProperty(derived)) { + // method is overridden with method -- correct case + continue; + } + else if (derived.flags & SymbolFlags.Accessor) { errorMessage = Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor; } else { @@ -30044,6 +30081,9 @@ namespace ts { } const constructor = findConstructorDeclaration(node); for (const member of node.members) { + if (getModifierFlags(member) & ModifierFlags.Ambient) { + continue; + } if (isInstancePropertyWithoutInitializer(member)) { const propName = (member).name; if (isIdentifier(propName)) { @@ -32970,7 +33010,7 @@ namespace ts { else if (flags & ModifierFlags.Async) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context, "async"); } - else if (isClassLike(node.parent)) { + else if (isClassLike(node.parent) && !isPropertyDeclaration(node)) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_class_element, "declare"); } else if (node.kind === SyntaxKind.Parameter) { diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index fd0d428d54bae..8e0a5b8d10af1 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -873,6 +873,13 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Disable_strict_checking_of_generic_signatures_in_function_types, }, + { + name: "useDefineForClassFields", + type: "boolean", + affectsSemanticDiagnostics: true, + category: Diagnostics.Advanced_Options, + description: Diagnostics.Emit_class_fields_with_Define_instead_of_Set, + }, { name: "keyofStringsOnly", type: "boolean", diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 87052c4e7cdb2..78700a9476cef 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2233,6 +2233,19 @@ "category": "Error", "code": 2609 }, + "Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member property.": { + "category": "Error", + "code": 2610 + }, + "Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member accessor.": { + "category": "Error", + "code": 2611 + }, + "Property '{0}' will overwrite the base property in '{1}'. If this is intentional, add an initializer. Otherwise, add a 'declare' modifier or remove the redundant declaration.": { + "category": "Error", + "code": 2612 + }, + "Cannot augment module '{0}' with value exports because it resolves to a non-module entity.": { "category": "Error", "code": 2649 @@ -3112,6 +3125,10 @@ "category": "Error", "code": 5047 }, + "Option '{0}' cannot be specified when option 'target' is 'ES3'.": { + "category": "Error", + "code": 5048 + }, "Option '{0} can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.": { "category": "Error", "code": 5051 @@ -3966,6 +3983,10 @@ "Conflicts are in this file.": { "category": "Message", "code": 6201 + }, + "Project references may not form a circular graph. Cycle detected: {0}": { + "category": "Error", + "code": 6202 }, "'{0}' was also declared here.": { "category": "Message", @@ -4043,6 +4064,10 @@ "category": "Message", "code": 6221 }, + "Emit class fields with Define instead of Set.": { + "category": "Message", + "code": 6222 + }, "Projects to reference": { "category": "Message", @@ -4052,10 +4077,7 @@ "category": "Message", "code": 6302 }, - "Project references may not form a circular graph. Cycle detected: {0}": { - "category": "Error", - "code": 6202 - }, + "Composite projects may not disable declaration emit.": { "category": "Error", "code": 6304 @@ -5180,6 +5202,14 @@ "category": "Message", "code": 95093 }, + "Prefix with 'declare'": { + "category": "Message", + "code": 95094 + }, + "Prefix all incorrect property declarations with 'declare'": { + "category": "Message", + "code": 95095 + }, "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": { "category": "Error", diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index bd2dcbee6f188..a4f780185e91e 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -484,6 +484,47 @@ namespace ts { return node; } + function createMethodCall(object: Expression, methodName: string | Identifier, argumentsList: readonly Expression[]) { + return createCall( + createPropertyAccess(object, asName(methodName)), + /*typeArguments*/ undefined, + argumentsList + ); + } + + function createGlobalMethodCall(globalObjectName: string, methodName: string, argumentsList: readonly Expression[]) { + return createMethodCall(createIdentifier(globalObjectName), methodName, argumentsList); + } + + /* @internal */ + export function createObjectDefinePropertyCall(target: Expression, propertyName: string | Expression, attributes: Expression) { + return createGlobalMethodCall("Object", "defineProperty", [target, asExpression(propertyName), attributes]); + } + + function tryAddPropertyAssignment(properties: Push, propertyName: string, expression: Expression | undefined) { + if (expression) { + properties.push(createPropertyAssignment(propertyName, expression)); + return true; + } + return false; + } + + /* @internal */ + export function createPropertyDescriptor(attributes: PropertyDescriptorAttributes, singleLine?: boolean) { + const properties: PropertyAssignment[] = []; + tryAddPropertyAssignment(properties, "enumerable", asExpression(attributes.enumerable)); + tryAddPropertyAssignment(properties, "configurable", asExpression(attributes.configurable)); + + let isData = tryAddPropertyAssignment(properties, "writable", asExpression(attributes.writable)); + isData = tryAddPropertyAssignment(properties, "value", attributes.value) || isData; + + let isAccessor = tryAddPropertyAssignment(properties, "get", attributes.get); + isAccessor = tryAddPropertyAssignment(properties, "set", attributes.set) || isAccessor; + + Debug.assert(!(isData && isAccessor), "A PropertyDescriptor may not be both an accessor descriptor and a data descriptor."); + return createObjectLiteral(properties, !singleLine); + } + export function updateMethod( node: MethodDeclaration, decorators: readonly Decorator[] | undefined, @@ -3146,8 +3187,11 @@ namespace ts { return isString(name) ? createIdentifier(name) : name; } - function asExpression(value: string | number | Expression) { - return isString(value) || typeof value === "number" ? createLiteral(value) : value; + function asExpression(value: string | number | boolean | T): T | StringLiteral | NumericLiteral | BooleanLiteral { + return typeof value === "string" ? createStringLiteral(value) : + typeof value === "number" ? createNumericLiteral(""+value) : + typeof value === "boolean" ? value ? createTrue() : createFalse() : + value; } function asNodeArray(array: readonly T[]): NodeArray; diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index edaa7ebeaebaa..bad247b175dca 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -5995,8 +5995,16 @@ namespace ts { token() === SyntaxKind.NumericLiteral || token() === SyntaxKind.AsteriskToken || token() === SyntaxKind.OpenBracketToken) { - - return parsePropertyOrMethodDeclaration(node); + const isAmbient = node.modifiers && some(node.modifiers, isDeclareModifier); + if (isAmbient) { + for (const m of node.modifiers!) { + m.flags |= NodeFlags.Ambient; + } + return doInsideOfContext(NodeFlags.Ambient, () => parsePropertyOrMethodDeclaration(node as PropertyDeclaration | MethodDeclaration)); + } + else { + return parsePropertyOrMethodDeclaration(node as PropertyDeclaration | MethodDeclaration); + } } if (node.decorators || node.modifiers) { diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 04c2c8d2c770b..9bc91e423a4f2 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -3073,6 +3073,10 @@ namespace ts { } } + if (options.useDefineForClassFields && languageVersion === ScriptTarget.ES3) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3, "useDefineForClassFields"); + } + if (!options.noEmit && options.allowJs && getEmitDeclarations(options)) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "allowJs", getEmitDeclarationOptionName(options)); } diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts index 37473d9bb20ec..1424d29336945 100644 --- a/src/compiler/transformers/classFields.ts +++ b/src/compiler/transformers/classFields.ts @@ -44,7 +44,9 @@ namespace ts { return chainBundle(transformSourceFile); function transformSourceFile(node: SourceFile) { - if (node.isDeclarationFile) { + const options = context.getCompilerOptions(); + if (node.isDeclarationFile + || options.useDefineForClassFields && options.target === ScriptTarget.ESNext) { return node; } const visited = visitEachChild(node, visitor, context); @@ -172,9 +174,9 @@ namespace ts { // From ES6 specification: // HasLexicalDeclaration (N) : Determines if the argument identifier has a binding in this environment record that was created using // a lexical declaration such as a LexicalDeclaration or a ClassDeclaration. - const staticProperties = getInitializedProperties(node, /*isStatic*/ true); + const staticProperties = getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); if (some(staticProperties)) { - addInitializedPropertyStatements(statements, staticProperties, getInternalName(node)); + addPropertyStatements(statements, staticProperties, getInternalName(node)); } return statements; @@ -196,7 +198,7 @@ namespace ts { // these statements after the class expression variable statement. const isDecoratedClassDeclaration = isClassDeclaration(getOriginalNode(node)); - const staticProperties = getInitializedProperties(node, /*isStatic*/ true); + const staticProperties = getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); const extendsClauseElement = getEffectiveBaseTypeNode(node); const isDerivedClass = !!(extendsClauseElement && skipOuterExpressions(extendsClauseElement.expression).kind !== SyntaxKind.NullKeyword); @@ -220,7 +222,7 @@ namespace ts { pendingExpressions = savedPendingExpressions; if (pendingStatements && some(staticProperties)) { - addInitializedPropertyStatements(pendingStatements, staticProperties, getInternalName(node)); + addPropertyStatements(pendingStatements, staticProperties, getInternalName(node)); } return classExpression; } @@ -266,8 +268,8 @@ namespace ts { function transformConstructor(node: ClassDeclaration | ClassExpression, isDerivedClass: boolean) { const constructor = visitNode(getFirstConstructorWithBody(node), visitor, isConstructorDeclaration); - const containsPropertyInitializer = forEach(node.members, isInitializedProperty); - if (!containsPropertyInitializer) { + const containsProperty = forEach(node.members, m => isInitializedProperty(m, /*requireInitializer*/ !context.getCompilerOptions().useDefineForClassFields)); + if (!containsProperty) { return constructor; } const parameters = visitParameterList(constructor ? constructor.parameters : undefined, visitor, context); @@ -292,7 +294,7 @@ namespace ts { } function transformConstructorBody(node: ClassDeclaration | ClassExpression, constructor: ConstructorDeclaration | undefined, isDerivedClass: boolean) { - const properties = getInitializedProperties(node, /*isStatic*/ false); + const properties = getProperties(node, /*requireInitializer*/ !context.getCompilerOptions().useDefineForClassFields, /*isStatic*/ false); // Only generate synthetic constructor when there are property initializers to move. if (!constructor && !some(properties)) { @@ -349,7 +351,7 @@ namespace ts { indexOfFirstStatement += parameterPropertyDeclarationCount; } } - addInitializedPropertyStatements(statements, properties, createThis()); + addPropertyStatements(statements, properties, createThis()); // Add existing statements, skipping the initial super call. if (constructor) { @@ -376,7 +378,7 @@ namespace ts { * @param properties An array of property declarations to transform. * @param receiver The receiver on which each property should be assigned. */ - function addInitializedPropertyStatements(statements: Statement[], properties: readonly PropertyDeclaration[], receiver: LeftHandSideExpression) { + function addPropertyStatements(statements: Statement[], properties: readonly PropertyDeclaration[], receiver: LeftHandSideExpression) { for (const property of properties) { const statement = createExpressionStatement(transformInitializedProperty(property, receiver)); setSourceMapRange(statement, moveRangePastModifiers(property)); @@ -414,13 +416,23 @@ namespace ts { */ function transformInitializedProperty(property: PropertyDeclaration, receiver: LeftHandSideExpression) { // We generate a name here in order to reuse the value cached by the relocated computed name expression (which uses the same generated name) + const emitAssignment = !context.getCompilerOptions().useDefineForClassFields; const propertyName = isComputedPropertyName(property.name) && !isSimpleInlineableExpression(property.name.expression) ? updateComputedPropertyName(property.name, getGeneratedNameForNode(property.name)) : property.name; - const initializer = visitNode(property.initializer, visitor, isExpression); - const memberAccess = createMemberAccessForPropertyName(receiver, propertyName, /*location*/ propertyName); - return createAssignment(memberAccess, initializer); + const initializer = property.initializer || emitAssignment ? visitNode(property.initializer, visitor, isExpression) : createVoidZero(); + if (emitAssignment) { + const memberAccess = createMemberAccessForPropertyName(receiver, propertyName, /*location*/ propertyName); + return createAssignment(memberAccess, initializer); + } + else { + const name = isComputedPropertyName(propertyName) ? propertyName.expression + : isIdentifier(propertyName) ? createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) + : propertyName; + const descriptor = createPropertyDescriptor({ value: initializer, configurable: true, writable: true, enumerable: true }); + return createObjectDefinePropertyCall(receiver, name, descriptor); + } } function enableSubstitutionForClassAliases() { diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 2b2a75e3c24c3..add17449edf3d 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -86,7 +86,6 @@ namespace ts { let emittedImports: readonly AnyImportSyntax[] | undefined; // must be declared in container so it can be `undefined` while transformer's first pass const resolver = context.getEmitResolver(); const options = context.getCompilerOptions(); - const newLine = getNewLineCharacter(options); const { noResolve, stripInternal } = options; return transformRoot; @@ -861,35 +860,25 @@ namespace ts { return cleanup(sig); } case SyntaxKind.GetAccessor: { - // For now, only emit class accessors as accessors if they were already declared in an ambient context. - if (input.flags & NodeFlags.Ambient) { - const isPrivate = hasModifier(input, ModifierFlags.Private); - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); - return cleanup(updateGetAccessor( - input, - /*decorators*/ undefined, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, isPrivate), - !isPrivate ? ensureType(input, accessorType) : undefined, - /*body*/ undefined)); - } - const newNode = ensureAccessor(input); - return cleanup(newNode); + const isPrivate = hasModifier(input, ModifierFlags.Private); + const accessorType = getTypeAnnotationFromAllAccessorDeclarations(input, resolver.getAllAccessorDeclarations(input)); + return cleanup(updateGetAccessor( + input, + /*decorators*/ undefined, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, isPrivate), + !isPrivate ? ensureType(input, accessorType) : undefined, + /*body*/ undefined)); } case SyntaxKind.SetAccessor: { - // For now, only emit class accessors as accessors if they were already declared in an ambient context. - if (input.flags & NodeFlags.Ambient) { - return cleanup(updateSetAccessor( - input, - /*decorators*/ undefined, - ensureModifiers(input), - input.name, - updateAccessorParamsList(input, hasModifier(input, ModifierFlags.Private)), - /*body*/ undefined)); - } - const newNode = ensureAccessor(input); - return cleanup(newNode); + return cleanup(updateSetAccessor( + input, + /*decorators*/ undefined, + ensureModifiers(input), + input.name, + updateAccessorParamsList(input, hasModifier(input, ModifierFlags.Private)), + /*body*/ undefined)); } case SyntaxKind.PropertyDeclaration: return cleanup(updateProperty( @@ -1462,36 +1451,6 @@ namespace ts { return accessorType; } - function ensureAccessor(node: AccessorDeclaration): PropertyDeclaration | undefined { - const accessors = resolver.getAllAccessorDeclarations(node); - if (node.kind !== accessors.firstAccessor.kind) { - return; - } - const accessorType = getTypeAnnotationFromAllAccessorDeclarations(node, accessors); - const prop = createProperty(/*decorators*/ undefined, maskModifiers(node, /*mask*/ undefined, (!accessors.setAccessor) ? ModifierFlags.Readonly : ModifierFlags.None), node.name, node.questionToken, ensureType(node, accessorType), /*initializer*/ undefined); - const leadingsSyntheticCommentRanges = accessors.secondAccessor && getLeadingCommentRangesOfNode(accessors.secondAccessor, currentSourceFile); - if (leadingsSyntheticCommentRanges) { - for (const range of leadingsSyntheticCommentRanges) { - if (range.kind === SyntaxKind.MultiLineCommentTrivia) { - let text = currentSourceFile.text.slice(range.pos + 2, range.end - 2); - const lines = text.split(/\r\n?|\n/g); - if (lines.length > 1) { - const lastLines = lines.slice(1); - const indentation = guessIndentation(lastLines); - text = [lines[0], ...map(lastLines, l => l.slice(indentation))].join(newLine); - } - addSyntheticLeadingComment( - prop, - range.kind, - text, - range.hasTrailingNewLine - ); - } - } - } - return prop; - } - function transformHeritageClauses(nodes: NodeArray | undefined) { return createNodeArray(filter(map(nodes, clause => updateHeritageClause(clause, visitNodes(createNodeArray(filter(clause.types, t => { return isEntityNameExpression(t.expression) || (clause.token === SyntaxKind.ExtendsKeyword && t.expression.kind === SyntaxKind.NullKeyword); diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 2a50943cb8082..2684b1acdd554 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -1591,17 +1591,22 @@ namespace ts { function transformClassMethodDeclarationToStatement(receiver: LeftHandSideExpression, member: MethodDeclaration, container: Node) { const commentRange = getCommentRange(member); const sourceMapRange = getSourceMapRange(member); - const memberName = createMemberAccessForPropertyName(receiver, visitNode(member.name, visitor, isPropertyName), /*location*/ member.name); const memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined, container); + let e: Expression; + if (context.getCompilerOptions().useDefineForClassFields) { + const propertyName = visitNode(member.name, visitor, isPropertyName); + const name = isComputedPropertyName(propertyName) ? propertyName.expression + : isIdentifier(propertyName) ? createStringLiteral(unescapeLeadingUnderscores(propertyName.escapedText)) + : propertyName; + e = createObjectDefinePropertyCall(receiver, name, createPropertyDescriptor({ value: memberFunction, enumerable: false, writable: true, configurable: true })); + } + else { + const memberName = createMemberAccessForPropertyName(receiver, visitNode(member.name, visitor, isPropertyName), /*location*/ member.name); + e = createAssignment(memberName, memberFunction); + } setEmitFlags(memberFunction, EmitFlags.NoComments); setSourceMapRange(memberFunction, sourceMapRange); - - const statement = setTextRange( - createExpressionStatement( - createAssignment(memberName, memberFunction) - ), - /*location*/ member - ); + const statement = setTextRange(createExpressionStatement(e), /*location*/ member); setOriginalNode(statement, member); setCommentRange(statement, commentRange); diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts index 06b3fb53ec180..ddb545f0eb575 100644 --- a/src/compiler/transformers/ts.ts +++ b/src/compiler/transformers/ts.ts @@ -610,7 +610,7 @@ namespace ts { return visitEachChild(node, visitor, context); } - const staticProperties = getInitializedProperties(node, /*isStatic*/ true); + const staticProperties = getProperties(node, /*requireInitializer*/ true, /*isStatic*/ true); const facts = getClassFacts(node, staticProperties); if (facts & ClassFacts.UseImmediatelyInvokedFunctionExpression) { diff --git a/src/compiler/transformers/utilities.ts b/src/compiler/transformers/utilities.ts index de4400a24f45d..e2029ff7b602e 100644 --- a/src/compiler/transformers/utilities.ts +++ b/src/compiler/transformers/utilities.ts @@ -297,41 +297,29 @@ namespace ts { } /** - * Gets all property declarations with initializers on either the static or instance side of a class. + * Gets all the static or all the instance property declarations of a class * * @param node The class node. * @param isStatic A value indicating whether to get properties from the static or instance side of the class. */ - export function getInitializedProperties(node: ClassExpression | ClassDeclaration, isStatic: boolean): readonly PropertyDeclaration[] { - return filter(node.members, isStatic ? isStaticInitializedProperty : isInstanceInitializedProperty); + export function getProperties(node: ClassExpression | ClassDeclaration, requireInitializer: boolean, isStatic: boolean): readonly PropertyDeclaration[] { + return filter(node.members, m => isInitializedOrStaticProperty(m, requireInitializer, isStatic)) as PropertyDeclaration[]; } /** - * Gets a value indicating whether a class element is a static property declaration with an initializer. + * Is a class element either a static or an instance property declaration with an initializer? * * @param member The class element node. + * @param isStatic A value indicating whether the member should be a static or instance member. */ - export function isStaticInitializedProperty(member: ClassElement): member is PropertyDeclaration & { initializer: Expression; } { - return isInitializedProperty(member) && hasStaticModifier(member); + function isInitializedOrStaticProperty(member: ClassElement, requireInitializer: boolean, isStatic: boolean) { + return isPropertyDeclaration(member) + && (!!member.initializer || !requireInitializer) + && hasStaticModifier(member) === isStatic; } - /** - * Gets a value indicating whether a class element is an instance property declaration with an initializer. - * - * @param member The class element node. - */ - export function isInstanceInitializedProperty(member: ClassElement): member is PropertyDeclaration & { initializer: Expression; } { - return isInitializedProperty(member) && !hasStaticModifier(member); + export function isInitializedProperty(member: ClassElement, requireInitializer: boolean): member is PropertyDeclaration { + return isPropertyDeclaration(member) && (!!member.initializer || !requireInitializer); } - /** - * Gets a value indicating whether a class element is either a static or an instance property declaration with an initializer. - * - * @param member The class element node. - * @param isStatic A value indicating whether the member should be a static or instance member. - */ - export function isInitializedProperty(member: ClassElement): member is PropertyDeclaration & { initializer: Expression; } { - return member.kind === SyntaxKind.PropertyDeclaration - && (member).initializer !== undefined; - } -} \ No newline at end of file +} diff --git a/src/compiler/types.ts b/src/compiler/types.ts index a10b42b849534..28d5fdbb1c967 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -4870,6 +4870,7 @@ namespace ts { /*@internal*/ watch?: boolean; esModuleInterop?: boolean; /* @internal */ showConfig?: boolean; + useDefineForClassFields?: boolean; [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; } @@ -5572,6 +5573,16 @@ namespace ts { readonly redirectTargetsMap: RedirectTargetsMap; } + /* @internal */ + export interface PropertyDescriptorAttributes { + enumerable?: boolean | Expression; + configurable?: boolean | Expression; + writable?: boolean | Expression; + value?: Expression; + get?: Expression; + set?: Expression; + } + export interface TransformationContext { /*@internal*/ getEmitResolver(): EmitResolver; /*@internal*/ getEmitHost(): EmitHost; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 6b48cb80625ee..9a331afa9abfc 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -3974,7 +3974,6 @@ namespace ts { } export function getModifierFlagsNoCache(node: Node): ModifierFlags { - let flags = ModifierFlags.None; if (node.modifiers) { for (const modifier of node.modifiers) { diff --git a/src/server/protocol.ts b/src/server/protocol.ts index 0674f1c142de3..50e41a67cfd0c 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -3067,6 +3067,7 @@ namespace ts.server.protocol { strictNullChecks?: boolean; suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; + useDefineForClassFields?: boolean; target?: ScriptTarget | ts.ScriptTarget; traceResolution?: boolean; resolveJsonModule?: boolean; diff --git a/src/services/codefixes/addMissingDeclareProperty.ts b/src/services/codefixes/addMissingDeclareProperty.ts new file mode 100644 index 0000000000000..e08929b9dd132 --- /dev/null +++ b/src/services/codefixes/addMissingDeclareProperty.ts @@ -0,0 +1,34 @@ +/* @internal */ +namespace ts.codefix { + const fixId = "addMissingDeclareProperty"; + const errorCodes = [ + Diagnostics.Property_0_will_overwrite_the_base_property_in_1_If_this_is_intentional_add_an_initializer_Otherwise_add_a_declare_modifier_or_remove_the_redundant_declaration.code, + ]; + + registerCodeFix({ + errorCodes, + getCodeActions: (context) => { + const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span.start)); + if (changes.length > 0) { + return [createCodeFixAction(fixId, changes, Diagnostics.Prefix_with_declare, fixId, Diagnostics.Prefix_all_incorrect_property_declarations_with_declare)]; + } + }, + fixIds: [fixId], + getAllCodeActions: context => { + const fixedNodes = new NodeSet(); + return codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file, diag.start, fixedNodes)); + }, + }); + + function makeChange(changeTracker: textChanges.ChangeTracker, sourceFile: SourceFile, pos: number, fixedNodes?: NodeSet) { + const token = getTokenAtPosition(sourceFile, pos); + if (!isIdentifier(token)) { + return; + } + const declaration = token.parent; + if (declaration.kind === SyntaxKind.PropertyDeclaration && + (!fixedNodes || fixedNodes.tryAdd(declaration))) { + changeTracker.insertModifierBefore(sourceFile, SyntaxKind.DeclareKeyword, declaration); + } + } +} diff --git a/src/services/services.ts b/src/services/services.ts index fb5c35d8f5d48..e126c2473c95c 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -339,7 +339,6 @@ namespace ts { } class TokenObject extends TokenOrIdentifierObject implements Token { - public symbol!: Symbol; public kind: TKind; constructor(kind: TKind, pos: number, end: number) { @@ -349,9 +348,8 @@ namespace ts { } class IdentifierObject extends TokenOrIdentifierObject implements Identifier { - public kind!: SyntaxKind.Identifier; + public kind: SyntaxKind.Identifier = SyntaxKind.Identifier; public escapedText!: __String; - public symbol!: Symbol; public autoGenerateFlags!: GeneratedIdentifierFlags; _primaryExpressionBrand: any; _memberExpressionBrand: any; @@ -541,7 +539,7 @@ namespace ts { } class SourceFileObject extends NodeObject implements SourceFile { - public kind!: SyntaxKind.SourceFile; + public kind: SyntaxKind.SourceFile = SyntaxKind.SourceFile; public _declarationBrand: any; public fileName!: string; public path!: Path; diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index b90607b0a85a3..5c0e39f9f6564 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -47,6 +47,7 @@ "codefixes/addConvertToUnknownForNonOverlappingTypes.ts", "codefixes/addMissingAwait.ts", "codefixes/addMissingConst.ts", + "codefixes/addMissingDeclareProperty.ts", "codefixes/addMissingInvocationForDecorator.ts", "codefixes/addNameToNamelessParameter.ts", "codefixes/annotateWithTypeFromJSDoc.ts", diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts index 56fa17dd9e1ce..89264224c13a6 100644 --- a/src/testRunner/parallel/host.ts +++ b/src/testRunner/parallel/host.ts @@ -24,9 +24,7 @@ namespace Harness.Parallel.Host { let totalCost = 0; class RemoteSuite extends Mocha.Suite { - suites!: RemoteSuite[]; suiteMap = ts.createMap(); - tests!: RemoteTest[]; constructor(title: string) { super(title); this.pending = false; @@ -529,10 +527,10 @@ namespace Harness.Parallel.Host { function replaySuite(runner: Mocha.Runner, suite: RemoteSuite) { runner.emit("suite", suite); for (const test of suite.tests) { - replayTest(runner, test); + replayTest(runner, test as RemoteTest); } for (const child of suite.suites) { - replaySuite(runner, child); + replaySuite(runner, child as RemoteSuite); } runner.emit("suite end", suite); } diff --git a/src/testRunner/unittests/tsserver/helpers.ts b/src/testRunner/unittests/tsserver/helpers.ts index a8c79d0b60347..71280330e8cd7 100644 --- a/src/testRunner/unittests/tsserver/helpers.ts +++ b/src/testRunner/unittests/tsserver/helpers.ts @@ -292,7 +292,7 @@ namespace ts.projectSystem { export class TestSession extends server.Session { private seq = 0; public events: protocol.Event[] = []; - public host!: TestServerHost; + public testhost: TestServerHost = this.host as TestServerHost; getProjectService() { return this.projectService; @@ -320,7 +320,7 @@ namespace ts.projectSystem { public clearMessages() { clear(this.events); - this.host.clearOutput(); + this.testhost.clearOutput(); } } @@ -721,8 +721,8 @@ namespace ts.projectSystem { const events = session.events; assert.deepEqual(events[index], expectedEvent, `Expected ${JSON.stringify(expectedEvent)} at ${index} in ${JSON.stringify(events)}`); - const outputs = session.host.getOutput(); - assert.equal(outputs[index], server.formatMessage(expectedEvent, nullLogger, Utils.byteLength, session.host.newLine)); + const outputs = session.testhost.getOutput(); + assert.equal(outputs[index], server.formatMessage(expectedEvent, nullLogger, Utils.byteLength, session.testhost.newLine)); if (isMostRecent) { assert.strictEqual(events.length, index + 1, JSON.stringify(events)); diff --git a/src/testRunner/unittests/tsserver/symLinks.ts b/src/testRunner/unittests/tsserver/symLinks.ts index c264bc2a6df09..54b7cb3fab427 100644 --- a/src/testRunner/unittests/tsserver/symLinks.ts +++ b/src/testRunner/unittests/tsserver/symLinks.ts @@ -159,7 +159,7 @@ new C();` } }); - const host = session.host; + const host = session.testhost; host.checkTimeoutQueueLengthAndRun(1); checkErrorMessage(session, "syntaxDiag", { file: recognizersDateTimeSrcFile.path, diagnostics: [] }); @@ -219,7 +219,7 @@ new C();` const projectService = session.getProjectService(); const project = projectService.configuredProjects.get(recognizerDateTimeTsconfigPath)!; checkProjectActualFiles(project, filesInProjectWithResolvedModule); - verifyWatchedFilesAndDirectories(session.host, filesInProjectWithResolvedModule, watchedDirectoriesWithResolvedModule, nonRecursiveWatchedDirectories); + verifyWatchedFilesAndDirectories(session.testhost, filesInProjectWithResolvedModule, watchedDirectoriesWithResolvedModule, nonRecursiveWatchedDirectories); verifyErrors(session, []); } @@ -227,7 +227,7 @@ new C();` const projectService = session.getProjectService(); const project = projectService.configuredProjects.get(recognizerDateTimeTsconfigPath)!; checkProjectActualFiles(project, filesInProjectWithUnresolvedModule); - verifyWatchedFilesAndDirectories(session.host, filesInProjectWithUnresolvedModule, watchedDirectoriesWithUnresolvedModule, nonRecursiveWatchedDirectories); + verifyWatchedFilesAndDirectories(session.testhost, filesInProjectWithUnresolvedModule, watchedDirectoriesWithUnresolvedModule, nonRecursiveWatchedDirectories); const startOffset = recognizersDateTimeSrcFile.content.indexOf('"') + 1; verifyErrors(session, [ createDiagnostic({ line: 1, offset: startOffset }, { line: 1, offset: startOffset + moduleNameInFile.length }, Diagnostics.Cannot_find_module_0, [moduleName]) diff --git a/tests/baselines/reference/accessorsOverrideMethod.errors.txt b/tests/baselines/reference/accessorsOverrideMethod.errors.txt new file mode 100644 index 0000000000000..2ff047d49be36 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideMethod.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts(5,9): error TS2423: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts (1 errors) ==== + class A { + m() { } + } + class B extends A { + get m() { return () => 1 } + ~ +!!! error TS2423: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member accessor. + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideMethod.js b/tests/baselines/reference/accessorsOverrideMethod.js new file mode 100644 index 0000000000000..0b7d62391909b --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideMethod.js @@ -0,0 +1,16 @@ +//// [accessorsOverrideMethod.ts] +class A { + m() { } +} +class B extends A { + get m() { return () => 1 } +} + + +//// [accessorsOverrideMethod.js] +class A { + m() { } +} +class B extends A { + get m() { return () => 1; } +} diff --git a/tests/baselines/reference/accessorsOverrideMethod.symbols b/tests/baselines/reference/accessorsOverrideMethod.symbols new file mode 100644 index 0000000000000..d447c137acff4 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideMethod.symbols @@ -0,0 +1,15 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts === +class A { +>A : Symbol(A, Decl(accessorsOverrideMethod.ts, 0, 0)) + + m() { } +>m : Symbol(A.m, Decl(accessorsOverrideMethod.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(accessorsOverrideMethod.ts, 2, 1)) +>A : Symbol(A, Decl(accessorsOverrideMethod.ts, 0, 0)) + + get m() { return () => 1 } +>m : Symbol(B.m, Decl(accessorsOverrideMethod.ts, 3, 19)) +} + diff --git a/tests/baselines/reference/accessorsOverrideMethod.types b/tests/baselines/reference/accessorsOverrideMethod.types new file mode 100644 index 0000000000000..a8781ae41a99b --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideMethod.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts === +class A { +>A : A + + m() { } +>m : () => void +} +class B extends A { +>B : B +>A : A + + get m() { return () => 1 } +>m : () => number +>() => 1 : () => number +>1 : 1 +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty.errors.txt b/tests/baselines/reference/accessorsOverrideProperty.errors.txt new file mode 100644 index 0000000000000..cda030610b543 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts(5,9): error TS2611: Class 'A' defines instance member property 'p', but extended class 'B' defines it as instance member accessor. +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts(12,9): error TS2611: Class 'C' defines instance member property 'p', but extended class 'D' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts (2 errors) ==== + class A { + p = 'yep' + } + class B extends A { + get p() { return 'oh no' } // error + ~ +!!! error TS2611: Class 'A' defines instance member property 'p', but extended class 'B' defines it as instance member accessor. + } + class C { + p = 101 + } + class D extends C { + _secret = 11 + get p() { return this._secret } // error + ~ +!!! error TS2611: Class 'C' defines instance member property 'p', but extended class 'D' defines it as instance member accessor. + set p(value) { this._secret = value } // error + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideProperty.js b/tests/baselines/reference/accessorsOverrideProperty.js new file mode 100644 index 0000000000000..5e9b94457ca41 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty.js @@ -0,0 +1,32 @@ +//// [accessorsOverrideProperty.ts] +class A { + p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} +class C { + p = 101 +} +class D extends C { + _secret = 11 + get p() { return this._secret } // error + set p(value) { this._secret = value } // error +} + + +//// [accessorsOverrideProperty.js] +class A { + p = 'yep'; +} +class B extends A { + get p() { return 'oh no'; } // error +} +class C { + p = 101; +} +class D extends C { + _secret = 11; + get p() { return this._secret; } // error + set p(value) { this._secret = value; } // error +} diff --git a/tests/baselines/reference/accessorsOverrideProperty.symbols b/tests/baselines/reference/accessorsOverrideProperty.symbols new file mode 100644 index 0000000000000..702417679a316 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty.symbols @@ -0,0 +1,42 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts === +class A { +>A : Symbol(A, Decl(accessorsOverrideProperty.ts, 0, 0)) + + p = 'yep' +>p : Symbol(A.p, Decl(accessorsOverrideProperty.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(accessorsOverrideProperty.ts, 2, 1)) +>A : Symbol(A, Decl(accessorsOverrideProperty.ts, 0, 0)) + + get p() { return 'oh no' } // error +>p : Symbol(B.p, Decl(accessorsOverrideProperty.ts, 3, 19)) +} +class C { +>C : Symbol(C, Decl(accessorsOverrideProperty.ts, 5, 1)) + + p = 101 +>p : Symbol(C.p, Decl(accessorsOverrideProperty.ts, 6, 9)) +} +class D extends C { +>D : Symbol(D, Decl(accessorsOverrideProperty.ts, 8, 1)) +>C : Symbol(C, Decl(accessorsOverrideProperty.ts, 5, 1)) + + _secret = 11 +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty.ts, 9, 19)) + + get p() { return this._secret } // error +>p : Symbol(D.p, Decl(accessorsOverrideProperty.ts, 10, 17), Decl(accessorsOverrideProperty.ts, 11, 35)) +>this._secret : Symbol(D._secret, Decl(accessorsOverrideProperty.ts, 9, 19)) +>this : Symbol(D, Decl(accessorsOverrideProperty.ts, 8, 1)) +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty.ts, 9, 19)) + + set p(value) { this._secret = value } // error +>p : Symbol(D.p, Decl(accessorsOverrideProperty.ts, 10, 17), Decl(accessorsOverrideProperty.ts, 11, 35)) +>value : Symbol(value, Decl(accessorsOverrideProperty.ts, 12, 10)) +>this._secret : Symbol(D._secret, Decl(accessorsOverrideProperty.ts, 9, 19)) +>this : Symbol(D, Decl(accessorsOverrideProperty.ts, 8, 1)) +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty.ts, 9, 19)) +>value : Symbol(value, Decl(accessorsOverrideProperty.ts, 12, 10)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty.types b/tests/baselines/reference/accessorsOverrideProperty.types new file mode 100644 index 0000000000000..4e3021e70243f --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty.types @@ -0,0 +1,47 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts === +class A { +>A : A + + p = 'yep' +>p : string +>'yep' : "yep" +} +class B extends A { +>B : B +>A : A + + get p() { return 'oh no' } // error +>p : string +>'oh no' : "oh no" +} +class C { +>C : C + + p = 101 +>p : number +>101 : 101 +} +class D extends C { +>D : D +>C : C + + _secret = 11 +>_secret : number +>11 : 11 + + get p() { return this._secret } // error +>p : number +>this._secret : number +>this : this +>_secret : number + + set p(value) { this._secret = value } // error +>p : number +>value : number +>this._secret = value : number +>this._secret : number +>this : this +>_secret : number +>value : number +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty2.errors.txt b/tests/baselines/reference/accessorsOverrideProperty2.errors.txt new file mode 100644 index 0000000000000..ee26b16f7c906 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty2.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts(6,7): error TS2611: Class 'Base' defines instance member property 'x', but extended class 'Derived' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts (1 errors) ==== + class Base { + x = 1; + } + + class Derived extends Base { + get x() { return 2; } // should be an error + ~ +!!! error TS2611: Class 'Base' defines instance member property 'x', but extended class 'Derived' defines it as instance member accessor. + set x(value) { console.log(`x was set to ${value}`); } + } + + const obj = new Derived(); // nothing printed + console.log(obj.x); // 1 + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideProperty2.js b/tests/baselines/reference/accessorsOverrideProperty2.js new file mode 100644 index 0000000000000..e16ae60363e36 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty2.js @@ -0,0 +1,24 @@ +//// [accessorsOverrideProperty2.ts] +class Base { + x = 1; +} + +class Derived extends Base { + get x() { return 2; } // should be an error + set x(value) { console.log(`x was set to ${value}`); } +} + +const obj = new Derived(); // nothing printed +console.log(obj.x); // 1 + + +//// [accessorsOverrideProperty2.js] +class Base { + x = 1; +} +class Derived extends Base { + get x() { return 2; } // should be an error + set x(value) { console.log(`x was set to ${value}`); } +} +const obj = new Derived(); // nothing printed +console.log(obj.x); // 1 diff --git a/tests/baselines/reference/accessorsOverrideProperty2.symbols b/tests/baselines/reference/accessorsOverrideProperty2.symbols new file mode 100644 index 0000000000000..eab967402566b --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty2.symbols @@ -0,0 +1,36 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts === +class Base { +>Base : Symbol(Base, Decl(accessorsOverrideProperty2.ts, 0, 0)) + + x = 1; +>x : Symbol(Base.x, Decl(accessorsOverrideProperty2.ts, 0, 12)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(accessorsOverrideProperty2.ts, 2, 1)) +>Base : Symbol(Base, Decl(accessorsOverrideProperty2.ts, 0, 0)) + + get x() { return 2; } // should be an error +>x : Symbol(Derived.x, Decl(accessorsOverrideProperty2.ts, 4, 28), Decl(accessorsOverrideProperty2.ts, 5, 23)) + + set x(value) { console.log(`x was set to ${value}`); } +>x : Symbol(Derived.x, Decl(accessorsOverrideProperty2.ts, 4, 28), Decl(accessorsOverrideProperty2.ts, 5, 23)) +>value : Symbol(value, Decl(accessorsOverrideProperty2.ts, 6, 8)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>value : Symbol(value, Decl(accessorsOverrideProperty2.ts, 6, 8)) +} + +const obj = new Derived(); // nothing printed +>obj : Symbol(obj, Decl(accessorsOverrideProperty2.ts, 9, 5)) +>Derived : Symbol(Derived, Decl(accessorsOverrideProperty2.ts, 2, 1)) + +console.log(obj.x); // 1 +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>obj.x : Symbol(Derived.x, Decl(accessorsOverrideProperty2.ts, 4, 28), Decl(accessorsOverrideProperty2.ts, 5, 23)) +>obj : Symbol(obj, Decl(accessorsOverrideProperty2.ts, 9, 5)) +>x : Symbol(Derived.x, Decl(accessorsOverrideProperty2.ts, 4, 28), Decl(accessorsOverrideProperty2.ts, 5, 23)) + diff --git a/tests/baselines/reference/accessorsOverrideProperty2.types b/tests/baselines/reference/accessorsOverrideProperty2.types new file mode 100644 index 0000000000000..f094ab56040e0 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty2.types @@ -0,0 +1,42 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts === +class Base { +>Base : Base + + x = 1; +>x : number +>1 : 1 +} + +class Derived extends Base { +>Derived : Derived +>Base : Base + + get x() { return 2; } // should be an error +>x : number +>2 : 2 + + set x(value) { console.log(`x was set to ${value}`); } +>x : number +>value : number +>console.log(`x was set to ${value}`) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>`x was set to ${value}` : string +>value : number +} + +const obj = new Derived(); // nothing printed +>obj : Derived +>new Derived() : Derived +>Derived : typeof Derived + +console.log(obj.x); // 1 +>console.log(obj.x) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>obj.x : number +>obj : Derived +>x : number + diff --git a/tests/baselines/reference/accessorsOverrideProperty3.errors.txt b/tests/baselines/reference/accessorsOverrideProperty3.errors.txt new file mode 100644 index 0000000000000..129af97f9b573 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty3.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts(6,9): error TS2611: Class 'Animal' defines instance member property 'sound', but extended class 'Lion' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts (1 errors) ==== + declare class Animal { + sound: string + } + class Lion extends Animal { + _sound = 'grrr' + get sound() { return this._sound } // error here + ~~~~~ +!!! error TS2611: Class 'Animal' defines instance member property 'sound', but extended class 'Lion' defines it as instance member accessor. + set sound(val) { this._sound = val } + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideProperty3.js b/tests/baselines/reference/accessorsOverrideProperty3.js new file mode 100644 index 0000000000000..2b061298ab9a3 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty3.js @@ -0,0 +1,17 @@ +//// [accessorsOverrideProperty3.ts] +declare class Animal { + sound: string +} +class Lion extends Animal { + _sound = 'grrr' + get sound() { return this._sound } // error here + set sound(val) { this._sound = val } +} + + +//// [accessorsOverrideProperty3.js] +class Lion extends Animal { + _sound = 'grrr'; + get sound() { return this._sound; } // error here + set sound(val) { this._sound = val; } +} diff --git a/tests/baselines/reference/accessorsOverrideProperty3.symbols b/tests/baselines/reference/accessorsOverrideProperty3.symbols new file mode 100644 index 0000000000000..f34923d36aad3 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty3.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts === +declare class Animal { +>Animal : Symbol(Animal, Decl(accessorsOverrideProperty3.ts, 0, 0)) + + sound: string +>sound : Symbol(Animal.sound, Decl(accessorsOverrideProperty3.ts, 0, 22)) +} +class Lion extends Animal { +>Lion : Symbol(Lion, Decl(accessorsOverrideProperty3.ts, 2, 1)) +>Animal : Symbol(Animal, Decl(accessorsOverrideProperty3.ts, 0, 0)) + + _sound = 'grrr' +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty3.ts, 3, 27)) + + get sound() { return this._sound } // error here +>sound : Symbol(Lion.sound, Decl(accessorsOverrideProperty3.ts, 4, 19), Decl(accessorsOverrideProperty3.ts, 5, 38)) +>this._sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty3.ts, 3, 27)) +>this : Symbol(Lion, Decl(accessorsOverrideProperty3.ts, 2, 1)) +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty3.ts, 3, 27)) + + set sound(val) { this._sound = val } +>sound : Symbol(Lion.sound, Decl(accessorsOverrideProperty3.ts, 4, 19), Decl(accessorsOverrideProperty3.ts, 5, 38)) +>val : Symbol(val, Decl(accessorsOverrideProperty3.ts, 6, 14)) +>this._sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty3.ts, 3, 27)) +>this : Symbol(Lion, Decl(accessorsOverrideProperty3.ts, 2, 1)) +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty3.ts, 3, 27)) +>val : Symbol(val, Decl(accessorsOverrideProperty3.ts, 6, 14)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty3.types b/tests/baselines/reference/accessorsOverrideProperty3.types new file mode 100644 index 0000000000000..6fa0efd42f5a6 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty3.types @@ -0,0 +1,31 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts === +declare class Animal { +>Animal : Animal + + sound: string +>sound : string +} +class Lion extends Animal { +>Lion : Lion +>Animal : Animal + + _sound = 'grrr' +>_sound : string +>'grrr' : "grrr" + + get sound() { return this._sound } // error here +>sound : string +>this._sound : string +>this : this +>_sound : string + + set sound(val) { this._sound = val } +>sound : string +>val : string +>this._sound = val : string +>this._sound : string +>this : this +>_sound : string +>val : string +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty4.errors.txt b/tests/baselines/reference/accessorsOverrideProperty4.errors.txt new file mode 100644 index 0000000000000..ca69ba6074425 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty4.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts(6,9): error TS2611: Class 'Animal' defines instance member property 'sound', but extended class 'Lion' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts (1 errors) ==== + declare class Animal { + sound: string; + } + class Lion extends Animal { + _sound = 'roar' + get sound(): string { return this._sound } + ~~~~~ +!!! error TS2611: Class 'Animal' defines instance member property 'sound', but extended class 'Lion' defines it as instance member accessor. + set sound(val: string) { this._sound = val } + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideProperty4.js b/tests/baselines/reference/accessorsOverrideProperty4.js new file mode 100644 index 0000000000000..28a0af827b7eb --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty4.js @@ -0,0 +1,17 @@ +//// [accessorsOverrideProperty4.ts] +declare class Animal { + sound: string; +} +class Lion extends Animal { + _sound = 'roar' + get sound(): string { return this._sound } + set sound(val: string) { this._sound = val } +} + + +//// [accessorsOverrideProperty4.js] +class Lion extends Animal { + _sound = 'roar'; + get sound() { return this._sound; } + set sound(val) { this._sound = val; } +} diff --git a/tests/baselines/reference/accessorsOverrideProperty4.symbols b/tests/baselines/reference/accessorsOverrideProperty4.symbols new file mode 100644 index 0000000000000..d51646d1ce558 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty4.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts === +declare class Animal { +>Animal : Symbol(Animal, Decl(accessorsOverrideProperty4.ts, 0, 0)) + + sound: string; +>sound : Symbol(Animal.sound, Decl(accessorsOverrideProperty4.ts, 0, 22)) +} +class Lion extends Animal { +>Lion : Symbol(Lion, Decl(accessorsOverrideProperty4.ts, 2, 1)) +>Animal : Symbol(Animal, Decl(accessorsOverrideProperty4.ts, 0, 0)) + + _sound = 'roar' +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty4.ts, 3, 27)) + + get sound(): string { return this._sound } +>sound : Symbol(Lion.sound, Decl(accessorsOverrideProperty4.ts, 4, 19), Decl(accessorsOverrideProperty4.ts, 5, 46)) +>this._sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty4.ts, 3, 27)) +>this : Symbol(Lion, Decl(accessorsOverrideProperty4.ts, 2, 1)) +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty4.ts, 3, 27)) + + set sound(val: string) { this._sound = val } +>sound : Symbol(Lion.sound, Decl(accessorsOverrideProperty4.ts, 4, 19), Decl(accessorsOverrideProperty4.ts, 5, 46)) +>val : Symbol(val, Decl(accessorsOverrideProperty4.ts, 6, 14)) +>this._sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty4.ts, 3, 27)) +>this : Symbol(Lion, Decl(accessorsOverrideProperty4.ts, 2, 1)) +>_sound : Symbol(Lion._sound, Decl(accessorsOverrideProperty4.ts, 3, 27)) +>val : Symbol(val, Decl(accessorsOverrideProperty4.ts, 6, 14)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty4.types b/tests/baselines/reference/accessorsOverrideProperty4.types new file mode 100644 index 0000000000000..e553e5f37f05d --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty4.types @@ -0,0 +1,31 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts === +declare class Animal { +>Animal : Animal + + sound: string; +>sound : string +} +class Lion extends Animal { +>Lion : Lion +>Animal : Animal + + _sound = 'roar' +>_sound : string +>'roar' : "roar" + + get sound(): string { return this._sound } +>sound : string +>this._sound : string +>this : this +>_sound : string + + set sound(val: string) { this._sound = val } +>sound : string +>val : string +>this._sound = val : string +>this._sound : string +>this : this +>_sound : string +>val : string +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty5.js b/tests/baselines/reference/accessorsOverrideProperty5.js new file mode 100644 index 0000000000000..fb7cee0630b67 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty5.js @@ -0,0 +1,19 @@ +//// [accessorsOverrideProperty5.ts] +interface I { + p: number +} +interface B extends I { } +class B { } +class C extends B { + get p() { return 1 } + set p(value) { } +} + + +//// [accessorsOverrideProperty5.js] +class B { +} +class C extends B { + get p() { return 1; } + set p(value) { } +} diff --git a/tests/baselines/reference/accessorsOverrideProperty5.symbols b/tests/baselines/reference/accessorsOverrideProperty5.symbols new file mode 100644 index 0000000000000..b048d8bbc928d --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty5.symbols @@ -0,0 +1,26 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts === +interface I { +>I : Symbol(I, Decl(accessorsOverrideProperty5.ts, 0, 0)) + + p: number +>p : Symbol(I.p, Decl(accessorsOverrideProperty5.ts, 0, 13)) +} +interface B extends I { } +>B : Symbol(B, Decl(accessorsOverrideProperty5.ts, 2, 1), Decl(accessorsOverrideProperty5.ts, 3, 25)) +>I : Symbol(I, Decl(accessorsOverrideProperty5.ts, 0, 0)) + +class B { } +>B : Symbol(B, Decl(accessorsOverrideProperty5.ts, 2, 1), Decl(accessorsOverrideProperty5.ts, 3, 25)) + +class C extends B { +>C : Symbol(C, Decl(accessorsOverrideProperty5.ts, 4, 11)) +>B : Symbol(B, Decl(accessorsOverrideProperty5.ts, 2, 1), Decl(accessorsOverrideProperty5.ts, 3, 25)) + + get p() { return 1 } +>p : Symbol(C.p, Decl(accessorsOverrideProperty5.ts, 5, 19), Decl(accessorsOverrideProperty5.ts, 6, 24)) + + set p(value) { } +>p : Symbol(C.p, Decl(accessorsOverrideProperty5.ts, 5, 19), Decl(accessorsOverrideProperty5.ts, 6, 24)) +>value : Symbol(value, Decl(accessorsOverrideProperty5.ts, 7, 10)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty5.types b/tests/baselines/reference/accessorsOverrideProperty5.types new file mode 100644 index 0000000000000..2032d3fa6ae50 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty5.types @@ -0,0 +1,22 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts === +interface I { + p: number +>p : number +} +interface B extends I { } +class B { } +>B : B + +class C extends B { +>C : C +>B : B + + get p() { return 1 } +>p : number +>1 : 1 + + set p(value) { } +>p : number +>value : number +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty6.js b/tests/baselines/reference/accessorsOverrideProperty6.js new file mode 100644 index 0000000000000..3cd61062c8626 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty6.js @@ -0,0 +1,39 @@ +//// [accessorsOverrideProperty6.ts] +class A { + p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} +class C { + p = 101 +} +class D extends C { + _secret = 11 + get p() { return this._secret } // error + set p(value) { this._secret = value } // error +} + + +//// [accessorsOverrideProperty6.js] +class A { + constructor() { + this.p = 'yep'; + } +} +class B extends A { + get p() { return 'oh no'; } // error +} +class C { + constructor() { + this.p = 101; + } +} +class D extends C { + constructor() { + super(...arguments); + this._secret = 11; + } + get p() { return this._secret; } // error + set p(value) { this._secret = value; } // error +} diff --git a/tests/baselines/reference/accessorsOverrideProperty6.symbols b/tests/baselines/reference/accessorsOverrideProperty6.symbols new file mode 100644 index 0000000000000..19f93b02630bc --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty6.symbols @@ -0,0 +1,42 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts === +class A { +>A : Symbol(A, Decl(accessorsOverrideProperty6.ts, 0, 0)) + + p = 'yep' +>p : Symbol(A.p, Decl(accessorsOverrideProperty6.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(accessorsOverrideProperty6.ts, 2, 1)) +>A : Symbol(A, Decl(accessorsOverrideProperty6.ts, 0, 0)) + + get p() { return 'oh no' } // error +>p : Symbol(B.p, Decl(accessorsOverrideProperty6.ts, 3, 19)) +} +class C { +>C : Symbol(C, Decl(accessorsOverrideProperty6.ts, 5, 1)) + + p = 101 +>p : Symbol(C.p, Decl(accessorsOverrideProperty6.ts, 6, 9)) +} +class D extends C { +>D : Symbol(D, Decl(accessorsOverrideProperty6.ts, 8, 1)) +>C : Symbol(C, Decl(accessorsOverrideProperty6.ts, 5, 1)) + + _secret = 11 +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty6.ts, 9, 19)) + + get p() { return this._secret } // error +>p : Symbol(D.p, Decl(accessorsOverrideProperty6.ts, 10, 17), Decl(accessorsOverrideProperty6.ts, 11, 35)) +>this._secret : Symbol(D._secret, Decl(accessorsOverrideProperty6.ts, 9, 19)) +>this : Symbol(D, Decl(accessorsOverrideProperty6.ts, 8, 1)) +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty6.ts, 9, 19)) + + set p(value) { this._secret = value } // error +>p : Symbol(D.p, Decl(accessorsOverrideProperty6.ts, 10, 17), Decl(accessorsOverrideProperty6.ts, 11, 35)) +>value : Symbol(value, Decl(accessorsOverrideProperty6.ts, 12, 10)) +>this._secret : Symbol(D._secret, Decl(accessorsOverrideProperty6.ts, 9, 19)) +>this : Symbol(D, Decl(accessorsOverrideProperty6.ts, 8, 1)) +>_secret : Symbol(D._secret, Decl(accessorsOverrideProperty6.ts, 9, 19)) +>value : Symbol(value, Decl(accessorsOverrideProperty6.ts, 12, 10)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty6.types b/tests/baselines/reference/accessorsOverrideProperty6.types new file mode 100644 index 0000000000000..594dbd372adef --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty6.types @@ -0,0 +1,47 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts === +class A { +>A : A + + p = 'yep' +>p : string +>'yep' : "yep" +} +class B extends A { +>B : B +>A : A + + get p() { return 'oh no' } // error +>p : string +>'oh no' : "oh no" +} +class C { +>C : C + + p = 101 +>p : number +>101 : 101 +} +class D extends C { +>D : D +>C : C + + _secret = 11 +>_secret : number +>11 : 11 + + get p() { return this._secret } // error +>p : number +>this._secret : number +>this : this +>_secret : number + + set p(value) { this._secret = value } // error +>p : number +>value : number +>this._secret = value : number +>this._secret : number +>this : this +>_secret : number +>value : number +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty7.errors.txt b/tests/baselines/reference/accessorsOverrideProperty7.errors.txt new file mode 100644 index 0000000000000..5ebeafe443d1b --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty7.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts(5,9): error TS2611: Class 'A' defines instance member property 'p', but extended class 'B' defines it as instance member accessor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts (1 errors) ==== + abstract class A { + abstract p = 'yep' + } + class B extends A { + get p() { return 'oh no' } // error + ~ +!!! error TS2611: Class 'A' defines instance member property 'p', but extended class 'B' defines it as instance member accessor. + } + \ No newline at end of file diff --git a/tests/baselines/reference/accessorsOverrideProperty7.js b/tests/baselines/reference/accessorsOverrideProperty7.js new file mode 100644 index 0000000000000..5c5b0de250708 --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty7.js @@ -0,0 +1,47 @@ +//// [accessorsOverrideProperty7.ts] +abstract class A { + abstract p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} + + +//// [accessorsOverrideProperty7.js] +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + Object.defineProperty(this, "p", { + enumerable: true, + configurable: true, + writable: true, + value: 'yep' + }); + } + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B() { + return _super !== null && _super.apply(this, arguments) || this; + } + Object.defineProperty(B.prototype, "p", { + get: function () { return 'oh no'; } // error + , + enumerable: true, + configurable: true + }); + return B; +}(A)); diff --git a/tests/baselines/reference/accessorsOverrideProperty7.symbols b/tests/baselines/reference/accessorsOverrideProperty7.symbols new file mode 100644 index 0000000000000..0ca99ab7abd6f --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty7.symbols @@ -0,0 +1,15 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts === +abstract class A { +>A : Symbol(A, Decl(accessorsOverrideProperty7.ts, 0, 0)) + + abstract p = 'yep' +>p : Symbol(A.p, Decl(accessorsOverrideProperty7.ts, 0, 18)) +} +class B extends A { +>B : Symbol(B, Decl(accessorsOverrideProperty7.ts, 2, 1)) +>A : Symbol(A, Decl(accessorsOverrideProperty7.ts, 0, 0)) + + get p() { return 'oh no' } // error +>p : Symbol(B.p, Decl(accessorsOverrideProperty7.ts, 3, 19)) +} + diff --git a/tests/baselines/reference/accessorsOverrideProperty7.types b/tests/baselines/reference/accessorsOverrideProperty7.types new file mode 100644 index 0000000000000..6e52715a3da6f --- /dev/null +++ b/tests/baselines/reference/accessorsOverrideProperty7.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts === +abstract class A { +>A : A + + abstract p = 'yep' +>p : string +>'yep' : "yep" +} +class B extends A { +>B : B +>A : A + + get p() { return 'oh no' } // error +>p : string +>'oh no' : "oh no" +} + diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 390ba29da27e7..4990a3b17e495 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -2637,6 +2637,7 @@ declare namespace ts { /** Paths used to compute primary types search locations */ typeRoots?: string[]; esModuleInterop?: boolean; + useDefineForClassFields?: boolean; [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; } export interface TypeAcquisition { @@ -8305,6 +8306,7 @@ declare namespace ts.server.protocol { strictNullChecks?: boolean; suppressExcessPropertyErrors?: boolean; suppressImplicitAnyIndexErrors?: boolean; + useDefineForClassFields?: boolean; target?: ScriptTarget | ts.ScriptTarget; traceResolution?: boolean; resolveJsonModule?: boolean; diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 594a83ce0b57c..c128eedc4bd50 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -2637,6 +2637,7 @@ declare namespace ts { /** Paths used to compute primary types search locations */ typeRoots?: string[]; esModuleInterop?: boolean; + useDefineForClassFields?: boolean; [option: string]: CompilerOptionsValue | TsConfigSourceFile | undefined; } export interface TypeAcquisition { diff --git a/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt b/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt new file mode 100644 index 0000000000000..d9104608284a9 --- /dev/null +++ b/tests/baselines/reference/checkJsFiles_noErrorLocation.errors.txt @@ -0,0 +1,25 @@ +tests/cases/compiler/a.js(14,10): error TS2424: Class 'A' defines instance member function 'foo', but extended class 'B' defines it as instance member property. + + +==== tests/cases/compiler/a.js (1 errors) ==== + // @ts-check + class A { + constructor() { + + } + foo() { + return 4; + } + } + + class B extends A { + constructor() { + super(); + this.foo = () => 3; + ~~~ +!!! error TS2424: Class 'A' defines instance member function 'foo', but extended class 'B' defines it as instance member property. + } + } + + const i = new B(); + i.foo(); \ No newline at end of file diff --git a/tests/baselines/reference/classExpressionPropertyModifiers.errors.txt b/tests/baselines/reference/classExpressionPropertyModifiers.errors.txt index f4b3fed7e5458..cb01d6561260f 100644 --- a/tests/baselines/reference/classExpressionPropertyModifiers.errors.txt +++ b/tests/baselines/reference/classExpressionPropertyModifiers.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/classExpressionPropertyModifiers.ts(2,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/compiler/classExpressionPropertyModifiers.ts(2,36): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/compiler/classExpressionPropertyModifiers.ts(3,5): error TS1031: 'export' modifier cannot appear on a class element. ==== tests/cases/compiler/classExpressionPropertyModifiers.ts (2 errors) ==== const a = class Cat { declare [Symbol.toStringTag] = "uh"; - ~~~~~~~ -!!! error TS1031: 'declare' modifier cannot appear on a class element. + ~~~~ +!!! error TS1039: Initializers are not allowed in ambient contexts. export foo = 1; ~~~~~~ !!! error TS1031: 'export' modifier cannot appear on a class element. diff --git a/tests/baselines/reference/classdecl.js b/tests/baselines/reference/classdecl.js index 42dd8b7d114ab..43d67d0cb1110 100644 --- a/tests/baselines/reference/classdecl.js +++ b/tests/baselines/reference/classdecl.js @@ -218,13 +218,14 @@ declare class a { constructor(s: string); pgF(): void; pv: any; - d: number; - static readonly p2: { + get d(): number; + set d(a: number); + static get p2(): { x: number; y: number; }; private static d2; - private static readonly p3; + private static get p3(); private pv3; private foo; } diff --git a/tests/baselines/reference/commentsClassMembers.js b/tests/baselines/reference/commentsClassMembers.js index 9918b0758ae40..bba4b44fc6023 100644 --- a/tests/baselines/reference/commentsClassMembers.js +++ b/tests/baselines/reference/commentsClassMembers.js @@ -486,15 +486,17 @@ declare class c1 { /** sum with property*/ p2(/** number to add*/ b: number): number; /** getter property*/ + get p3(): number; /** setter property*/ - p3: number; + set p3(/** this is value*/ value: number); /** pp1 is property of c1*/ private pp1; /** sum with property*/ private pp2; /** getter property*/ + private get pp3(); /** setter property*/ - private pp3; + private set pp3(value); /** Constructor method*/ constructor(); /** s1 is static property of c1*/ @@ -502,49 +504,59 @@ declare class c1 { /** static sum with property*/ static s2(/** number to add*/ b: number): number; /** static getter property*/ + static get s3(): number; /** setter property*/ - static s3: number; + static set s3(/** this is value*/ value: number); nc_p1: number; nc_p2(b: number): number; - nc_p3: number; + get nc_p3(): number; + set nc_p3(value: number); private nc_pp1; private nc_pp2; - private nc_pp3; + private get nc_pp3(); + private set nc_pp3(value); static nc_s1: number; static nc_s2(b: number): number; - static nc_s3: number; + static get nc_s3(): number; + static set nc_s3(value: number); a_p1: number; a_p2(b: number): number; - a_p3: number; + get a_p3(): number; + set a_p3(value: number); private a_pp1; private a_pp2; - private a_pp3; + private get a_pp3(); + private set a_pp3(value); static a_s1: number; static a_s2(b: number): number; - static a_s3: number; + static get a_s3(): number; + static set a_s3(value: number); /** p1 is property of c1 */ b_p1: number; /** sum with property */ b_p2(b: number): number; /** getter property */ + get b_p3(): number; /** setter property */ - b_p3: number; + set b_p3(value: number); /** pp1 is property of c1 */ private b_pp1; /** sum with property */ private b_pp2; /** getter property */ + private get b_pp3(); /** setter property */ - private b_pp3; + private set b_pp3(value); /** s1 is static property of c1 */ static b_s1: number; /** static sum with property */ static b_s2(b: number): number; /** static getter property */ + static get b_s3(): number; /** setter property */ - static b_s3: number; + static set b_s3(value: number); } declare var i1: c1; declare var i1_p: number; @@ -567,11 +579,11 @@ declare var i1_c: typeof c1; declare class cProperties { private val; /** getter only property*/ - readonly p1: number; - readonly nc_p1: number; + get p1(): number; + get nc_p1(): number; /**setter only property*/ - p2: number; - nc_p2: number; + set p2(value: number); + set nc_p2(value: number); x: number; private y; } diff --git a/tests/baselines/reference/commentsInheritance.js b/tests/baselines/reference/commentsInheritance.js index 58e243301b4e2..9779df371a2ec 100644 --- a/tests/baselines/reference/commentsInheritance.js +++ b/tests/baselines/reference/commentsInheritance.js @@ -323,19 +323,19 @@ declare class c2 { /** c2 c2_f1*/ c2_f1(): void; /** c2 c2_prop*/ - readonly c2_prop: number; + get c2_prop(): number; c2_nc_p1: number; c2_nc_f1(): void; - readonly c2_nc_prop: number; + get c2_nc_prop(): number; /** c2 p1*/ p1: number; /** c2 f1*/ f1(): void; /** c2 prop*/ - readonly prop: number; + get prop(): number; nc_p1: number; nc_f1(): void; - readonly nc_prop: number; + get nc_prop(): number; /** c2 constructor*/ constructor(a: number); } @@ -346,10 +346,10 @@ declare class c3 extends c2 { /** c3 f1*/ f1(): void; /** c3 prop*/ - readonly prop: number; + get prop(): number; nc_p1: number; nc_f1(): void; - readonly nc_prop: number; + get nc_prop(): number; } declare var c2_i: c2; declare var c3_i: c3; diff --git a/tests/baselines/reference/commentsdoNotEmitComments.js b/tests/baselines/reference/commentsdoNotEmitComments.js index ae7442f109a64..865ae43c4de22 100644 --- a/tests/baselines/reference/commentsdoNotEmitComments.js +++ b/tests/baselines/reference/commentsdoNotEmitComments.js @@ -144,7 +144,8 @@ declare class c { constructor(); b: number; myFoo(): number; - prop1: number; + get prop1(): number; + set prop1(val: number); foo1(a: number): string; foo1(b: string): string; } diff --git a/tests/baselines/reference/commentsemitComments.js b/tests/baselines/reference/commentsemitComments.js index dd8f3608cf33f..8bfb1c59c9abd 100644 --- a/tests/baselines/reference/commentsemitComments.js +++ b/tests/baselines/reference/commentsemitComments.js @@ -160,8 +160,9 @@ declare class c { /** function comment */ myFoo(): number; /** getter comment*/ + get prop1(): number; /** setter comment*/ - prop1: number; + set prop1(val: number); /** overload signature1*/ foo1(a: number): string; /** Overload signature 2*/ diff --git a/tests/baselines/reference/declFileAccessors.js b/tests/baselines/reference/declFileAccessors.js index c6175ec7ede0a..103f86d688e69 100644 --- a/tests/baselines/reference/declFileAccessors.js +++ b/tests/baselines/reference/declFileAccessors.js @@ -273,35 +273,47 @@ var c2 = /** @class */ (function () { /** This is comment for c1*/ export declare class c1 { /** getter property*/ + get p3(): number; /** setter property*/ - p3: number; + set p3(/** this is value*/ value: number); /** private getter property*/ + private get pp3(); /** private setter property*/ - private pp3; + private set pp3(value); /** static getter property*/ + static get s3(): number; /** setter property*/ - static s3: number; - nc_p3: number; - private nc_pp3; - static nc_s3: string; - readonly onlyGetter: number; - onlySetter: number; + static set s3(/** this is value*/ value: number); + get nc_p3(): number; + set nc_p3(value: number); + private get nc_pp3(); + private set nc_pp3(value); + static get nc_s3(): string; + static set nc_s3(value: string); + get onlyGetter(): number; + set onlySetter(value: number); } //// [declFileAccessors_1.d.ts] /** This is comment for c2 - the global class*/ declare class c2 { /** getter property*/ + get p3(): number; /** setter property*/ - p3: number; + set p3(/** this is value*/ value: number); /** private getter property*/ + private get pp3(); /** private setter property*/ - private pp3; + private set pp3(value); /** static getter property*/ + static get s3(): number; /** setter property*/ - static s3: number; - nc_p3: number; - private nc_pp3; - static nc_s3: string; - readonly onlyGetter: number; - onlySetter: number; + static set s3(/** this is value*/ value: number); + get nc_p3(): number; + set nc_p3(value: number); + private get nc_pp3(); + private set nc_pp3(value); + static get nc_s3(): string; + static set nc_s3(value: string); + get onlyGetter(): number; + set onlySetter(value: number); } diff --git a/tests/baselines/reference/declFilePrivateStatic.js b/tests/baselines/reference/declFilePrivateStatic.js index 67469327265b5..9dd2adc8c59ef 100644 --- a/tests/baselines/reference/declFilePrivateStatic.js +++ b/tests/baselines/reference/declFilePrivateStatic.js @@ -51,8 +51,8 @@ declare class C { static y: number; private static a; static b(): void; - private static readonly c; - static readonly d: number; - private static e; - static f: any; + private static get c(); + static get d(): number; + private static set e(value); + static set f(v: any); } diff --git a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js index 6018176153396..598ac67c20ed5 100644 --- a/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js +++ b/tests/baselines/reference/declFileTypeAnnotationVisibilityErrorAccessors.js @@ -271,21 +271,27 @@ declare module m { } } export class c { - readonly foo1: private1; - readonly foo2: private1; - foo3: private1; - foo4: private1; - foo5: private1; - readonly foo11: public1; - readonly foo12: public1; - foo13: public1; - foo14: public1; - foo15: public1; - readonly foo111: m2.public2; - readonly foo112: m2.public2; - foo113: m2.public2; - foo114: m2.public2; - foo115: m2.public2; + get foo1(): private1; + get foo2(): private1; + set foo3(param: private1); + get foo4(): private1; + set foo4(param: private1); + get foo5(): private1; + set foo5(param: private1); + get foo11(): public1; + get foo12(): public1; + set foo13(param: public1); + get foo14(): public1; + set foo14(param: public1); + get foo15(): public1; + set foo15(param: public1); + get foo111(): m2.public2; + get foo112(): m2.public2; + set foo113(param: m2.public2); + get foo114(): m2.public2; + set foo114(param: m2.public2); + get foo115(): m2.public2; + set foo115(param: m2.public2); } export {}; } diff --git a/tests/baselines/reference/declarationEmitClassMemberNameConflict.js b/tests/baselines/reference/declarationEmitClassMemberNameConflict.js index 77732ea94f889..43523aba38f0e 100644 --- a/tests/baselines/reference/declarationEmitClassMemberNameConflict.js +++ b/tests/baselines/reference/declarationEmitClassMemberNameConflict.js @@ -103,10 +103,10 @@ export declare class C2 { bar(): (t: typeof C2) => void; } export declare class C3 { - readonly C3: number; + get C3(): number; bar(): (t: typeof C3) => void; } export declare class C4 { - C4: any; + set C4(v: any); bar(): (t: typeof C4) => void; } diff --git a/tests/baselines/reference/declarationEmitProtectedMembers.js b/tests/baselines/reference/declarationEmitProtectedMembers.js index fb0a9cb933914..e0a2b40ffd50c 100644 --- a/tests/baselines/reference/declarationEmitProtectedMembers.js +++ b/tests/baselines/reference/declarationEmitProtectedMembers.js @@ -138,11 +138,12 @@ var C4 = /** @class */ (function () { declare class C1 { protected x: number; protected f(): number; - protected accessor: number; + protected set accessor(a: number); + protected get accessor(): number; protected static sx: number; protected static sf(): number; - protected static staticSetter: number; - protected static readonly staticGetter: number; + protected static set staticSetter(a: number); + protected static get staticGetter(): number; } declare class C2 extends C1 { protected f(): number; @@ -153,7 +154,7 @@ declare class C3 extends C2 { static sx: number; f(): number; static sf(): number; - static readonly staticGetter: number; + static get staticGetter(): number; } declare class C4 { protected a: number; diff --git a/tests/baselines/reference/definePropertyES5.js b/tests/baselines/reference/definePropertyES5.js new file mode 100644 index 0000000000000..a0bc4a64db48a --- /dev/null +++ b/tests/baselines/reference/definePropertyES5.js @@ -0,0 +1,50 @@ +//// [definePropertyES5.ts] +var x: "p" = "p" +class A { + a = 12 + b + ["computed"] = 13 + ;[x] = 14 + m() { } +} + + +//// [definePropertyES5.js] +var _a; +var x = "p"; +var A = /** @class */ (function () { + function A() { + Object.defineProperty(this, "a", { + enumerable: true, + configurable: true, + writable: true, + value: 12 + }); + Object.defineProperty(this, "b", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "computed", { + enumerable: true, + configurable: true, + writable: true, + value: 13 + }); + Object.defineProperty(this, _a, { + enumerable: true, + configurable: true, + writable: true, + value: 14 + }); + } + Object.defineProperty(A.prototype, "m", { + enumerable: false, + configurable: true, + writable: true, + value: function () { } + }); + return A; +}()); +_a = x; diff --git a/tests/baselines/reference/definePropertyES5.symbols b/tests/baselines/reference/definePropertyES5.symbols new file mode 100644 index 0000000000000..f9afa02868793 --- /dev/null +++ b/tests/baselines/reference/definePropertyES5.symbols @@ -0,0 +1,25 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts === +var x: "p" = "p" +>x : Symbol(x, Decl(definePropertyES5.ts, 0, 3)) + +class A { +>A : Symbol(A, Decl(definePropertyES5.ts, 0, 16)) + + a = 12 +>a : Symbol(A.a, Decl(definePropertyES5.ts, 1, 9)) + + b +>b : Symbol(A.b, Decl(definePropertyES5.ts, 2, 10)) + + ["computed"] = 13 +>["computed"] : Symbol(A["computed"], Decl(definePropertyES5.ts, 3, 5)) +>"computed" : Symbol(A["computed"], Decl(definePropertyES5.ts, 3, 5)) + + ;[x] = 14 +>[x] : Symbol(A[x], Decl(definePropertyES5.ts, 5, 5)) +>x : Symbol(x, Decl(definePropertyES5.ts, 0, 3)) + + m() { } +>m : Symbol(A.m, Decl(definePropertyES5.ts, 5, 13)) +} + diff --git a/tests/baselines/reference/definePropertyES5.types b/tests/baselines/reference/definePropertyES5.types new file mode 100644 index 0000000000000..3f82787c13a34 --- /dev/null +++ b/tests/baselines/reference/definePropertyES5.types @@ -0,0 +1,29 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts === +var x: "p" = "p" +>x : "p" +>"p" : "p" + +class A { +>A : A + + a = 12 +>a : number +>12 : 12 + + b +>b : any + + ["computed"] = 13 +>["computed"] : number +>"computed" : "computed" +>13 : 13 + + ;[x] = 14 +>[x] : number +>x : "p" +>14 : 14 + + m() { } +>m : () => void +} + diff --git a/tests/baselines/reference/definePropertyOutputES3.errors.txt b/tests/baselines/reference/definePropertyOutputES3.errors.txt new file mode 100644 index 0000000000000..c527477922545 --- /dev/null +++ b/tests/baselines/reference/definePropertyOutputES3.errors.txt @@ -0,0 +1,9 @@ +error TS5048: Option 'useDefineForClassFields' cannot be specified when option 'target' is 'ES3'. + + +!!! error TS5048: Option 'useDefineForClassFields' cannot be specified when option 'target' is 'ES3'. +==== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts (0 errors) ==== + class A { + a = 12 + } + \ No newline at end of file diff --git a/tests/baselines/reference/definePropertyOutputES3.js b/tests/baselines/reference/definePropertyOutputES3.js new file mode 100644 index 0000000000000..038a8818e0fda --- /dev/null +++ b/tests/baselines/reference/definePropertyOutputES3.js @@ -0,0 +1,18 @@ +//// [definePropertyOutputES3.ts] +class A { + a = 12 +} + + +//// [definePropertyOutputES3.js] +var A = /** @class */ (function () { + function A() { + Object.defineProperty(this, "a", { + enumerable: true, + configurable: true, + writable: true, + value: 12 + }); + } + return A; +}()); diff --git a/tests/baselines/reference/definePropertyOutputES3.symbols b/tests/baselines/reference/definePropertyOutputES3.symbols new file mode 100644 index 0000000000000..d41600cd523b8 --- /dev/null +++ b/tests/baselines/reference/definePropertyOutputES3.symbols @@ -0,0 +1,8 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts === +class A { +>A : Symbol(A, Decl(definePropertyOutputES3.ts, 0, 0)) + + a = 12 +>a : Symbol(A.a, Decl(definePropertyOutputES3.ts, 0, 9)) +} + diff --git a/tests/baselines/reference/definePropertyOutputES3.types b/tests/baselines/reference/definePropertyOutputES3.types new file mode 100644 index 0000000000000..5912a50934371 --- /dev/null +++ b/tests/baselines/reference/definePropertyOutputES3.types @@ -0,0 +1,9 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts === +class A { +>A : A + + a = 12 +>a : number +>12 : 12 +} + diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt new file mode 100644 index 0000000000000..f657e335a48cf --- /dev/null +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.errors.txt @@ -0,0 +1,88 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(12,21): error TS1255: A definite assignment assertion '!' is not permitted in this context. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(15,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(15,17): error TS1183: An implementation cannot be declared in ambient contexts. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(17,24): error TS1039: Initializers are not allowed in ambient contexts. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(24,5): error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. +tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts(27,5): error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts (6 errors) ==== + class A { + property = 'x'; + m() { return 1 } + } + class B extends A { + property: any; // error + } + class BD extends A { + declare property: any; // ok because it's implicitly initialised + } + class BDBang extends A { + declare property!: any; // ! is not allowed, this is an ambient declaration + ~ +!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. + } + class BOther extends A { + declare m() { return 2 } // not allowed on methods + ~~~~~~~ +!!! error TS1031: 'declare' modifier cannot appear on a class element. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. + declare nonce: any; // ok, even though it's not in the base + declare property = 'y' // initialiser not allowed with declare + ~~~ +!!! error TS1039: Initializers are not allowed in ambient contexts. + } + class U { + declare nonce: any; // ok, even though there's no base + } + + class C { + p: string; + ~ +!!! error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. + } + class D extends C { + p: 'hi'; // error + ~ +!!! error TS2564: Property 'p' has no initializer and is not definitely assigned in the constructor. + } + class DD extends C { + declare p: 'bye'; // ok + } + + + declare class E { + p1: string + p2: string + } + class F extends E { + p1!: 'z' + declare p2: 'alpha' + } + + class G extends E { + p1: 'z' + constructor() { + super() + this.p1 = 'z' + } + } + + abstract class H extends E { + abstract p1: 'a' | 'b' | 'c' + declare abstract p2: 'a' | 'b' | 'c' + } + + interface I { + q: number + } + interface J extends I { } + class J { + r = 5 + } + class K extends J { + q!: 1 | 2 | 3 // ok, extends a property from an interface + r!: 4 | 5 // error, from class + } + \ No newline at end of file diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js new file mode 100644 index 0000000000000..471cd5bbf1d18 --- /dev/null +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.js @@ -0,0 +1,182 @@ +//// [derivedUninitializedPropertyDeclaration.ts] +class A { + property = 'x'; + m() { return 1 } +} +class B extends A { + property: any; // error +} +class BD extends A { + declare property: any; // ok because it's implicitly initialised +} +class BDBang extends A { + declare property!: any; // ! is not allowed, this is an ambient declaration +} +class BOther extends A { + declare m() { return 2 } // not allowed on methods + declare nonce: any; // ok, even though it's not in the base + declare property = 'y' // initialiser not allowed with declare +} +class U { + declare nonce: any; // ok, even though there's no base +} + +class C { + p: string; +} +class D extends C { + p: 'hi'; // error +} +class DD extends C { + declare p: 'bye'; // ok +} + + +declare class E { + p1: string + p2: string +} +class F extends E { + p1!: 'z' + declare p2: 'alpha' +} + +class G extends E { + p1: 'z' + constructor() { + super() + this.p1 = 'z' + } +} + +abstract class H extends E { + abstract p1: 'a' | 'b' | 'c' + declare abstract p2: 'a' | 'b' | 'c' +} + +interface I { + q: number +} +interface J extends I { } +class J { + r = 5 +} +class K extends J { + q!: 1 | 2 | 3 // ok, extends a property from an interface + r!: 4 | 5 // error, from class +} + + +//// [derivedUninitializedPropertyDeclaration.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + this.property = 'x'; + } + A.prototype.m = function () { return 1; }; + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B() { + return _super !== null && _super.apply(this, arguments) || this; + } + return B; +}(A)); +var BD = /** @class */ (function (_super) { + __extends(BD, _super); + function BD() { + return _super !== null && _super.apply(this, arguments) || this; + } + return BD; +}(A)); +var BDBang = /** @class */ (function (_super) { + __extends(BDBang, _super); + function BDBang() { + return _super !== null && _super.apply(this, arguments) || this; + } + return BDBang; +}(A)); +var BOther = /** @class */ (function (_super) { + __extends(BOther, _super); + function BOther() { + var _this = _super !== null && _super.apply(this, arguments) || this; + _this.property = 'y'; // initialiser not allowed with declare + return _this; + } + BOther.prototype.m = function () { return 2; }; // not allowed on methods + return BOther; +}(A)); +var U = /** @class */ (function () { + function U() { + } + return U; +}()); +var C = /** @class */ (function () { + function C() { + } + return C; +}()); +var D = /** @class */ (function (_super) { + __extends(D, _super); + function D() { + return _super !== null && _super.apply(this, arguments) || this; + } + return D; +}(C)); +var DD = /** @class */ (function (_super) { + __extends(DD, _super); + function DD() { + return _super !== null && _super.apply(this, arguments) || this; + } + return DD; +}(C)); +var F = /** @class */ (function (_super) { + __extends(F, _super); + function F() { + return _super !== null && _super.apply(this, arguments) || this; + } + return F; +}(E)); +var G = /** @class */ (function (_super) { + __extends(G, _super); + function G() { + var _this = _super.call(this) || this; + _this.p1 = 'z'; + return _this; + } + return G; +}(E)); +var H = /** @class */ (function (_super) { + __extends(H, _super); + function H() { + return _super !== null && _super.apply(this, arguments) || this; + } + return H; +}(E)); +var J = /** @class */ (function () { + function J() { + this.r = 5; + } + return J; +}()); +var K = /** @class */ (function (_super) { + __extends(K, _super); + function K() { + return _super !== null && _super.apply(this, arguments) || this; + } + return K; +}(J)); diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.symbols b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.symbols new file mode 100644 index 0000000000000..87e912887042a --- /dev/null +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.symbols @@ -0,0 +1,149 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts === +class A { +>A : Symbol(A, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 0)) + + property = 'x'; +>property : Symbol(A.property, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 9)) + + m() { return 1 } +>m : Symbol(A.m, Decl(derivedUninitializedPropertyDeclaration.ts, 1, 19)) +} +class B extends A { +>B : Symbol(B, Decl(derivedUninitializedPropertyDeclaration.ts, 3, 1)) +>A : Symbol(A, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 0)) + + property: any; // error +>property : Symbol(B.property, Decl(derivedUninitializedPropertyDeclaration.ts, 4, 19)) +} +class BD extends A { +>BD : Symbol(BD, Decl(derivedUninitializedPropertyDeclaration.ts, 6, 1)) +>A : Symbol(A, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 0)) + + declare property: any; // ok because it's implicitly initialised +>property : Symbol(BD.property, Decl(derivedUninitializedPropertyDeclaration.ts, 7, 20)) +} +class BDBang extends A { +>BDBang : Symbol(BDBang, Decl(derivedUninitializedPropertyDeclaration.ts, 9, 1)) +>A : Symbol(A, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 0)) + + declare property!: any; // ! is not allowed, this is an ambient declaration +>property : Symbol(BDBang.property, Decl(derivedUninitializedPropertyDeclaration.ts, 10, 24)) +} +class BOther extends A { +>BOther : Symbol(BOther, Decl(derivedUninitializedPropertyDeclaration.ts, 12, 1)) +>A : Symbol(A, Decl(derivedUninitializedPropertyDeclaration.ts, 0, 0)) + + declare m() { return 2 } // not allowed on methods +>m : Symbol(BOther.m, Decl(derivedUninitializedPropertyDeclaration.ts, 13, 24)) + + declare nonce: any; // ok, even though it's not in the base +>nonce : Symbol(BOther.nonce, Decl(derivedUninitializedPropertyDeclaration.ts, 14, 28)) + + declare property = 'y' // initialiser not allowed with declare +>property : Symbol(BOther.property, Decl(derivedUninitializedPropertyDeclaration.ts, 15, 23)) +} +class U { +>U : Symbol(U, Decl(derivedUninitializedPropertyDeclaration.ts, 17, 1)) + + declare nonce: any; // ok, even though there's no base +>nonce : Symbol(U.nonce, Decl(derivedUninitializedPropertyDeclaration.ts, 18, 9)) +} + +class C { +>C : Symbol(C, Decl(derivedUninitializedPropertyDeclaration.ts, 20, 1)) + + p: string; +>p : Symbol(C.p, Decl(derivedUninitializedPropertyDeclaration.ts, 22, 9)) +} +class D extends C { +>D : Symbol(D, Decl(derivedUninitializedPropertyDeclaration.ts, 24, 1)) +>C : Symbol(C, Decl(derivedUninitializedPropertyDeclaration.ts, 20, 1)) + + p: 'hi'; // error +>p : Symbol(D.p, Decl(derivedUninitializedPropertyDeclaration.ts, 25, 19)) +} +class DD extends C { +>DD : Symbol(DD, Decl(derivedUninitializedPropertyDeclaration.ts, 27, 1)) +>C : Symbol(C, Decl(derivedUninitializedPropertyDeclaration.ts, 20, 1)) + + declare p: 'bye'; // ok +>p : Symbol(DD.p, Decl(derivedUninitializedPropertyDeclaration.ts, 28, 20)) +} + + +declare class E { +>E : Symbol(E, Decl(derivedUninitializedPropertyDeclaration.ts, 30, 1)) + + p1: string +>p1 : Symbol(E.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 33, 17)) + + p2: string +>p2 : Symbol(E.p2, Decl(derivedUninitializedPropertyDeclaration.ts, 34, 14)) +} +class F extends E { +>F : Symbol(F, Decl(derivedUninitializedPropertyDeclaration.ts, 36, 1)) +>E : Symbol(E, Decl(derivedUninitializedPropertyDeclaration.ts, 30, 1)) + + p1!: 'z' +>p1 : Symbol(F.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 37, 19)) + + declare p2: 'alpha' +>p2 : Symbol(F.p2, Decl(derivedUninitializedPropertyDeclaration.ts, 38, 12)) +} + +class G extends E { +>G : Symbol(G, Decl(derivedUninitializedPropertyDeclaration.ts, 40, 1)) +>E : Symbol(E, Decl(derivedUninitializedPropertyDeclaration.ts, 30, 1)) + + p1: 'z' +>p1 : Symbol(G.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 42, 19)) + + constructor() { + super() +>super : Symbol(E, Decl(derivedUninitializedPropertyDeclaration.ts, 30, 1)) + + this.p1 = 'z' +>this.p1 : Symbol(G.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 42, 19)) +>this : Symbol(G, Decl(derivedUninitializedPropertyDeclaration.ts, 40, 1)) +>p1 : Symbol(G.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 42, 19)) + } +} + +abstract class H extends E { +>H : Symbol(H, Decl(derivedUninitializedPropertyDeclaration.ts, 48, 1)) +>E : Symbol(E, Decl(derivedUninitializedPropertyDeclaration.ts, 30, 1)) + + abstract p1: 'a' | 'b' | 'c' +>p1 : Symbol(H.p1, Decl(derivedUninitializedPropertyDeclaration.ts, 50, 28)) + + declare abstract p2: 'a' | 'b' | 'c' +>p2 : Symbol(H.p2, Decl(derivedUninitializedPropertyDeclaration.ts, 51, 32)) +} + +interface I { +>I : Symbol(I, Decl(derivedUninitializedPropertyDeclaration.ts, 53, 1)) + + q: number +>q : Symbol(I.q, Decl(derivedUninitializedPropertyDeclaration.ts, 55, 13)) +} +interface J extends I { } +>J : Symbol(J, Decl(derivedUninitializedPropertyDeclaration.ts, 57, 1), Decl(derivedUninitializedPropertyDeclaration.ts, 58, 25)) +>I : Symbol(I, Decl(derivedUninitializedPropertyDeclaration.ts, 53, 1)) + +class J { +>J : Symbol(J, Decl(derivedUninitializedPropertyDeclaration.ts, 57, 1), Decl(derivedUninitializedPropertyDeclaration.ts, 58, 25)) + + r = 5 +>r : Symbol(J.r, Decl(derivedUninitializedPropertyDeclaration.ts, 59, 9)) +} +class K extends J { +>K : Symbol(K, Decl(derivedUninitializedPropertyDeclaration.ts, 61, 1)) +>J : Symbol(J, Decl(derivedUninitializedPropertyDeclaration.ts, 57, 1), Decl(derivedUninitializedPropertyDeclaration.ts, 58, 25)) + + q!: 1 | 2 | 3 // ok, extends a property from an interface +>q : Symbol(K.q, Decl(derivedUninitializedPropertyDeclaration.ts, 62, 19)) + + r!: 4 | 5 // error, from class +>r : Symbol(K.r, Decl(derivedUninitializedPropertyDeclaration.ts, 63, 17)) +} + diff --git a/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types new file mode 100644 index 0000000000000..d9c96f0c9fc07 --- /dev/null +++ b/tests/baselines/reference/derivedUninitializedPropertyDeclaration.types @@ -0,0 +1,152 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts === +class A { +>A : A + + property = 'x'; +>property : string +>'x' : "x" + + m() { return 1 } +>m : () => number +>1 : 1 +} +class B extends A { +>B : B +>A : A + + property: any; // error +>property : any +} +class BD extends A { +>BD : BD +>A : A + + declare property: any; // ok because it's implicitly initialised +>property : any +} +class BDBang extends A { +>BDBang : BDBang +>A : A + + declare property!: any; // ! is not allowed, this is an ambient declaration +>property : any +} +class BOther extends A { +>BOther : BOther +>A : A + + declare m() { return 2 } // not allowed on methods +>m : () => number +>2 : 2 + + declare nonce: any; // ok, even though it's not in the base +>nonce : any + + declare property = 'y' // initialiser not allowed with declare +>property : string +>'y' : "y" +} +class U { +>U : U + + declare nonce: any; // ok, even though there's no base +>nonce : any +} + +class C { +>C : C + + p: string; +>p : string +} +class D extends C { +>D : D +>C : C + + p: 'hi'; // error +>p : "hi" +} +class DD extends C { +>DD : DD +>C : C + + declare p: 'bye'; // ok +>p : "bye" +} + + +declare class E { +>E : E + + p1: string +>p1 : string + + p2: string +>p2 : string +} +class F extends E { +>F : F +>E : E + + p1!: 'z' +>p1 : "z" + + declare p2: 'alpha' +>p2 : "alpha" +} + +class G extends E { +>G : G +>E : E + + p1: 'z' +>p1 : "z" + + constructor() { + super() +>super() : void +>super : typeof E + + this.p1 = 'z' +>this.p1 = 'z' : "z" +>this.p1 : "z" +>this : this +>p1 : "z" +>'z' : "z" + } +} + +abstract class H extends E { +>H : H +>E : E + + abstract p1: 'a' | 'b' | 'c' +>p1 : "a" | "b" | "c" + + declare abstract p2: 'a' | 'b' | 'c' +>p2 : "a" | "b" | "c" +} + +interface I { + q: number +>q : number +} +interface J extends I { } +class J { +>J : J + + r = 5 +>r : number +>5 : 5 +} +class K extends J { +>K : K +>J : J + + q!: 1 | 2 | 3 // ok, extends a property from an interface +>q : 1 | 2 | 3 + + r!: 4 | 5 // error, from class +>r : 5 | 4 +} + diff --git a/tests/baselines/reference/dynamicNamesErrors.js b/tests/baselines/reference/dynamicNamesErrors.js index ff6bdec604f31..8433527d73fd6 100644 --- a/tests/baselines/reference/dynamicNamesErrors.js +++ b/tests/baselines/reference/dynamicNamesErrors.js @@ -101,12 +101,12 @@ export interface InterfaceMemberVisibility { export declare class ClassMemberVisibility { static [x]: number; static [y](): number; - static readonly [z]: number; - static [w]: number; + static get [z](): number; + static set [w](value: number); [x]: number; [y](): number; - readonly [z]: number; - [w]: number; + get [z](): number; + set [w](value: number); } export declare type ObjectTypeVisibility = { [x]: number; diff --git a/tests/baselines/reference/giant.js b/tests/baselines/reference/giant.js index 85686faa01e98..9adf046d8cfc2 100644 --- a/tests/baselines/reference/giant.js +++ b/tests/baselines/reference/giant.js @@ -1120,19 +1120,19 @@ export declare class eC { pF(): void; private rF; pgF(): void; - readonly pgF: any; + get pgF(): any; psF(param: any): void; - psF: any; + set psF(param: any); private rgF; - private readonly rgF; - private rsF; + private get rgF(); private rsF; + private set rsF(value); static tV: any; static tF(): void; static tsF(param: any): void; - static tsF: any; + static set tsF(param: any); static tgF(): void; - static readonly tgF: any; + static get tgF(): any; } export interface eI { (): any; @@ -1172,19 +1172,19 @@ export declare module eM { pF(): void; private rF; pgF(): void; - readonly pgF: any; + get pgF(): any; psF(param: any): void; - psF: any; + set psF(param: any); private rgF; - private readonly rgF; - private rsF; + private get rgF(); private rsF; + private set rsF(value); static tV: any; static tF(): void; static tsF(param: any): void; - static tsF: any; + static set tsF(param: any); static tgF(): void; - static readonly tgF: any; + static get tgF(): any; } interface eI { (): any; diff --git a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt index eb373ad2fae07..99ba043b52a80 100644 --- a/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt +++ b/tests/baselines/reference/illegalModifiersOnClassElements.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/illegalModifiersOnClassElements.ts(2,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/compiler/illegalModifiersOnClassElements.ts(2,19): error TS1039: Initializers are not allowed in ambient contexts. tests/cases/compiler/illegalModifiersOnClassElements.ts(3,5): error TS1031: 'export' modifier cannot appear on a class element. ==== tests/cases/compiler/illegalModifiersOnClassElements.ts (2 errors) ==== class C { declare foo = 1; - ~~~~~~~ -!!! error TS1031: 'declare' modifier cannot appear on a class element. + ~ +!!! error TS1039: Initializers are not allowed in ambient contexts. export bar = 1; ~~~~~~ !!! error TS1031: 'export' modifier cannot appear on a class element. diff --git a/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt new file mode 100644 index 0000000000000..52ae20032e628 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberAccessorOverridingMethod.errors.txt @@ -0,0 +1,20 @@ +tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts(8,9): error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. + + +==== tests/cases/compiler/inheritanceMemberAccessorOverridingMethod.ts (1 errors) ==== + class a { + x() { + return "20"; + } + } + + class b extends a { + get x() { + ~ +!!! error TS2423: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member accessor. + return () => "20"; + } + set x(aValue) { + + } + } \ No newline at end of file diff --git a/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt new file mode 100644 index 0000000000000..2b56866b22b33 --- /dev/null +++ b/tests/baselines/reference/inheritanceMemberPropertyOverridingMethod.errors.txt @@ -0,0 +1,15 @@ +tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts(8,5): error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. + + +==== tests/cases/compiler/inheritanceMemberPropertyOverridingMethod.ts (1 errors) ==== + class a { + x() { + return "20"; + } + } + + class b extends a { + x: () => string; + ~ +!!! error TS2424: Class 'a' defines instance member function 'x', but extended class 'b' defines it as instance member property. + } \ No newline at end of file diff --git a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js index 83a926ab7d2eb..40f5e59083c0c 100644 --- a/tests/baselines/reference/isDeclarationVisibleNodeKinds.js +++ b/tests/baselines/reference/isDeclarationVisibleNodeKinds.js @@ -184,7 +184,7 @@ declare module schema { } declare module schema { class T { - readonly createValidator9: (data: T) => T; - createValidator10: (data: T) => T; + get createValidator9(): (data: T) => T; + set createValidator10(v: (data: T) => T); } } diff --git a/tests/baselines/reference/moduledecl.js b/tests/baselines/reference/moduledecl.js index de7a5434e4df6..9672b980929b0 100644 --- a/tests/baselines/reference/moduledecl.js +++ b/tests/baselines/reference/moduledecl.js @@ -457,10 +457,10 @@ declare module exportTests { class C3_public { private getC2_private; private setC2_private; - private readonly c2; + private get c2(); getC1_public(): C1_public; setC1_public(arg: C1_public): void; - readonly c1: C1_public; + get c1(): C1_public; } } declare module mAmbient { diff --git a/tests/baselines/reference/overrideInterfaceProperty.js b/tests/baselines/reference/overrideInterfaceProperty.js new file mode 100644 index 0000000000000..0c1029b0c1129 --- /dev/null +++ b/tests/baselines/reference/overrideInterfaceProperty.js @@ -0,0 +1,31 @@ +//// [overrideInterfaceProperty.ts] +interface Mup { + readonly size: number; +} +interface MupConstructor { + new(): Mup; + new(entries?: readonly (readonly [K, V])[] | null): Mup; + readonly prototype: Mup; +} +declare var Mup: MupConstructor; + +class Sizz extends Mup { + // ok, because Mup is an interface + get size() { return 0 } +} +class Kasizz extends Mup { + size = -1 +} + + +//// [overrideInterfaceProperty.js] +class Sizz extends Mup { + // ok, because Mup is an interface + get size() { return 0; } +} +class Kasizz extends Mup { + constructor() { + super(...arguments); + this.size = -1; + } +} diff --git a/tests/baselines/reference/overrideInterfaceProperty.symbols b/tests/baselines/reference/overrideInterfaceProperty.symbols new file mode 100644 index 0000000000000..37f0f99a1070a --- /dev/null +++ b/tests/baselines/reference/overrideInterfaceProperty.symbols @@ -0,0 +1,49 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/overrideInterfaceProperty.ts === +interface Mup { +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) +>K : Symbol(K, Decl(overrideInterfaceProperty.ts, 0, 14)) +>V : Symbol(V, Decl(overrideInterfaceProperty.ts, 0, 16)) + + readonly size: number; +>size : Symbol(Mup.size, Decl(overrideInterfaceProperty.ts, 0, 21)) +} +interface MupConstructor { +>MupConstructor : Symbol(MupConstructor, Decl(overrideInterfaceProperty.ts, 2, 1)) + + new(): Mup; +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) + + new(entries?: readonly (readonly [K, V])[] | null): Mup; +>K : Symbol(K, Decl(overrideInterfaceProperty.ts, 5, 8)) +>V : Symbol(V, Decl(overrideInterfaceProperty.ts, 5, 10)) +>entries : Symbol(entries, Decl(overrideInterfaceProperty.ts, 5, 14)) +>K : Symbol(K, Decl(overrideInterfaceProperty.ts, 5, 8)) +>V : Symbol(V, Decl(overrideInterfaceProperty.ts, 5, 10)) +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) +>K : Symbol(K, Decl(overrideInterfaceProperty.ts, 5, 8)) +>V : Symbol(V, Decl(overrideInterfaceProperty.ts, 5, 10)) + + readonly prototype: Mup; +>prototype : Symbol(MupConstructor.prototype, Decl(overrideInterfaceProperty.ts, 5, 72)) +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) +} +declare var Mup: MupConstructor; +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) +>MupConstructor : Symbol(MupConstructor, Decl(overrideInterfaceProperty.ts, 2, 1)) + +class Sizz extends Mup { +>Sizz : Symbol(Sizz, Decl(overrideInterfaceProperty.ts, 8, 32)) +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) + + // ok, because Mup is an interface + get size() { return 0 } +>size : Symbol(Sizz.size, Decl(overrideInterfaceProperty.ts, 10, 24)) +} +class Kasizz extends Mup { +>Kasizz : Symbol(Kasizz, Decl(overrideInterfaceProperty.ts, 13, 1)) +>Mup : Symbol(Mup, Decl(overrideInterfaceProperty.ts, 0, 0), Decl(overrideInterfaceProperty.ts, 8, 11)) + + size = -1 +>size : Symbol(Kasizz.size, Decl(overrideInterfaceProperty.ts, 14, 26)) +} + diff --git a/tests/baselines/reference/overrideInterfaceProperty.types b/tests/baselines/reference/overrideInterfaceProperty.types new file mode 100644 index 0000000000000..69bf70e7358d5 --- /dev/null +++ b/tests/baselines/reference/overrideInterfaceProperty.types @@ -0,0 +1,36 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/overrideInterfaceProperty.ts === +interface Mup { + readonly size: number; +>size : number +} +interface MupConstructor { + new(): Mup; + new(entries?: readonly (readonly [K, V])[] | null): Mup; +>entries : readonly (readonly [K, V])[] +>null : null + + readonly prototype: Mup; +>prototype : Mup +} +declare var Mup: MupConstructor; +>Mup : MupConstructor + +class Sizz extends Mup { +>Sizz : Sizz +>Mup : Mup + + // ok, because Mup is an interface + get size() { return 0 } +>size : number +>0 : 0 +} +class Kasizz extends Mup { +>Kasizz : Kasizz +>Mup : Mup + + size = -1 +>size : number +>-1 : -1 +>1 : 1 +} + diff --git a/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt b/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt index dc19cb0f8550a..402355919a031 100644 --- a/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt +++ b/tests/baselines/reference/parserMemberFunctionDeclaration5.errors.txt @@ -1,9 +1,12 @@ tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts(2,5): error TS1031: 'declare' modifier cannot appear on a class element. +tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts(2,19): error TS1183: An implementation cannot be declared in ambient contexts. -==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts (1 errors) ==== +==== tests/cases/conformance/parser/ecmascript5/MemberFunctionDeclarations/parserMemberFunctionDeclaration5.ts (2 errors) ==== class C { declare Foo() { } ~~~~~~~ !!! error TS1031: 'declare' modifier cannot appear on a class element. + ~ +!!! error TS1183: An implementation cannot be declared in ambient contexts. } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberVariableDeclaration5.errors.txt b/tests/baselines/reference/parserMemberVariableDeclaration5.errors.txt deleted file mode 100644 index 2b2ea9664ceb4..0000000000000 --- a/tests/baselines/reference/parserMemberVariableDeclaration5.errors.txt +++ /dev/null @@ -1,9 +0,0 @@ -tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts(2,3): error TS1031: 'declare' modifier cannot appear on a class element. - - -==== tests/cases/conformance/parser/ecmascript5/MemberVariableDeclarations/parserMemberVariableDeclaration5.ts (1 errors) ==== - class C { - declare Foo; - ~~~~~~~ -!!! error TS1031: 'declare' modifier cannot appear on a class element. - } \ No newline at end of file diff --git a/tests/baselines/reference/privacyAccessorDeclFile.js b/tests/baselines/reference/privacyAccessorDeclFile.js index a7eb6296f5c8e..1c84bd63749d6 100644 --- a/tests/baselines/reference/privacyAccessorDeclFile.js +++ b/tests/baselines/reference/privacyAccessorDeclFile.js @@ -3562,46 +3562,46 @@ declare class privateClass { export declare class publicClass { } export declare class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: privateClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: privateClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: privateClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: privateClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): privateClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): privateClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): privateClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): privateClass; + private get myPrivateMethod1(); } export declare class publicClassWithWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClass; + private get myPrivateMethod1(); } export declare class publicClassWithWithPrivateSetAccessorTypes { - static myPublicStaticMethod: privateClass; - private static myPrivateStaticMethod; - myPublicMethod: privateClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: privateClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: privateClass); + private set myPrivateMethod(value); } export declare class publicClassWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClass; - private static myPrivateStaticMethod; - myPublicMethod: publicClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClass); + private set myPrivateMethod(value); } export declare class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: privateModule.publicClass; - readonly myPublicMethod: privateModule.publicClass; - static readonly myPublicStaticMethod1: privateModule.publicClass; - readonly myPublicMethod1: privateModule.publicClass; + static get myPublicStaticMethod(): privateModule.publicClass; + get myPublicMethod(): privateModule.publicClass; + static get myPublicStaticMethod1(): privateModule.publicClass; + get myPublicMethod1(): privateModule.publicClass; } export declare class publicClassWithPrivateModuleSetAccessorTypes { - static myPublicStaticMethod: privateModule.publicClass; - myPublicMethod: privateModule.publicClass; + static set myPublicStaticMethod(param: privateModule.publicClass); + set myPublicMethod(param: privateModule.publicClass); } export declare module publicModule { class privateClass { @@ -3609,46 +3609,46 @@ export declare module publicModule { export class publicClass { } export class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: privateClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: privateClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: privateClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: privateClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): privateClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): privateClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): privateClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): privateClass; + private get myPrivateMethod1(); } export class publicClassWithWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClass; + private get myPrivateMethod1(); } export class publicClassWithWithPrivateSetAccessorTypes { - static myPublicStaticMethod: privateClass; - private static myPrivateStaticMethod; - myPublicMethod: privateClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: privateClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: privateClass); + private set myPrivateMethod(value); } export class publicClassWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClass; - private static myPrivateStaticMethod; - myPublicMethod: publicClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClass); + private set myPrivateMethod(value); } export class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: privateModule.publicClass; - readonly myPublicMethod: privateModule.publicClass; - static readonly myPublicStaticMethod1: privateModule.publicClass; - readonly myPublicMethod1: privateModule.publicClass; + static get myPublicStaticMethod(): privateModule.publicClass; + get myPublicMethod(): privateModule.publicClass; + static get myPublicStaticMethod1(): privateModule.publicClass; + get myPublicMethod1(): privateModule.publicClass; } export class publicClassWithPrivateModuleSetAccessorTypes { - static myPublicStaticMethod: privateModule.publicClass; - myPublicMethod: privateModule.publicClass; + static set myPublicStaticMethod(param: privateModule.publicClass); + set myPublicMethod(param: privateModule.publicClass); } export {}; } @@ -3658,46 +3658,46 @@ declare module privateModule { export class publicClass { } export class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: privateClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: privateClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: privateClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: privateClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): privateClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): privateClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): privateClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): privateClass; + private get myPrivateMethod1(); } export class publicClassWithWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClass; + private get myPrivateMethod1(); } export class publicClassWithWithPrivateSetAccessorTypes { - static myPublicStaticMethod: privateClass; - private static myPrivateStaticMethod; - myPublicMethod: privateClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: privateClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: privateClass); + private set myPrivateMethod(value); } export class publicClassWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClass; - private static myPrivateStaticMethod; - myPublicMethod: publicClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClass); + private set myPrivateMethod(value); } export class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: privateModule.publicClass; - readonly myPublicMethod: privateModule.publicClass; - static readonly myPublicStaticMethod1: publicClass; - readonly myPublicMethod1: publicClass; + static get myPublicStaticMethod(): privateModule.publicClass; + get myPublicMethod(): privateModule.publicClass; + static get myPublicStaticMethod1(): publicClass; + get myPublicMethod1(): publicClass; } export class publicClassWithPrivateModuleSetAccessorTypes { - static myPublicStaticMethod: privateModule.publicClass; - myPublicMethod: privateModule.publicClass; + static set myPublicStaticMethod(param: privateModule.publicClass); + set myPublicMethod(param: privateModule.publicClass); } export {}; } @@ -3706,20 +3706,20 @@ export {}; declare class publicClassInGlobal { } declare class publicClassInGlobalWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClassInGlobal; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClassInGlobal; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClassInGlobal; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClassInGlobal; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClassInGlobal; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClassInGlobal; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClassInGlobal; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClassInGlobal; + private get myPrivateMethod1(); } declare class publicClassInGlobalWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClassInGlobal; - private static myPrivateStaticMethod; - myPublicMethod: publicClassInGlobal; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClassInGlobal); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClassInGlobal); + private set myPrivateMethod(value); } declare module publicModuleInGlobal { class privateClass { @@ -3732,90 +3732,90 @@ declare module publicModuleInGlobal { export class publicClass { } export class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: privateClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: privateClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: privateClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: privateClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): privateClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): privateClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): privateClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): privateClass; + private get myPrivateMethod1(); } export class publicClassWithWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClass; + private get myPrivateMethod1(); } export class publicClassWithWithPrivateSetAccessorTypes { - static myPublicStaticMethod: privateClass; - private static myPrivateStaticMethod; - myPublicMethod: privateClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: privateClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: privateClass); + private set myPrivateMethod(value); } export class publicClassWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClass; - private static myPrivateStaticMethod; - myPublicMethod: publicClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClass); + private set myPrivateMethod(value); } export class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: privateModule.publicClass; - readonly myPublicMethod: privateModule.publicClass; - static readonly myPublicStaticMethod1: publicClass; - readonly myPublicMethod1: publicClass; + static get myPublicStaticMethod(): privateModule.publicClass; + get myPublicMethod(): privateModule.publicClass; + static get myPublicStaticMethod1(): publicClass; + get myPublicMethod1(): publicClass; } export class publicClassWithPrivateModuleSetAccessorTypes { - static myPublicStaticMethod: privateModule.publicClass; - myPublicMethod: privateModule.publicClass; + static set myPublicStaticMethod(param: privateModule.publicClass); + set myPublicMethod(param: privateModule.publicClass); } export {}; } export class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: privateClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: privateClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: privateClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: privateClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): privateClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): privateClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): privateClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): privateClass; + private get myPrivateMethod1(); } export class publicClassWithWithPublicGetAccessorTypes { - static readonly myPublicStaticMethod: publicClass; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: publicClass; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: publicClass; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: publicClass; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): publicClass; + private static get myPrivateStaticMethod(); + get myPublicMethod(): publicClass; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): publicClass; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): publicClass; + private get myPrivateMethod1(); } export class publicClassWithWithPrivateSetAccessorTypes { - static myPublicStaticMethod: privateClass; - private static myPrivateStaticMethod; - myPublicMethod: privateClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: privateClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: privateClass); + private set myPrivateMethod(value); } export class publicClassWithWithPublicSetAccessorTypes { - static myPublicStaticMethod: publicClass; - private static myPrivateStaticMethod; - myPublicMethod: publicClass; - private myPrivateMethod; + static set myPublicStaticMethod(param: publicClass); + private static set myPrivateStaticMethod(value); + set myPublicMethod(param: publicClass); + private set myPrivateMethod(value); } export class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: privateModule.publicClass; - readonly myPublicMethod: privateModule.publicClass; - static readonly myPublicStaticMethod1: privateModule.publicClass; - readonly myPublicMethod1: privateModule.publicClass; + static get myPublicStaticMethod(): privateModule.publicClass; + get myPublicMethod(): privateModule.publicClass; + static get myPublicStaticMethod1(): privateModule.publicClass; + get myPublicMethod1(): privateModule.publicClass; } export class publicClassWithPrivateModuleSetAccessorTypes { - static myPublicStaticMethod: privateModule.publicClass; - myPublicMethod: privateModule.publicClass; + static set myPublicStaticMethod(param: privateModule.publicClass); + set myPublicMethod(param: privateModule.publicClass); } export {}; } diff --git a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js index 42f7639986913..e0dc38bcfcd58 100644 --- a/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js +++ b/tests/baselines/reference/privacyCannotNameAccessorDeclFile.js @@ -417,18 +417,18 @@ export declare function createExportedWidget4(): Widgets1.SpecializedGlobalWidge //// [privacyCannotNameAccessorDeclFile_consumer.d.ts] /// export declare class publicClassWithWithPrivateGetAccessorTypes { - static readonly myPublicStaticMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; - private static readonly myPrivateStaticMethod; - readonly myPublicMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; - private readonly myPrivateMethod; - static readonly myPublicStaticMethod1: import("GlobalWidgets").Widget3; - private static readonly myPrivateStaticMethod1; - readonly myPublicMethod1: import("GlobalWidgets").Widget3; - private readonly myPrivateMethod1; + static get myPublicStaticMethod(): import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; + private static get myPrivateStaticMethod(); + get myPublicMethod(): import("./privacyCannotNameAccessorDeclFile_Widgets").Widget1; + private get myPrivateMethod(); + static get myPublicStaticMethod1(): import("GlobalWidgets").Widget3; + private static get myPrivateStaticMethod1(); + get myPublicMethod1(): import("GlobalWidgets").Widget3; + private get myPrivateMethod1(); } export declare class publicClassWithPrivateModuleGetAccessorTypes { - static readonly myPublicStaticMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; - readonly myPublicMethod: import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; - static readonly myPublicStaticMethod1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; - readonly myPublicMethod1: import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + static get myPublicStaticMethod(): import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; + get myPublicMethod(): import("./privacyCannotNameAccessorDeclFile_Widgets").SpecializedWidget.Widget2; + static get myPublicStaticMethod1(): import("GlobalWidgets").SpecializedGlobalWidget.Widget4; + get myPublicMethod1(): import("GlobalWidgets").SpecializedGlobalWidget.Widget4; } diff --git a/tests/baselines/reference/properties.js b/tests/baselines/reference/properties.js index 0b81d7671cdbb..27688f5837578 100644 --- a/tests/baselines/reference/properties.js +++ b/tests/baselines/reference/properties.js @@ -32,5 +32,6 @@ var MyClass = /** @class */ (function () { //// [properties.d.ts] declare class MyClass { - Count: number; + get Count(): number; + set Count(value: number); } diff --git a/tests/baselines/reference/propertyOverridesAccessors.errors.txt b/tests/baselines/reference/propertyOverridesAccessors.errors.txt new file mode 100644 index 0000000000000..dcacf16696d48 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors.errors.txt @@ -0,0 +1,24 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts(5,5): error TS2610: Class 'A' defines instance member accessor 'p', but extended class 'B' defines it as instance member property. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts(13,5): error TS2610: Class 'C' defines instance member accessor 'p', but extended class 'D' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts (2 errors) ==== + class A { + get p() { return 'oh no' } + } + class B extends A { + p = 'yep' // error + ~ +!!! error TS2610: Class 'A' defines instance member accessor 'p', but extended class 'B' defines it as instance member property. + } + class C { + _secret = 11 + get p() { return this._secret } + set p(value) { this._secret = value } + } + class D extends C { + p = 101 // error + ~ +!!! error TS2610: Class 'C' defines instance member accessor 'p', but extended class 'D' defines it as instance member property. + } + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesAccessors.js b/tests/baselines/reference/propertyOverridesAccessors.js new file mode 100644 index 0000000000000..d9cc40acc6f39 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors.js @@ -0,0 +1,55 @@ +//// [propertyOverridesAccessors.ts] +class A { + get p() { return 'oh no' } +} +class B extends A { + p = 'yep' // error +} +class C { + _secret = 11 + get p() { return this._secret } + set p(value) { this._secret = value } +} +class D extends C { + p = 101 // error +} + + +//// [propertyOverridesAccessors.js] +class A { + get p() { return 'oh no'; } +} +class B extends A { + constructor() { + super(...arguments); + Object.defineProperty(this, "p", { + enumerable: true, + configurable: true, + writable: true, + value: 'yep' + }); // error + } +} +class C { + constructor() { + Object.defineProperty(this, "_secret", { + enumerable: true, + configurable: true, + writable: true, + value: 11 + }); + } + get p() { return this._secret; } + set p(value) { this._secret = value; } +} +class D extends C { + constructor() { + super(...arguments); + Object.defineProperty(this, "p", { + enumerable: true, + configurable: true, + writable: true, + value: 101 + }); // error + } +} diff --git a/tests/baselines/reference/propertyOverridesAccessors.symbols b/tests/baselines/reference/propertyOverridesAccessors.symbols new file mode 100644 index 0000000000000..e365fedad0a2e --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors.symbols @@ -0,0 +1,42 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts === +class A { +>A : Symbol(A, Decl(propertyOverridesAccessors.ts, 0, 0)) + + get p() { return 'oh no' } +>p : Symbol(A.p, Decl(propertyOverridesAccessors.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(propertyOverridesAccessors.ts, 2, 1)) +>A : Symbol(A, Decl(propertyOverridesAccessors.ts, 0, 0)) + + p = 'yep' // error +>p : Symbol(B.p, Decl(propertyOverridesAccessors.ts, 3, 19)) +} +class C { +>C : Symbol(C, Decl(propertyOverridesAccessors.ts, 5, 1)) + + _secret = 11 +>_secret : Symbol(C._secret, Decl(propertyOverridesAccessors.ts, 6, 9)) + + get p() { return this._secret } +>p : Symbol(C.p, Decl(propertyOverridesAccessors.ts, 7, 16), Decl(propertyOverridesAccessors.ts, 8, 35)) +>this._secret : Symbol(C._secret, Decl(propertyOverridesAccessors.ts, 6, 9)) +>this : Symbol(C, Decl(propertyOverridesAccessors.ts, 5, 1)) +>_secret : Symbol(C._secret, Decl(propertyOverridesAccessors.ts, 6, 9)) + + set p(value) { this._secret = value } +>p : Symbol(C.p, Decl(propertyOverridesAccessors.ts, 7, 16), Decl(propertyOverridesAccessors.ts, 8, 35)) +>value : Symbol(value, Decl(propertyOverridesAccessors.ts, 9, 10)) +>this._secret : Symbol(C._secret, Decl(propertyOverridesAccessors.ts, 6, 9)) +>this : Symbol(C, Decl(propertyOverridesAccessors.ts, 5, 1)) +>_secret : Symbol(C._secret, Decl(propertyOverridesAccessors.ts, 6, 9)) +>value : Symbol(value, Decl(propertyOverridesAccessors.ts, 9, 10)) +} +class D extends C { +>D : Symbol(D, Decl(propertyOverridesAccessors.ts, 10, 1)) +>C : Symbol(C, Decl(propertyOverridesAccessors.ts, 5, 1)) + + p = 101 // error +>p : Symbol(D.p, Decl(propertyOverridesAccessors.ts, 11, 19)) +} + diff --git a/tests/baselines/reference/propertyOverridesAccessors.types b/tests/baselines/reference/propertyOverridesAccessors.types new file mode 100644 index 0000000000000..9ffec6e8fe68d --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors.types @@ -0,0 +1,47 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts === +class A { +>A : A + + get p() { return 'oh no' } +>p : string +>'oh no' : "oh no" +} +class B extends A { +>B : B +>A : A + + p = 'yep' // error +>p : string +>'yep' : "yep" +} +class C { +>C : C + + _secret = 11 +>_secret : number +>11 : 11 + + get p() { return this._secret } +>p : number +>this._secret : number +>this : this +>_secret : number + + set p(value) { this._secret = value } +>p : number +>value : number +>this._secret = value : number +>this._secret : number +>this : this +>_secret : number +>value : number +} +class D extends C { +>D : D +>C : C + + p = 101 // error +>p : number +>101 : 101 +} + diff --git a/tests/baselines/reference/propertyOverridesAccessors2.errors.txt b/tests/baselines/reference/propertyOverridesAccessors2.errors.txt new file mode 100644 index 0000000000000..0c91d3b9f7f7a --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors2.errors.txt @@ -0,0 +1,18 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts(7,3): error TS2610: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts (1 errors) ==== + class Base { + get x() { return 2; } + set x(value) { console.log(`x was set to ${value}`); } + } + + class Derived extends Base { + x = 1; + ~ +!!! error TS2610: Class 'Base' defines instance member accessor 'x', but extended class 'Derived' defines it as instance member property. + } + + const obj = new Derived(); // prints 'x was set to 1' + console.log(obj.x); // 2 + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesAccessors2.js b/tests/baselines/reference/propertyOverridesAccessors2.js new file mode 100644 index 0000000000000..bbd8e0fbecf3f --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors2.js @@ -0,0 +1,24 @@ +//// [propertyOverridesAccessors2.ts] +class Base { + get x() { return 2; } + set x(value) { console.log(`x was set to ${value}`); } +} + +class Derived extends Base { + x = 1; +} + +const obj = new Derived(); // prints 'x was set to 1' +console.log(obj.x); // 2 + + +//// [propertyOverridesAccessors2.js] +class Base { + get x() { return 2; } + set x(value) { console.log(`x was set to ${value}`); } +} +class Derived extends Base { + x = 1; +} +const obj = new Derived(); // prints 'x was set to 1' +console.log(obj.x); // 2 diff --git a/tests/baselines/reference/propertyOverridesAccessors2.symbols b/tests/baselines/reference/propertyOverridesAccessors2.symbols new file mode 100644 index 0000000000000..fd26e67e69bf0 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors2.symbols @@ -0,0 +1,36 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts === +class Base { +>Base : Symbol(Base, Decl(propertyOverridesAccessors2.ts, 0, 0)) + + get x() { return 2; } +>x : Symbol(Base.x, Decl(propertyOverridesAccessors2.ts, 0, 12), Decl(propertyOverridesAccessors2.ts, 1, 23)) + + set x(value) { console.log(`x was set to ${value}`); } +>x : Symbol(Base.x, Decl(propertyOverridesAccessors2.ts, 0, 12), Decl(propertyOverridesAccessors2.ts, 1, 23)) +>value : Symbol(value, Decl(propertyOverridesAccessors2.ts, 2, 8)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>value : Symbol(value, Decl(propertyOverridesAccessors2.ts, 2, 8)) +} + +class Derived extends Base { +>Derived : Symbol(Derived, Decl(propertyOverridesAccessors2.ts, 3, 1)) +>Base : Symbol(Base, Decl(propertyOverridesAccessors2.ts, 0, 0)) + + x = 1; +>x : Symbol(Derived.x, Decl(propertyOverridesAccessors2.ts, 5, 28)) +} + +const obj = new Derived(); // prints 'x was set to 1' +>obj : Symbol(obj, Decl(propertyOverridesAccessors2.ts, 9, 5)) +>Derived : Symbol(Derived, Decl(propertyOverridesAccessors2.ts, 3, 1)) + +console.log(obj.x); // 2 +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>obj.x : Symbol(Derived.x, Decl(propertyOverridesAccessors2.ts, 5, 28)) +>obj : Symbol(obj, Decl(propertyOverridesAccessors2.ts, 9, 5)) +>x : Symbol(Derived.x, Decl(propertyOverridesAccessors2.ts, 5, 28)) + diff --git a/tests/baselines/reference/propertyOverridesAccessors2.types b/tests/baselines/reference/propertyOverridesAccessors2.types new file mode 100644 index 0000000000000..5db511e968184 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors2.types @@ -0,0 +1,42 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts === +class Base { +>Base : Base + + get x() { return 2; } +>x : number +>2 : 2 + + set x(value) { console.log(`x was set to ${value}`); } +>x : number +>value : number +>console.log(`x was set to ${value}`) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>`x was set to ${value}` : string +>value : number +} + +class Derived extends Base { +>Derived : Derived +>Base : Base + + x = 1; +>x : number +>1 : 1 +} + +const obj = new Derived(); // prints 'x was set to 1' +>obj : Derived +>new Derived() : Derived +>Derived : typeof Derived + +console.log(obj.x); // 2 +>console.log(obj.x) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>obj.x : number +>obj : Derived +>x : number + diff --git a/tests/baselines/reference/propertyOverridesAccessors3.errors.txt b/tests/baselines/reference/propertyOverridesAccessors3.errors.txt new file mode 100644 index 0000000000000..523a0f6db3d08 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors3.errors.txt @@ -0,0 +1,30 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts(19,5): error TS2610: Class 'Animal' defines instance member accessor 'sound', but extended class 'Lion' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts (1 errors) ==== + class Animal { + _sound = 'rustling noise in the bushes' + + get sound() { return this._sound } + set sound(val) { + this._sound = val; + /* some important code here, perhaps tracking known sounds, etc */ + } + + makeSound() { + console.log(this._sound) + } + } + + const a = new Animal + a.makeSound() // 'rustling noise in the bushes' + + class Lion extends Animal { + sound = 'RAWR!' // error here + ~~~~~ +!!! error TS2610: Class 'Animal' defines instance member accessor 'sound', but extended class 'Lion' defines it as instance member property. + } + + const lion = new Lion + lion.makeSound() // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesAccessors3.js b/tests/baselines/reference/propertyOverridesAccessors3.js new file mode 100644 index 0000000000000..ff96cdd19abd7 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors3.js @@ -0,0 +1,45 @@ +//// [propertyOverridesAccessors3.ts] +class Animal { + _sound = 'rustling noise in the bushes' + + get sound() { return this._sound } + set sound(val) { + this._sound = val; + /* some important code here, perhaps tracking known sounds, etc */ + } + + makeSound() { + console.log(this._sound) + } +} + +const a = new Animal +a.makeSound() // 'rustling noise in the bushes' + +class Lion extends Animal { + sound = 'RAWR!' // error here +} + +const lion = new Lion +lion.makeSound() // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" + + +//// [propertyOverridesAccessors3.js] +class Animal { + _sound = 'rustling noise in the bushes'; + get sound() { return this._sound; } + set sound(val) { + this._sound = val; + /* some important code here, perhaps tracking known sounds, etc */ + } + makeSound() { + console.log(this._sound); + } +} +const a = new Animal; +a.makeSound(); // 'rustling noise in the bushes' +class Lion extends Animal { + sound = 'RAWR!'; // error here +} +const lion = new Lion; +lion.makeSound(); // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" diff --git a/tests/baselines/reference/propertyOverridesAccessors3.symbols b/tests/baselines/reference/propertyOverridesAccessors3.symbols new file mode 100644 index 0000000000000..801b6ca3c9810 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors3.symbols @@ -0,0 +1,65 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts === +class Animal { +>Animal : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) + + _sound = 'rustling noise in the bushes' +>_sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) + + get sound() { return this._sound } +>sound : Symbol(Animal.sound, Decl(propertyOverridesAccessors3.ts, 1, 43), Decl(propertyOverridesAccessors3.ts, 3, 38)) +>this._sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) +>this : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) +>_sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) + + set sound(val) { +>sound : Symbol(Animal.sound, Decl(propertyOverridesAccessors3.ts, 1, 43), Decl(propertyOverridesAccessors3.ts, 3, 38)) +>val : Symbol(val, Decl(propertyOverridesAccessors3.ts, 4, 14)) + + this._sound = val; +>this._sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) +>this : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) +>_sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) +>val : Symbol(val, Decl(propertyOverridesAccessors3.ts, 4, 14)) + + /* some important code here, perhaps tracking known sounds, etc */ + } + + makeSound() { +>makeSound : Symbol(Animal.makeSound, Decl(propertyOverridesAccessors3.ts, 7, 5)) + + console.log(this._sound) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>this._sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) +>this : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) +>_sound : Symbol(Animal._sound, Decl(propertyOverridesAccessors3.ts, 0, 14)) + } +} + +const a = new Animal +>a : Symbol(a, Decl(propertyOverridesAccessors3.ts, 14, 5)) +>Animal : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) + +a.makeSound() // 'rustling noise in the bushes' +>a.makeSound : Symbol(Animal.makeSound, Decl(propertyOverridesAccessors3.ts, 7, 5)) +>a : Symbol(a, Decl(propertyOverridesAccessors3.ts, 14, 5)) +>makeSound : Symbol(Animal.makeSound, Decl(propertyOverridesAccessors3.ts, 7, 5)) + +class Lion extends Animal { +>Lion : Symbol(Lion, Decl(propertyOverridesAccessors3.ts, 15, 13)) +>Animal : Symbol(Animal, Decl(propertyOverridesAccessors3.ts, 0, 0)) + + sound = 'RAWR!' // error here +>sound : Symbol(Lion.sound, Decl(propertyOverridesAccessors3.ts, 17, 27)) +} + +const lion = new Lion +>lion : Symbol(lion, Decl(propertyOverridesAccessors3.ts, 21, 5)) +>Lion : Symbol(Lion, Decl(propertyOverridesAccessors3.ts, 15, 13)) + +lion.makeSound() // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" +>lion.makeSound : Symbol(Animal.makeSound, Decl(propertyOverridesAccessors3.ts, 7, 5)) +>lion : Symbol(lion, Decl(propertyOverridesAccessors3.ts, 21, 5)) +>makeSound : Symbol(Animal.makeSound, Decl(propertyOverridesAccessors3.ts, 7, 5)) + diff --git a/tests/baselines/reference/propertyOverridesAccessors3.types b/tests/baselines/reference/propertyOverridesAccessors3.types new file mode 100644 index 0000000000000..b7ea64087c7a8 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors3.types @@ -0,0 +1,73 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts === +class Animal { +>Animal : Animal + + _sound = 'rustling noise in the bushes' +>_sound : string +>'rustling noise in the bushes' : "rustling noise in the bushes" + + get sound() { return this._sound } +>sound : string +>this._sound : string +>this : this +>_sound : string + + set sound(val) { +>sound : string +>val : string + + this._sound = val; +>this._sound = val : string +>this._sound : string +>this : this +>_sound : string +>val : string + + /* some important code here, perhaps tracking known sounds, etc */ + } + + makeSound() { +>makeSound : () => void + + console.log(this._sound) +>console.log(this._sound) : void +>console.log : (message?: any, ...optionalParams: any[]) => void +>console : Console +>log : (message?: any, ...optionalParams: any[]) => void +>this._sound : string +>this : this +>_sound : string + } +} + +const a = new Animal +>a : Animal +>new Animal : Animal +>Animal : typeof Animal + +a.makeSound() // 'rustling noise in the bushes' +>a.makeSound() : void +>a.makeSound : () => void +>a : Animal +>makeSound : () => void + +class Lion extends Animal { +>Lion : Lion +>Animal : Animal + + sound = 'RAWR!' // error here +>sound : string +>'RAWR!' : "RAWR!" +} + +const lion = new Lion +>lion : Lion +>new Lion : Lion +>Lion : typeof Lion + +lion.makeSound() // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" +>lion.makeSound() : void +>lion.makeSound : () => void +>lion : Lion +>makeSound : () => void + diff --git a/tests/baselines/reference/propertyOverridesAccessors4.errors.txt b/tests/baselines/reference/propertyOverridesAccessors4.errors.txt new file mode 100644 index 0000000000000..c437e05b28280 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors4.errors.txt @@ -0,0 +1,14 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts(6,5): error TS2610: Class 'Animal' defines instance member accessor 'sound', but extended class 'Lion' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts (1 errors) ==== + declare class Animal { + get sound(): string + set sound(val: string) + } + class Lion extends Animal { + sound = 'RAWR!' // error here + ~~~~~ +!!! error TS2610: Class 'Animal' defines instance member accessor 'sound', but extended class 'Lion' defines it as instance member property. + } + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesAccessors4.js b/tests/baselines/reference/propertyOverridesAccessors4.js new file mode 100644 index 0000000000000..1c284e6aa497c --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors4.js @@ -0,0 +1,38 @@ +//// [propertyOverridesAccessors4.ts] +declare class Animal { + get sound(): string + set sound(val: string) +} +class Lion extends Animal { + sound = 'RAWR!' // error here +} + + +//// [propertyOverridesAccessors4.js] +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var Lion = /** @class */ (function (_super) { + __extends(Lion, _super); + function Lion() { + var _this = _super !== null && _super.apply(this, arguments) || this; + Object.defineProperty(_this, "sound", { + enumerable: true, + configurable: true, + writable: true, + value: 'RAWR!' + }); // error here + return _this; + } + return Lion; +}(Animal)); diff --git a/tests/baselines/reference/propertyOverridesAccessors4.symbols b/tests/baselines/reference/propertyOverridesAccessors4.symbols new file mode 100644 index 0000000000000..d7097e1d528cd --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors4.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts === +declare class Animal { +>Animal : Symbol(Animal, Decl(propertyOverridesAccessors4.ts, 0, 0)) + + get sound(): string +>sound : Symbol(Animal.sound, Decl(propertyOverridesAccessors4.ts, 0, 22), Decl(propertyOverridesAccessors4.ts, 1, 23)) + + set sound(val: string) +>sound : Symbol(Animal.sound, Decl(propertyOverridesAccessors4.ts, 0, 22), Decl(propertyOverridesAccessors4.ts, 1, 23)) +>val : Symbol(val, Decl(propertyOverridesAccessors4.ts, 2, 14)) +} +class Lion extends Animal { +>Lion : Symbol(Lion, Decl(propertyOverridesAccessors4.ts, 3, 1)) +>Animal : Symbol(Animal, Decl(propertyOverridesAccessors4.ts, 0, 0)) + + sound = 'RAWR!' // error here +>sound : Symbol(Lion.sound, Decl(propertyOverridesAccessors4.ts, 4, 27)) +} + diff --git a/tests/baselines/reference/propertyOverridesAccessors4.types b/tests/baselines/reference/propertyOverridesAccessors4.types new file mode 100644 index 0000000000000..5701f76127bd6 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors4.types @@ -0,0 +1,20 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts === +declare class Animal { +>Animal : Animal + + get sound(): string +>sound : string + + set sound(val: string) +>sound : string +>val : string +} +class Lion extends Animal { +>Lion : Lion +>Animal : Animal + + sound = 'RAWR!' // error here +>sound : string +>'RAWR!' : "RAWR!" +} + diff --git a/tests/baselines/reference/propertyOverridesAccessors5.errors.txt b/tests/baselines/reference/propertyOverridesAccessors5.errors.txt new file mode 100644 index 0000000000000..5028138995693 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors5.errors.txt @@ -0,0 +1,15 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts(5,24): error TS2610: Class 'A' defines instance member accessor 'p', but extended class 'B' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts (1 errors) ==== + class A { + get p() { return 'oh no' } + } + class B extends A { + constructor(public p: string) { + ~ +!!! error TS2610: Class 'A' defines instance member accessor 'p', but extended class 'B' defines it as instance member property. + super() + } + } + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesAccessors5.js b/tests/baselines/reference/propertyOverridesAccessors5.js new file mode 100644 index 0000000000000..76e1296627074 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors5.js @@ -0,0 +1,22 @@ +//// [propertyOverridesAccessors5.ts] +class A { + get p() { return 'oh no' } +} +class B extends A { + constructor(public p: string) { + super() + } +} + + +//// [propertyOverridesAccessors5.js] +class A { + get p() { return 'oh no'; } +} +class B extends A { + p; + constructor(p) { + super(); + this.p = p; + } +} diff --git a/tests/baselines/reference/propertyOverridesAccessors5.symbols b/tests/baselines/reference/propertyOverridesAccessors5.symbols new file mode 100644 index 0000000000000..289021c0c7fb5 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors5.symbols @@ -0,0 +1,19 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts === +class A { +>A : Symbol(A, Decl(propertyOverridesAccessors5.ts, 0, 0)) + + get p() { return 'oh no' } +>p : Symbol(A.p, Decl(propertyOverridesAccessors5.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(propertyOverridesAccessors5.ts, 2, 1)) +>A : Symbol(A, Decl(propertyOverridesAccessors5.ts, 0, 0)) + + constructor(public p: string) { +>p : Symbol(B.p, Decl(propertyOverridesAccessors5.ts, 4, 16)) + + super() +>super : Symbol(A, Decl(propertyOverridesAccessors5.ts, 0, 0)) + } +} + diff --git a/tests/baselines/reference/propertyOverridesAccessors5.types b/tests/baselines/reference/propertyOverridesAccessors5.types new file mode 100644 index 0000000000000..ebbe10d4b01e9 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesAccessors5.types @@ -0,0 +1,21 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts === +class A { +>A : A + + get p() { return 'oh no' } +>p : string +>'oh no' : "oh no" +} +class B extends A { +>B : B +>A : A + + constructor(public p: string) { +>p : string + + super() +>super() : void +>super : typeof A + } +} + diff --git a/tests/baselines/reference/propertyOverridesMethod.errors.txt b/tests/baselines/reference/propertyOverridesMethod.errors.txt new file mode 100644 index 0000000000000..aaee2d48cf658 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesMethod.errors.txt @@ -0,0 +1,13 @@ +tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts(5,5): error TS2424: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member property. + + +==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts (1 errors) ==== + class A { + m() { } + } + class B extends A { + m = () => 1 + ~ +!!! error TS2424: Class 'A' defines instance member function 'm', but extended class 'B' defines it as instance member property. + } + \ No newline at end of file diff --git a/tests/baselines/reference/propertyOverridesMethod.js b/tests/baselines/reference/propertyOverridesMethod.js new file mode 100644 index 0000000000000..f78971a38f7cf --- /dev/null +++ b/tests/baselines/reference/propertyOverridesMethod.js @@ -0,0 +1,16 @@ +//// [propertyOverridesMethod.ts] +class A { + m() { } +} +class B extends A { + m = () => 1 +} + + +//// [propertyOverridesMethod.js] +class A { + m() { } +} +class B extends A { + m = () => 1; +} diff --git a/tests/baselines/reference/propertyOverridesMethod.symbols b/tests/baselines/reference/propertyOverridesMethod.symbols new file mode 100644 index 0000000000000..960aab6cb5612 --- /dev/null +++ b/tests/baselines/reference/propertyOverridesMethod.symbols @@ -0,0 +1,15 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts === +class A { +>A : Symbol(A, Decl(propertyOverridesMethod.ts, 0, 0)) + + m() { } +>m : Symbol(A.m, Decl(propertyOverridesMethod.ts, 0, 9)) +} +class B extends A { +>B : Symbol(B, Decl(propertyOverridesMethod.ts, 2, 1)) +>A : Symbol(A, Decl(propertyOverridesMethod.ts, 0, 0)) + + m = () => 1 +>m : Symbol(B.m, Decl(propertyOverridesMethod.ts, 3, 19)) +} + diff --git a/tests/baselines/reference/propertyOverridesMethod.types b/tests/baselines/reference/propertyOverridesMethod.types new file mode 100644 index 0000000000000..13fcda01a853d --- /dev/null +++ b/tests/baselines/reference/propertyOverridesMethod.types @@ -0,0 +1,17 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts === +class A { +>A : A + + m() { } +>m : () => void +} +class B extends A { +>B : B +>A : A + + m = () => 1 +>m : () => number +>() => 1 : () => number +>1 : 1 +} + diff --git a/tests/baselines/reference/propertyOverridingPrototype.errors.txt b/tests/baselines/reference/propertyOverridingPrototype.errors.txt new file mode 100644 index 0000000000000..a585f7999f603 --- /dev/null +++ b/tests/baselines/reference/propertyOverridingPrototype.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/propertyOverridingPrototype.ts(7,5): error TS2424: Class 'Base' defines instance member function 'foo', but extended class 'Derived' defines it as instance member property. + + +==== tests/cases/compiler/propertyOverridingPrototype.ts (1 errors) ==== + class Base { + foo() { + } + } + + class Derived extends Base { + foo: () => { }; + ~~~ +!!! error TS2424: Class 'Base' defines instance member function 'foo', but extended class 'Derived' defines it as instance member property. + } + + \ No newline at end of file diff --git a/tests/baselines/reference/readonlyInDeclarationFile.js b/tests/baselines/reference/readonlyInDeclarationFile.js index 667d2582f100d..7419e27c013b5 100644 --- a/tests/baselines/reference/readonlyInDeclarationFile.js +++ b/tests/baselines/reference/readonlyInDeclarationFile.js @@ -149,21 +149,27 @@ declare class C { private readonly a1; protected readonly a2: number; readonly a3: number; - private readonly b1; - protected readonly b2: number; - readonly b3: number; - private c1; - protected c2: number; - c3: number; + private get b1(); + protected get b2(): number; + get b3(): number; + private get c1(); + private set c1(value); + protected get c2(): number; + protected set c2(value: number); + get c3(): number; + set c3(value: number); private static readonly s1; protected static readonly s2: number; static readonly s3: number; - private static readonly t1; - protected static readonly t2: number; - static readonly t3: number; - private static u1; - protected static u2: number; - static u3: number; + private static get t1(); + protected static get t2(): number; + static get t3(): number; + private static get u1(); + private static set u1(value); + protected static get u2(): number; + protected static set u2(value: number); + static get u3(): number; + static set u3(value: number); } declare var z: { readonly a: string; diff --git a/tests/baselines/reference/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json b/tests/baselines/reference/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json new file mode 100644 index 0000000000000..608714e952871 --- /dev/null +++ b/tests/baselines/reference/showConfig/Shows tsconfig for single option/useDefineForClassFields/tsconfig.json @@ -0,0 +1,5 @@ +{ + "compilerOptions": { + "useDefineForClassFields": true + } +} diff --git a/tests/baselines/reference/symbolDeclarationEmit11.js b/tests/baselines/reference/symbolDeclarationEmit11.js index 25af4c4306475..b0cd9cfddbd5b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit11.js +++ b/tests/baselines/reference/symbolDeclarationEmit11.js @@ -19,5 +19,6 @@ C[Symbol.iterator] = 0; declare class C { static [Symbol.iterator]: number; static [Symbol.isConcatSpreadable](): void; - static [Symbol.toPrimitive]: string; + static get [Symbol.toPrimitive](): string; + static set [Symbol.toPrimitive](x: string); } diff --git a/tests/baselines/reference/symbolDeclarationEmit12.js b/tests/baselines/reference/symbolDeclarationEmit12.js index 0b2034e045000..5d9f70334d44e 100644 --- a/tests/baselines/reference/symbolDeclarationEmit12.js +++ b/tests/baselines/reference/symbolDeclarationEmit12.js @@ -35,8 +35,8 @@ declare module M { [Symbol.iterator]: I; [Symbol.toPrimitive](x: I): void; [Symbol.isConcatSpreadable](): I; - readonly [Symbol.toPrimitive]: any; - [Symbol.toPrimitive]: I; + get [Symbol.toPrimitive](): any; + set [Symbol.toPrimitive](x: I); } export {}; } diff --git a/tests/baselines/reference/symbolDeclarationEmit13.js b/tests/baselines/reference/symbolDeclarationEmit13.js index bbd2c15cfcd1a..dc00d00fc9828 100644 --- a/tests/baselines/reference/symbolDeclarationEmit13.js +++ b/tests/baselines/reference/symbolDeclarationEmit13.js @@ -13,6 +13,6 @@ class C { //// [symbolDeclarationEmit13.d.ts] declare class C { - readonly [Symbol.toPrimitive]: string; - [Symbol.toStringTag]: any; + get [Symbol.toPrimitive](): string; + set [Symbol.toStringTag](x: any); } diff --git a/tests/baselines/reference/symbolDeclarationEmit14.js b/tests/baselines/reference/symbolDeclarationEmit14.js index d4ae3eeb43c35..f79c4e254f03b 100644 --- a/tests/baselines/reference/symbolDeclarationEmit14.js +++ b/tests/baselines/reference/symbolDeclarationEmit14.js @@ -13,6 +13,6 @@ class C { //// [symbolDeclarationEmit14.d.ts] declare class C { - readonly [Symbol.toPrimitive]: string; - readonly [Symbol.toStringTag]: string; + get [Symbol.toPrimitive](): string; + get [Symbol.toStringTag](): string; } diff --git a/tests/baselines/reference/symbolDeclarationEmit4.js b/tests/baselines/reference/symbolDeclarationEmit4.js index 75680aacb66fa..fb3099ec49dbd 100644 --- a/tests/baselines/reference/symbolDeclarationEmit4.js +++ b/tests/baselines/reference/symbolDeclarationEmit4.js @@ -13,5 +13,6 @@ class C { //// [symbolDeclarationEmit4.d.ts] declare class C { - [Symbol.toPrimitive]: string; + get [Symbol.toPrimitive](): string; + set [Symbol.toPrimitive](x: string); } diff --git a/tests/baselines/reference/thisPropertyOverridesAccessors.symbols b/tests/baselines/reference/thisPropertyOverridesAccessors.symbols new file mode 100644 index 0000000000000..40cec9f184709 --- /dev/null +++ b/tests/baselines/reference/thisPropertyOverridesAccessors.symbols @@ -0,0 +1,28 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/foo.ts === +class Foo { +>Foo : Symbol(Foo, Decl(foo.ts, 0, 0)) + + get p() { return 1 } +>p : Symbol(Foo.p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) + + set p(value) { } +>p : Symbol(Foo.p, Decl(foo.ts, 0, 11), Decl(foo.ts, 1, 24)) +>value : Symbol(value, Decl(foo.ts, 2, 10)) +} + +=== tests/cases/conformance/classes/propertyMemberDeclarations/bar.js === +class Bar extends Foo { +>Bar : Symbol(Bar, Decl(bar.js, 0, 0)) +>Foo : Symbol(Foo, Decl(foo.ts, 0, 0)) + + constructor() { + super() +>super : Symbol(Foo, Decl(foo.ts, 0, 0)) + + this.p = 2 +>this.p : Symbol(Bar.p, Decl(bar.js, 2, 15)) +>this : Symbol(Bar, Decl(bar.js, 0, 0)) +>p : Symbol(Bar.p, Decl(bar.js, 2, 15)) + } +} + diff --git a/tests/baselines/reference/thisPropertyOverridesAccessors.types b/tests/baselines/reference/thisPropertyOverridesAccessors.types new file mode 100644 index 0000000000000..c242351dbd2b2 --- /dev/null +++ b/tests/baselines/reference/thisPropertyOverridesAccessors.types @@ -0,0 +1,32 @@ +=== tests/cases/conformance/classes/propertyMemberDeclarations/foo.ts === +class Foo { +>Foo : Foo + + get p() { return 1 } +>p : number +>1 : 1 + + set p(value) { } +>p : number +>value : number +} + +=== tests/cases/conformance/classes/propertyMemberDeclarations/bar.js === +class Bar extends Foo { +>Bar : Bar +>Foo : Foo + + constructor() { + super() +>super() : void +>super : typeof Foo + + this.p = 2 +>this.p = 2 : 2 +>this.p : number +>this : this +>p : number +>2 : 2 + } +} + diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js index 6f6ca38435a80..375dd74392659 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-declaration-doesnt-change/stripInternal.js @@ -3552,32 +3552,32 @@ sourceFile:global.ts }, { "pos": 108, - "end": 212, + "end": 233, "kind": "internal" }, { - "pos": 214, - "end": 253, + "pos": 235, + "end": 274, "kind": "text" }, { - "pos": 253, - "end": 721, + "pos": 274, + "end": 742, "kind": "internal" }, { - "pos": 723, - "end": 730, + "pos": 744, + "end": 751, "kind": "text" }, { - "pos": 730, - "end": 1219, + "pos": 751, + "end": 1240, "kind": "internal" }, { - "pos": 1221, - "end": 1312, + "pos": 1242, + "end": 1333, "kind": "text" } ] @@ -3708,18 +3708,19 @@ declare module "file1" { export class normalC { ---------------------------------------------------------------------- -internal: (108-212) +internal: (108-233) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (214-253) +text: (235-274) } export namespace normalN { ---------------------------------------------------------------------- -internal: (253-721) +internal: (274-742) class C { } function foo(): void; @@ -3740,11 +3741,11 @@ internal: (253-721) c = 2 } ---------------------------------------------------------------------- -text: (723-730) +text: (744-751) } ---------------------------------------------------------------------- -internal: (730-1219) +internal: (751-1240) export class internalC { } export function internalfoo(): void; @@ -3765,7 +3766,7 @@ internal: (730-1219) c = 2 } ---------------------------------------------------------------------- -text: (1221-1312) +text: (1242-1333) } declare module "file2" { export const y = 20; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js index 544b25a544dac..e371045db9a52 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/incremental-headers-change-without-dts-changes/stripInternal.js @@ -2090,7 +2090,7 @@ export namespace normalN { //// [/src/lib/module.d.ts] file written with same contents //// [/src/lib/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAc,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IAClC,MAAM,OAAO,OAAO;;QAEF,IAAI,EAAE,MAAM,CAAC;QACb,MAAM;sBACF,CAAC,EACM,MAAM;KAClC;IACD,MAAM,WAAW,OAAO,CAAC;QACP,MAAa,CAAC;SAAI;QAClB,SAAgB,GAAG,SAAK;QACxB,UAAiB,aAAa,CAAC;YAAE,MAAa,CAAC;aAAG;SAAE;QACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;YAAE,MAAa,SAAS;aAAG;SAAE;QAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;QAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,KAAK,CAAC;QAChC,KAAY,YAAY;YAAG,CAAC,IAAA;YAAE,CAAC,IAAA;YAAE,CAAC,IAAA;SAAE;KACrD;IACa,MAAM,OAAO,SAAS;KAAG;IACzB,MAAM,UAAU,WAAW,SAAK;IAChC,MAAM,WAAW,iBAAiB,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAChE,MAAM,WAAW,aAAa,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACtE,MAAM,QAAQ,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;IAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,MAAM,CAAC,MAAM,aAAa,KAAK,CAAC;IAChC,MAAM,MAAM,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;;;ICzBlD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAc,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAlB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IAClC,MAAM,OAAO,OAAO;;QAEF,IAAI,EAAE,MAAM,CAAC;QACb,MAAM;QACN,IAAI,CAAC,IACM,MAAM,CADK;QACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;KACvC;IACD,MAAM,WAAW,OAAO,CAAC;QACP,MAAa,CAAC;SAAI;QAClB,SAAgB,GAAG,SAAK;QACxB,UAAiB,aAAa,CAAC;YAAE,MAAa,CAAC;aAAG;SAAE;QACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;YAAE,MAAa,SAAS;aAAG;SAAE;QAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;QAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,KAAK,CAAC;QAChC,KAAY,YAAY;YAAG,CAAC,IAAA;YAAE,CAAC,IAAA;YAAE,CAAC,IAAA;SAAE;KACrD;IACa,MAAM,OAAO,SAAS;KAAG;IACzB,MAAM,UAAU,WAAW,SAAK;IAChC,MAAM,WAAW,iBAAiB,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAChE,MAAM,WAAW,aAAa,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACtE,MAAM,QAAQ,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;IAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,MAAM,CAAC,MAAM,aAAa,KAAK,CAAC;IAChC,MAAM,MAAM,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;;;ICzBlD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} //// [/src/lib/module.d.ts.map.baseline.txt] =================================================================== @@ -2191,35 +2191,66 @@ sourceFile:file1.ts >>> method(): void; 1->^^^^^^^^ 2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(7, 9) Source(5, 19) + SourceIndex(1) 2 >Emitted(7, 15) Source(5, 25) + SourceIndex(1) --- ->>> /*@internal*/ c: number; -1->^^^^^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +>>> get c(): number; +1->^^^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(8, 23) Source(6, 23) + SourceIndex(1) -2 >Emitted(8, 24) Source(6, 24) + SourceIndex(1) -3 >Emitted(8, 26) Source(7, 30) + SourceIndex(1) -4 >Emitted(8, 32) Source(7, 36) + SourceIndex(1) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(8, 9) Source(6, 19) + SourceIndex(1) +2 >Emitted(8, 13) Source(6, 23) + SourceIndex(1) +3 >Emitted(8, 14) Source(6, 24) + SourceIndex(1) +4 >Emitted(8, 18) Source(7, 30) + SourceIndex(1) +5 >Emitted(8, 24) Source(7, 36) + SourceIndex(1) +6 >Emitted(8, 25) Source(6, 41) + SourceIndex(1) +--- +>>> set c(val: number); +1->^^^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(9, 9) Source(7, 19) + SourceIndex(1) +2 >Emitted(9, 13) Source(7, 23) + SourceIndex(1) +3 >Emitted(9, 14) Source(7, 24) + SourceIndex(1) +4 >Emitted(9, 15) Source(7, 25) + SourceIndex(1) +5 >Emitted(9, 20) Source(7, 30) + SourceIndex(1) +6 >Emitted(9, 26) Source(7, 36) + SourceIndex(1) +7 >Emitted(9, 28) Source(7, 41) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(9, 6) Source(8, 2) + SourceIndex(1) +1 >Emitted(10, 6) Source(8, 2) + SourceIndex(1) --- >>> export namespace normalN { 1->^^^^ @@ -2233,11 +2264,11 @@ sourceFile:file1.ts 3 > namespace 4 > normalN 5 > -1->Emitted(10, 5) Source(9, 1) + SourceIndex(1) -2 >Emitted(10, 11) Source(9, 7) + SourceIndex(1) -3 >Emitted(10, 22) Source(9, 18) + SourceIndex(1) -4 >Emitted(10, 29) Source(9, 25) + SourceIndex(1) -5 >Emitted(10, 30) Source(9, 26) + SourceIndex(1) +1->Emitted(11, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(11, 11) Source(9, 7) + SourceIndex(1) +3 >Emitted(11, 22) Source(9, 18) + SourceIndex(1) +4 >Emitted(11, 29) Source(9, 25) + SourceIndex(1) +5 >Emitted(11, 30) Source(9, 26) + SourceIndex(1) --- >>> class C { 1 >^^^^^^^^ @@ -2247,15 +2278,15 @@ sourceFile:file1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(11, 9) Source(10, 19) + SourceIndex(1) -2 >Emitted(11, 15) Source(10, 32) + SourceIndex(1) -3 >Emitted(11, 16) Source(10, 33) + SourceIndex(1) +1 >Emitted(12, 9) Source(10, 19) + SourceIndex(1) +2 >Emitted(12, 15) Source(10, 32) + SourceIndex(1) +3 >Emitted(12, 16) Source(10, 33) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(12, 10) Source(10, 37) + SourceIndex(1) +1 >Emitted(13, 10) Source(10, 37) + SourceIndex(1) --- >>> function foo(): void; 1->^^^^^^^^ @@ -2268,10 +2299,10 @@ sourceFile:file1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(13, 9) Source(11, 19) + SourceIndex(1) -2 >Emitted(13, 18) Source(11, 35) + SourceIndex(1) -3 >Emitted(13, 21) Source(11, 38) + SourceIndex(1) -4 >Emitted(13, 30) Source(11, 43) + SourceIndex(1) +1->Emitted(14, 9) Source(11, 19) + SourceIndex(1) +2 >Emitted(14, 18) Source(11, 35) + SourceIndex(1) +3 >Emitted(14, 21) Source(11, 38) + SourceIndex(1) +4 >Emitted(14, 30) Source(11, 43) + SourceIndex(1) --- >>> namespace someNamespace { 1->^^^^^^^^ @@ -2283,10 +2314,10 @@ sourceFile:file1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(14, 9) Source(12, 19) + SourceIndex(1) -2 >Emitted(14, 19) Source(12, 36) + SourceIndex(1) -3 >Emitted(14, 32) Source(12, 49) + SourceIndex(1) -4 >Emitted(14, 33) Source(12, 50) + SourceIndex(1) +1->Emitted(15, 9) Source(12, 19) + SourceIndex(1) +2 >Emitted(15, 19) Source(12, 36) + SourceIndex(1) +3 >Emitted(15, 32) Source(12, 49) + SourceIndex(1) +4 >Emitted(15, 33) Source(12, 50) + SourceIndex(1) --- >>> class C { 1 >^^^^^^^^^^^^ @@ -2295,20 +2326,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(15, 13) Source(12, 52) + SourceIndex(1) -2 >Emitted(15, 19) Source(12, 65) + SourceIndex(1) -3 >Emitted(15, 20) Source(12, 66) + SourceIndex(1) +1 >Emitted(16, 13) Source(12, 52) + SourceIndex(1) +2 >Emitted(16, 19) Source(12, 65) + SourceIndex(1) +3 >Emitted(16, 20) Source(12, 66) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^ 1 > {} -1 >Emitted(16, 14) Source(12, 69) + SourceIndex(1) +1 >Emitted(17, 14) Source(12, 69) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(17, 10) Source(12, 71) + SourceIndex(1) +1 >Emitted(18, 10) Source(12, 71) + SourceIndex(1) --- >>> namespace someOther.something { 1->^^^^^^^^ @@ -2324,12 +2355,12 @@ sourceFile:file1.ts 4 > . 5 > something 6 > -1->Emitted(18, 9) Source(13, 19) + SourceIndex(1) -2 >Emitted(18, 19) Source(13, 36) + SourceIndex(1) -3 >Emitted(18, 28) Source(13, 45) + SourceIndex(1) -4 >Emitted(18, 29) Source(13, 46) + SourceIndex(1) -5 >Emitted(18, 38) Source(13, 55) + SourceIndex(1) -6 >Emitted(18, 39) Source(13, 56) + SourceIndex(1) +1->Emitted(19, 9) Source(13, 19) + SourceIndex(1) +2 >Emitted(19, 19) Source(13, 36) + SourceIndex(1) +3 >Emitted(19, 28) Source(13, 45) + SourceIndex(1) +4 >Emitted(19, 29) Source(13, 46) + SourceIndex(1) +5 >Emitted(19, 38) Source(13, 55) + SourceIndex(1) +6 >Emitted(19, 39) Source(13, 56) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^^^^^ @@ -2338,20 +2369,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(19, 13) Source(13, 58) + SourceIndex(1) -2 >Emitted(19, 19) Source(13, 71) + SourceIndex(1) -3 >Emitted(19, 28) Source(13, 80) + SourceIndex(1) +1 >Emitted(20, 13) Source(13, 58) + SourceIndex(1) +2 >Emitted(20, 19) Source(13, 71) + SourceIndex(1) +3 >Emitted(20, 28) Source(13, 80) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^ 1 > {} -1 >Emitted(20, 14) Source(13, 83) + SourceIndex(1) +1 >Emitted(21, 14) Source(13, 83) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(21, 10) Source(13, 85) + SourceIndex(1) +1 >Emitted(22, 10) Source(13, 85) + SourceIndex(1) --- >>> export import someImport = someNamespace.C; 1->^^^^^^^^ @@ -2373,15 +2404,15 @@ sourceFile:file1.ts 7 > . 8 > C 9 > ; -1->Emitted(22, 9) Source(14, 19) + SourceIndex(1) -2 >Emitted(22, 15) Source(14, 25) + SourceIndex(1) -3 >Emitted(22, 23) Source(14, 33) + SourceIndex(1) -4 >Emitted(22, 33) Source(14, 43) + SourceIndex(1) -5 >Emitted(22, 36) Source(14, 46) + SourceIndex(1) -6 >Emitted(22, 49) Source(14, 59) + SourceIndex(1) -7 >Emitted(22, 50) Source(14, 60) + SourceIndex(1) -8 >Emitted(22, 51) Source(14, 61) + SourceIndex(1) -9 >Emitted(22, 52) Source(14, 62) + SourceIndex(1) +1->Emitted(23, 9) Source(14, 19) + SourceIndex(1) +2 >Emitted(23, 15) Source(14, 25) + SourceIndex(1) +3 >Emitted(23, 23) Source(14, 33) + SourceIndex(1) +4 >Emitted(23, 33) Source(14, 43) + SourceIndex(1) +5 >Emitted(23, 36) Source(14, 46) + SourceIndex(1) +6 >Emitted(23, 49) Source(14, 59) + SourceIndex(1) +7 >Emitted(23, 50) Source(14, 60) + SourceIndex(1) +8 >Emitted(23, 51) Source(14, 61) + SourceIndex(1) +9 >Emitted(23, 52) Source(14, 62) + SourceIndex(1) --- >>> type internalType = internalC; 1 >^^^^^^^^ @@ -2397,12 +2428,12 @@ sourceFile:file1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(23, 9) Source(15, 19) + SourceIndex(1) -2 >Emitted(23, 14) Source(15, 31) + SourceIndex(1) -3 >Emitted(23, 26) Source(15, 43) + SourceIndex(1) -4 >Emitted(23, 29) Source(15, 46) + SourceIndex(1) -5 >Emitted(23, 38) Source(15, 55) + SourceIndex(1) -6 >Emitted(23, 39) Source(15, 56) + SourceIndex(1) +1 >Emitted(24, 9) Source(15, 19) + SourceIndex(1) +2 >Emitted(24, 14) Source(15, 31) + SourceIndex(1) +3 >Emitted(24, 26) Source(15, 43) + SourceIndex(1) +4 >Emitted(24, 29) Source(15, 46) + SourceIndex(1) +5 >Emitted(24, 38) Source(15, 55) + SourceIndex(1) +6 >Emitted(24, 39) Source(15, 56) + SourceIndex(1) --- >>> const internalConst = 10; 1 >^^^^^^^^ @@ -2416,11 +2447,11 @@ sourceFile:file1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(24, 9) Source(16, 26) + SourceIndex(1) -2 >Emitted(24, 15) Source(16, 32) + SourceIndex(1) -3 >Emitted(24, 28) Source(16, 45) + SourceIndex(1) -4 >Emitted(24, 33) Source(16, 50) + SourceIndex(1) -5 >Emitted(24, 34) Source(16, 51) + SourceIndex(1) +1 >Emitted(25, 9) Source(16, 26) + SourceIndex(1) +2 >Emitted(25, 15) Source(16, 32) + SourceIndex(1) +3 >Emitted(25, 28) Source(16, 45) + SourceIndex(1) +4 >Emitted(25, 33) Source(16, 50) + SourceIndex(1) +5 >Emitted(25, 34) Source(16, 51) + SourceIndex(1) --- >>> enum internalEnum { 1 >^^^^^^^^ @@ -2430,9 +2461,9 @@ sourceFile:file1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(25, 9) Source(17, 19) + SourceIndex(1) -2 >Emitted(25, 14) Source(17, 31) + SourceIndex(1) -3 >Emitted(25, 26) Source(17, 43) + SourceIndex(1) +1 >Emitted(26, 9) Source(17, 19) + SourceIndex(1) +2 >Emitted(26, 14) Source(17, 31) + SourceIndex(1) +3 >Emitted(26, 26) Source(17, 43) + SourceIndex(1) --- >>> a = 0, 1 >^^^^^^^^^^^^ @@ -2442,9 +2473,9 @@ sourceFile:file1.ts 1 > { 2 > a 3 > -1 >Emitted(26, 13) Source(17, 46) + SourceIndex(1) -2 >Emitted(26, 14) Source(17, 47) + SourceIndex(1) -3 >Emitted(26, 18) Source(17, 47) + SourceIndex(1) +1 >Emitted(27, 13) Source(17, 46) + SourceIndex(1) +2 >Emitted(27, 14) Source(17, 47) + SourceIndex(1) +3 >Emitted(27, 18) Source(17, 47) + SourceIndex(1) --- >>> b = 1, 1->^^^^^^^^^^^^ @@ -2454,9 +2485,9 @@ sourceFile:file1.ts 1->, 2 > b 3 > -1->Emitted(27, 13) Source(17, 49) + SourceIndex(1) -2 >Emitted(27, 14) Source(17, 50) + SourceIndex(1) -3 >Emitted(27, 18) Source(17, 50) + SourceIndex(1) +1->Emitted(28, 13) Source(17, 49) + SourceIndex(1) +2 >Emitted(28, 14) Source(17, 50) + SourceIndex(1) +3 >Emitted(28, 18) Source(17, 50) + SourceIndex(1) --- >>> c = 2 1->^^^^^^^^^^^^ @@ -2465,21 +2496,21 @@ sourceFile:file1.ts 1->, 2 > c 3 > -1->Emitted(28, 13) Source(17, 52) + SourceIndex(1) -2 >Emitted(28, 14) Source(17, 53) + SourceIndex(1) -3 >Emitted(28, 18) Source(17, 53) + SourceIndex(1) +1->Emitted(29, 13) Source(17, 52) + SourceIndex(1) +2 >Emitted(29, 14) Source(17, 53) + SourceIndex(1) +3 >Emitted(29, 18) Source(17, 53) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > } -1 >Emitted(29, 10) Source(17, 55) + SourceIndex(1) +1 >Emitted(30, 10) Source(17, 55) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(30, 6) Source(18, 2) + SourceIndex(1) +1 >Emitted(31, 6) Source(18, 2) + SourceIndex(1) --- >>> export class internalC { 1->^^^^ @@ -2491,16 +2522,16 @@ sourceFile:file1.ts 2 > export 3 > class 4 > internalC -1->Emitted(31, 5) Source(19, 15) + SourceIndex(1) -2 >Emitted(31, 11) Source(19, 21) + SourceIndex(1) -3 >Emitted(31, 18) Source(19, 28) + SourceIndex(1) -4 >Emitted(31, 27) Source(19, 37) + SourceIndex(1) +1->Emitted(32, 5) Source(19, 15) + SourceIndex(1) +2 >Emitted(32, 11) Source(19, 21) + SourceIndex(1) +3 >Emitted(32, 18) Source(19, 28) + SourceIndex(1) +4 >Emitted(32, 27) Source(19, 37) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(32, 6) Source(19, 40) + SourceIndex(1) +1 >Emitted(33, 6) Source(19, 40) + SourceIndex(1) --- >>> export function internalfoo(): void; 1->^^^^ @@ -2515,11 +2546,11 @@ sourceFile:file1.ts 3 > function 4 > internalfoo 5 > () {} -1->Emitted(33, 5) Source(20, 15) + SourceIndex(1) -2 >Emitted(33, 11) Source(20, 21) + SourceIndex(1) -3 >Emitted(33, 21) Source(20, 31) + SourceIndex(1) -4 >Emitted(33, 32) Source(20, 42) + SourceIndex(1) -5 >Emitted(33, 41) Source(20, 47) + SourceIndex(1) +1->Emitted(34, 5) Source(20, 15) + SourceIndex(1) +2 >Emitted(34, 11) Source(20, 21) + SourceIndex(1) +3 >Emitted(34, 21) Source(20, 31) + SourceIndex(1) +4 >Emitted(34, 32) Source(20, 42) + SourceIndex(1) +5 >Emitted(34, 41) Source(20, 47) + SourceIndex(1) --- >>> export namespace internalNamespace { 1->^^^^ @@ -2533,11 +2564,11 @@ sourceFile:file1.ts 3 > namespace 4 > internalNamespace 5 > -1->Emitted(34, 5) Source(21, 15) + SourceIndex(1) -2 >Emitted(34, 11) Source(21, 21) + SourceIndex(1) -3 >Emitted(34, 22) Source(21, 32) + SourceIndex(1) -4 >Emitted(34, 39) Source(21, 49) + SourceIndex(1) -5 >Emitted(34, 40) Source(21, 50) + SourceIndex(1) +1->Emitted(35, 5) Source(21, 15) + SourceIndex(1) +2 >Emitted(35, 11) Source(21, 21) + SourceIndex(1) +3 >Emitted(35, 22) Source(21, 32) + SourceIndex(1) +4 >Emitted(35, 39) Source(21, 49) + SourceIndex(1) +5 >Emitted(35, 40) Source(21, 50) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^ @@ -2546,20 +2577,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(35, 9) Source(21, 52) + SourceIndex(1) -2 >Emitted(35, 15) Source(21, 65) + SourceIndex(1) -3 >Emitted(35, 24) Source(21, 74) + SourceIndex(1) +1 >Emitted(36, 9) Source(21, 52) + SourceIndex(1) +2 >Emitted(36, 15) Source(21, 65) + SourceIndex(1) +3 >Emitted(36, 24) Source(21, 74) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(36, 10) Source(21, 77) + SourceIndex(1) +1 >Emitted(37, 10) Source(21, 77) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(37, 6) Source(21, 79) + SourceIndex(1) +1 >Emitted(38, 6) Source(21, 79) + SourceIndex(1) --- >>> export namespace internalOther.something { 1->^^^^ @@ -2577,13 +2608,13 @@ sourceFile:file1.ts 5 > . 6 > something 7 > -1->Emitted(38, 5) Source(22, 15) + SourceIndex(1) -2 >Emitted(38, 11) Source(22, 21) + SourceIndex(1) -3 >Emitted(38, 22) Source(22, 32) + SourceIndex(1) -4 >Emitted(38, 35) Source(22, 45) + SourceIndex(1) -5 >Emitted(38, 36) Source(22, 46) + SourceIndex(1) -6 >Emitted(38, 45) Source(22, 55) + SourceIndex(1) -7 >Emitted(38, 46) Source(22, 56) + SourceIndex(1) +1->Emitted(39, 5) Source(22, 15) + SourceIndex(1) +2 >Emitted(39, 11) Source(22, 21) + SourceIndex(1) +3 >Emitted(39, 22) Source(22, 32) + SourceIndex(1) +4 >Emitted(39, 35) Source(22, 45) + SourceIndex(1) +5 >Emitted(39, 36) Source(22, 46) + SourceIndex(1) +6 >Emitted(39, 45) Source(22, 55) + SourceIndex(1) +7 >Emitted(39, 46) Source(22, 56) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^ @@ -2592,20 +2623,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(39, 9) Source(22, 58) + SourceIndex(1) -2 >Emitted(39, 15) Source(22, 71) + SourceIndex(1) -3 >Emitted(39, 24) Source(22, 80) + SourceIndex(1) +1 >Emitted(40, 9) Source(22, 58) + SourceIndex(1) +2 >Emitted(40, 15) Source(22, 71) + SourceIndex(1) +3 >Emitted(40, 24) Source(22, 80) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(40, 10) Source(22, 83) + SourceIndex(1) +1 >Emitted(41, 10) Source(22, 83) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(41, 6) Source(22, 85) + SourceIndex(1) +1 >Emitted(42, 6) Source(22, 85) + SourceIndex(1) --- >>> export import internalImport = internalNamespace.someClass; 1->^^^^ @@ -2627,15 +2658,15 @@ sourceFile:file1.ts 7 > . 8 > someClass 9 > ; -1->Emitted(42, 5) Source(23, 15) + SourceIndex(1) -2 >Emitted(42, 11) Source(23, 21) + SourceIndex(1) -3 >Emitted(42, 19) Source(23, 29) + SourceIndex(1) -4 >Emitted(42, 33) Source(23, 43) + SourceIndex(1) -5 >Emitted(42, 36) Source(23, 46) + SourceIndex(1) -6 >Emitted(42, 53) Source(23, 63) + SourceIndex(1) -7 >Emitted(42, 54) Source(23, 64) + SourceIndex(1) -8 >Emitted(42, 63) Source(23, 73) + SourceIndex(1) -9 >Emitted(42, 64) Source(23, 74) + SourceIndex(1) +1->Emitted(43, 5) Source(23, 15) + SourceIndex(1) +2 >Emitted(43, 11) Source(23, 21) + SourceIndex(1) +3 >Emitted(43, 19) Source(23, 29) + SourceIndex(1) +4 >Emitted(43, 33) Source(23, 43) + SourceIndex(1) +5 >Emitted(43, 36) Source(23, 46) + SourceIndex(1) +6 >Emitted(43, 53) Source(23, 63) + SourceIndex(1) +7 >Emitted(43, 54) Source(23, 64) + SourceIndex(1) +8 >Emitted(43, 63) Source(23, 73) + SourceIndex(1) +9 >Emitted(43, 64) Source(23, 74) + SourceIndex(1) --- >>> export type internalType = internalC; 1 >^^^^ @@ -2653,13 +2684,13 @@ sourceFile:file1.ts 5 > = 6 > internalC 7 > ; -1 >Emitted(43, 5) Source(24, 15) + SourceIndex(1) -2 >Emitted(43, 11) Source(24, 21) + SourceIndex(1) -3 >Emitted(43, 17) Source(24, 27) + SourceIndex(1) -4 >Emitted(43, 29) Source(24, 39) + SourceIndex(1) -5 >Emitted(43, 32) Source(24, 42) + SourceIndex(1) -6 >Emitted(43, 41) Source(24, 51) + SourceIndex(1) -7 >Emitted(43, 42) Source(24, 52) + SourceIndex(1) +1 >Emitted(44, 5) Source(24, 15) + SourceIndex(1) +2 >Emitted(44, 11) Source(24, 21) + SourceIndex(1) +3 >Emitted(44, 17) Source(24, 27) + SourceIndex(1) +4 >Emitted(44, 29) Source(24, 39) + SourceIndex(1) +5 >Emitted(44, 32) Source(24, 42) + SourceIndex(1) +6 >Emitted(44, 41) Source(24, 51) + SourceIndex(1) +7 >Emitted(44, 42) Source(24, 52) + SourceIndex(1) --- >>> export const internalConst = 10; 1 >^^^^ @@ -2677,13 +2708,13 @@ sourceFile:file1.ts 5 > internalConst 6 > = 10 7 > ; -1 >Emitted(44, 5) Source(25, 15) + SourceIndex(1) -2 >Emitted(44, 11) Source(25, 21) + SourceIndex(1) -3 >Emitted(44, 12) Source(25, 22) + SourceIndex(1) -4 >Emitted(44, 18) Source(25, 28) + SourceIndex(1) -5 >Emitted(44, 31) Source(25, 41) + SourceIndex(1) -6 >Emitted(44, 36) Source(25, 46) + SourceIndex(1) -7 >Emitted(44, 37) Source(25, 47) + SourceIndex(1) +1 >Emitted(45, 5) Source(25, 15) + SourceIndex(1) +2 >Emitted(45, 11) Source(25, 21) + SourceIndex(1) +3 >Emitted(45, 12) Source(25, 22) + SourceIndex(1) +4 >Emitted(45, 18) Source(25, 28) + SourceIndex(1) +5 >Emitted(45, 31) Source(25, 41) + SourceIndex(1) +6 >Emitted(45, 36) Source(25, 46) + SourceIndex(1) +7 >Emitted(45, 37) Source(25, 47) + SourceIndex(1) --- >>> export enum internalEnum { 1 >^^^^ @@ -2695,10 +2726,10 @@ sourceFile:file1.ts 2 > export 3 > enum 4 > internalEnum -1 >Emitted(45, 5) Source(26, 15) + SourceIndex(1) -2 >Emitted(45, 11) Source(26, 21) + SourceIndex(1) -3 >Emitted(45, 17) Source(26, 27) + SourceIndex(1) -4 >Emitted(45, 29) Source(26, 39) + SourceIndex(1) +1 >Emitted(46, 5) Source(26, 15) + SourceIndex(1) +2 >Emitted(46, 11) Source(26, 21) + SourceIndex(1) +3 >Emitted(46, 17) Source(26, 27) + SourceIndex(1) +4 >Emitted(46, 29) Source(26, 39) + SourceIndex(1) --- >>> a = 0, 1 >^^^^^^^^ @@ -2708,9 +2739,9 @@ sourceFile:file1.ts 1 > { 2 > a 3 > -1 >Emitted(46, 9) Source(26, 42) + SourceIndex(1) -2 >Emitted(46, 10) Source(26, 43) + SourceIndex(1) -3 >Emitted(46, 14) Source(26, 43) + SourceIndex(1) +1 >Emitted(47, 9) Source(26, 42) + SourceIndex(1) +2 >Emitted(47, 10) Source(26, 43) + SourceIndex(1) +3 >Emitted(47, 14) Source(26, 43) + SourceIndex(1) --- >>> b = 1, 1->^^^^^^^^ @@ -2720,9 +2751,9 @@ sourceFile:file1.ts 1->, 2 > b 3 > -1->Emitted(47, 9) Source(26, 45) + SourceIndex(1) -2 >Emitted(47, 10) Source(26, 46) + SourceIndex(1) -3 >Emitted(47, 14) Source(26, 46) + SourceIndex(1) +1->Emitted(48, 9) Source(26, 45) + SourceIndex(1) +2 >Emitted(48, 10) Source(26, 46) + SourceIndex(1) +3 >Emitted(48, 14) Source(26, 46) + SourceIndex(1) --- >>> c = 2 1->^^^^^^^^ @@ -2731,14 +2762,14 @@ sourceFile:file1.ts 1->, 2 > c 3 > -1->Emitted(48, 9) Source(26, 48) + SourceIndex(1) -2 >Emitted(48, 10) Source(26, 49) + SourceIndex(1) -3 >Emitted(48, 14) Source(26, 49) + SourceIndex(1) +1->Emitted(49, 9) Source(26, 48) + SourceIndex(1) +2 >Emitted(49, 10) Source(26, 49) + SourceIndex(1) +3 >Emitted(49, 14) Source(26, 49) + SourceIndex(1) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(49, 6) Source(26, 51) + SourceIndex(1) +1 >Emitted(50, 6) Source(26, 51) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -2761,13 +2792,13 @@ sourceFile:file2.ts 5 > y 6 > = 20 7 > ; -1 >Emitted(52, 5) Source(1, 1) + SourceIndex(2) -2 >Emitted(52, 11) Source(1, 7) + SourceIndex(2) -3 >Emitted(52, 12) Source(1, 8) + SourceIndex(2) -4 >Emitted(52, 18) Source(1, 14) + SourceIndex(2) -5 >Emitted(52, 19) Source(1, 15) + SourceIndex(2) -6 >Emitted(52, 24) Source(1, 20) + SourceIndex(2) -7 >Emitted(52, 25) Source(1, 21) + SourceIndex(2) +1 >Emitted(53, 5) Source(1, 1) + SourceIndex(2) +2 >Emitted(53, 11) Source(1, 7) + SourceIndex(2) +3 >Emitted(53, 12) Source(1, 8) + SourceIndex(2) +4 >Emitted(53, 18) Source(1, 14) + SourceIndex(2) +5 >Emitted(53, 19) Source(1, 15) + SourceIndex(2) +6 >Emitted(53, 24) Source(1, 20) + SourceIndex(2) +7 >Emitted(53, 25) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -2788,12 +2819,12 @@ sourceFile:global.ts 4 > globalConst 5 > = 10 6 > ; -1 >Emitted(54, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(54, 9) Source(1, 1) + SourceIndex(3) -3 >Emitted(54, 15) Source(1, 7) + SourceIndex(3) -4 >Emitted(54, 26) Source(1, 18) + SourceIndex(3) -5 >Emitted(54, 31) Source(1, 23) + SourceIndex(3) -6 >Emitted(54, 32) Source(1, 24) + SourceIndex(3) +1 >Emitted(55, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(55, 9) Source(1, 1) + SourceIndex(3) +3 >Emitted(55, 15) Source(1, 7) + SourceIndex(3) +4 >Emitted(55, 26) Source(1, 18) + SourceIndex(3) +5 >Emitted(55, 31) Source(1, 23) + SourceIndex(3) +6 >Emitted(55, 32) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.d.ts.map @@ -4423,32 +4454,32 @@ sourceFile:global.ts }, { "pos": 108, - "end": 212, + "end": 233, "kind": "internal" }, { - "pos": 214, - "end": 253, + "pos": 235, + "end": 274, "kind": "text" }, { - "pos": 253, - "end": 721, + "pos": 274, + "end": 742, "kind": "internal" }, { - "pos": 723, - "end": 730, + "pos": 744, + "end": 751, "kind": "text" }, { - "pos": 730, - "end": 1219, + "pos": 751, + "end": 1240, "kind": "internal" }, { - "pos": 1221, - "end": 1312, + "pos": 1242, + "end": 1333, "kind": "text" } ] @@ -4583,18 +4614,19 @@ text: (80-108) export class normalC { ---------------------------------------------------------------------- -internal: (108-212) +internal: (108-233) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (214-253) +text: (235-274) } export namespace normalN { ---------------------------------------------------------------------- -internal: (253-721) +internal: (274-742) class C { } function foo(): void; @@ -4615,11 +4647,11 @@ internal: (253-721) c = 2 } ---------------------------------------------------------------------- -text: (723-730) +text: (744-751) } ---------------------------------------------------------------------- -internal: (730-1219) +internal: (751-1240) export class internalC { } export function internalfoo(): void; @@ -4640,7 +4672,7 @@ internal: (730-1219) c = 2 } ---------------------------------------------------------------------- -text: (1221-1312) +text: (1242-1333) } declare module "file2" { export const y = 20; diff --git a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js index 2d2bd9809d628..6192e04a062a3 100644 --- a/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/amdModulesWithOut/initial-build/stripInternal.js @@ -2137,7 +2137,8 @@ declare module "file1" { constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); } export namespace normalN { class C { @@ -2187,7 +2188,7 @@ declare const globalConst = 10; //# sourceMappingURL=module.d.ts.map //// [/src/lib/module.d.ts.map] -{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAc,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAhC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IACpB,MAAM,OAAO,OAAO;;QAEF,IAAI,EAAE,MAAM,CAAC;QACb,MAAM;sBACF,CAAC,EACM,MAAM;KAClC;IACD,MAAM,WAAW,OAAO,CAAC;QACP,MAAa,CAAC;SAAI;QAClB,SAAgB,GAAG,SAAK;QACxB,UAAiB,aAAa,CAAC;YAAE,MAAa,CAAC;aAAG;SAAE;QACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;YAAE,MAAa,SAAS;aAAG;SAAE;QAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;QAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,KAAK,CAAC;QAChC,KAAY,YAAY;YAAG,CAAC,IAAA;YAAE,CAAC,IAAA;YAAE,CAAC,IAAA;SAAE;KACrD;IACa,MAAM,OAAO,SAAS;KAAG;IACzB,MAAM,UAAU,WAAW,SAAK;IAChC,MAAM,WAAW,iBAAiB,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAChE,MAAM,WAAW,aAAa,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACtE,MAAM,QAAQ,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;IAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,MAAM,CAAC,MAAM,aAAa,KAAK,CAAC;IAChC,MAAM,MAAM,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;;;ICzBlD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} +{"version":3,"file":"module.d.ts","sourceRoot":"","sources":["file0.ts","file1.ts","file2.ts","global.ts"],"names":[],"mappings":"AAAc,QAAA,MAAM,MAAM,KAAK,CAAC;;ICAhC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;IACpB,MAAM,OAAO,OAAO;;QAEF,IAAI,EAAE,MAAM,CAAC;QACb,MAAM;QACN,IAAI,CAAC,IACM,MAAM,CADK;QACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;KACvC;IACD,MAAM,WAAW,OAAO,CAAC;QACP,MAAa,CAAC;SAAI;QAClB,SAAgB,GAAG,SAAK;QACxB,UAAiB,aAAa,CAAC;YAAE,MAAa,CAAC;aAAG;SAAE;QACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;YAAE,MAAa,SAAS;aAAG;SAAE;QAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;QAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;QAC9B,MAAM,aAAa,KAAK,CAAC;QAChC,KAAY,YAAY;YAAG,CAAC,IAAA;YAAE,CAAC,IAAA;YAAE,CAAC,IAAA;SAAE;KACrD;IACa,MAAM,OAAO,SAAS;KAAG;IACzB,MAAM,UAAU,WAAW,SAAK;IAChC,MAAM,WAAW,iBAAiB,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAChE,MAAM,WAAW,aAAa,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACtE,MAAM,QAAQ,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;IAC3D,MAAM,MAAM,YAAY,GAAG,SAAS,CAAC;IACrC,MAAM,CAAC,MAAM,aAAa,KAAK,CAAC;IAChC,MAAM,MAAM,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;;;ICzBlD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;ACApB,QAAA,MAAM,WAAW,KAAK,CAAC"} //// [/src/lib/module.d.ts.map.baseline.txt] =================================================================== @@ -2288,35 +2289,66 @@ sourceFile:file1.ts >>> method(): void; 1->^^^^^^^^ 2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(7, 9) Source(5, 19) + SourceIndex(1) 2 >Emitted(7, 15) Source(5, 25) + SourceIndex(1) --- ->>> /*@internal*/ c: number; -1->^^^^^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +>>> get c(): number; +1->^^^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(8, 23) Source(6, 23) + SourceIndex(1) -2 >Emitted(8, 24) Source(6, 24) + SourceIndex(1) -3 >Emitted(8, 26) Source(7, 30) + SourceIndex(1) -4 >Emitted(8, 32) Source(7, 36) + SourceIndex(1) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(8, 9) Source(6, 19) + SourceIndex(1) +2 >Emitted(8, 13) Source(6, 23) + SourceIndex(1) +3 >Emitted(8, 14) Source(6, 24) + SourceIndex(1) +4 >Emitted(8, 18) Source(7, 30) + SourceIndex(1) +5 >Emitted(8, 24) Source(7, 36) + SourceIndex(1) +6 >Emitted(8, 25) Source(6, 41) + SourceIndex(1) +--- +>>> set c(val: number); +1->^^^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(9, 9) Source(7, 19) + SourceIndex(1) +2 >Emitted(9, 13) Source(7, 23) + SourceIndex(1) +3 >Emitted(9, 14) Source(7, 24) + SourceIndex(1) +4 >Emitted(9, 15) Source(7, 25) + SourceIndex(1) +5 >Emitted(9, 20) Source(7, 30) + SourceIndex(1) +6 >Emitted(9, 26) Source(7, 36) + SourceIndex(1) +7 >Emitted(9, 28) Source(7, 41) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(9, 6) Source(8, 2) + SourceIndex(1) +1 >Emitted(10, 6) Source(8, 2) + SourceIndex(1) --- >>> export namespace normalN { 1->^^^^ @@ -2330,11 +2362,11 @@ sourceFile:file1.ts 3 > namespace 4 > normalN 5 > -1->Emitted(10, 5) Source(9, 1) + SourceIndex(1) -2 >Emitted(10, 11) Source(9, 7) + SourceIndex(1) -3 >Emitted(10, 22) Source(9, 18) + SourceIndex(1) -4 >Emitted(10, 29) Source(9, 25) + SourceIndex(1) -5 >Emitted(10, 30) Source(9, 26) + SourceIndex(1) +1->Emitted(11, 5) Source(9, 1) + SourceIndex(1) +2 >Emitted(11, 11) Source(9, 7) + SourceIndex(1) +3 >Emitted(11, 22) Source(9, 18) + SourceIndex(1) +4 >Emitted(11, 29) Source(9, 25) + SourceIndex(1) +5 >Emitted(11, 30) Source(9, 26) + SourceIndex(1) --- >>> class C { 1 >^^^^^^^^ @@ -2344,15 +2376,15 @@ sourceFile:file1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(11, 9) Source(10, 19) + SourceIndex(1) -2 >Emitted(11, 15) Source(10, 32) + SourceIndex(1) -3 >Emitted(11, 16) Source(10, 33) + SourceIndex(1) +1 >Emitted(12, 9) Source(10, 19) + SourceIndex(1) +2 >Emitted(12, 15) Source(10, 32) + SourceIndex(1) +3 >Emitted(12, 16) Source(10, 33) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(12, 10) Source(10, 37) + SourceIndex(1) +1 >Emitted(13, 10) Source(10, 37) + SourceIndex(1) --- >>> function foo(): void; 1->^^^^^^^^ @@ -2365,10 +2397,10 @@ sourceFile:file1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(13, 9) Source(11, 19) + SourceIndex(1) -2 >Emitted(13, 18) Source(11, 35) + SourceIndex(1) -3 >Emitted(13, 21) Source(11, 38) + SourceIndex(1) -4 >Emitted(13, 30) Source(11, 43) + SourceIndex(1) +1->Emitted(14, 9) Source(11, 19) + SourceIndex(1) +2 >Emitted(14, 18) Source(11, 35) + SourceIndex(1) +3 >Emitted(14, 21) Source(11, 38) + SourceIndex(1) +4 >Emitted(14, 30) Source(11, 43) + SourceIndex(1) --- >>> namespace someNamespace { 1->^^^^^^^^ @@ -2380,10 +2412,10 @@ sourceFile:file1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(14, 9) Source(12, 19) + SourceIndex(1) -2 >Emitted(14, 19) Source(12, 36) + SourceIndex(1) -3 >Emitted(14, 32) Source(12, 49) + SourceIndex(1) -4 >Emitted(14, 33) Source(12, 50) + SourceIndex(1) +1->Emitted(15, 9) Source(12, 19) + SourceIndex(1) +2 >Emitted(15, 19) Source(12, 36) + SourceIndex(1) +3 >Emitted(15, 32) Source(12, 49) + SourceIndex(1) +4 >Emitted(15, 33) Source(12, 50) + SourceIndex(1) --- >>> class C { 1 >^^^^^^^^^^^^ @@ -2392,20 +2424,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(15, 13) Source(12, 52) + SourceIndex(1) -2 >Emitted(15, 19) Source(12, 65) + SourceIndex(1) -3 >Emitted(15, 20) Source(12, 66) + SourceIndex(1) +1 >Emitted(16, 13) Source(12, 52) + SourceIndex(1) +2 >Emitted(16, 19) Source(12, 65) + SourceIndex(1) +3 >Emitted(16, 20) Source(12, 66) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^ 1 > {} -1 >Emitted(16, 14) Source(12, 69) + SourceIndex(1) +1 >Emitted(17, 14) Source(12, 69) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(17, 10) Source(12, 71) + SourceIndex(1) +1 >Emitted(18, 10) Source(12, 71) + SourceIndex(1) --- >>> namespace someOther.something { 1->^^^^^^^^ @@ -2421,12 +2453,12 @@ sourceFile:file1.ts 4 > . 5 > something 6 > -1->Emitted(18, 9) Source(13, 19) + SourceIndex(1) -2 >Emitted(18, 19) Source(13, 36) + SourceIndex(1) -3 >Emitted(18, 28) Source(13, 45) + SourceIndex(1) -4 >Emitted(18, 29) Source(13, 46) + SourceIndex(1) -5 >Emitted(18, 38) Source(13, 55) + SourceIndex(1) -6 >Emitted(18, 39) Source(13, 56) + SourceIndex(1) +1->Emitted(19, 9) Source(13, 19) + SourceIndex(1) +2 >Emitted(19, 19) Source(13, 36) + SourceIndex(1) +3 >Emitted(19, 28) Source(13, 45) + SourceIndex(1) +4 >Emitted(19, 29) Source(13, 46) + SourceIndex(1) +5 >Emitted(19, 38) Source(13, 55) + SourceIndex(1) +6 >Emitted(19, 39) Source(13, 56) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^^^^^ @@ -2435,20 +2467,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(19, 13) Source(13, 58) + SourceIndex(1) -2 >Emitted(19, 19) Source(13, 71) + SourceIndex(1) -3 >Emitted(19, 28) Source(13, 80) + SourceIndex(1) +1 >Emitted(20, 13) Source(13, 58) + SourceIndex(1) +2 >Emitted(20, 19) Source(13, 71) + SourceIndex(1) +3 >Emitted(20, 28) Source(13, 80) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^^^^^ 1 > {} -1 >Emitted(20, 14) Source(13, 83) + SourceIndex(1) +1 >Emitted(21, 14) Source(13, 83) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(21, 10) Source(13, 85) + SourceIndex(1) +1 >Emitted(22, 10) Source(13, 85) + SourceIndex(1) --- >>> export import someImport = someNamespace.C; 1->^^^^^^^^ @@ -2470,15 +2502,15 @@ sourceFile:file1.ts 7 > . 8 > C 9 > ; -1->Emitted(22, 9) Source(14, 19) + SourceIndex(1) -2 >Emitted(22, 15) Source(14, 25) + SourceIndex(1) -3 >Emitted(22, 23) Source(14, 33) + SourceIndex(1) -4 >Emitted(22, 33) Source(14, 43) + SourceIndex(1) -5 >Emitted(22, 36) Source(14, 46) + SourceIndex(1) -6 >Emitted(22, 49) Source(14, 59) + SourceIndex(1) -7 >Emitted(22, 50) Source(14, 60) + SourceIndex(1) -8 >Emitted(22, 51) Source(14, 61) + SourceIndex(1) -9 >Emitted(22, 52) Source(14, 62) + SourceIndex(1) +1->Emitted(23, 9) Source(14, 19) + SourceIndex(1) +2 >Emitted(23, 15) Source(14, 25) + SourceIndex(1) +3 >Emitted(23, 23) Source(14, 33) + SourceIndex(1) +4 >Emitted(23, 33) Source(14, 43) + SourceIndex(1) +5 >Emitted(23, 36) Source(14, 46) + SourceIndex(1) +6 >Emitted(23, 49) Source(14, 59) + SourceIndex(1) +7 >Emitted(23, 50) Source(14, 60) + SourceIndex(1) +8 >Emitted(23, 51) Source(14, 61) + SourceIndex(1) +9 >Emitted(23, 52) Source(14, 62) + SourceIndex(1) --- >>> type internalType = internalC; 1 >^^^^^^^^ @@ -2494,12 +2526,12 @@ sourceFile:file1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(23, 9) Source(15, 19) + SourceIndex(1) -2 >Emitted(23, 14) Source(15, 31) + SourceIndex(1) -3 >Emitted(23, 26) Source(15, 43) + SourceIndex(1) -4 >Emitted(23, 29) Source(15, 46) + SourceIndex(1) -5 >Emitted(23, 38) Source(15, 55) + SourceIndex(1) -6 >Emitted(23, 39) Source(15, 56) + SourceIndex(1) +1 >Emitted(24, 9) Source(15, 19) + SourceIndex(1) +2 >Emitted(24, 14) Source(15, 31) + SourceIndex(1) +3 >Emitted(24, 26) Source(15, 43) + SourceIndex(1) +4 >Emitted(24, 29) Source(15, 46) + SourceIndex(1) +5 >Emitted(24, 38) Source(15, 55) + SourceIndex(1) +6 >Emitted(24, 39) Source(15, 56) + SourceIndex(1) --- >>> const internalConst = 10; 1 >^^^^^^^^ @@ -2513,11 +2545,11 @@ sourceFile:file1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(24, 9) Source(16, 26) + SourceIndex(1) -2 >Emitted(24, 15) Source(16, 32) + SourceIndex(1) -3 >Emitted(24, 28) Source(16, 45) + SourceIndex(1) -4 >Emitted(24, 33) Source(16, 50) + SourceIndex(1) -5 >Emitted(24, 34) Source(16, 51) + SourceIndex(1) +1 >Emitted(25, 9) Source(16, 26) + SourceIndex(1) +2 >Emitted(25, 15) Source(16, 32) + SourceIndex(1) +3 >Emitted(25, 28) Source(16, 45) + SourceIndex(1) +4 >Emitted(25, 33) Source(16, 50) + SourceIndex(1) +5 >Emitted(25, 34) Source(16, 51) + SourceIndex(1) --- >>> enum internalEnum { 1 >^^^^^^^^ @@ -2527,9 +2559,9 @@ sourceFile:file1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(25, 9) Source(17, 19) + SourceIndex(1) -2 >Emitted(25, 14) Source(17, 31) + SourceIndex(1) -3 >Emitted(25, 26) Source(17, 43) + SourceIndex(1) +1 >Emitted(26, 9) Source(17, 19) + SourceIndex(1) +2 >Emitted(26, 14) Source(17, 31) + SourceIndex(1) +3 >Emitted(26, 26) Source(17, 43) + SourceIndex(1) --- >>> a = 0, 1 >^^^^^^^^^^^^ @@ -2539,9 +2571,9 @@ sourceFile:file1.ts 1 > { 2 > a 3 > -1 >Emitted(26, 13) Source(17, 46) + SourceIndex(1) -2 >Emitted(26, 14) Source(17, 47) + SourceIndex(1) -3 >Emitted(26, 18) Source(17, 47) + SourceIndex(1) +1 >Emitted(27, 13) Source(17, 46) + SourceIndex(1) +2 >Emitted(27, 14) Source(17, 47) + SourceIndex(1) +3 >Emitted(27, 18) Source(17, 47) + SourceIndex(1) --- >>> b = 1, 1->^^^^^^^^^^^^ @@ -2551,9 +2583,9 @@ sourceFile:file1.ts 1->, 2 > b 3 > -1->Emitted(27, 13) Source(17, 49) + SourceIndex(1) -2 >Emitted(27, 14) Source(17, 50) + SourceIndex(1) -3 >Emitted(27, 18) Source(17, 50) + SourceIndex(1) +1->Emitted(28, 13) Source(17, 49) + SourceIndex(1) +2 >Emitted(28, 14) Source(17, 50) + SourceIndex(1) +3 >Emitted(28, 18) Source(17, 50) + SourceIndex(1) --- >>> c = 2 1->^^^^^^^^^^^^ @@ -2562,21 +2594,21 @@ sourceFile:file1.ts 1->, 2 > c 3 > -1->Emitted(28, 13) Source(17, 52) + SourceIndex(1) -2 >Emitted(28, 14) Source(17, 53) + SourceIndex(1) -3 >Emitted(28, 18) Source(17, 53) + SourceIndex(1) +1->Emitted(29, 13) Source(17, 52) + SourceIndex(1) +2 >Emitted(29, 14) Source(17, 53) + SourceIndex(1) +3 >Emitted(29, 18) Source(17, 53) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > } -1 >Emitted(29, 10) Source(17, 55) + SourceIndex(1) +1 >Emitted(30, 10) Source(17, 55) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(30, 6) Source(18, 2) + SourceIndex(1) +1 >Emitted(31, 6) Source(18, 2) + SourceIndex(1) --- >>> export class internalC { 1->^^^^ @@ -2588,16 +2620,16 @@ sourceFile:file1.ts 2 > export 3 > class 4 > internalC -1->Emitted(31, 5) Source(19, 15) + SourceIndex(1) -2 >Emitted(31, 11) Source(19, 21) + SourceIndex(1) -3 >Emitted(31, 18) Source(19, 28) + SourceIndex(1) -4 >Emitted(31, 27) Source(19, 37) + SourceIndex(1) +1->Emitted(32, 5) Source(19, 15) + SourceIndex(1) +2 >Emitted(32, 11) Source(19, 21) + SourceIndex(1) +3 >Emitted(32, 18) Source(19, 28) + SourceIndex(1) +4 >Emitted(32, 27) Source(19, 37) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(32, 6) Source(19, 40) + SourceIndex(1) +1 >Emitted(33, 6) Source(19, 40) + SourceIndex(1) --- >>> export function internalfoo(): void; 1->^^^^ @@ -2612,11 +2644,11 @@ sourceFile:file1.ts 3 > function 4 > internalfoo 5 > () {} -1->Emitted(33, 5) Source(20, 15) + SourceIndex(1) -2 >Emitted(33, 11) Source(20, 21) + SourceIndex(1) -3 >Emitted(33, 21) Source(20, 31) + SourceIndex(1) -4 >Emitted(33, 32) Source(20, 42) + SourceIndex(1) -5 >Emitted(33, 41) Source(20, 47) + SourceIndex(1) +1->Emitted(34, 5) Source(20, 15) + SourceIndex(1) +2 >Emitted(34, 11) Source(20, 21) + SourceIndex(1) +3 >Emitted(34, 21) Source(20, 31) + SourceIndex(1) +4 >Emitted(34, 32) Source(20, 42) + SourceIndex(1) +5 >Emitted(34, 41) Source(20, 47) + SourceIndex(1) --- >>> export namespace internalNamespace { 1->^^^^ @@ -2630,11 +2662,11 @@ sourceFile:file1.ts 3 > namespace 4 > internalNamespace 5 > -1->Emitted(34, 5) Source(21, 15) + SourceIndex(1) -2 >Emitted(34, 11) Source(21, 21) + SourceIndex(1) -3 >Emitted(34, 22) Source(21, 32) + SourceIndex(1) -4 >Emitted(34, 39) Source(21, 49) + SourceIndex(1) -5 >Emitted(34, 40) Source(21, 50) + SourceIndex(1) +1->Emitted(35, 5) Source(21, 15) + SourceIndex(1) +2 >Emitted(35, 11) Source(21, 21) + SourceIndex(1) +3 >Emitted(35, 22) Source(21, 32) + SourceIndex(1) +4 >Emitted(35, 39) Source(21, 49) + SourceIndex(1) +5 >Emitted(35, 40) Source(21, 50) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^ @@ -2643,20 +2675,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(35, 9) Source(21, 52) + SourceIndex(1) -2 >Emitted(35, 15) Source(21, 65) + SourceIndex(1) -3 >Emitted(35, 24) Source(21, 74) + SourceIndex(1) +1 >Emitted(36, 9) Source(21, 52) + SourceIndex(1) +2 >Emitted(36, 15) Source(21, 65) + SourceIndex(1) +3 >Emitted(36, 24) Source(21, 74) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(36, 10) Source(21, 77) + SourceIndex(1) +1 >Emitted(37, 10) Source(21, 77) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(37, 6) Source(21, 79) + SourceIndex(1) +1 >Emitted(38, 6) Source(21, 79) + SourceIndex(1) --- >>> export namespace internalOther.something { 1->^^^^ @@ -2674,13 +2706,13 @@ sourceFile:file1.ts 5 > . 6 > something 7 > -1->Emitted(38, 5) Source(22, 15) + SourceIndex(1) -2 >Emitted(38, 11) Source(22, 21) + SourceIndex(1) -3 >Emitted(38, 22) Source(22, 32) + SourceIndex(1) -4 >Emitted(38, 35) Source(22, 45) + SourceIndex(1) -5 >Emitted(38, 36) Source(22, 46) + SourceIndex(1) -6 >Emitted(38, 45) Source(22, 55) + SourceIndex(1) -7 >Emitted(38, 46) Source(22, 56) + SourceIndex(1) +1->Emitted(39, 5) Source(22, 15) + SourceIndex(1) +2 >Emitted(39, 11) Source(22, 21) + SourceIndex(1) +3 >Emitted(39, 22) Source(22, 32) + SourceIndex(1) +4 >Emitted(39, 35) Source(22, 45) + SourceIndex(1) +5 >Emitted(39, 36) Source(22, 46) + SourceIndex(1) +6 >Emitted(39, 45) Source(22, 55) + SourceIndex(1) +7 >Emitted(39, 46) Source(22, 56) + SourceIndex(1) --- >>> class someClass { 1 >^^^^^^^^ @@ -2689,20 +2721,20 @@ sourceFile:file1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(39, 9) Source(22, 58) + SourceIndex(1) -2 >Emitted(39, 15) Source(22, 71) + SourceIndex(1) -3 >Emitted(39, 24) Source(22, 80) + SourceIndex(1) +1 >Emitted(40, 9) Source(22, 58) + SourceIndex(1) +2 >Emitted(40, 15) Source(22, 71) + SourceIndex(1) +3 >Emitted(40, 24) Source(22, 80) + SourceIndex(1) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(40, 10) Source(22, 83) + SourceIndex(1) +1 >Emitted(41, 10) Source(22, 83) + SourceIndex(1) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(41, 6) Source(22, 85) + SourceIndex(1) +1 >Emitted(42, 6) Source(22, 85) + SourceIndex(1) --- >>> export import internalImport = internalNamespace.someClass; 1->^^^^ @@ -2724,15 +2756,15 @@ sourceFile:file1.ts 7 > . 8 > someClass 9 > ; -1->Emitted(42, 5) Source(23, 15) + SourceIndex(1) -2 >Emitted(42, 11) Source(23, 21) + SourceIndex(1) -3 >Emitted(42, 19) Source(23, 29) + SourceIndex(1) -4 >Emitted(42, 33) Source(23, 43) + SourceIndex(1) -5 >Emitted(42, 36) Source(23, 46) + SourceIndex(1) -6 >Emitted(42, 53) Source(23, 63) + SourceIndex(1) -7 >Emitted(42, 54) Source(23, 64) + SourceIndex(1) -8 >Emitted(42, 63) Source(23, 73) + SourceIndex(1) -9 >Emitted(42, 64) Source(23, 74) + SourceIndex(1) +1->Emitted(43, 5) Source(23, 15) + SourceIndex(1) +2 >Emitted(43, 11) Source(23, 21) + SourceIndex(1) +3 >Emitted(43, 19) Source(23, 29) + SourceIndex(1) +4 >Emitted(43, 33) Source(23, 43) + SourceIndex(1) +5 >Emitted(43, 36) Source(23, 46) + SourceIndex(1) +6 >Emitted(43, 53) Source(23, 63) + SourceIndex(1) +7 >Emitted(43, 54) Source(23, 64) + SourceIndex(1) +8 >Emitted(43, 63) Source(23, 73) + SourceIndex(1) +9 >Emitted(43, 64) Source(23, 74) + SourceIndex(1) --- >>> export type internalType = internalC; 1 >^^^^ @@ -2750,13 +2782,13 @@ sourceFile:file1.ts 5 > = 6 > internalC 7 > ; -1 >Emitted(43, 5) Source(24, 15) + SourceIndex(1) -2 >Emitted(43, 11) Source(24, 21) + SourceIndex(1) -3 >Emitted(43, 17) Source(24, 27) + SourceIndex(1) -4 >Emitted(43, 29) Source(24, 39) + SourceIndex(1) -5 >Emitted(43, 32) Source(24, 42) + SourceIndex(1) -6 >Emitted(43, 41) Source(24, 51) + SourceIndex(1) -7 >Emitted(43, 42) Source(24, 52) + SourceIndex(1) +1 >Emitted(44, 5) Source(24, 15) + SourceIndex(1) +2 >Emitted(44, 11) Source(24, 21) + SourceIndex(1) +3 >Emitted(44, 17) Source(24, 27) + SourceIndex(1) +4 >Emitted(44, 29) Source(24, 39) + SourceIndex(1) +5 >Emitted(44, 32) Source(24, 42) + SourceIndex(1) +6 >Emitted(44, 41) Source(24, 51) + SourceIndex(1) +7 >Emitted(44, 42) Source(24, 52) + SourceIndex(1) --- >>> export const internalConst = 10; 1 >^^^^ @@ -2774,13 +2806,13 @@ sourceFile:file1.ts 5 > internalConst 6 > = 10 7 > ; -1 >Emitted(44, 5) Source(25, 15) + SourceIndex(1) -2 >Emitted(44, 11) Source(25, 21) + SourceIndex(1) -3 >Emitted(44, 12) Source(25, 22) + SourceIndex(1) -4 >Emitted(44, 18) Source(25, 28) + SourceIndex(1) -5 >Emitted(44, 31) Source(25, 41) + SourceIndex(1) -6 >Emitted(44, 36) Source(25, 46) + SourceIndex(1) -7 >Emitted(44, 37) Source(25, 47) + SourceIndex(1) +1 >Emitted(45, 5) Source(25, 15) + SourceIndex(1) +2 >Emitted(45, 11) Source(25, 21) + SourceIndex(1) +3 >Emitted(45, 12) Source(25, 22) + SourceIndex(1) +4 >Emitted(45, 18) Source(25, 28) + SourceIndex(1) +5 >Emitted(45, 31) Source(25, 41) + SourceIndex(1) +6 >Emitted(45, 36) Source(25, 46) + SourceIndex(1) +7 >Emitted(45, 37) Source(25, 47) + SourceIndex(1) --- >>> export enum internalEnum { 1 >^^^^ @@ -2792,10 +2824,10 @@ sourceFile:file1.ts 2 > export 3 > enum 4 > internalEnum -1 >Emitted(45, 5) Source(26, 15) + SourceIndex(1) -2 >Emitted(45, 11) Source(26, 21) + SourceIndex(1) -3 >Emitted(45, 17) Source(26, 27) + SourceIndex(1) -4 >Emitted(45, 29) Source(26, 39) + SourceIndex(1) +1 >Emitted(46, 5) Source(26, 15) + SourceIndex(1) +2 >Emitted(46, 11) Source(26, 21) + SourceIndex(1) +3 >Emitted(46, 17) Source(26, 27) + SourceIndex(1) +4 >Emitted(46, 29) Source(26, 39) + SourceIndex(1) --- >>> a = 0, 1 >^^^^^^^^ @@ -2805,9 +2837,9 @@ sourceFile:file1.ts 1 > { 2 > a 3 > -1 >Emitted(46, 9) Source(26, 42) + SourceIndex(1) -2 >Emitted(46, 10) Source(26, 43) + SourceIndex(1) -3 >Emitted(46, 14) Source(26, 43) + SourceIndex(1) +1 >Emitted(47, 9) Source(26, 42) + SourceIndex(1) +2 >Emitted(47, 10) Source(26, 43) + SourceIndex(1) +3 >Emitted(47, 14) Source(26, 43) + SourceIndex(1) --- >>> b = 1, 1->^^^^^^^^ @@ -2817,9 +2849,9 @@ sourceFile:file1.ts 1->, 2 > b 3 > -1->Emitted(47, 9) Source(26, 45) + SourceIndex(1) -2 >Emitted(47, 10) Source(26, 46) + SourceIndex(1) -3 >Emitted(47, 14) Source(26, 46) + SourceIndex(1) +1->Emitted(48, 9) Source(26, 45) + SourceIndex(1) +2 >Emitted(48, 10) Source(26, 46) + SourceIndex(1) +3 >Emitted(48, 14) Source(26, 46) + SourceIndex(1) --- >>> c = 2 1->^^^^^^^^ @@ -2828,14 +2860,14 @@ sourceFile:file1.ts 1->, 2 > c 3 > -1->Emitted(48, 9) Source(26, 48) + SourceIndex(1) -2 >Emitted(48, 10) Source(26, 49) + SourceIndex(1) -3 >Emitted(48, 14) Source(26, 49) + SourceIndex(1) +1->Emitted(49, 9) Source(26, 48) + SourceIndex(1) +2 >Emitted(49, 10) Source(26, 49) + SourceIndex(1) +3 >Emitted(49, 14) Source(26, 49) + SourceIndex(1) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(49, 6) Source(26, 51) + SourceIndex(1) +1 >Emitted(50, 6) Source(26, 51) + SourceIndex(1) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -2858,13 +2890,13 @@ sourceFile:file2.ts 5 > y 6 > = 20 7 > ; -1 >Emitted(52, 5) Source(1, 1) + SourceIndex(2) -2 >Emitted(52, 11) Source(1, 7) + SourceIndex(2) -3 >Emitted(52, 12) Source(1, 8) + SourceIndex(2) -4 >Emitted(52, 18) Source(1, 14) + SourceIndex(2) -5 >Emitted(52, 19) Source(1, 15) + SourceIndex(2) -6 >Emitted(52, 24) Source(1, 20) + SourceIndex(2) -7 >Emitted(52, 25) Source(1, 21) + SourceIndex(2) +1 >Emitted(53, 5) Source(1, 1) + SourceIndex(2) +2 >Emitted(53, 11) Source(1, 7) + SourceIndex(2) +3 >Emitted(53, 12) Source(1, 8) + SourceIndex(2) +4 >Emitted(53, 18) Source(1, 14) + SourceIndex(2) +5 >Emitted(53, 19) Source(1, 15) + SourceIndex(2) +6 >Emitted(53, 24) Source(1, 20) + SourceIndex(2) +7 >Emitted(53, 25) Source(1, 21) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/lib/module.d.ts @@ -2885,12 +2917,12 @@ sourceFile:global.ts 4 > globalConst 5 > = 10 6 > ; -1 >Emitted(54, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(54, 9) Source(1, 1) + SourceIndex(3) -3 >Emitted(54, 15) Source(1, 7) + SourceIndex(3) -4 >Emitted(54, 26) Source(1, 18) + SourceIndex(3) -5 >Emitted(54, 31) Source(1, 23) + SourceIndex(3) -6 >Emitted(54, 32) Source(1, 24) + SourceIndex(3) +1 >Emitted(55, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(55, 9) Source(1, 1) + SourceIndex(3) +3 >Emitted(55, 15) Source(1, 7) + SourceIndex(3) +4 >Emitted(55, 26) Source(1, 18) + SourceIndex(3) +5 >Emitted(55, 31) Source(1, 23) + SourceIndex(3) +6 >Emitted(55, 32) Source(1, 24) + SourceIndex(3) --- >>>//# sourceMappingURL=module.d.ts.map @@ -4504,32 +4536,32 @@ sourceFile:global.ts }, { "pos": 108, - "end": 212, + "end": 233, "kind": "internal" }, { - "pos": 214, - "end": 253, + "pos": 235, + "end": 274, "kind": "text" }, { - "pos": 253, - "end": 721, + "pos": 274, + "end": 742, "kind": "internal" }, { - "pos": 723, - "end": 730, + "pos": 744, + "end": 751, "kind": "text" }, { - "pos": 730, - "end": 1219, + "pos": 751, + "end": 1240, "kind": "internal" }, { - "pos": 1221, - "end": 1312, + "pos": 1242, + "end": 1333, "kind": "text" } ] @@ -4659,18 +4691,19 @@ declare module "file1" { export class normalC { ---------------------------------------------------------------------- -internal: (108-212) +internal: (108-233) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (214-253) +text: (235-274) } export namespace normalN { ---------------------------------------------------------------------- -internal: (253-721) +internal: (274-742) class C { } function foo(): void; @@ -4691,11 +4724,11 @@ internal: (253-721) c = 2 } ---------------------------------------------------------------------- -text: (723-730) +text: (744-751) } ---------------------------------------------------------------------- -internal: (730-1219) +internal: (751-1240) export class internalC { } export function internalfoo(): void; @@ -4716,7 +4749,7 @@ internal: (730-1219) c = 2 } ---------------------------------------------------------------------- -text: (1221-1312) +text: (1242-1333) } declare module "file2" { export const y = 20; diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index c218edfa8a9c1..cca89f269e911 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -58,7 +58,8 @@ declare class normalC { constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -106,7 +107,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,gBAAgB,CAAC;AAExB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,gBAAgB,CAAC;AAExB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -326,35 +327,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 19) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 25) + SourceIndex(2) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(17, 5) Source(17, 23) + SourceIndex(2) -2 >Emitted(17, 6) Source(17, 24) + SourceIndex(2) -3 >Emitted(17, 8) Source(18, 30) + SourceIndex(2) -4 >Emitted(17, 14) Source(18, 36) + SourceIndex(2) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 19) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 23) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 24) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 30) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 36) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 41) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 19) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 23) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 24) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 25) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 30) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 36) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 41) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -366,10 +398,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -379,15 +411,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 19) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 32) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 33) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 19) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 32) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 33) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 37) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 37) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -400,10 +432,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 19) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 35) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 38) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 43) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 19) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 35) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 38) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 43) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -415,10 +447,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 19) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 36) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 49) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 50) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 19) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 36) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 49) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 50) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -427,20 +459,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 52) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 65) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 66) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 52) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 65) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 66) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 69) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 69) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 71) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 71) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -456,12 +488,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 19) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 36) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 45) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 46) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 55) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 56) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 19) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 36) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 45) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 46) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 55) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 56) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -470,20 +502,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 58) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 71) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 80) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 58) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 71) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 80) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 83) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 83) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 85) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 85) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -505,15 +537,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 19) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 25) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 33) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 43) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 46) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 59) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 60) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 61) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 62) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 19) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 25) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 33) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 43) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 46) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 59) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 60) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 61) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 62) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -529,12 +561,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 19) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 31) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 43) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 46) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 55) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 56) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 19) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 31) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 43) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 46) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 55) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 56) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -548,11 +580,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 26) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 32) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 45) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 50) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 51) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 26) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 32) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 45) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 50) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 51) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -562,9 +594,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 19) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 31) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 43) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 19) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 31) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 43) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -574,9 +606,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 46) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 47) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 47) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 46) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 47) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 47) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -586,9 +618,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 49) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 50) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 50) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 49) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 50) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 50) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -597,21 +629,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 52) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 53) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 53) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 52) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 53) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 53) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 55) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 55) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -621,15 +653,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 15) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 21) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 30) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 15) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 21) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 30) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 33) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 33) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -642,10 +674,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 15) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 24) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 35) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 40) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 15) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 24) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 35) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 40) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -657,10 +689,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 15) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 25) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 42) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 43) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 15) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 25) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 42) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 43) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -669,20 +701,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 45) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 58) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 67) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 45) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 58) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 67) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 70) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 70) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 72) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 72) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -698,12 +730,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 15) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 25) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 38) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 39) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 48) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 49) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 15) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 25) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 38) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 39) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 48) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 49) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -712,20 +744,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 51) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 64) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 73) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 51) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 64) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 73) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 76) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 76) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 78) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 78) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -745,14 +777,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 15) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 22) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 36) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 39) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 56) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 57) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 66) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 67) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 15) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 22) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 36) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 39) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 56) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 57) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 66) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 67) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -768,12 +800,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 15) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 20) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 32) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 35) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 44) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 45) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 15) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 20) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 32) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 35) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 44) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 45) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -789,12 +821,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 15) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 21) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 34) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 39) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 40) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 15) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 21) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 34) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 39) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 40) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -804,9 +836,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 15) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 20) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 32) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 15) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 20) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 32) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -816,9 +848,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 35) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 36) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 36) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 35) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 36) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 36) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -828,9 +860,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 38) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 39) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 39) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 38) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 39) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 39) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -839,15 +871,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 41) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 42) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 42) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 41) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 42) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 44) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 44) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -861,9 +893,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -871,8 +903,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -881,7 +913,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2637,32 +2669,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 233, - "end": 307, + "end": 338, "kind": "internal" }, { - "pos": 309, - "end": 341, + "pos": 340, + "end": 372, "kind": "text" }, { - "pos": 341, - "end": 733, + "pos": 372, + "end": 764, "kind": "internal" }, { - "pos": 735, - "end": 738, + "pos": 766, + "end": 769, "kind": "text" }, { - "pos": 738, - "end": 1151, + "pos": 769, + "end": 1182, "kind": "internal" }, { - "pos": 1153, - "end": 1201, + "pos": 1184, + "end": 1232, "kind": "text" } ] @@ -2817,18 +2849,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (233-307) +internal: (233-338) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (309-341) +text: (340-372) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (341-733) +internal: (372-764) class C { } function foo(): void; @@ -2849,11 +2882,11 @@ internal: (341-733) c = 2 } ---------------------------------------------------------------------- -text: (735-738) +text: (766-769) } ---------------------------------------------------------------------- -internal: (738-1151) +internal: (769-1182) declare class internalC { } declare function internalfoo(): void; @@ -2874,7 +2907,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1153-1201) +text: (1184-1232) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index 9c369db811c90..ac11658e2ca20 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -1805,32 +1805,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -1986,18 +1986,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -2018,11 +2019,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2043,7 +2044,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index b7ccf17985a32..957ed1cd9b102 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1905,32 +1905,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 249, - "end": 398, + "end": 429, "kind": "internal" }, { - "pos": 400, - "end": 432, + "pos": 431, + "end": 463, "kind": "text" }, { - "pos": 432, - "end": 944, + "pos": 463, + "end": 975, "kind": "internal" }, { - "pos": 946, - "end": 949, + "pos": 977, + "end": 980, "kind": "text" }, { - "pos": 949, - "end": 1482, + "pos": 980, + "end": 1513, "kind": "internal" }, { - "pos": 1484, - "end": 1532, + "pos": 1515, + "end": 1563, "kind": "text" } ] @@ -2086,18 +2086,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (249-398) +internal: (249-429) /**@internal*/ constructor(); /**@internal*/ prop: string; /**@internal*/ method(): void; - /**@internal*/ /**@internal*/ c: number; + /**@internal*/ get c(): number; + /**@internal*/ set c(val: number); ---------------------------------------------------------------------- -text: (400-432) +text: (431-463) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (432-944) +internal: (463-975) /**@internal*/ class C { } /**@internal*/ function foo(): void; @@ -2118,11 +2119,11 @@ internal: (432-944) c = 2 } ---------------------------------------------------------------------- -text: (946-949) +text: (977-980) } ---------------------------------------------------------------------- -internal: (949-1482) +internal: (980-1513) /**@internal*/ declare class internalC { } /**@internal*/ declare function internalfoo(): void; @@ -2143,7 +2144,7 @@ internal: (949-1482) c = 2 } ---------------------------------------------------------------------- -text: (1484-1532) +text: (1515-1563) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js index e670e22aab643..512c530fffffc 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -1827,32 +1827,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -2008,18 +2008,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -2040,11 +2041,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2065,7 +2066,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index eb1f081ead5df..1eed13c834257 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-declaration-doesnt-change/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -1905,32 +1905,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 322, + "end": 339, "kind": "internal" }, { - "pos": 324, - "end": 356, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 356, - "end": 748, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 750, - "end": 753, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 753, - "end": 1166, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1168, - "end": 1216, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -2086,18 +2086,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-322) +internal: (234-339) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (324-356) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (356-748) +internal: (373-765) class C { } function foo(): void; @@ -2118,11 +2119,11 @@ internal: (356-748) c = 2 } ---------------------------------------------------------------------- -text: (750-753) +text: (767-770) } ---------------------------------------------------------------------- -internal: (753-1166) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2143,7 +2144,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1168-1216) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index c4c6dc7ab6db8..d1aac8b70e84b 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -25,7 +25,7 @@ exitCode:: 0 //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACxC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -245,35 +245,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /**@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 20) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 26) + SourceIndex(2) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /**@internal*/ get -2 > c -3 > () { return 10; } - > /**@internal*/ set c(val: -4 > number -1->Emitted(17, 5) Source(17, 24) + SourceIndex(2) -2 >Emitted(17, 6) Source(17, 25) + SourceIndex(2) -3 >Emitted(17, 8) Source(18, 31) + SourceIndex(2) -4 >Emitted(17, 14) Source(18, 37) + SourceIndex(2) + > /**@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /**@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 20) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 24) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 25) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 31) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 37) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 42) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /**@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 20) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 24) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 25) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 26) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 31) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 37) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -285,10 +316,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -298,15 +329,15 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 20) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 33) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 34) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 20) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 33) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 34) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 38) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 38) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -319,10 +350,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 20) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 36) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 39) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 44) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 20) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 36) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 39) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 44) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -334,10 +365,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 20) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 37) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 50) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 51) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 20) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 37) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 50) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 51) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -346,20 +377,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 53) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 66) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 67) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 53) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 66) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 67) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 70) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 70) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 72) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 72) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -375,12 +406,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 20) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 37) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 46) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 47) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 56) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 57) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 20) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 37) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 46) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 47) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 56) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 57) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -389,20 +420,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 59) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 72) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 81) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 59) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 72) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 81) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 84) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 84) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 86) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 86) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -424,15 +455,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 20) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 26) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 34) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 44) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 47) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 60) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 61) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 62) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 63) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 20) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 26) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 34) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 44) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 47) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 60) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 61) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 62) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 63) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -448,12 +479,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 20) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 32) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 44) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 47) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 56) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 57) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 20) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 32) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 44) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 47) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 56) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 57) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -467,11 +498,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 27) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 33) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 46) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 51) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 52) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 27) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 33) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 46) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 51) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 52) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -481,9 +512,9 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 20) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 32) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 44) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 20) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 32) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 44) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -493,9 +524,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 47) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 48) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 48) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 47) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 48) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 48) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -505,9 +536,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 50) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 51) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 51) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 50) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 51) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 51) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -516,21 +547,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 53) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 54) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 54) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 53) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 54) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 54) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 56) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 56) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -540,15 +571,15 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 16) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 22) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 31) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 16) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 22) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 31) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 34) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 34) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -561,10 +592,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 16) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 25) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 36) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 41) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 16) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 25) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 36) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 41) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -576,10 +607,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 16) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 26) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 43) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 44) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 16) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 26) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 43) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 44) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -588,20 +619,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 46) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 59) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 68) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 46) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 59) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 68) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 71) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 71) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 73) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 73) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -617,12 +648,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 16) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 26) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 39) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 40) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 49) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 50) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 16) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 26) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 39) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 40) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 49) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 50) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -631,20 +662,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 52) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 65) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 74) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 52) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 65) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 74) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 77) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 77) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 79) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 79) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -664,14 +695,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 16) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 23) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 37) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 40) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 57) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 58) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 67) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 68) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 16) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 23) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 37) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 40) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 57) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 58) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 67) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 68) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -687,12 +718,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 16) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 21) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 33) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 36) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 45) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 46) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 16) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 21) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 33) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 36) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 45) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 46) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -708,12 +739,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 16) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 16) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 22) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 35) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 40) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 41) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 16) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 16) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 22) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 35) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 40) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 41) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -723,9 +754,9 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 16) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 21) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 33) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 16) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 21) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 33) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -735,9 +766,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 36) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 37) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 37) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 36) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 37) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 37) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -747,9 +778,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 39) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 40) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 40) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 39) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 40) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 40) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -758,15 +789,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 42) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 43) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 43) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 42) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 43) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 43) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 45) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 45) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -780,9 +811,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -790,8 +821,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -800,7 +831,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -856,32 +887,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -1034,18 +1065,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -1066,11 +1098,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -1091,7 +1123,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js index a157ee39fc996..1fec0b7b22e95 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -47,7 +47,7 @@ readFiles:: { } //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -267,35 +267,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 19) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 25) + SourceIndex(2) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(17, 5) Source(17, 23) + SourceIndex(2) -2 >Emitted(17, 6) Source(17, 24) + SourceIndex(2) -3 >Emitted(17, 8) Source(18, 30) + SourceIndex(2) -4 >Emitted(17, 14) Source(18, 36) + SourceIndex(2) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 19) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 23) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 24) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 30) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 36) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 41) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 19) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 23) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 24) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 25) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 30) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 36) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 41) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -307,10 +338,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -320,15 +351,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 19) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 32) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 33) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 19) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 32) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 33) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 37) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 37) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -341,10 +372,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 19) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 35) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 38) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 43) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 19) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 35) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 38) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 43) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -356,10 +387,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 19) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 36) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 49) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 50) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 19) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 36) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 49) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 50) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -368,20 +399,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 52) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 65) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 66) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 52) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 65) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 66) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 69) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 69) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 71) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 71) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -397,12 +428,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 19) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 36) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 45) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 46) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 55) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 56) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 19) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 36) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 45) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 46) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 55) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 56) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -411,20 +442,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 58) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 71) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 80) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 58) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 71) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 80) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 83) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 83) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 85) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 85) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -446,15 +477,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 19) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 25) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 33) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 43) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 46) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 59) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 60) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 61) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 62) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 19) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 25) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 33) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 43) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 46) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 59) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 60) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 61) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 62) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -470,12 +501,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 19) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 31) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 43) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 46) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 55) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 56) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 19) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 31) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 43) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 46) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 55) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 56) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -489,11 +520,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 26) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 32) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 45) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 50) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 51) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 26) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 32) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 45) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 50) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 51) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -503,9 +534,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 19) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 31) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 43) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 19) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 31) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 43) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -515,9 +546,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 46) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 47) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 47) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 46) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 47) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 47) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -527,9 +558,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 49) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 50) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 50) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 49) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 50) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 50) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -538,21 +569,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 52) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 53) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 53) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 52) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 53) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 53) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 55) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 55) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -562,15 +593,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 15) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 21) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 30) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 15) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 21) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 30) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 33) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 33) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -583,10 +614,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 15) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 24) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 35) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 40) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 15) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 24) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 35) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 40) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -598,10 +629,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 15) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 25) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 42) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 43) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 15) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 25) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 42) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 43) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -610,20 +641,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 45) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 58) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 67) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 45) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 58) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 67) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 70) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 70) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 72) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 72) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -639,12 +670,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 15) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 25) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 38) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 39) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 48) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 49) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 15) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 25) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 38) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 39) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 48) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 49) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -653,20 +684,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 51) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 64) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 73) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 51) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 64) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 73) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 76) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 76) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 78) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 78) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -686,14 +717,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 15) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 22) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 36) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 39) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 56) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 57) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 66) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 67) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 15) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 22) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 36) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 39) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 56) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 57) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 66) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 67) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -709,12 +740,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 15) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 20) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 32) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 35) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 44) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 45) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 15) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 20) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 32) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 35) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 44) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 45) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -730,12 +761,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 15) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 21) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 34) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 39) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 40) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 15) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 21) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 34) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 39) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 40) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -745,9 +776,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 15) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 20) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 32) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 15) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 20) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 32) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -757,9 +788,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 35) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 36) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 36) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 35) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 36) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 36) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -769,9 +800,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 38) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 39) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 39) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 38) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 39) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 39) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -780,15 +811,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 41) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 42) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 42) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 41) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 42) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 44) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 44) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -802,9 +833,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -812,8 +843,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -822,7 +853,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -878,32 +909,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -1056,18 +1087,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -1088,11 +1120,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -1113,7 +1145,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index fb2071dc25616..774cd39ea59c3 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/incremental-headers-change-without-dts-changes/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -25,7 +25,7 @@ exitCode:: 0 //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;kBACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,UAAU,QAAQ;IACd,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -245,35 +245,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 19) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 25) + SourceIndex(2) --- ->>> /*@internal*/ c: number; -1->^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +>>> get c(): number; +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(17, 19) Source(17, 23) + SourceIndex(2) -2 >Emitted(17, 20) Source(17, 24) + SourceIndex(2) -3 >Emitted(17, 22) Source(18, 30) + SourceIndex(2) -4 >Emitted(17, 28) Source(18, 36) + SourceIndex(2) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 19) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 23) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 24) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 30) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 36) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 41) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 19) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 23) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 24) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 25) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 30) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 36) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 41) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -285,10 +316,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -298,15 +329,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 19) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 32) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 33) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 19) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 32) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 33) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 37) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 37) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -319,10 +350,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 19) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 35) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 38) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 43) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 19) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 35) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 38) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 43) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -334,10 +365,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 19) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 36) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 49) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 50) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 19) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 36) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 49) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 50) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -346,20 +377,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 52) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 65) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 66) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 52) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 65) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 66) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 69) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 69) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 71) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 71) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -375,12 +406,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 19) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 36) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 45) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 46) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 55) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 56) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 19) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 36) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 45) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 46) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 55) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 56) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -389,20 +420,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 58) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 71) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 80) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 58) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 71) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 80) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 83) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 83) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 85) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 85) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -424,15 +455,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 19) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 25) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 33) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 43) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 46) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 59) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 60) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 61) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 62) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 19) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 25) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 33) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 43) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 46) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 59) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 60) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 61) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 62) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -448,12 +479,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 19) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 31) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 43) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 46) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 55) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 56) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 19) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 31) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 43) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 46) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 55) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 56) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -467,11 +498,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 26) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 32) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 45) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 50) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 51) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 26) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 32) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 45) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 50) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 51) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -481,9 +512,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 19) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 31) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 43) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 19) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 31) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 43) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -493,9 +524,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 46) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 47) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 47) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 46) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 47) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 47) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -505,9 +536,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 49) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 50) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 50) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 49) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 50) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 50) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -516,21 +547,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 52) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 53) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 53) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 52) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 53) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 53) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 55) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 55) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -540,15 +571,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 15) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 21) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 30) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 15) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 21) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 30) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 33) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 33) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -561,10 +592,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 15) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 24) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 35) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 40) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 15) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 24) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 35) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 40) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -576,10 +607,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 15) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 25) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 42) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 43) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 15) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 25) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 42) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 43) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -588,20 +619,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 45) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 58) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 67) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 45) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 58) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 67) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 70) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 70) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 72) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 72) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -617,12 +648,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 15) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 25) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 38) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 39) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 48) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 49) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 15) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 25) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 38) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 39) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 48) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 49) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -631,20 +662,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 51) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 64) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 73) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 51) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 64) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 73) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 76) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 76) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 78) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 78) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -664,14 +695,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 15) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 22) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 36) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 39) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 56) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 57) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 66) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 67) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 15) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 22) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 36) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 39) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 56) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 57) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 66) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 67) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -687,12 +718,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 15) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 20) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 32) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 35) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 44) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 45) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 15) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 20) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 32) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 35) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 44) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 45) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -708,12 +739,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 15) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 21) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 34) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 39) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 40) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 15) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 21) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 34) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 39) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 40) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -723,9 +754,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 15) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 20) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 32) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 15) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 20) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 32) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -735,9 +766,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 35) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 36) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 36) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 35) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 36) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 36) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -747,9 +778,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 38) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 39) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 39) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 38) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 39) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 39) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -758,15 +789,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 41) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 42) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 42) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 41) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 42) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 44) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 44) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -780,9 +811,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -790,8 +821,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -800,7 +831,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -856,32 +887,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 322, + "end": 339, "kind": "internal" }, { - "pos": 324, - "end": 356, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 356, - "end": 748, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 750, - "end": 753, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 753, - "end": 1166, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1168, - "end": 1216, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -1034,18 +1065,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-322) +internal: (234-339) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (324-356) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (356-748) +internal: (373-765) class C { } function foo(): void; @@ -1066,11 +1098,11 @@ internal: (356-748) c = 2 } ---------------------------------------------------------------------- -text: (750-753) +text: (767-770) } ---------------------------------------------------------------------- -internal: (753-1166) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -1091,7 +1123,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1168-1216) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js index c341d9c5d2222..339374d5326bb 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment-when-one-two-three-are-prepended-in-order.js @@ -37,7 +37,8 @@ declare class normalC { constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -85,7 +86,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAe,UAAU,QAAQ;IAC7B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAe,UAAU,QAAQ;IAC7B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACxC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -305,35 +306,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /**@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 20) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 26) + SourceIndex(2) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /**@internal*/ get -2 > c -3 > () { return 10; } - > /**@internal*/ set c(val: -4 > number -1->Emitted(17, 5) Source(17, 24) + SourceIndex(2) -2 >Emitted(17, 6) Source(17, 25) + SourceIndex(2) -3 >Emitted(17, 8) Source(18, 31) + SourceIndex(2) -4 >Emitted(17, 14) Source(18, 37) + SourceIndex(2) + > /**@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /**@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 20) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 24) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 25) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 31) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 37) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 42) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /**@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 20) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 24) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 25) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 26) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 31) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 37) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -345,10 +377,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -358,15 +390,15 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 20) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 33) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 34) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 20) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 33) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 34) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 38) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 38) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -379,10 +411,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 20) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 36) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 39) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 44) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 20) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 36) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 39) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 44) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -394,10 +426,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 20) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 37) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 50) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 51) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 20) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 37) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 50) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 51) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -406,20 +438,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 53) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 66) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 67) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 53) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 66) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 67) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 70) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 70) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 72) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 72) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -435,12 +467,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 20) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 37) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 46) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 47) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 56) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 57) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 20) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 37) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 46) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 47) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 56) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 57) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -449,20 +481,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 59) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 72) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 81) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 59) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 72) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 81) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 84) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 84) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 86) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 86) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -484,15 +516,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 20) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 26) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 34) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 44) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 47) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 60) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 61) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 62) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 63) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 20) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 26) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 34) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 44) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 47) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 60) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 61) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 62) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 63) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -508,12 +540,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 20) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 32) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 44) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 47) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 56) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 57) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 20) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 32) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 44) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 47) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 56) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 57) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -527,11 +559,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 27) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 33) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 46) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 51) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 52) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 27) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 33) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 46) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 51) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 52) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -541,9 +573,9 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 20) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 32) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 44) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 20) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 32) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 44) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -553,9 +585,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 47) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 48) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 48) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 47) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 48) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 48) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -565,9 +597,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 50) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 51) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 51) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 50) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 51) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 51) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -576,21 +608,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 53) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 54) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 54) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 53) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 54) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 54) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 56) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 56) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -600,15 +632,15 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 16) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 22) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 31) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 16) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 22) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 31) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 34) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 34) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -621,10 +653,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 16) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 25) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 36) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 41) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 16) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 25) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 36) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 41) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -636,10 +668,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 16) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 26) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 43) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 44) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 16) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 26) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 43) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 44) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -648,20 +680,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 46) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 59) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 68) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 46) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 59) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 68) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 71) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 71) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 73) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 73) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -677,12 +709,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 16) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 26) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 39) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 40) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 49) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 50) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 16) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 26) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 39) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 40) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 49) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 50) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -691,20 +723,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 52) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 65) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 74) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 52) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 65) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 74) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 77) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 77) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 79) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 79) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -724,14 +756,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 16) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 23) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 37) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 40) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 57) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 58) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 67) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 68) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 16) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 23) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 37) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 40) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 57) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 58) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 67) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 68) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -747,12 +779,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 16) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 21) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 33) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 36) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 45) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 46) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 16) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 21) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 33) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 36) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 45) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 46) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -768,12 +800,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 16) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 16) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 22) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 35) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 40) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 41) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 16) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 16) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 22) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 35) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 40) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 41) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -783,9 +815,9 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 16) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 21) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 33) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 16) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 21) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 33) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -795,9 +827,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 36) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 37) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 37) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 36) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 37) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 37) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -807,9 +839,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 39) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 40) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 40) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 39) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 40) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 40) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -818,15 +850,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 42) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 43) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 43) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 42) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 43) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 43) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 45) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 45) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -840,9 +872,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -850,8 +882,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -860,7 +892,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2616,32 +2648,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -2796,18 +2828,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -2828,11 +2861,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2853,7 +2886,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js index 709634ade2742..329530576c00c 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-comment.js @@ -29,7 +29,8 @@ declare class normalC { constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -77,7 +78,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEM,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACxC;AACD,kBAAU,OAAO,CAAC;IACC,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACc,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -177,35 +178,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /**@internal*/ 2 > method 1->Emitted(8, 5) Source(16, 20) + SourceIndex(0) 2 >Emitted(8, 11) Source(16, 26) + SourceIndex(0) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /**@internal*/ get -2 > c -3 > () { return 10; } - > /**@internal*/ set c(val: -4 > number -1->Emitted(9, 5) Source(17, 24) + SourceIndex(0) -2 >Emitted(9, 6) Source(17, 25) + SourceIndex(0) -3 >Emitted(9, 8) Source(18, 31) + SourceIndex(0) -4 >Emitted(9, 14) Source(18, 37) + SourceIndex(0) + > /**@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /**@internal*/ set c(val: +5 > number +6 > +1->Emitted(9, 5) Source(17, 20) + SourceIndex(0) +2 >Emitted(9, 9) Source(17, 24) + SourceIndex(0) +3 >Emitted(9, 10) Source(17, 25) + SourceIndex(0) +4 >Emitted(9, 14) Source(18, 31) + SourceIndex(0) +5 >Emitted(9, 20) Source(18, 37) + SourceIndex(0) +6 >Emitted(9, 21) Source(17, 42) + SourceIndex(0) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /**@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(10, 5) Source(18, 20) + SourceIndex(0) +2 >Emitted(10, 9) Source(18, 24) + SourceIndex(0) +3 >Emitted(10, 10) Source(18, 25) + SourceIndex(0) +4 >Emitted(10, 11) Source(18, 26) + SourceIndex(0) +5 >Emitted(10, 16) Source(18, 31) + SourceIndex(0) +6 >Emitted(10, 22) Source(18, 37) + SourceIndex(0) +7 >Emitted(10, 24) Source(18, 42) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(10, 2) Source(19, 2) + SourceIndex(0) +1 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) --- >>>declare namespace normalN { 1-> @@ -217,10 +249,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) -2 >Emitted(11, 19) Source(20, 11) + SourceIndex(0) -3 >Emitted(11, 26) Source(20, 18) + SourceIndex(0) -4 >Emitted(11, 27) Source(20, 19) + SourceIndex(0) +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 19) Source(20, 11) + SourceIndex(0) +3 >Emitted(12, 26) Source(20, 18) + SourceIndex(0) +4 >Emitted(12, 27) Source(20, 19) + SourceIndex(0) --- >>> class C { 1 >^^^^ @@ -230,15 +262,15 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export class 3 > C -1 >Emitted(12, 5) Source(21, 20) + SourceIndex(0) -2 >Emitted(12, 11) Source(21, 33) + SourceIndex(0) -3 >Emitted(12, 12) Source(21, 34) + SourceIndex(0) +1 >Emitted(13, 5) Source(21, 20) + SourceIndex(0) +2 >Emitted(13, 11) Source(21, 33) + SourceIndex(0) +3 >Emitted(13, 12) Source(21, 34) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(13, 6) Source(21, 38) + SourceIndex(0) +1 >Emitted(14, 6) Source(21, 38) + SourceIndex(0) --- >>> function foo(): void; 1->^^^^ @@ -251,10 +283,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(14, 5) Source(22, 20) + SourceIndex(0) -2 >Emitted(14, 14) Source(22, 36) + SourceIndex(0) -3 >Emitted(14, 17) Source(22, 39) + SourceIndex(0) -4 >Emitted(14, 26) Source(22, 44) + SourceIndex(0) +1->Emitted(15, 5) Source(22, 20) + SourceIndex(0) +2 >Emitted(15, 14) Source(22, 36) + SourceIndex(0) +3 >Emitted(15, 17) Source(22, 39) + SourceIndex(0) +4 >Emitted(15, 26) Source(22, 44) + SourceIndex(0) --- >>> namespace someNamespace { 1->^^^^ @@ -266,10 +298,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(15, 5) Source(23, 20) + SourceIndex(0) -2 >Emitted(15, 15) Source(23, 37) + SourceIndex(0) -3 >Emitted(15, 28) Source(23, 50) + SourceIndex(0) -4 >Emitted(15, 29) Source(23, 51) + SourceIndex(0) +1->Emitted(16, 5) Source(23, 20) + SourceIndex(0) +2 >Emitted(16, 15) Source(23, 37) + SourceIndex(0) +3 >Emitted(16, 28) Source(23, 50) + SourceIndex(0) +4 >Emitted(16, 29) Source(23, 51) + SourceIndex(0) --- >>> class C { 1 >^^^^^^^^ @@ -278,20 +310,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(16, 9) Source(23, 53) + SourceIndex(0) -2 >Emitted(16, 15) Source(23, 66) + SourceIndex(0) -3 >Emitted(16, 16) Source(23, 67) + SourceIndex(0) +1 >Emitted(17, 9) Source(23, 53) + SourceIndex(0) +2 >Emitted(17, 15) Source(23, 66) + SourceIndex(0) +3 >Emitted(17, 16) Source(23, 67) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(17, 10) Source(23, 70) + SourceIndex(0) +1 >Emitted(18, 10) Source(23, 70) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(18, 6) Source(23, 72) + SourceIndex(0) +1 >Emitted(19, 6) Source(23, 72) + SourceIndex(0) --- >>> namespace someOther.something { 1->^^^^ @@ -307,12 +339,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(19, 5) Source(24, 20) + SourceIndex(0) -2 >Emitted(19, 15) Source(24, 37) + SourceIndex(0) -3 >Emitted(19, 24) Source(24, 46) + SourceIndex(0) -4 >Emitted(19, 25) Source(24, 47) + SourceIndex(0) -5 >Emitted(19, 34) Source(24, 56) + SourceIndex(0) -6 >Emitted(19, 35) Source(24, 57) + SourceIndex(0) +1->Emitted(20, 5) Source(24, 20) + SourceIndex(0) +2 >Emitted(20, 15) Source(24, 37) + SourceIndex(0) +3 >Emitted(20, 24) Source(24, 46) + SourceIndex(0) +4 >Emitted(20, 25) Source(24, 47) + SourceIndex(0) +5 >Emitted(20, 34) Source(24, 56) + SourceIndex(0) +6 >Emitted(20, 35) Source(24, 57) + SourceIndex(0) --- >>> class someClass { 1 >^^^^^^^^ @@ -321,20 +353,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(20, 9) Source(24, 59) + SourceIndex(0) -2 >Emitted(20, 15) Source(24, 72) + SourceIndex(0) -3 >Emitted(20, 24) Source(24, 81) + SourceIndex(0) +1 >Emitted(21, 9) Source(24, 59) + SourceIndex(0) +2 >Emitted(21, 15) Source(24, 72) + SourceIndex(0) +3 >Emitted(21, 24) Source(24, 81) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(21, 10) Source(24, 84) + SourceIndex(0) +1 >Emitted(22, 10) Source(24, 84) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(22, 6) Source(24, 86) + SourceIndex(0) +1 >Emitted(23, 6) Source(24, 86) + SourceIndex(0) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -356,15 +388,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(23, 5) Source(25, 20) + SourceIndex(0) -2 >Emitted(23, 11) Source(25, 26) + SourceIndex(0) -3 >Emitted(23, 19) Source(25, 34) + SourceIndex(0) -4 >Emitted(23, 29) Source(25, 44) + SourceIndex(0) -5 >Emitted(23, 32) Source(25, 47) + SourceIndex(0) -6 >Emitted(23, 45) Source(25, 60) + SourceIndex(0) -7 >Emitted(23, 46) Source(25, 61) + SourceIndex(0) -8 >Emitted(23, 47) Source(25, 62) + SourceIndex(0) -9 >Emitted(23, 48) Source(25, 63) + SourceIndex(0) +1->Emitted(24, 5) Source(25, 20) + SourceIndex(0) +2 >Emitted(24, 11) Source(25, 26) + SourceIndex(0) +3 >Emitted(24, 19) Source(25, 34) + SourceIndex(0) +4 >Emitted(24, 29) Source(25, 44) + SourceIndex(0) +5 >Emitted(24, 32) Source(25, 47) + SourceIndex(0) +6 >Emitted(24, 45) Source(25, 60) + SourceIndex(0) +7 >Emitted(24, 46) Source(25, 61) + SourceIndex(0) +8 >Emitted(24, 47) Source(25, 62) + SourceIndex(0) +9 >Emitted(24, 48) Source(25, 63) + SourceIndex(0) --- >>> type internalType = internalC; 1 >^^^^ @@ -380,12 +412,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(24, 5) Source(26, 20) + SourceIndex(0) -2 >Emitted(24, 10) Source(26, 32) + SourceIndex(0) -3 >Emitted(24, 22) Source(26, 44) + SourceIndex(0) -4 >Emitted(24, 25) Source(26, 47) + SourceIndex(0) -5 >Emitted(24, 34) Source(26, 56) + SourceIndex(0) -6 >Emitted(24, 35) Source(26, 57) + SourceIndex(0) +1 >Emitted(25, 5) Source(26, 20) + SourceIndex(0) +2 >Emitted(25, 10) Source(26, 32) + SourceIndex(0) +3 >Emitted(25, 22) Source(26, 44) + SourceIndex(0) +4 >Emitted(25, 25) Source(26, 47) + SourceIndex(0) +5 >Emitted(25, 34) Source(26, 56) + SourceIndex(0) +6 >Emitted(25, 35) Source(26, 57) + SourceIndex(0) --- >>> const internalConst = 10; 1 >^^^^ @@ -399,11 +431,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(25, 5) Source(27, 27) + SourceIndex(0) -2 >Emitted(25, 11) Source(27, 33) + SourceIndex(0) -3 >Emitted(25, 24) Source(27, 46) + SourceIndex(0) -4 >Emitted(25, 29) Source(27, 51) + SourceIndex(0) -5 >Emitted(25, 30) Source(27, 52) + SourceIndex(0) +1 >Emitted(26, 5) Source(27, 27) + SourceIndex(0) +2 >Emitted(26, 11) Source(27, 33) + SourceIndex(0) +3 >Emitted(26, 24) Source(27, 46) + SourceIndex(0) +4 >Emitted(26, 29) Source(27, 51) + SourceIndex(0) +5 >Emitted(26, 30) Source(27, 52) + SourceIndex(0) --- >>> enum internalEnum { 1 >^^^^ @@ -413,9 +445,9 @@ sourceFile:../second/second_part1.ts > /**@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(26, 5) Source(28, 20) + SourceIndex(0) -2 >Emitted(26, 10) Source(28, 32) + SourceIndex(0) -3 >Emitted(26, 22) Source(28, 44) + SourceIndex(0) +1 >Emitted(27, 5) Source(28, 20) + SourceIndex(0) +2 >Emitted(27, 10) Source(28, 32) + SourceIndex(0) +3 >Emitted(27, 22) Source(28, 44) + SourceIndex(0) --- >>> a = 0, 1 >^^^^^^^^ @@ -425,9 +457,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(27, 9) Source(28, 47) + SourceIndex(0) -2 >Emitted(27, 10) Source(28, 48) + SourceIndex(0) -3 >Emitted(27, 14) Source(28, 48) + SourceIndex(0) +1 >Emitted(28, 9) Source(28, 47) + SourceIndex(0) +2 >Emitted(28, 10) Source(28, 48) + SourceIndex(0) +3 >Emitted(28, 14) Source(28, 48) + SourceIndex(0) --- >>> b = 1, 1->^^^^^^^^ @@ -437,9 +469,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(28, 9) Source(28, 50) + SourceIndex(0) -2 >Emitted(28, 10) Source(28, 51) + SourceIndex(0) -3 >Emitted(28, 14) Source(28, 51) + SourceIndex(0) +1->Emitted(29, 9) Source(28, 50) + SourceIndex(0) +2 >Emitted(29, 10) Source(28, 51) + SourceIndex(0) +3 >Emitted(29, 14) Source(28, 51) + SourceIndex(0) --- >>> c = 2 1->^^^^^^^^ @@ -448,21 +480,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(29, 9) Source(28, 53) + SourceIndex(0) -2 >Emitted(29, 10) Source(28, 54) + SourceIndex(0) -3 >Emitted(29, 14) Source(28, 54) + SourceIndex(0) +1->Emitted(30, 9) Source(28, 53) + SourceIndex(0) +2 >Emitted(30, 10) Source(28, 54) + SourceIndex(0) +3 >Emitted(30, 14) Source(28, 54) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(30, 6) Source(28, 56) + SourceIndex(0) +1 >Emitted(31, 6) Source(28, 56) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(31, 2) Source(29, 2) + SourceIndex(0) +1 >Emitted(32, 2) Source(29, 2) + SourceIndex(0) --- >>>declare class internalC { 1-> @@ -472,15 +504,15 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >class 3 > internalC -1->Emitted(32, 1) Source(30, 16) + SourceIndex(0) -2 >Emitted(32, 15) Source(30, 22) + SourceIndex(0) -3 >Emitted(32, 24) Source(30, 31) + SourceIndex(0) +1->Emitted(33, 1) Source(30, 16) + SourceIndex(0) +2 >Emitted(33, 15) Source(30, 22) + SourceIndex(0) +3 >Emitted(33, 24) Source(30, 31) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(33, 2) Source(30, 34) + SourceIndex(0) +1 >Emitted(34, 2) Source(30, 34) + SourceIndex(0) --- >>>declare function internalfoo(): void; 1-> @@ -493,10 +525,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(34, 1) Source(31, 16) + SourceIndex(0) -2 >Emitted(34, 18) Source(31, 25) + SourceIndex(0) -3 >Emitted(34, 29) Source(31, 36) + SourceIndex(0) -4 >Emitted(34, 38) Source(31, 41) + SourceIndex(0) +1->Emitted(35, 1) Source(31, 16) + SourceIndex(0) +2 >Emitted(35, 18) Source(31, 25) + SourceIndex(0) +3 >Emitted(35, 29) Source(31, 36) + SourceIndex(0) +4 >Emitted(35, 38) Source(31, 41) + SourceIndex(0) --- >>>declare namespace internalNamespace { 1-> @@ -508,10 +540,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(35, 1) Source(32, 16) + SourceIndex(0) -2 >Emitted(35, 19) Source(32, 26) + SourceIndex(0) -3 >Emitted(35, 36) Source(32, 43) + SourceIndex(0) -4 >Emitted(35, 37) Source(32, 44) + SourceIndex(0) +1->Emitted(36, 1) Source(32, 16) + SourceIndex(0) +2 >Emitted(36, 19) Source(32, 26) + SourceIndex(0) +3 >Emitted(36, 36) Source(32, 43) + SourceIndex(0) +4 >Emitted(36, 37) Source(32, 44) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -520,20 +552,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(36, 5) Source(32, 46) + SourceIndex(0) -2 >Emitted(36, 11) Source(32, 59) + SourceIndex(0) -3 >Emitted(36, 20) Source(32, 68) + SourceIndex(0) +1 >Emitted(37, 5) Source(32, 46) + SourceIndex(0) +2 >Emitted(37, 11) Source(32, 59) + SourceIndex(0) +3 >Emitted(37, 20) Source(32, 68) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(37, 6) Source(32, 71) + SourceIndex(0) +1 >Emitted(38, 6) Source(32, 71) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(38, 2) Source(32, 73) + SourceIndex(0) +1 >Emitted(39, 2) Source(32, 73) + SourceIndex(0) --- >>>declare namespace internalOther.something { 1-> @@ -549,12 +581,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(39, 1) Source(33, 16) + SourceIndex(0) -2 >Emitted(39, 19) Source(33, 26) + SourceIndex(0) -3 >Emitted(39, 32) Source(33, 39) + SourceIndex(0) -4 >Emitted(39, 33) Source(33, 40) + SourceIndex(0) -5 >Emitted(39, 42) Source(33, 49) + SourceIndex(0) -6 >Emitted(39, 43) Source(33, 50) + SourceIndex(0) +1->Emitted(40, 1) Source(33, 16) + SourceIndex(0) +2 >Emitted(40, 19) Source(33, 26) + SourceIndex(0) +3 >Emitted(40, 32) Source(33, 39) + SourceIndex(0) +4 >Emitted(40, 33) Source(33, 40) + SourceIndex(0) +5 >Emitted(40, 42) Source(33, 49) + SourceIndex(0) +6 >Emitted(40, 43) Source(33, 50) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -563,20 +595,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(40, 5) Source(33, 52) + SourceIndex(0) -2 >Emitted(40, 11) Source(33, 65) + SourceIndex(0) -3 >Emitted(40, 20) Source(33, 74) + SourceIndex(0) +1 >Emitted(41, 5) Source(33, 52) + SourceIndex(0) +2 >Emitted(41, 11) Source(33, 65) + SourceIndex(0) +3 >Emitted(41, 20) Source(33, 74) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(41, 6) Source(33, 77) + SourceIndex(0) +1 >Emitted(42, 6) Source(33, 77) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(42, 2) Source(33, 79) + SourceIndex(0) +1 >Emitted(43, 2) Source(33, 79) + SourceIndex(0) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -596,14 +628,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(43, 1) Source(34, 16) + SourceIndex(0) -2 >Emitted(43, 8) Source(34, 23) + SourceIndex(0) -3 >Emitted(43, 22) Source(34, 37) + SourceIndex(0) -4 >Emitted(43, 25) Source(34, 40) + SourceIndex(0) -5 >Emitted(43, 42) Source(34, 57) + SourceIndex(0) -6 >Emitted(43, 43) Source(34, 58) + SourceIndex(0) -7 >Emitted(43, 52) Source(34, 67) + SourceIndex(0) -8 >Emitted(43, 53) Source(34, 68) + SourceIndex(0) +1->Emitted(44, 1) Source(34, 16) + SourceIndex(0) +2 >Emitted(44, 8) Source(34, 23) + SourceIndex(0) +3 >Emitted(44, 22) Source(34, 37) + SourceIndex(0) +4 >Emitted(44, 25) Source(34, 40) + SourceIndex(0) +5 >Emitted(44, 42) Source(34, 57) + SourceIndex(0) +6 >Emitted(44, 43) Source(34, 58) + SourceIndex(0) +7 >Emitted(44, 52) Source(34, 67) + SourceIndex(0) +8 >Emitted(44, 53) Source(34, 68) + SourceIndex(0) --- >>>declare type internalType = internalC; 1 > @@ -619,12 +651,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(44, 1) Source(35, 16) + SourceIndex(0) -2 >Emitted(44, 14) Source(35, 21) + SourceIndex(0) -3 >Emitted(44, 26) Source(35, 33) + SourceIndex(0) -4 >Emitted(44, 29) Source(35, 36) + SourceIndex(0) -5 >Emitted(44, 38) Source(35, 45) + SourceIndex(0) -6 >Emitted(44, 39) Source(35, 46) + SourceIndex(0) +1 >Emitted(45, 1) Source(35, 16) + SourceIndex(0) +2 >Emitted(45, 14) Source(35, 21) + SourceIndex(0) +3 >Emitted(45, 26) Source(35, 33) + SourceIndex(0) +4 >Emitted(45, 29) Source(35, 36) + SourceIndex(0) +5 >Emitted(45, 38) Source(35, 45) + SourceIndex(0) +6 >Emitted(45, 39) Source(35, 46) + SourceIndex(0) --- >>>declare const internalConst = 10; 1 > @@ -640,12 +672,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(45, 1) Source(36, 16) + SourceIndex(0) -2 >Emitted(45, 9) Source(36, 16) + SourceIndex(0) -3 >Emitted(45, 15) Source(36, 22) + SourceIndex(0) -4 >Emitted(45, 28) Source(36, 35) + SourceIndex(0) -5 >Emitted(45, 33) Source(36, 40) + SourceIndex(0) -6 >Emitted(45, 34) Source(36, 41) + SourceIndex(0) +1 >Emitted(46, 1) Source(36, 16) + SourceIndex(0) +2 >Emitted(46, 9) Source(36, 16) + SourceIndex(0) +3 >Emitted(46, 15) Source(36, 22) + SourceIndex(0) +4 >Emitted(46, 28) Source(36, 35) + SourceIndex(0) +5 >Emitted(46, 33) Source(36, 40) + SourceIndex(0) +6 >Emitted(46, 34) Source(36, 41) + SourceIndex(0) --- >>>declare enum internalEnum { 1 > @@ -655,9 +687,9 @@ sourceFile:../second/second_part1.ts >/**@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(46, 1) Source(37, 16) + SourceIndex(0) -2 >Emitted(46, 14) Source(37, 21) + SourceIndex(0) -3 >Emitted(46, 26) Source(37, 33) + SourceIndex(0) +1 >Emitted(47, 1) Source(37, 16) + SourceIndex(0) +2 >Emitted(47, 14) Source(37, 21) + SourceIndex(0) +3 >Emitted(47, 26) Source(37, 33) + SourceIndex(0) --- >>> a = 0, 1 >^^^^ @@ -667,9 +699,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(47, 5) Source(37, 36) + SourceIndex(0) -2 >Emitted(47, 6) Source(37, 37) + SourceIndex(0) -3 >Emitted(47, 10) Source(37, 37) + SourceIndex(0) +1 >Emitted(48, 5) Source(37, 36) + SourceIndex(0) +2 >Emitted(48, 6) Source(37, 37) + SourceIndex(0) +3 >Emitted(48, 10) Source(37, 37) + SourceIndex(0) --- >>> b = 1, 1->^^^^ @@ -679,9 +711,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(48, 5) Source(37, 39) + SourceIndex(0) -2 >Emitted(48, 6) Source(37, 40) + SourceIndex(0) -3 >Emitted(48, 10) Source(37, 40) + SourceIndex(0) +1->Emitted(49, 5) Source(37, 39) + SourceIndex(0) +2 >Emitted(49, 6) Source(37, 40) + SourceIndex(0) +3 >Emitted(49, 10) Source(37, 40) + SourceIndex(0) --- >>> c = 2 1->^^^^ @@ -690,15 +722,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(49, 5) Source(37, 42) + SourceIndex(0) -2 >Emitted(49, 6) Source(37, 43) + SourceIndex(0) -3 >Emitted(49, 10) Source(37, 43) + SourceIndex(0) +1->Emitted(50, 5) Source(37, 42) + SourceIndex(0) +2 >Emitted(50, 6) Source(37, 43) + SourceIndex(0) +3 >Emitted(50, 10) Source(37, 43) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(37, 45) + SourceIndex(0) +1 >Emitted(51, 2) Source(37, 45) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -712,9 +744,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(51, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(51, 15) Source(1, 7) + SourceIndex(1) -3 >Emitted(51, 16) Source(1, 8) + SourceIndex(1) +1->Emitted(52, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(52, 15) Source(1, 7) + SourceIndex(1) +3 >Emitted(52, 16) Source(1, 8) + SourceIndex(1) --- >>> doSomething(): void; 1->^^^^ @@ -722,8 +754,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(52, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(52, 16) Source(2, 16) + SourceIndex(1) +1->Emitted(53, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(53, 16) Source(2, 16) + SourceIndex(1) --- >>>} 1 >^ @@ -732,7 +764,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(53, 2) Source(5, 2) + SourceIndex(1) +1 >Emitted(54, 2) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2316,32 +2348,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 77, - "end": 151, + "end": 182, "kind": "internal" }, { - "pos": 153, - "end": 185, + "pos": 184, + "end": 216, "kind": "text" }, { - "pos": 185, - "end": 577, + "pos": 216, + "end": 608, "kind": "internal" }, { - "pos": 579, - "end": 582, + "pos": 610, + "end": 613, "kind": "text" }, { - "pos": 582, - "end": 995, + "pos": 613, + "end": 1026, "kind": "internal" }, { - "pos": 997, - "end": 1045, + "pos": 1028, + "end": 1076, "kind": "text" } ] @@ -2470,18 +2502,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (77-151) +internal: (77-182) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (153-185) +text: (184-216) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (185-577) +internal: (216-608) class C { } function foo(): void; @@ -2502,11 +2535,11 @@ internal: (185-577) c = 2 } ---------------------------------------------------------------------- -text: (579-582) +text: (610-613) } ---------------------------------------------------------------------- -internal: (582-995) +internal: (613-1026) declare class internalC { } declare function internalfoo(): void; @@ -2527,7 +2560,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (997-1045) +text: (1028-1076) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index 81653bf15bbec..27a636b0f7c2e 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -37,7 +37,8 @@ declare class normalC { /**@internal*/ constructor(); /**@internal*/ prop: string; /**@internal*/ method(): void; - /**@internal*/ /**@internal*/ c: number; + /**@internal*/ get c(): number; + /**@internal*/ set c(val: number); } declare namespace normalN { /**@internal*/ class C { @@ -85,7 +86,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,cAAc,CAAC,UAAU,QAAQ;IAC7B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;IACT,cAAc;IACd,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,MAAM;IACrB,cAAc,gBAAK,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACd,cAAc,CAAC,MAAa,CAAC;KAAI;IACjC,cAAc,CAAC,SAAgB,GAAG,SAAK;IACvC,cAAc,CAAC,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACnE,cAAc,CAAC,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACjF,cAAc,CAAC,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC1D,cAAc,CAAC,KAAY,YAAY,GAAG,SAAS,CAAC;IACpD,cAAc,CAAQ,MAAM,aAAa,KAAK,CAAC;IAC/C,cAAc,CAAC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACD,cAAc,CAAC,cAAM,SAAS;CAAG;AACjC,cAAc,CAAC,iBAAS,WAAW,SAAK;AACxC,cAAc,CAAC,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACxE,cAAc,CAAC,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC9E,cAAc,CAAC,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACnE,cAAc,CAAC,aAAK,YAAY,GAAG,SAAS,CAAC;AAC7C,cAAc,CAAC,QAAA,MAAM,aAAa,KAAK,CAAC;AACxC,cAAc,CAAC,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,cAAc,CAAC,UAAU,QAAQ;IAC7B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;IACT,cAAc;IACd,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,IAAI,CAAC,IACM,MAAM,CADK;IACrC,cAAc,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACxC;AACD,kBAAU,OAAO,CAAC;IACd,cAAc,CAAC,MAAa,CAAC;KAAI;IACjC,cAAc,CAAC,SAAgB,GAAG,SAAK;IACvC,cAAc,CAAC,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACnE,cAAc,CAAC,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACjF,cAAc,CAAC,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC1D,cAAc,CAAC,KAAY,YAAY,GAAG,SAAS,CAAC;IACpD,cAAc,CAAQ,MAAM,aAAa,KAAK,CAAC;IAC/C,cAAc,CAAC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACD,cAAc,CAAC,cAAM,SAAS;CAAG;AACjC,cAAc,CAAC,iBAAS,WAAW,SAAK;AACxC,cAAc,CAAC,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACxE,cAAc,CAAC,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC9E,cAAc,CAAC,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACnE,cAAc,CAAC,aAAK,YAAY,GAAG,SAAS,CAAC;AAC7C,cAAc,CAAC,QAAA,MAAM,aAAa,KAAK,CAAC;AACxC,cAAc,CAAC,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -328,7 +329,7 @@ sourceFile:../second/second_part1.ts 2 > ^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^-> 1-> > 2 > /**@internal*/ @@ -339,34 +340,71 @@ sourceFile:../second/second_part1.ts 3 >Emitted(16, 20) Source(16, 20) + SourceIndex(2) 4 >Emitted(16, 26) Source(16, 26) + SourceIndex(2) --- ->>> /**@internal*/ /**@internal*/ c: number; +>>> /**@internal*/ get c(): number; 1->^^^^ 2 > ^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^^^^-> 1->() { } > 2 > /**@internal*/ -3 > get -4 > c -5 > () { return 10; } - > /**@internal*/ set c(val: -6 > number +3 > +4 > get +5 > c +6 > () { return 10; } + > /**@internal*/ set c(val: +7 > number +8 > 1->Emitted(17, 5) Source(17, 5) + SourceIndex(2) 2 >Emitted(17, 19) Source(17, 19) + SourceIndex(2) -3 >Emitted(17, 35) Source(17, 24) + SourceIndex(2) -4 >Emitted(17, 36) Source(17, 25) + SourceIndex(2) -5 >Emitted(17, 38) Source(18, 31) + SourceIndex(2) -6 >Emitted(17, 44) Source(18, 37) + SourceIndex(2) +3 >Emitted(17, 20) Source(17, 20) + SourceIndex(2) +4 >Emitted(17, 24) Source(17, 24) + SourceIndex(2) +5 >Emitted(17, 25) Source(17, 25) + SourceIndex(2) +6 >Emitted(17, 29) Source(18, 31) + SourceIndex(2) +7 >Emitted(17, 35) Source(18, 37) + SourceIndex(2) +8 >Emitted(17, 36) Source(17, 42) + SourceIndex(2) +--- +>>> /**@internal*/ set c(val: number); +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^ +7 > ^^^^^ +8 > ^^^^^^ +9 > ^^ +1-> + > +2 > /**@internal*/ +3 > +4 > set +5 > c +6 > ( +7 > val: +8 > number +9 > ) { } +1->Emitted(18, 5) Source(18, 5) + SourceIndex(2) +2 >Emitted(18, 19) Source(18, 19) + SourceIndex(2) +3 >Emitted(18, 20) Source(18, 20) + SourceIndex(2) +4 >Emitted(18, 24) Source(18, 24) + SourceIndex(2) +5 >Emitted(18, 25) Source(18, 25) + SourceIndex(2) +6 >Emitted(18, 26) Source(18, 26) + SourceIndex(2) +7 >Emitted(18, 31) Source(18, 31) + SourceIndex(2) +8 >Emitted(18, 37) Source(18, 37) + SourceIndex(2) +9 >Emitted(18, 39) Source(18, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -379,10 +417,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> /**@internal*/ class C { 1->^^^^ @@ -396,17 +434,17 @@ sourceFile:../second/second_part1.ts 3 > 4 > export class 5 > C -1->Emitted(20, 5) Source(21, 5) + SourceIndex(2) -2 >Emitted(20, 19) Source(21, 19) + SourceIndex(2) -3 >Emitted(20, 20) Source(21, 20) + SourceIndex(2) -4 >Emitted(20, 26) Source(21, 33) + SourceIndex(2) -5 >Emitted(20, 27) Source(21, 34) + SourceIndex(2) +1->Emitted(21, 5) Source(21, 5) + SourceIndex(2) +2 >Emitted(21, 19) Source(21, 19) + SourceIndex(2) +3 >Emitted(21, 20) Source(21, 20) + SourceIndex(2) +4 >Emitted(21, 26) Source(21, 33) + SourceIndex(2) +5 >Emitted(21, 27) Source(21, 34) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 38) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 38) + SourceIndex(2) --- >>> /**@internal*/ function foo(): void; 1->^^^^ @@ -423,12 +461,12 @@ sourceFile:../second/second_part1.ts 4 > export function 5 > foo 6 > () {} -1->Emitted(22, 5) Source(22, 5) + SourceIndex(2) -2 >Emitted(22, 19) Source(22, 19) + SourceIndex(2) -3 >Emitted(22, 20) Source(22, 20) + SourceIndex(2) -4 >Emitted(22, 29) Source(22, 36) + SourceIndex(2) -5 >Emitted(22, 32) Source(22, 39) + SourceIndex(2) -6 >Emitted(22, 41) Source(22, 44) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 5) + SourceIndex(2) +2 >Emitted(23, 19) Source(22, 19) + SourceIndex(2) +3 >Emitted(23, 20) Source(22, 20) + SourceIndex(2) +4 >Emitted(23, 29) Source(22, 36) + SourceIndex(2) +5 >Emitted(23, 32) Source(22, 39) + SourceIndex(2) +6 >Emitted(23, 41) Source(22, 44) + SourceIndex(2) --- >>> /**@internal*/ namespace someNamespace { 1->^^^^ @@ -444,12 +482,12 @@ sourceFile:../second/second_part1.ts 4 > export namespace 5 > someNamespace 6 > -1->Emitted(23, 5) Source(23, 5) + SourceIndex(2) -2 >Emitted(23, 19) Source(23, 19) + SourceIndex(2) -3 >Emitted(23, 20) Source(23, 20) + SourceIndex(2) -4 >Emitted(23, 30) Source(23, 37) + SourceIndex(2) -5 >Emitted(23, 43) Source(23, 50) + SourceIndex(2) -6 >Emitted(23, 44) Source(23, 51) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 5) + SourceIndex(2) +2 >Emitted(24, 19) Source(23, 19) + SourceIndex(2) +3 >Emitted(24, 20) Source(23, 20) + SourceIndex(2) +4 >Emitted(24, 30) Source(23, 37) + SourceIndex(2) +5 >Emitted(24, 43) Source(23, 50) + SourceIndex(2) +6 >Emitted(24, 44) Source(23, 51) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -458,20 +496,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 53) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 66) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 67) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 53) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 66) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 67) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 70) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 70) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 72) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 72) + SourceIndex(2) --- >>> /**@internal*/ namespace someOther.something { 1->^^^^ @@ -491,14 +529,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > something 8 > -1->Emitted(27, 5) Source(24, 5) + SourceIndex(2) -2 >Emitted(27, 19) Source(24, 19) + SourceIndex(2) -3 >Emitted(27, 20) Source(24, 20) + SourceIndex(2) -4 >Emitted(27, 30) Source(24, 37) + SourceIndex(2) -5 >Emitted(27, 39) Source(24, 46) + SourceIndex(2) -6 >Emitted(27, 40) Source(24, 47) + SourceIndex(2) -7 >Emitted(27, 49) Source(24, 56) + SourceIndex(2) -8 >Emitted(27, 50) Source(24, 57) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 5) + SourceIndex(2) +2 >Emitted(28, 19) Source(24, 19) + SourceIndex(2) +3 >Emitted(28, 20) Source(24, 20) + SourceIndex(2) +4 >Emitted(28, 30) Source(24, 37) + SourceIndex(2) +5 >Emitted(28, 39) Source(24, 46) + SourceIndex(2) +6 >Emitted(28, 40) Source(24, 47) + SourceIndex(2) +7 >Emitted(28, 49) Source(24, 56) + SourceIndex(2) +8 >Emitted(28, 50) Source(24, 57) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -507,20 +545,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 59) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 72) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 81) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 59) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 72) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 81) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 84) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 84) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 86) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 86) + SourceIndex(2) --- >>> /**@internal*/ export import someImport = someNamespace.C; 1->^^^^ @@ -546,17 +584,17 @@ sourceFile:../second/second_part1.ts 9 > . 10> C 11> ; -1->Emitted(31, 5) Source(25, 5) + SourceIndex(2) -2 >Emitted(31, 19) Source(25, 19) + SourceIndex(2) -3 >Emitted(31, 20) Source(25, 20) + SourceIndex(2) -4 >Emitted(31, 26) Source(25, 26) + SourceIndex(2) -5 >Emitted(31, 34) Source(25, 34) + SourceIndex(2) -6 >Emitted(31, 44) Source(25, 44) + SourceIndex(2) -7 >Emitted(31, 47) Source(25, 47) + SourceIndex(2) -8 >Emitted(31, 60) Source(25, 60) + SourceIndex(2) -9 >Emitted(31, 61) Source(25, 61) + SourceIndex(2) -10>Emitted(31, 62) Source(25, 62) + SourceIndex(2) -11>Emitted(31, 63) Source(25, 63) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 5) + SourceIndex(2) +2 >Emitted(32, 19) Source(25, 19) + SourceIndex(2) +3 >Emitted(32, 20) Source(25, 20) + SourceIndex(2) +4 >Emitted(32, 26) Source(25, 26) + SourceIndex(2) +5 >Emitted(32, 34) Source(25, 34) + SourceIndex(2) +6 >Emitted(32, 44) Source(25, 44) + SourceIndex(2) +7 >Emitted(32, 47) Source(25, 47) + SourceIndex(2) +8 >Emitted(32, 60) Source(25, 60) + SourceIndex(2) +9 >Emitted(32, 61) Source(25, 61) + SourceIndex(2) +10>Emitted(32, 62) Source(25, 62) + SourceIndex(2) +11>Emitted(32, 63) Source(25, 63) + SourceIndex(2) --- >>> /**@internal*/ type internalType = internalC; 1 >^^^^ @@ -576,14 +614,14 @@ sourceFile:../second/second_part1.ts 6 > = 7 > internalC 8 > ; -1 >Emitted(32, 5) Source(26, 5) + SourceIndex(2) -2 >Emitted(32, 19) Source(26, 19) + SourceIndex(2) -3 >Emitted(32, 20) Source(26, 20) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 32) + SourceIndex(2) -5 >Emitted(32, 37) Source(26, 44) + SourceIndex(2) -6 >Emitted(32, 40) Source(26, 47) + SourceIndex(2) -7 >Emitted(32, 49) Source(26, 56) + SourceIndex(2) -8 >Emitted(32, 50) Source(26, 57) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 5) + SourceIndex(2) +2 >Emitted(33, 19) Source(26, 19) + SourceIndex(2) +3 >Emitted(33, 20) Source(26, 20) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 32) + SourceIndex(2) +5 >Emitted(33, 37) Source(26, 44) + SourceIndex(2) +6 >Emitted(33, 40) Source(26, 47) + SourceIndex(2) +7 >Emitted(33, 49) Source(26, 56) + SourceIndex(2) +8 >Emitted(33, 50) Source(26, 57) + SourceIndex(2) --- >>> /**@internal*/ const internalConst = 10; 1 >^^^^ @@ -601,13 +639,13 @@ sourceFile:../second/second_part1.ts 5 > internalConst 6 > = 10 7 > ; -1 >Emitted(33, 5) Source(27, 5) + SourceIndex(2) -2 >Emitted(33, 19) Source(27, 19) + SourceIndex(2) -3 >Emitted(33, 20) Source(27, 27) + SourceIndex(2) -4 >Emitted(33, 26) Source(27, 33) + SourceIndex(2) -5 >Emitted(33, 39) Source(27, 46) + SourceIndex(2) -6 >Emitted(33, 44) Source(27, 51) + SourceIndex(2) -7 >Emitted(33, 45) Source(27, 52) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 5) + SourceIndex(2) +2 >Emitted(34, 19) Source(27, 19) + SourceIndex(2) +3 >Emitted(34, 20) Source(27, 27) + SourceIndex(2) +4 >Emitted(34, 26) Source(27, 33) + SourceIndex(2) +5 >Emitted(34, 39) Source(27, 46) + SourceIndex(2) +6 >Emitted(34, 44) Source(27, 51) + SourceIndex(2) +7 >Emitted(34, 45) Source(27, 52) + SourceIndex(2) --- >>> /**@internal*/ enum internalEnum { 1 >^^^^ @@ -621,11 +659,11 @@ sourceFile:../second/second_part1.ts 3 > 4 > export enum 5 > internalEnum -1 >Emitted(34, 5) Source(28, 5) + SourceIndex(2) -2 >Emitted(34, 19) Source(28, 19) + SourceIndex(2) -3 >Emitted(34, 20) Source(28, 20) + SourceIndex(2) -4 >Emitted(34, 25) Source(28, 32) + SourceIndex(2) -5 >Emitted(34, 37) Source(28, 44) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 5) + SourceIndex(2) +2 >Emitted(35, 19) Source(28, 19) + SourceIndex(2) +3 >Emitted(35, 20) Source(28, 20) + SourceIndex(2) +4 >Emitted(35, 25) Source(28, 32) + SourceIndex(2) +5 >Emitted(35, 37) Source(28, 44) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -635,9 +673,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 47) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 48) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 48) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 47) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 48) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 48) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -647,9 +685,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 50) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 51) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 51) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 50) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 51) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 51) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -658,21 +696,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 53) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 54) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 54) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 53) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 54) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 54) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 56) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 56) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>/**@internal*/ declare class internalC { 1-> @@ -686,17 +724,17 @@ sourceFile:../second/second_part1.ts 3 > 4 > class 5 > internalC -1->Emitted(40, 1) Source(30, 1) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 15) + SourceIndex(2) -3 >Emitted(40, 16) Source(30, 16) + SourceIndex(2) -4 >Emitted(40, 30) Source(30, 22) + SourceIndex(2) -5 >Emitted(40, 39) Source(30, 31) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 1) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 15) + SourceIndex(2) +3 >Emitted(41, 16) Source(30, 16) + SourceIndex(2) +4 >Emitted(41, 30) Source(30, 22) + SourceIndex(2) +5 >Emitted(41, 39) Source(30, 31) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 34) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 34) + SourceIndex(2) --- >>>/**@internal*/ declare function internalfoo(): void; 1-> @@ -713,12 +751,12 @@ sourceFile:../second/second_part1.ts 4 > function 5 > internalfoo 6 > () {} -1->Emitted(42, 1) Source(31, 1) + SourceIndex(2) -2 >Emitted(42, 15) Source(31, 15) + SourceIndex(2) -3 >Emitted(42, 16) Source(31, 16) + SourceIndex(2) -4 >Emitted(42, 33) Source(31, 25) + SourceIndex(2) -5 >Emitted(42, 44) Source(31, 36) + SourceIndex(2) -6 >Emitted(42, 53) Source(31, 41) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 1) + SourceIndex(2) +2 >Emitted(43, 15) Source(31, 15) + SourceIndex(2) +3 >Emitted(43, 16) Source(31, 16) + SourceIndex(2) +4 >Emitted(43, 33) Source(31, 25) + SourceIndex(2) +5 >Emitted(43, 44) Source(31, 36) + SourceIndex(2) +6 >Emitted(43, 53) Source(31, 41) + SourceIndex(2) --- >>>/**@internal*/ declare namespace internalNamespace { 1-> @@ -734,12 +772,12 @@ sourceFile:../second/second_part1.ts 4 > namespace 5 > internalNamespace 6 > -1->Emitted(43, 1) Source(32, 1) + SourceIndex(2) -2 >Emitted(43, 15) Source(32, 15) + SourceIndex(2) -3 >Emitted(43, 16) Source(32, 16) + SourceIndex(2) -4 >Emitted(43, 34) Source(32, 26) + SourceIndex(2) -5 >Emitted(43, 51) Source(32, 43) + SourceIndex(2) -6 >Emitted(43, 52) Source(32, 44) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 1) + SourceIndex(2) +2 >Emitted(44, 15) Source(32, 15) + SourceIndex(2) +3 >Emitted(44, 16) Source(32, 16) + SourceIndex(2) +4 >Emitted(44, 34) Source(32, 26) + SourceIndex(2) +5 >Emitted(44, 51) Source(32, 43) + SourceIndex(2) +6 >Emitted(44, 52) Source(32, 44) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -748,20 +786,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 46) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 59) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 68) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 46) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 59) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 68) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 71) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 71) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 73) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 73) + SourceIndex(2) --- >>>/**@internal*/ declare namespace internalOther.something { 1-> @@ -781,14 +819,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > something 8 > -1->Emitted(47, 1) Source(33, 1) + SourceIndex(2) -2 >Emitted(47, 15) Source(33, 15) + SourceIndex(2) -3 >Emitted(47, 16) Source(33, 16) + SourceIndex(2) -4 >Emitted(47, 34) Source(33, 26) + SourceIndex(2) -5 >Emitted(47, 47) Source(33, 39) + SourceIndex(2) -6 >Emitted(47, 48) Source(33, 40) + SourceIndex(2) -7 >Emitted(47, 57) Source(33, 49) + SourceIndex(2) -8 >Emitted(47, 58) Source(33, 50) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 1) + SourceIndex(2) +2 >Emitted(48, 15) Source(33, 15) + SourceIndex(2) +3 >Emitted(48, 16) Source(33, 16) + SourceIndex(2) +4 >Emitted(48, 34) Source(33, 26) + SourceIndex(2) +5 >Emitted(48, 47) Source(33, 39) + SourceIndex(2) +6 >Emitted(48, 48) Source(33, 40) + SourceIndex(2) +7 >Emitted(48, 57) Source(33, 49) + SourceIndex(2) +8 >Emitted(48, 58) Source(33, 50) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -797,20 +835,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 52) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 65) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 74) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 52) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 65) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 74) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 77) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 77) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 79) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 79) + SourceIndex(2) --- >>>/**@internal*/ import internalImport = internalNamespace.someClass; 1-> @@ -834,16 +872,16 @@ sourceFile:../second/second_part1.ts 8 > . 9 > someClass 10> ; -1->Emitted(51, 1) Source(34, 1) + SourceIndex(2) -2 >Emitted(51, 15) Source(34, 15) + SourceIndex(2) -3 >Emitted(51, 16) Source(34, 16) + SourceIndex(2) -4 >Emitted(51, 23) Source(34, 23) + SourceIndex(2) -5 >Emitted(51, 37) Source(34, 37) + SourceIndex(2) -6 >Emitted(51, 40) Source(34, 40) + SourceIndex(2) -7 >Emitted(51, 57) Source(34, 57) + SourceIndex(2) -8 >Emitted(51, 58) Source(34, 58) + SourceIndex(2) -9 >Emitted(51, 67) Source(34, 67) + SourceIndex(2) -10>Emitted(51, 68) Source(34, 68) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 1) + SourceIndex(2) +2 >Emitted(52, 15) Source(34, 15) + SourceIndex(2) +3 >Emitted(52, 16) Source(34, 16) + SourceIndex(2) +4 >Emitted(52, 23) Source(34, 23) + SourceIndex(2) +5 >Emitted(52, 37) Source(34, 37) + SourceIndex(2) +6 >Emitted(52, 40) Source(34, 40) + SourceIndex(2) +7 >Emitted(52, 57) Source(34, 57) + SourceIndex(2) +8 >Emitted(52, 58) Source(34, 58) + SourceIndex(2) +9 >Emitted(52, 67) Source(34, 67) + SourceIndex(2) +10>Emitted(52, 68) Source(34, 68) + SourceIndex(2) --- >>>/**@internal*/ declare type internalType = internalC; 1 > @@ -863,14 +901,14 @@ sourceFile:../second/second_part1.ts 6 > = 7 > internalC 8 > ; -1 >Emitted(52, 1) Source(35, 1) + SourceIndex(2) -2 >Emitted(52, 15) Source(35, 15) + SourceIndex(2) -3 >Emitted(52, 16) Source(35, 16) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 21) + SourceIndex(2) -5 >Emitted(52, 41) Source(35, 33) + SourceIndex(2) -6 >Emitted(52, 44) Source(35, 36) + SourceIndex(2) -7 >Emitted(52, 53) Source(35, 45) + SourceIndex(2) -8 >Emitted(52, 54) Source(35, 46) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 1) + SourceIndex(2) +2 >Emitted(53, 15) Source(35, 15) + SourceIndex(2) +3 >Emitted(53, 16) Source(35, 16) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 21) + SourceIndex(2) +5 >Emitted(53, 41) Source(35, 33) + SourceIndex(2) +6 >Emitted(53, 44) Source(35, 36) + SourceIndex(2) +7 >Emitted(53, 53) Source(35, 45) + SourceIndex(2) +8 >Emitted(53, 54) Source(35, 46) + SourceIndex(2) --- >>>/**@internal*/ declare const internalConst = 10; 1 > @@ -890,14 +928,14 @@ sourceFile:../second/second_part1.ts 6 > internalConst 7 > = 10 8 > ; -1 >Emitted(53, 1) Source(36, 1) + SourceIndex(2) -2 >Emitted(53, 15) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 16) Source(36, 16) + SourceIndex(2) -4 >Emitted(53, 24) Source(36, 16) + SourceIndex(2) -5 >Emitted(53, 30) Source(36, 22) + SourceIndex(2) -6 >Emitted(53, 43) Source(36, 35) + SourceIndex(2) -7 >Emitted(53, 48) Source(36, 40) + SourceIndex(2) -8 >Emitted(53, 49) Source(36, 41) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 1) + SourceIndex(2) +2 >Emitted(54, 15) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 16) Source(36, 16) + SourceIndex(2) +4 >Emitted(54, 24) Source(36, 16) + SourceIndex(2) +5 >Emitted(54, 30) Source(36, 22) + SourceIndex(2) +6 >Emitted(54, 43) Source(36, 35) + SourceIndex(2) +7 >Emitted(54, 48) Source(36, 40) + SourceIndex(2) +8 >Emitted(54, 49) Source(36, 41) + SourceIndex(2) --- >>>/**@internal*/ declare enum internalEnum { 1 > @@ -911,11 +949,11 @@ sourceFile:../second/second_part1.ts 3 > 4 > enum 5 > internalEnum -1 >Emitted(54, 1) Source(37, 1) + SourceIndex(2) -2 >Emitted(54, 15) Source(37, 15) + SourceIndex(2) -3 >Emitted(54, 16) Source(37, 16) + SourceIndex(2) -4 >Emitted(54, 29) Source(37, 21) + SourceIndex(2) -5 >Emitted(54, 41) Source(37, 33) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 1) + SourceIndex(2) +2 >Emitted(55, 15) Source(37, 15) + SourceIndex(2) +3 >Emitted(55, 16) Source(37, 16) + SourceIndex(2) +4 >Emitted(55, 29) Source(37, 21) + SourceIndex(2) +5 >Emitted(55, 41) Source(37, 33) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -925,9 +963,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 36) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 37) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 37) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 36) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 37) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 37) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -937,9 +975,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 39) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 40) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 40) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 39) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 40) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 40) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -948,15 +986,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 42) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 43) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 43) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 42) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 43) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 43) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 45) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 45) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -970,9 +1008,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -980,8 +1018,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -990,7 +1028,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2846,32 +2884,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 249, - "end": 398, + "end": 429, "kind": "internal" }, { - "pos": 400, - "end": 432, + "pos": 431, + "end": 463, "kind": "text" }, { - "pos": 432, - "end": 944, + "pos": 463, + "end": 975, "kind": "internal" }, { - "pos": 946, - "end": 949, + "pos": 977, + "end": 980, "kind": "text" }, { - "pos": 949, - "end": 1482, + "pos": 980, + "end": 1513, "kind": "internal" }, { - "pos": 1484, - "end": 1532, + "pos": 1515, + "end": 1563, "kind": "text" } ] @@ -3026,18 +3064,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (249-398) +internal: (249-429) /**@internal*/ constructor(); /**@internal*/ prop: string; /**@internal*/ method(): void; - /**@internal*/ /**@internal*/ c: number; + /**@internal*/ get c(): number; + /**@internal*/ set c(val: number); ---------------------------------------------------------------------- -text: (400-432) +text: (431-463) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (432-944) +internal: (463-975) /**@internal*/ class C { } /**@internal*/ function foo(): void; @@ -3058,11 +3097,11 @@ internal: (432-944) c = 2 } ---------------------------------------------------------------------- -text: (946-949) +text: (977-980) } ---------------------------------------------------------------------- -internal: (949-1482) +internal: (980-1513) /**@internal*/ declare class internalC { } /**@internal*/ declare function internalfoo(): void; @@ -3083,7 +3122,7 @@ internal: (949-1482) c = 2 } ---------------------------------------------------------------------- -text: (1484-1532) +text: (1515-1563) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js index e86999f7bf452..ae47b9248255f 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-jsdoc-style-with-comments-emit-enabled.js @@ -29,7 +29,8 @@ declare class normalC { /**@internal*/ constructor(); /**@internal*/ prop: string; /**@internal*/ method(): void; - /**@internal*/ /**@internal*/ c: number; + /**@internal*/ get c(): number; + /**@internal*/ set c(val: number); } declare namespace normalN { /**@internal*/ class C { @@ -77,7 +78,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;IACT,cAAc;IACd,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,MAAM;IACrB,cAAc,gBAAK,CAAC,EACM,MAAM;CACnC;AACD,kBAAU,OAAO,CAAC;IACd,cAAc,CAAC,MAAa,CAAC;KAAI;IACjC,cAAc,CAAC,SAAgB,GAAG,SAAK;IACvC,cAAc,CAAC,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACnE,cAAc,CAAC,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACjF,cAAc,CAAC,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC1D,cAAc,CAAC,KAAY,YAAY,GAAG,SAAS,CAAC;IACpD,cAAc,CAAQ,MAAM,aAAa,KAAK,CAAC;IAC/C,cAAc,CAAC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACD,cAAc,CAAC,cAAM,SAAS;CAAG;AACjC,cAAc,CAAC,iBAAS,WAAW,SAAK;AACxC,cAAc,CAAC,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACxE,cAAc,CAAC,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC9E,cAAc,CAAC,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACnE,cAAc,CAAC,aAAK,YAAY,GAAG,SAAS,CAAC;AAC7C,cAAc,CAAC,QAAA,MAAM,aAAa,KAAK,CAAC;AACxC,cAAc,CAAC,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;IACT,cAAc;IACd,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,MAAM;IACrB,cAAc,CAAC,IAAI,CAAC,IACM,MAAM,CADK;IACrC,cAAc,CAAC,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACxC;AACD,kBAAU,OAAO,CAAC;IACd,cAAc,CAAC,MAAa,CAAC;KAAI;IACjC,cAAc,CAAC,SAAgB,GAAG,SAAK;IACvC,cAAc,CAAC,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACnE,cAAc,CAAC,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IACjF,cAAc,CAAC,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC1D,cAAc,CAAC,KAAY,YAAY,GAAG,SAAS,CAAC;IACpD,cAAc,CAAQ,MAAM,aAAa,KAAK,CAAC;IAC/C,cAAc,CAAC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACtD;AACD,cAAc,CAAC,cAAM,SAAS;CAAG;AACjC,cAAc,CAAC,iBAAS,WAAW,SAAK;AACxC,cAAc,CAAC,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACxE,cAAc,CAAC,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC9E,cAAc,CAAC,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACnE,cAAc,CAAC,aAAK,YAAY,GAAG,SAAS,CAAC;AAC7C,cAAc,CAAC,QAAA,MAAM,aAAa,KAAK,CAAC;AACxC,cAAc,CAAC,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC5C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -194,7 +195,7 @@ sourceFile:../second/second_part1.ts 2 > ^^^^^^^^^^^^^^ 3 > ^ 4 > ^^^^^^ -5 > ^^^^^^^^^^^^^^^^^^^^-> +5 > ^^^^^^^^^^^-> 1-> > 2 > /**@internal*/ @@ -205,34 +206,71 @@ sourceFile:../second/second_part1.ts 3 >Emitted(8, 20) Source(16, 20) + SourceIndex(0) 4 >Emitted(8, 26) Source(16, 26) + SourceIndex(0) --- ->>> /**@internal*/ /**@internal*/ c: number; +>>> /**@internal*/ get c(): number; 1->^^^^ 2 > ^^^^^^^^^^^^^^ -3 > ^^^^^^^^^^^^^^^^ -4 > ^ -5 > ^^ -6 > ^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^^^^ +7 > ^^^^^^ +8 > ^ +9 > ^^^^-> 1->() { } > 2 > /**@internal*/ -3 > get -4 > c -5 > () { return 10; } - > /**@internal*/ set c(val: -6 > number +3 > +4 > get +5 > c +6 > () { return 10; } + > /**@internal*/ set c(val: +7 > number +8 > 1->Emitted(9, 5) Source(17, 5) + SourceIndex(0) 2 >Emitted(9, 19) Source(17, 19) + SourceIndex(0) -3 >Emitted(9, 35) Source(17, 24) + SourceIndex(0) -4 >Emitted(9, 36) Source(17, 25) + SourceIndex(0) -5 >Emitted(9, 38) Source(18, 31) + SourceIndex(0) -6 >Emitted(9, 44) Source(18, 37) + SourceIndex(0) +3 >Emitted(9, 20) Source(17, 20) + SourceIndex(0) +4 >Emitted(9, 24) Source(17, 24) + SourceIndex(0) +5 >Emitted(9, 25) Source(17, 25) + SourceIndex(0) +6 >Emitted(9, 29) Source(18, 31) + SourceIndex(0) +7 >Emitted(9, 35) Source(18, 37) + SourceIndex(0) +8 >Emitted(9, 36) Source(17, 42) + SourceIndex(0) +--- +>>> /**@internal*/ set c(val: number); +1->^^^^ +2 > ^^^^^^^^^^^^^^ +3 > ^ +4 > ^^^^ +5 > ^ +6 > ^ +7 > ^^^^^ +8 > ^^^^^^ +9 > ^^ +1-> + > +2 > /**@internal*/ +3 > +4 > set +5 > c +6 > ( +7 > val: +8 > number +9 > ) { } +1->Emitted(10, 5) Source(18, 5) + SourceIndex(0) +2 >Emitted(10, 19) Source(18, 19) + SourceIndex(0) +3 >Emitted(10, 20) Source(18, 20) + SourceIndex(0) +4 >Emitted(10, 24) Source(18, 24) + SourceIndex(0) +5 >Emitted(10, 25) Source(18, 25) + SourceIndex(0) +6 >Emitted(10, 26) Source(18, 26) + SourceIndex(0) +7 >Emitted(10, 31) Source(18, 31) + SourceIndex(0) +8 >Emitted(10, 37) Source(18, 37) + SourceIndex(0) +9 >Emitted(10, 39) Source(18, 42) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(10, 2) Source(19, 2) + SourceIndex(0) +1 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) --- >>>declare namespace normalN { 1-> @@ -245,10 +283,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) -2 >Emitted(11, 19) Source(20, 11) + SourceIndex(0) -3 >Emitted(11, 26) Source(20, 18) + SourceIndex(0) -4 >Emitted(11, 27) Source(20, 19) + SourceIndex(0) +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 19) Source(20, 11) + SourceIndex(0) +3 >Emitted(12, 26) Source(20, 18) + SourceIndex(0) +4 >Emitted(12, 27) Source(20, 19) + SourceIndex(0) --- >>> /**@internal*/ class C { 1->^^^^ @@ -262,17 +300,17 @@ sourceFile:../second/second_part1.ts 3 > 4 > export class 5 > C -1->Emitted(12, 5) Source(21, 5) + SourceIndex(0) -2 >Emitted(12, 19) Source(21, 19) + SourceIndex(0) -3 >Emitted(12, 20) Source(21, 20) + SourceIndex(0) -4 >Emitted(12, 26) Source(21, 33) + SourceIndex(0) -5 >Emitted(12, 27) Source(21, 34) + SourceIndex(0) +1->Emitted(13, 5) Source(21, 5) + SourceIndex(0) +2 >Emitted(13, 19) Source(21, 19) + SourceIndex(0) +3 >Emitted(13, 20) Source(21, 20) + SourceIndex(0) +4 >Emitted(13, 26) Source(21, 33) + SourceIndex(0) +5 >Emitted(13, 27) Source(21, 34) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(13, 6) Source(21, 38) + SourceIndex(0) +1 >Emitted(14, 6) Source(21, 38) + SourceIndex(0) --- >>> /**@internal*/ function foo(): void; 1->^^^^ @@ -289,12 +327,12 @@ sourceFile:../second/second_part1.ts 4 > export function 5 > foo 6 > () {} -1->Emitted(14, 5) Source(22, 5) + SourceIndex(0) -2 >Emitted(14, 19) Source(22, 19) + SourceIndex(0) -3 >Emitted(14, 20) Source(22, 20) + SourceIndex(0) -4 >Emitted(14, 29) Source(22, 36) + SourceIndex(0) -5 >Emitted(14, 32) Source(22, 39) + SourceIndex(0) -6 >Emitted(14, 41) Source(22, 44) + SourceIndex(0) +1->Emitted(15, 5) Source(22, 5) + SourceIndex(0) +2 >Emitted(15, 19) Source(22, 19) + SourceIndex(0) +3 >Emitted(15, 20) Source(22, 20) + SourceIndex(0) +4 >Emitted(15, 29) Source(22, 36) + SourceIndex(0) +5 >Emitted(15, 32) Source(22, 39) + SourceIndex(0) +6 >Emitted(15, 41) Source(22, 44) + SourceIndex(0) --- >>> /**@internal*/ namespace someNamespace { 1->^^^^ @@ -310,12 +348,12 @@ sourceFile:../second/second_part1.ts 4 > export namespace 5 > someNamespace 6 > -1->Emitted(15, 5) Source(23, 5) + SourceIndex(0) -2 >Emitted(15, 19) Source(23, 19) + SourceIndex(0) -3 >Emitted(15, 20) Source(23, 20) + SourceIndex(0) -4 >Emitted(15, 30) Source(23, 37) + SourceIndex(0) -5 >Emitted(15, 43) Source(23, 50) + SourceIndex(0) -6 >Emitted(15, 44) Source(23, 51) + SourceIndex(0) +1->Emitted(16, 5) Source(23, 5) + SourceIndex(0) +2 >Emitted(16, 19) Source(23, 19) + SourceIndex(0) +3 >Emitted(16, 20) Source(23, 20) + SourceIndex(0) +4 >Emitted(16, 30) Source(23, 37) + SourceIndex(0) +5 >Emitted(16, 43) Source(23, 50) + SourceIndex(0) +6 >Emitted(16, 44) Source(23, 51) + SourceIndex(0) --- >>> class C { 1 >^^^^^^^^ @@ -324,20 +362,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(16, 9) Source(23, 53) + SourceIndex(0) -2 >Emitted(16, 15) Source(23, 66) + SourceIndex(0) -3 >Emitted(16, 16) Source(23, 67) + SourceIndex(0) +1 >Emitted(17, 9) Source(23, 53) + SourceIndex(0) +2 >Emitted(17, 15) Source(23, 66) + SourceIndex(0) +3 >Emitted(17, 16) Source(23, 67) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(17, 10) Source(23, 70) + SourceIndex(0) +1 >Emitted(18, 10) Source(23, 70) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(18, 6) Source(23, 72) + SourceIndex(0) +1 >Emitted(19, 6) Source(23, 72) + SourceIndex(0) --- >>> /**@internal*/ namespace someOther.something { 1->^^^^ @@ -357,14 +395,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > something 8 > -1->Emitted(19, 5) Source(24, 5) + SourceIndex(0) -2 >Emitted(19, 19) Source(24, 19) + SourceIndex(0) -3 >Emitted(19, 20) Source(24, 20) + SourceIndex(0) -4 >Emitted(19, 30) Source(24, 37) + SourceIndex(0) -5 >Emitted(19, 39) Source(24, 46) + SourceIndex(0) -6 >Emitted(19, 40) Source(24, 47) + SourceIndex(0) -7 >Emitted(19, 49) Source(24, 56) + SourceIndex(0) -8 >Emitted(19, 50) Source(24, 57) + SourceIndex(0) +1->Emitted(20, 5) Source(24, 5) + SourceIndex(0) +2 >Emitted(20, 19) Source(24, 19) + SourceIndex(0) +3 >Emitted(20, 20) Source(24, 20) + SourceIndex(0) +4 >Emitted(20, 30) Source(24, 37) + SourceIndex(0) +5 >Emitted(20, 39) Source(24, 46) + SourceIndex(0) +6 >Emitted(20, 40) Source(24, 47) + SourceIndex(0) +7 >Emitted(20, 49) Source(24, 56) + SourceIndex(0) +8 >Emitted(20, 50) Source(24, 57) + SourceIndex(0) --- >>> class someClass { 1 >^^^^^^^^ @@ -373,20 +411,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(20, 9) Source(24, 59) + SourceIndex(0) -2 >Emitted(20, 15) Source(24, 72) + SourceIndex(0) -3 >Emitted(20, 24) Source(24, 81) + SourceIndex(0) +1 >Emitted(21, 9) Source(24, 59) + SourceIndex(0) +2 >Emitted(21, 15) Source(24, 72) + SourceIndex(0) +3 >Emitted(21, 24) Source(24, 81) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(21, 10) Source(24, 84) + SourceIndex(0) +1 >Emitted(22, 10) Source(24, 84) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(22, 6) Source(24, 86) + SourceIndex(0) +1 >Emitted(23, 6) Source(24, 86) + SourceIndex(0) --- >>> /**@internal*/ export import someImport = someNamespace.C; 1->^^^^ @@ -412,17 +450,17 @@ sourceFile:../second/second_part1.ts 9 > . 10> C 11> ; -1->Emitted(23, 5) Source(25, 5) + SourceIndex(0) -2 >Emitted(23, 19) Source(25, 19) + SourceIndex(0) -3 >Emitted(23, 20) Source(25, 20) + SourceIndex(0) -4 >Emitted(23, 26) Source(25, 26) + SourceIndex(0) -5 >Emitted(23, 34) Source(25, 34) + SourceIndex(0) -6 >Emitted(23, 44) Source(25, 44) + SourceIndex(0) -7 >Emitted(23, 47) Source(25, 47) + SourceIndex(0) -8 >Emitted(23, 60) Source(25, 60) + SourceIndex(0) -9 >Emitted(23, 61) Source(25, 61) + SourceIndex(0) -10>Emitted(23, 62) Source(25, 62) + SourceIndex(0) -11>Emitted(23, 63) Source(25, 63) + SourceIndex(0) +1->Emitted(24, 5) Source(25, 5) + SourceIndex(0) +2 >Emitted(24, 19) Source(25, 19) + SourceIndex(0) +3 >Emitted(24, 20) Source(25, 20) + SourceIndex(0) +4 >Emitted(24, 26) Source(25, 26) + SourceIndex(0) +5 >Emitted(24, 34) Source(25, 34) + SourceIndex(0) +6 >Emitted(24, 44) Source(25, 44) + SourceIndex(0) +7 >Emitted(24, 47) Source(25, 47) + SourceIndex(0) +8 >Emitted(24, 60) Source(25, 60) + SourceIndex(0) +9 >Emitted(24, 61) Source(25, 61) + SourceIndex(0) +10>Emitted(24, 62) Source(25, 62) + SourceIndex(0) +11>Emitted(24, 63) Source(25, 63) + SourceIndex(0) --- >>> /**@internal*/ type internalType = internalC; 1 >^^^^ @@ -442,14 +480,14 @@ sourceFile:../second/second_part1.ts 6 > = 7 > internalC 8 > ; -1 >Emitted(24, 5) Source(26, 5) + SourceIndex(0) -2 >Emitted(24, 19) Source(26, 19) + SourceIndex(0) -3 >Emitted(24, 20) Source(26, 20) + SourceIndex(0) -4 >Emitted(24, 25) Source(26, 32) + SourceIndex(0) -5 >Emitted(24, 37) Source(26, 44) + SourceIndex(0) -6 >Emitted(24, 40) Source(26, 47) + SourceIndex(0) -7 >Emitted(24, 49) Source(26, 56) + SourceIndex(0) -8 >Emitted(24, 50) Source(26, 57) + SourceIndex(0) +1 >Emitted(25, 5) Source(26, 5) + SourceIndex(0) +2 >Emitted(25, 19) Source(26, 19) + SourceIndex(0) +3 >Emitted(25, 20) Source(26, 20) + SourceIndex(0) +4 >Emitted(25, 25) Source(26, 32) + SourceIndex(0) +5 >Emitted(25, 37) Source(26, 44) + SourceIndex(0) +6 >Emitted(25, 40) Source(26, 47) + SourceIndex(0) +7 >Emitted(25, 49) Source(26, 56) + SourceIndex(0) +8 >Emitted(25, 50) Source(26, 57) + SourceIndex(0) --- >>> /**@internal*/ const internalConst = 10; 1 >^^^^ @@ -467,13 +505,13 @@ sourceFile:../second/second_part1.ts 5 > internalConst 6 > = 10 7 > ; -1 >Emitted(25, 5) Source(27, 5) + SourceIndex(0) -2 >Emitted(25, 19) Source(27, 19) + SourceIndex(0) -3 >Emitted(25, 20) Source(27, 27) + SourceIndex(0) -4 >Emitted(25, 26) Source(27, 33) + SourceIndex(0) -5 >Emitted(25, 39) Source(27, 46) + SourceIndex(0) -6 >Emitted(25, 44) Source(27, 51) + SourceIndex(0) -7 >Emitted(25, 45) Source(27, 52) + SourceIndex(0) +1 >Emitted(26, 5) Source(27, 5) + SourceIndex(0) +2 >Emitted(26, 19) Source(27, 19) + SourceIndex(0) +3 >Emitted(26, 20) Source(27, 27) + SourceIndex(0) +4 >Emitted(26, 26) Source(27, 33) + SourceIndex(0) +5 >Emitted(26, 39) Source(27, 46) + SourceIndex(0) +6 >Emitted(26, 44) Source(27, 51) + SourceIndex(0) +7 >Emitted(26, 45) Source(27, 52) + SourceIndex(0) --- >>> /**@internal*/ enum internalEnum { 1 >^^^^ @@ -487,11 +525,11 @@ sourceFile:../second/second_part1.ts 3 > 4 > export enum 5 > internalEnum -1 >Emitted(26, 5) Source(28, 5) + SourceIndex(0) -2 >Emitted(26, 19) Source(28, 19) + SourceIndex(0) -3 >Emitted(26, 20) Source(28, 20) + SourceIndex(0) -4 >Emitted(26, 25) Source(28, 32) + SourceIndex(0) -5 >Emitted(26, 37) Source(28, 44) + SourceIndex(0) +1 >Emitted(27, 5) Source(28, 5) + SourceIndex(0) +2 >Emitted(27, 19) Source(28, 19) + SourceIndex(0) +3 >Emitted(27, 20) Source(28, 20) + SourceIndex(0) +4 >Emitted(27, 25) Source(28, 32) + SourceIndex(0) +5 >Emitted(27, 37) Source(28, 44) + SourceIndex(0) --- >>> a = 0, 1 >^^^^^^^^ @@ -501,9 +539,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(27, 9) Source(28, 47) + SourceIndex(0) -2 >Emitted(27, 10) Source(28, 48) + SourceIndex(0) -3 >Emitted(27, 14) Source(28, 48) + SourceIndex(0) +1 >Emitted(28, 9) Source(28, 47) + SourceIndex(0) +2 >Emitted(28, 10) Source(28, 48) + SourceIndex(0) +3 >Emitted(28, 14) Source(28, 48) + SourceIndex(0) --- >>> b = 1, 1->^^^^^^^^ @@ -513,9 +551,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(28, 9) Source(28, 50) + SourceIndex(0) -2 >Emitted(28, 10) Source(28, 51) + SourceIndex(0) -3 >Emitted(28, 14) Source(28, 51) + SourceIndex(0) +1->Emitted(29, 9) Source(28, 50) + SourceIndex(0) +2 >Emitted(29, 10) Source(28, 51) + SourceIndex(0) +3 >Emitted(29, 14) Source(28, 51) + SourceIndex(0) --- >>> c = 2 1->^^^^^^^^ @@ -524,21 +562,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(29, 9) Source(28, 53) + SourceIndex(0) -2 >Emitted(29, 10) Source(28, 54) + SourceIndex(0) -3 >Emitted(29, 14) Source(28, 54) + SourceIndex(0) +1->Emitted(30, 9) Source(28, 53) + SourceIndex(0) +2 >Emitted(30, 10) Source(28, 54) + SourceIndex(0) +3 >Emitted(30, 14) Source(28, 54) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(30, 6) Source(28, 56) + SourceIndex(0) +1 >Emitted(31, 6) Source(28, 56) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(31, 2) Source(29, 2) + SourceIndex(0) +1 >Emitted(32, 2) Source(29, 2) + SourceIndex(0) --- >>>/**@internal*/ declare class internalC { 1-> @@ -552,17 +590,17 @@ sourceFile:../second/second_part1.ts 3 > 4 > class 5 > internalC -1->Emitted(32, 1) Source(30, 1) + SourceIndex(0) -2 >Emitted(32, 15) Source(30, 15) + SourceIndex(0) -3 >Emitted(32, 16) Source(30, 16) + SourceIndex(0) -4 >Emitted(32, 30) Source(30, 22) + SourceIndex(0) -5 >Emitted(32, 39) Source(30, 31) + SourceIndex(0) +1->Emitted(33, 1) Source(30, 1) + SourceIndex(0) +2 >Emitted(33, 15) Source(30, 15) + SourceIndex(0) +3 >Emitted(33, 16) Source(30, 16) + SourceIndex(0) +4 >Emitted(33, 30) Source(30, 22) + SourceIndex(0) +5 >Emitted(33, 39) Source(30, 31) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(33, 2) Source(30, 34) + SourceIndex(0) +1 >Emitted(34, 2) Source(30, 34) + SourceIndex(0) --- >>>/**@internal*/ declare function internalfoo(): void; 1-> @@ -579,12 +617,12 @@ sourceFile:../second/second_part1.ts 4 > function 5 > internalfoo 6 > () {} -1->Emitted(34, 1) Source(31, 1) + SourceIndex(0) -2 >Emitted(34, 15) Source(31, 15) + SourceIndex(0) -3 >Emitted(34, 16) Source(31, 16) + SourceIndex(0) -4 >Emitted(34, 33) Source(31, 25) + SourceIndex(0) -5 >Emitted(34, 44) Source(31, 36) + SourceIndex(0) -6 >Emitted(34, 53) Source(31, 41) + SourceIndex(0) +1->Emitted(35, 1) Source(31, 1) + SourceIndex(0) +2 >Emitted(35, 15) Source(31, 15) + SourceIndex(0) +3 >Emitted(35, 16) Source(31, 16) + SourceIndex(0) +4 >Emitted(35, 33) Source(31, 25) + SourceIndex(0) +5 >Emitted(35, 44) Source(31, 36) + SourceIndex(0) +6 >Emitted(35, 53) Source(31, 41) + SourceIndex(0) --- >>>/**@internal*/ declare namespace internalNamespace { 1-> @@ -600,12 +638,12 @@ sourceFile:../second/second_part1.ts 4 > namespace 5 > internalNamespace 6 > -1->Emitted(35, 1) Source(32, 1) + SourceIndex(0) -2 >Emitted(35, 15) Source(32, 15) + SourceIndex(0) -3 >Emitted(35, 16) Source(32, 16) + SourceIndex(0) -4 >Emitted(35, 34) Source(32, 26) + SourceIndex(0) -5 >Emitted(35, 51) Source(32, 43) + SourceIndex(0) -6 >Emitted(35, 52) Source(32, 44) + SourceIndex(0) +1->Emitted(36, 1) Source(32, 1) + SourceIndex(0) +2 >Emitted(36, 15) Source(32, 15) + SourceIndex(0) +3 >Emitted(36, 16) Source(32, 16) + SourceIndex(0) +4 >Emitted(36, 34) Source(32, 26) + SourceIndex(0) +5 >Emitted(36, 51) Source(32, 43) + SourceIndex(0) +6 >Emitted(36, 52) Source(32, 44) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -614,20 +652,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(36, 5) Source(32, 46) + SourceIndex(0) -2 >Emitted(36, 11) Source(32, 59) + SourceIndex(0) -3 >Emitted(36, 20) Source(32, 68) + SourceIndex(0) +1 >Emitted(37, 5) Source(32, 46) + SourceIndex(0) +2 >Emitted(37, 11) Source(32, 59) + SourceIndex(0) +3 >Emitted(37, 20) Source(32, 68) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(37, 6) Source(32, 71) + SourceIndex(0) +1 >Emitted(38, 6) Source(32, 71) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(38, 2) Source(32, 73) + SourceIndex(0) +1 >Emitted(39, 2) Source(32, 73) + SourceIndex(0) --- >>>/**@internal*/ declare namespace internalOther.something { 1-> @@ -647,14 +685,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > something 8 > -1->Emitted(39, 1) Source(33, 1) + SourceIndex(0) -2 >Emitted(39, 15) Source(33, 15) + SourceIndex(0) -3 >Emitted(39, 16) Source(33, 16) + SourceIndex(0) -4 >Emitted(39, 34) Source(33, 26) + SourceIndex(0) -5 >Emitted(39, 47) Source(33, 39) + SourceIndex(0) -6 >Emitted(39, 48) Source(33, 40) + SourceIndex(0) -7 >Emitted(39, 57) Source(33, 49) + SourceIndex(0) -8 >Emitted(39, 58) Source(33, 50) + SourceIndex(0) +1->Emitted(40, 1) Source(33, 1) + SourceIndex(0) +2 >Emitted(40, 15) Source(33, 15) + SourceIndex(0) +3 >Emitted(40, 16) Source(33, 16) + SourceIndex(0) +4 >Emitted(40, 34) Source(33, 26) + SourceIndex(0) +5 >Emitted(40, 47) Source(33, 39) + SourceIndex(0) +6 >Emitted(40, 48) Source(33, 40) + SourceIndex(0) +7 >Emitted(40, 57) Source(33, 49) + SourceIndex(0) +8 >Emitted(40, 58) Source(33, 50) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -663,20 +701,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(40, 5) Source(33, 52) + SourceIndex(0) -2 >Emitted(40, 11) Source(33, 65) + SourceIndex(0) -3 >Emitted(40, 20) Source(33, 74) + SourceIndex(0) +1 >Emitted(41, 5) Source(33, 52) + SourceIndex(0) +2 >Emitted(41, 11) Source(33, 65) + SourceIndex(0) +3 >Emitted(41, 20) Source(33, 74) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(41, 6) Source(33, 77) + SourceIndex(0) +1 >Emitted(42, 6) Source(33, 77) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(42, 2) Source(33, 79) + SourceIndex(0) +1 >Emitted(43, 2) Source(33, 79) + SourceIndex(0) --- >>>/**@internal*/ import internalImport = internalNamespace.someClass; 1-> @@ -700,16 +738,16 @@ sourceFile:../second/second_part1.ts 8 > . 9 > someClass 10> ; -1->Emitted(43, 1) Source(34, 1) + SourceIndex(0) -2 >Emitted(43, 15) Source(34, 15) + SourceIndex(0) -3 >Emitted(43, 16) Source(34, 16) + SourceIndex(0) -4 >Emitted(43, 23) Source(34, 23) + SourceIndex(0) -5 >Emitted(43, 37) Source(34, 37) + SourceIndex(0) -6 >Emitted(43, 40) Source(34, 40) + SourceIndex(0) -7 >Emitted(43, 57) Source(34, 57) + SourceIndex(0) -8 >Emitted(43, 58) Source(34, 58) + SourceIndex(0) -9 >Emitted(43, 67) Source(34, 67) + SourceIndex(0) -10>Emitted(43, 68) Source(34, 68) + SourceIndex(0) +1->Emitted(44, 1) Source(34, 1) + SourceIndex(0) +2 >Emitted(44, 15) Source(34, 15) + SourceIndex(0) +3 >Emitted(44, 16) Source(34, 16) + SourceIndex(0) +4 >Emitted(44, 23) Source(34, 23) + SourceIndex(0) +5 >Emitted(44, 37) Source(34, 37) + SourceIndex(0) +6 >Emitted(44, 40) Source(34, 40) + SourceIndex(0) +7 >Emitted(44, 57) Source(34, 57) + SourceIndex(0) +8 >Emitted(44, 58) Source(34, 58) + SourceIndex(0) +9 >Emitted(44, 67) Source(34, 67) + SourceIndex(0) +10>Emitted(44, 68) Source(34, 68) + SourceIndex(0) --- >>>/**@internal*/ declare type internalType = internalC; 1 > @@ -729,14 +767,14 @@ sourceFile:../second/second_part1.ts 6 > = 7 > internalC 8 > ; -1 >Emitted(44, 1) Source(35, 1) + SourceIndex(0) -2 >Emitted(44, 15) Source(35, 15) + SourceIndex(0) -3 >Emitted(44, 16) Source(35, 16) + SourceIndex(0) -4 >Emitted(44, 29) Source(35, 21) + SourceIndex(0) -5 >Emitted(44, 41) Source(35, 33) + SourceIndex(0) -6 >Emitted(44, 44) Source(35, 36) + SourceIndex(0) -7 >Emitted(44, 53) Source(35, 45) + SourceIndex(0) -8 >Emitted(44, 54) Source(35, 46) + SourceIndex(0) +1 >Emitted(45, 1) Source(35, 1) + SourceIndex(0) +2 >Emitted(45, 15) Source(35, 15) + SourceIndex(0) +3 >Emitted(45, 16) Source(35, 16) + SourceIndex(0) +4 >Emitted(45, 29) Source(35, 21) + SourceIndex(0) +5 >Emitted(45, 41) Source(35, 33) + SourceIndex(0) +6 >Emitted(45, 44) Source(35, 36) + SourceIndex(0) +7 >Emitted(45, 53) Source(35, 45) + SourceIndex(0) +8 >Emitted(45, 54) Source(35, 46) + SourceIndex(0) --- >>>/**@internal*/ declare const internalConst = 10; 1 > @@ -756,14 +794,14 @@ sourceFile:../second/second_part1.ts 6 > internalConst 7 > = 10 8 > ; -1 >Emitted(45, 1) Source(36, 1) + SourceIndex(0) -2 >Emitted(45, 15) Source(36, 15) + SourceIndex(0) -3 >Emitted(45, 16) Source(36, 16) + SourceIndex(0) -4 >Emitted(45, 24) Source(36, 16) + SourceIndex(0) -5 >Emitted(45, 30) Source(36, 22) + SourceIndex(0) -6 >Emitted(45, 43) Source(36, 35) + SourceIndex(0) -7 >Emitted(45, 48) Source(36, 40) + SourceIndex(0) -8 >Emitted(45, 49) Source(36, 41) + SourceIndex(0) +1 >Emitted(46, 1) Source(36, 1) + SourceIndex(0) +2 >Emitted(46, 15) Source(36, 15) + SourceIndex(0) +3 >Emitted(46, 16) Source(36, 16) + SourceIndex(0) +4 >Emitted(46, 24) Source(36, 16) + SourceIndex(0) +5 >Emitted(46, 30) Source(36, 22) + SourceIndex(0) +6 >Emitted(46, 43) Source(36, 35) + SourceIndex(0) +7 >Emitted(46, 48) Source(36, 40) + SourceIndex(0) +8 >Emitted(46, 49) Source(36, 41) + SourceIndex(0) --- >>>/**@internal*/ declare enum internalEnum { 1 > @@ -777,11 +815,11 @@ sourceFile:../second/second_part1.ts 3 > 4 > enum 5 > internalEnum -1 >Emitted(46, 1) Source(37, 1) + SourceIndex(0) -2 >Emitted(46, 15) Source(37, 15) + SourceIndex(0) -3 >Emitted(46, 16) Source(37, 16) + SourceIndex(0) -4 >Emitted(46, 29) Source(37, 21) + SourceIndex(0) -5 >Emitted(46, 41) Source(37, 33) + SourceIndex(0) +1 >Emitted(47, 1) Source(37, 1) + SourceIndex(0) +2 >Emitted(47, 15) Source(37, 15) + SourceIndex(0) +3 >Emitted(47, 16) Source(37, 16) + SourceIndex(0) +4 >Emitted(47, 29) Source(37, 21) + SourceIndex(0) +5 >Emitted(47, 41) Source(37, 33) + SourceIndex(0) --- >>> a = 0, 1 >^^^^ @@ -791,9 +829,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(47, 5) Source(37, 36) + SourceIndex(0) -2 >Emitted(47, 6) Source(37, 37) + SourceIndex(0) -3 >Emitted(47, 10) Source(37, 37) + SourceIndex(0) +1 >Emitted(48, 5) Source(37, 36) + SourceIndex(0) +2 >Emitted(48, 6) Source(37, 37) + SourceIndex(0) +3 >Emitted(48, 10) Source(37, 37) + SourceIndex(0) --- >>> b = 1, 1->^^^^ @@ -803,9 +841,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(48, 5) Source(37, 39) + SourceIndex(0) -2 >Emitted(48, 6) Source(37, 40) + SourceIndex(0) -3 >Emitted(48, 10) Source(37, 40) + SourceIndex(0) +1->Emitted(49, 5) Source(37, 39) + SourceIndex(0) +2 >Emitted(49, 6) Source(37, 40) + SourceIndex(0) +3 >Emitted(49, 10) Source(37, 40) + SourceIndex(0) --- >>> c = 2 1->^^^^ @@ -814,15 +852,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(49, 5) Source(37, 42) + SourceIndex(0) -2 >Emitted(49, 6) Source(37, 43) + SourceIndex(0) -3 >Emitted(49, 10) Source(37, 43) + SourceIndex(0) +1->Emitted(50, 5) Source(37, 42) + SourceIndex(0) +2 >Emitted(50, 6) Source(37, 43) + SourceIndex(0) +3 >Emitted(50, 10) Source(37, 43) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(37, 45) + SourceIndex(0) +1 >Emitted(51, 2) Source(37, 45) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -836,9 +874,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(51, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(51, 15) Source(1, 7) + SourceIndex(1) -3 >Emitted(51, 16) Source(1, 8) + SourceIndex(1) +1->Emitted(52, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(52, 15) Source(1, 7) + SourceIndex(1) +3 >Emitted(52, 16) Source(1, 8) + SourceIndex(1) --- >>> doSomething(): void; 1->^^^^ @@ -846,8 +884,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(52, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(52, 16) Source(2, 16) + SourceIndex(1) +1->Emitted(53, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(53, 16) Source(2, 16) + SourceIndex(1) --- >>>} 1 >^ @@ -856,7 +894,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(53, 2) Source(5, 2) + SourceIndex(1) +1 >Emitted(54, 2) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2540,32 +2578,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 77, - "end": 226, + "end": 257, "kind": "internal" }, { - "pos": 228, - "end": 260, + "pos": 259, + "end": 291, "kind": "text" }, { - "pos": 260, - "end": 772, + "pos": 291, + "end": 803, "kind": "internal" }, { - "pos": 774, - "end": 777, + "pos": 805, + "end": 808, "kind": "text" }, { - "pos": 777, - "end": 1310, + "pos": 808, + "end": 1341, "kind": "internal" }, { - "pos": 1312, - "end": 1360, + "pos": 1343, + "end": 1391, "kind": "text" } ] @@ -2694,18 +2732,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (77-226) +internal: (77-257) /**@internal*/ constructor(); /**@internal*/ prop: string; /**@internal*/ method(): void; - /**@internal*/ /**@internal*/ c: number; + /**@internal*/ get c(): number; + /**@internal*/ set c(val: number); ---------------------------------------------------------------------- -text: (228-260) +text: (259-291) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (260-772) +internal: (291-803) /**@internal*/ class C { } /**@internal*/ function foo(): void; @@ -2726,11 +2765,11 @@ internal: (260-772) c = 2 } ---------------------------------------------------------------------- -text: (774-777) +text: (805-808) } ---------------------------------------------------------------------- -internal: (777-1310) +internal: (808-1341) /**@internal*/ declare class internalC { } /**@internal*/ declare function internalfoo(): void; @@ -2751,7 +2790,7 @@ internal: (777-1310) c = 2 } ---------------------------------------------------------------------- -text: (1312-1360) +text: (1343-1391) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js index a858a1e27d8a9..360d2c392a278 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-when-one-two-three-are-prepended-in-order.js @@ -57,7 +57,8 @@ declare class normalC { constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -105,7 +106,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -325,35 +326,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 19) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 25) + SourceIndex(2) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(17, 5) Source(17, 23) + SourceIndex(2) -2 >Emitted(17, 6) Source(17, 24) + SourceIndex(2) -3 >Emitted(17, 8) Source(18, 30) + SourceIndex(2) -4 >Emitted(17, 14) Source(18, 36) + SourceIndex(2) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 19) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 23) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 24) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 30) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 36) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 41) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 19) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 23) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 24) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 25) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 30) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 36) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 41) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -365,10 +397,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -378,15 +410,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 19) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 32) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 33) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 19) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 32) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 33) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 37) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 37) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -399,10 +431,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 19) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 35) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 38) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 43) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 19) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 35) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 38) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 43) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -414,10 +446,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 19) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 36) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 49) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 50) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 19) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 36) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 49) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 50) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -426,20 +458,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 52) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 65) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 66) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 52) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 65) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 66) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 69) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 69) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 71) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 71) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -455,12 +487,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 19) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 36) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 45) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 46) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 55) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 56) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 19) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 36) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 45) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 46) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 55) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 56) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -469,20 +501,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 58) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 71) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 80) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 58) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 71) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 80) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 83) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 83) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 85) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 85) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -504,15 +536,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 19) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 25) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 33) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 43) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 46) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 59) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 60) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 61) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 62) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 19) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 25) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 33) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 43) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 46) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 59) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 60) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 61) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 62) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -528,12 +560,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 19) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 31) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 43) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 46) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 55) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 56) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 19) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 31) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 43) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 46) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 55) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 56) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -547,11 +579,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 26) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 32) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 45) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 50) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 51) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 26) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 32) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 45) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 50) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 51) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -561,9 +593,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 19) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 31) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 43) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 19) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 31) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 43) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -573,9 +605,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 46) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 47) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 47) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 46) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 47) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 47) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -585,9 +617,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 49) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 50) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 50) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 49) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 50) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 50) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -596,21 +628,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 52) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 53) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 53) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 52) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 53) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 53) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 55) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 55) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -620,15 +652,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 15) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 21) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 30) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 15) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 21) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 30) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 33) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 33) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -641,10 +673,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 15) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 24) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 35) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 40) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 15) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 24) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 35) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 40) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -656,10 +688,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 15) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 25) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 42) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 43) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 15) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 25) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 42) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 43) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -668,20 +700,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 45) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 58) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 67) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 45) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 58) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 67) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 70) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 70) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 72) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 72) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -697,12 +729,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 15) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 25) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 38) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 39) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 48) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 49) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 15) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 25) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 38) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 39) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 48) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 49) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -711,20 +743,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 51) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 64) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 73) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 51) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 64) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 73) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 76) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 76) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 78) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 78) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -744,14 +776,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 15) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 22) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 36) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 39) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 56) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 57) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 66) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 67) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 15) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 22) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 36) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 39) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 56) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 57) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 66) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 67) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -767,12 +799,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 15) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 20) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 32) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 35) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 44) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 45) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 15) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 20) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 32) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 35) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 44) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 45) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -788,12 +820,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 15) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 21) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 34) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 39) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 40) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 15) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 21) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 34) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 39) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 40) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -803,9 +835,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 15) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 20) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 32) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 15) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 20) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 32) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -815,9 +847,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 35) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 36) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 36) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 35) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 36) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 36) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -827,9 +859,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 38) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 39) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 39) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 38) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 39) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 39) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -838,15 +870,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 41) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 42) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 42) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 41) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 42) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 44) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 44) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -860,9 +892,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -870,8 +902,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -880,7 +912,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2636,32 +2668,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 308, + "end": 339, "kind": "internal" }, { - "pos": 310, - "end": 342, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 342, - "end": 734, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 736, - "end": 739, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 739, - "end": 1152, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1154, - "end": 1202, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -2816,18 +2848,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-308) +internal: (234-339) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (310-342) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (342-734) +internal: (373-765) class C { } function foo(): void; @@ -2848,11 +2881,11 @@ internal: (342-734) c = 2 } ---------------------------------------------------------------------- -text: (736-739) +text: (767-770) } ---------------------------------------------------------------------- -internal: (739-1152) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2873,7 +2906,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1154-1202) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js index fa4c05b80fe0e..b9106767cea94 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled-when-one-two-three-are-prepended-in-order.js @@ -37,7 +37,8 @@ declare class normalC { constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -85,7 +86,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;kBACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../first/first_PART1.ts","../first/first_part3.ts","../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAc,UAAU,QAAQ;IAC5B,IAAI,EAAE,GAAG,CAAC;CACb;AAED,QAAA,MAAM,CAAC,iBAAiB,CAAC;AAEzB,UAAU,iBAAiB;IACvB,IAAI,EAAE,GAAG,CAAC;CACb;ACRD,iBAAS,CAAC,WAET;ACFD,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -305,35 +306,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(16, 5) Source(16, 19) + SourceIndex(2) 2 >Emitted(16, 11) Source(16, 25) + SourceIndex(2) --- ->>> /*@internal*/ c: number; -1->^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +>>> get c(): number; +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(17, 19) Source(17, 23) + SourceIndex(2) -2 >Emitted(17, 20) Source(17, 24) + SourceIndex(2) -3 >Emitted(17, 22) Source(18, 30) + SourceIndex(2) -4 >Emitted(17, 28) Source(18, 36) + SourceIndex(2) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(17, 5) Source(17, 19) + SourceIndex(2) +2 >Emitted(17, 9) Source(17, 23) + SourceIndex(2) +3 >Emitted(17, 10) Source(17, 24) + SourceIndex(2) +4 >Emitted(17, 14) Source(18, 30) + SourceIndex(2) +5 >Emitted(17, 20) Source(18, 36) + SourceIndex(2) +6 >Emitted(17, 21) Source(17, 41) + SourceIndex(2) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(18, 5) Source(18, 19) + SourceIndex(2) +2 >Emitted(18, 9) Source(18, 23) + SourceIndex(2) +3 >Emitted(18, 10) Source(18, 24) + SourceIndex(2) +4 >Emitted(18, 11) Source(18, 25) + SourceIndex(2) +5 >Emitted(18, 16) Source(18, 30) + SourceIndex(2) +6 >Emitted(18, 22) Source(18, 36) + SourceIndex(2) +7 >Emitted(18, 24) Source(18, 41) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(18, 2) Source(19, 2) + SourceIndex(2) +1 >Emitted(19, 2) Source(19, 2) + SourceIndex(2) --- >>>declare namespace normalN { 1-> @@ -345,10 +377,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(19, 1) Source(20, 1) + SourceIndex(2) -2 >Emitted(19, 19) Source(20, 11) + SourceIndex(2) -3 >Emitted(19, 26) Source(20, 18) + SourceIndex(2) -4 >Emitted(19, 27) Source(20, 19) + SourceIndex(2) +1->Emitted(20, 1) Source(20, 1) + SourceIndex(2) +2 >Emitted(20, 19) Source(20, 11) + SourceIndex(2) +3 >Emitted(20, 26) Source(20, 18) + SourceIndex(2) +4 >Emitted(20, 27) Source(20, 19) + SourceIndex(2) --- >>> class C { 1 >^^^^ @@ -358,15 +390,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(20, 5) Source(21, 19) + SourceIndex(2) -2 >Emitted(20, 11) Source(21, 32) + SourceIndex(2) -3 >Emitted(20, 12) Source(21, 33) + SourceIndex(2) +1 >Emitted(21, 5) Source(21, 19) + SourceIndex(2) +2 >Emitted(21, 11) Source(21, 32) + SourceIndex(2) +3 >Emitted(21, 12) Source(21, 33) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(21, 6) Source(21, 37) + SourceIndex(2) +1 >Emitted(22, 6) Source(21, 37) + SourceIndex(2) --- >>> function foo(): void; 1->^^^^ @@ -379,10 +411,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(22, 5) Source(22, 19) + SourceIndex(2) -2 >Emitted(22, 14) Source(22, 35) + SourceIndex(2) -3 >Emitted(22, 17) Source(22, 38) + SourceIndex(2) -4 >Emitted(22, 26) Source(22, 43) + SourceIndex(2) +1->Emitted(23, 5) Source(22, 19) + SourceIndex(2) +2 >Emitted(23, 14) Source(22, 35) + SourceIndex(2) +3 >Emitted(23, 17) Source(22, 38) + SourceIndex(2) +4 >Emitted(23, 26) Source(22, 43) + SourceIndex(2) --- >>> namespace someNamespace { 1->^^^^ @@ -394,10 +426,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(23, 5) Source(23, 19) + SourceIndex(2) -2 >Emitted(23, 15) Source(23, 36) + SourceIndex(2) -3 >Emitted(23, 28) Source(23, 49) + SourceIndex(2) -4 >Emitted(23, 29) Source(23, 50) + SourceIndex(2) +1->Emitted(24, 5) Source(23, 19) + SourceIndex(2) +2 >Emitted(24, 15) Source(23, 36) + SourceIndex(2) +3 >Emitted(24, 28) Source(23, 49) + SourceIndex(2) +4 >Emitted(24, 29) Source(23, 50) + SourceIndex(2) --- >>> class C { 1 >^^^^^^^^ @@ -406,20 +438,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(24, 9) Source(23, 52) + SourceIndex(2) -2 >Emitted(24, 15) Source(23, 65) + SourceIndex(2) -3 >Emitted(24, 16) Source(23, 66) + SourceIndex(2) +1 >Emitted(25, 9) Source(23, 52) + SourceIndex(2) +2 >Emitted(25, 15) Source(23, 65) + SourceIndex(2) +3 >Emitted(25, 16) Source(23, 66) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(25, 10) Source(23, 69) + SourceIndex(2) +1 >Emitted(26, 10) Source(23, 69) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(26, 6) Source(23, 71) + SourceIndex(2) +1 >Emitted(27, 6) Source(23, 71) + SourceIndex(2) --- >>> namespace someOther.something { 1->^^^^ @@ -435,12 +467,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(27, 5) Source(24, 19) + SourceIndex(2) -2 >Emitted(27, 15) Source(24, 36) + SourceIndex(2) -3 >Emitted(27, 24) Source(24, 45) + SourceIndex(2) -4 >Emitted(27, 25) Source(24, 46) + SourceIndex(2) -5 >Emitted(27, 34) Source(24, 55) + SourceIndex(2) -6 >Emitted(27, 35) Source(24, 56) + SourceIndex(2) +1->Emitted(28, 5) Source(24, 19) + SourceIndex(2) +2 >Emitted(28, 15) Source(24, 36) + SourceIndex(2) +3 >Emitted(28, 24) Source(24, 45) + SourceIndex(2) +4 >Emitted(28, 25) Source(24, 46) + SourceIndex(2) +5 >Emitted(28, 34) Source(24, 55) + SourceIndex(2) +6 >Emitted(28, 35) Source(24, 56) + SourceIndex(2) --- >>> class someClass { 1 >^^^^^^^^ @@ -449,20 +481,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(28, 9) Source(24, 58) + SourceIndex(2) -2 >Emitted(28, 15) Source(24, 71) + SourceIndex(2) -3 >Emitted(28, 24) Source(24, 80) + SourceIndex(2) +1 >Emitted(29, 9) Source(24, 58) + SourceIndex(2) +2 >Emitted(29, 15) Source(24, 71) + SourceIndex(2) +3 >Emitted(29, 24) Source(24, 80) + SourceIndex(2) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(29, 10) Source(24, 83) + SourceIndex(2) +1 >Emitted(30, 10) Source(24, 83) + SourceIndex(2) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(30, 6) Source(24, 85) + SourceIndex(2) +1 >Emitted(31, 6) Source(24, 85) + SourceIndex(2) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -484,15 +516,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(31, 5) Source(25, 19) + SourceIndex(2) -2 >Emitted(31, 11) Source(25, 25) + SourceIndex(2) -3 >Emitted(31, 19) Source(25, 33) + SourceIndex(2) -4 >Emitted(31, 29) Source(25, 43) + SourceIndex(2) -5 >Emitted(31, 32) Source(25, 46) + SourceIndex(2) -6 >Emitted(31, 45) Source(25, 59) + SourceIndex(2) -7 >Emitted(31, 46) Source(25, 60) + SourceIndex(2) -8 >Emitted(31, 47) Source(25, 61) + SourceIndex(2) -9 >Emitted(31, 48) Source(25, 62) + SourceIndex(2) +1->Emitted(32, 5) Source(25, 19) + SourceIndex(2) +2 >Emitted(32, 11) Source(25, 25) + SourceIndex(2) +3 >Emitted(32, 19) Source(25, 33) + SourceIndex(2) +4 >Emitted(32, 29) Source(25, 43) + SourceIndex(2) +5 >Emitted(32, 32) Source(25, 46) + SourceIndex(2) +6 >Emitted(32, 45) Source(25, 59) + SourceIndex(2) +7 >Emitted(32, 46) Source(25, 60) + SourceIndex(2) +8 >Emitted(32, 47) Source(25, 61) + SourceIndex(2) +9 >Emitted(32, 48) Source(25, 62) + SourceIndex(2) --- >>> type internalType = internalC; 1 >^^^^ @@ -508,12 +540,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(32, 5) Source(26, 19) + SourceIndex(2) -2 >Emitted(32, 10) Source(26, 31) + SourceIndex(2) -3 >Emitted(32, 22) Source(26, 43) + SourceIndex(2) -4 >Emitted(32, 25) Source(26, 46) + SourceIndex(2) -5 >Emitted(32, 34) Source(26, 55) + SourceIndex(2) -6 >Emitted(32, 35) Source(26, 56) + SourceIndex(2) +1 >Emitted(33, 5) Source(26, 19) + SourceIndex(2) +2 >Emitted(33, 10) Source(26, 31) + SourceIndex(2) +3 >Emitted(33, 22) Source(26, 43) + SourceIndex(2) +4 >Emitted(33, 25) Source(26, 46) + SourceIndex(2) +5 >Emitted(33, 34) Source(26, 55) + SourceIndex(2) +6 >Emitted(33, 35) Source(26, 56) + SourceIndex(2) --- >>> const internalConst = 10; 1 >^^^^ @@ -527,11 +559,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(33, 5) Source(27, 26) + SourceIndex(2) -2 >Emitted(33, 11) Source(27, 32) + SourceIndex(2) -3 >Emitted(33, 24) Source(27, 45) + SourceIndex(2) -4 >Emitted(33, 29) Source(27, 50) + SourceIndex(2) -5 >Emitted(33, 30) Source(27, 51) + SourceIndex(2) +1 >Emitted(34, 5) Source(27, 26) + SourceIndex(2) +2 >Emitted(34, 11) Source(27, 32) + SourceIndex(2) +3 >Emitted(34, 24) Source(27, 45) + SourceIndex(2) +4 >Emitted(34, 29) Source(27, 50) + SourceIndex(2) +5 >Emitted(34, 30) Source(27, 51) + SourceIndex(2) --- >>> enum internalEnum { 1 >^^^^ @@ -541,9 +573,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(34, 5) Source(28, 19) + SourceIndex(2) -2 >Emitted(34, 10) Source(28, 31) + SourceIndex(2) -3 >Emitted(34, 22) Source(28, 43) + SourceIndex(2) +1 >Emitted(35, 5) Source(28, 19) + SourceIndex(2) +2 >Emitted(35, 10) Source(28, 31) + SourceIndex(2) +3 >Emitted(35, 22) Source(28, 43) + SourceIndex(2) --- >>> a = 0, 1 >^^^^^^^^ @@ -553,9 +585,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(35, 9) Source(28, 46) + SourceIndex(2) -2 >Emitted(35, 10) Source(28, 47) + SourceIndex(2) -3 >Emitted(35, 14) Source(28, 47) + SourceIndex(2) +1 >Emitted(36, 9) Source(28, 46) + SourceIndex(2) +2 >Emitted(36, 10) Source(28, 47) + SourceIndex(2) +3 >Emitted(36, 14) Source(28, 47) + SourceIndex(2) --- >>> b = 1, 1->^^^^^^^^ @@ -565,9 +597,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(36, 9) Source(28, 49) + SourceIndex(2) -2 >Emitted(36, 10) Source(28, 50) + SourceIndex(2) -3 >Emitted(36, 14) Source(28, 50) + SourceIndex(2) +1->Emitted(37, 9) Source(28, 49) + SourceIndex(2) +2 >Emitted(37, 10) Source(28, 50) + SourceIndex(2) +3 >Emitted(37, 14) Source(28, 50) + SourceIndex(2) --- >>> c = 2 1->^^^^^^^^ @@ -576,21 +608,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(37, 9) Source(28, 52) + SourceIndex(2) -2 >Emitted(37, 10) Source(28, 53) + SourceIndex(2) -3 >Emitted(37, 14) Source(28, 53) + SourceIndex(2) +1->Emitted(38, 9) Source(28, 52) + SourceIndex(2) +2 >Emitted(38, 10) Source(28, 53) + SourceIndex(2) +3 >Emitted(38, 14) Source(28, 53) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(38, 6) Source(28, 55) + SourceIndex(2) +1 >Emitted(39, 6) Source(28, 55) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(39, 2) Source(29, 2) + SourceIndex(2) +1 >Emitted(40, 2) Source(29, 2) + SourceIndex(2) --- >>>declare class internalC { 1-> @@ -600,15 +632,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(40, 1) Source(30, 15) + SourceIndex(2) -2 >Emitted(40, 15) Source(30, 21) + SourceIndex(2) -3 >Emitted(40, 24) Source(30, 30) + SourceIndex(2) +1->Emitted(41, 1) Source(30, 15) + SourceIndex(2) +2 >Emitted(41, 15) Source(30, 21) + SourceIndex(2) +3 >Emitted(41, 24) Source(30, 30) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(41, 2) Source(30, 33) + SourceIndex(2) +1 >Emitted(42, 2) Source(30, 33) + SourceIndex(2) --- >>>declare function internalfoo(): void; 1-> @@ -621,10 +653,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(42, 1) Source(31, 15) + SourceIndex(2) -2 >Emitted(42, 18) Source(31, 24) + SourceIndex(2) -3 >Emitted(42, 29) Source(31, 35) + SourceIndex(2) -4 >Emitted(42, 38) Source(31, 40) + SourceIndex(2) +1->Emitted(43, 1) Source(31, 15) + SourceIndex(2) +2 >Emitted(43, 18) Source(31, 24) + SourceIndex(2) +3 >Emitted(43, 29) Source(31, 35) + SourceIndex(2) +4 >Emitted(43, 38) Source(31, 40) + SourceIndex(2) --- >>>declare namespace internalNamespace { 1-> @@ -636,10 +668,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(43, 1) Source(32, 15) + SourceIndex(2) -2 >Emitted(43, 19) Source(32, 25) + SourceIndex(2) -3 >Emitted(43, 36) Source(32, 42) + SourceIndex(2) -4 >Emitted(43, 37) Source(32, 43) + SourceIndex(2) +1->Emitted(44, 1) Source(32, 15) + SourceIndex(2) +2 >Emitted(44, 19) Source(32, 25) + SourceIndex(2) +3 >Emitted(44, 36) Source(32, 42) + SourceIndex(2) +4 >Emitted(44, 37) Source(32, 43) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -648,20 +680,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(44, 5) Source(32, 45) + SourceIndex(2) -2 >Emitted(44, 11) Source(32, 58) + SourceIndex(2) -3 >Emitted(44, 20) Source(32, 67) + SourceIndex(2) +1 >Emitted(45, 5) Source(32, 45) + SourceIndex(2) +2 >Emitted(45, 11) Source(32, 58) + SourceIndex(2) +3 >Emitted(45, 20) Source(32, 67) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(45, 6) Source(32, 70) + SourceIndex(2) +1 >Emitted(46, 6) Source(32, 70) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(46, 2) Source(32, 72) + SourceIndex(2) +1 >Emitted(47, 2) Source(32, 72) + SourceIndex(2) --- >>>declare namespace internalOther.something { 1-> @@ -677,12 +709,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(47, 1) Source(33, 15) + SourceIndex(2) -2 >Emitted(47, 19) Source(33, 25) + SourceIndex(2) -3 >Emitted(47, 32) Source(33, 38) + SourceIndex(2) -4 >Emitted(47, 33) Source(33, 39) + SourceIndex(2) -5 >Emitted(47, 42) Source(33, 48) + SourceIndex(2) -6 >Emitted(47, 43) Source(33, 49) + SourceIndex(2) +1->Emitted(48, 1) Source(33, 15) + SourceIndex(2) +2 >Emitted(48, 19) Source(33, 25) + SourceIndex(2) +3 >Emitted(48, 32) Source(33, 38) + SourceIndex(2) +4 >Emitted(48, 33) Source(33, 39) + SourceIndex(2) +5 >Emitted(48, 42) Source(33, 48) + SourceIndex(2) +6 >Emitted(48, 43) Source(33, 49) + SourceIndex(2) --- >>> class someClass { 1 >^^^^ @@ -691,20 +723,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(48, 5) Source(33, 51) + SourceIndex(2) -2 >Emitted(48, 11) Source(33, 64) + SourceIndex(2) -3 >Emitted(48, 20) Source(33, 73) + SourceIndex(2) +1 >Emitted(49, 5) Source(33, 51) + SourceIndex(2) +2 >Emitted(49, 11) Source(33, 64) + SourceIndex(2) +3 >Emitted(49, 20) Source(33, 73) + SourceIndex(2) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(49, 6) Source(33, 76) + SourceIndex(2) +1 >Emitted(50, 6) Source(33, 76) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(33, 78) + SourceIndex(2) +1 >Emitted(51, 2) Source(33, 78) + SourceIndex(2) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -724,14 +756,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(51, 1) Source(34, 15) + SourceIndex(2) -2 >Emitted(51, 8) Source(34, 22) + SourceIndex(2) -3 >Emitted(51, 22) Source(34, 36) + SourceIndex(2) -4 >Emitted(51, 25) Source(34, 39) + SourceIndex(2) -5 >Emitted(51, 42) Source(34, 56) + SourceIndex(2) -6 >Emitted(51, 43) Source(34, 57) + SourceIndex(2) -7 >Emitted(51, 52) Source(34, 66) + SourceIndex(2) -8 >Emitted(51, 53) Source(34, 67) + SourceIndex(2) +1->Emitted(52, 1) Source(34, 15) + SourceIndex(2) +2 >Emitted(52, 8) Source(34, 22) + SourceIndex(2) +3 >Emitted(52, 22) Source(34, 36) + SourceIndex(2) +4 >Emitted(52, 25) Source(34, 39) + SourceIndex(2) +5 >Emitted(52, 42) Source(34, 56) + SourceIndex(2) +6 >Emitted(52, 43) Source(34, 57) + SourceIndex(2) +7 >Emitted(52, 52) Source(34, 66) + SourceIndex(2) +8 >Emitted(52, 53) Source(34, 67) + SourceIndex(2) --- >>>declare type internalType = internalC; 1 > @@ -747,12 +779,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(52, 1) Source(35, 15) + SourceIndex(2) -2 >Emitted(52, 14) Source(35, 20) + SourceIndex(2) -3 >Emitted(52, 26) Source(35, 32) + SourceIndex(2) -4 >Emitted(52, 29) Source(35, 35) + SourceIndex(2) -5 >Emitted(52, 38) Source(35, 44) + SourceIndex(2) -6 >Emitted(52, 39) Source(35, 45) + SourceIndex(2) +1 >Emitted(53, 1) Source(35, 15) + SourceIndex(2) +2 >Emitted(53, 14) Source(35, 20) + SourceIndex(2) +3 >Emitted(53, 26) Source(35, 32) + SourceIndex(2) +4 >Emitted(53, 29) Source(35, 35) + SourceIndex(2) +5 >Emitted(53, 38) Source(35, 44) + SourceIndex(2) +6 >Emitted(53, 39) Source(35, 45) + SourceIndex(2) --- >>>declare const internalConst = 10; 1 > @@ -768,12 +800,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(53, 1) Source(36, 15) + SourceIndex(2) -2 >Emitted(53, 9) Source(36, 15) + SourceIndex(2) -3 >Emitted(53, 15) Source(36, 21) + SourceIndex(2) -4 >Emitted(53, 28) Source(36, 34) + SourceIndex(2) -5 >Emitted(53, 33) Source(36, 39) + SourceIndex(2) -6 >Emitted(53, 34) Source(36, 40) + SourceIndex(2) +1 >Emitted(54, 1) Source(36, 15) + SourceIndex(2) +2 >Emitted(54, 9) Source(36, 15) + SourceIndex(2) +3 >Emitted(54, 15) Source(36, 21) + SourceIndex(2) +4 >Emitted(54, 28) Source(36, 34) + SourceIndex(2) +5 >Emitted(54, 33) Source(36, 39) + SourceIndex(2) +6 >Emitted(54, 34) Source(36, 40) + SourceIndex(2) --- >>>declare enum internalEnum { 1 > @@ -783,9 +815,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(54, 1) Source(37, 15) + SourceIndex(2) -2 >Emitted(54, 14) Source(37, 20) + SourceIndex(2) -3 >Emitted(54, 26) Source(37, 32) + SourceIndex(2) +1 >Emitted(55, 1) Source(37, 15) + SourceIndex(2) +2 >Emitted(55, 14) Source(37, 20) + SourceIndex(2) +3 >Emitted(55, 26) Source(37, 32) + SourceIndex(2) --- >>> a = 0, 1 >^^^^ @@ -795,9 +827,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(55, 5) Source(37, 35) + SourceIndex(2) -2 >Emitted(55, 6) Source(37, 36) + SourceIndex(2) -3 >Emitted(55, 10) Source(37, 36) + SourceIndex(2) +1 >Emitted(56, 5) Source(37, 35) + SourceIndex(2) +2 >Emitted(56, 6) Source(37, 36) + SourceIndex(2) +3 >Emitted(56, 10) Source(37, 36) + SourceIndex(2) --- >>> b = 1, 1->^^^^ @@ -807,9 +839,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(56, 5) Source(37, 38) + SourceIndex(2) -2 >Emitted(56, 6) Source(37, 39) + SourceIndex(2) -3 >Emitted(56, 10) Source(37, 39) + SourceIndex(2) +1->Emitted(57, 5) Source(37, 38) + SourceIndex(2) +2 >Emitted(57, 6) Source(37, 39) + SourceIndex(2) +3 >Emitted(57, 10) Source(37, 39) + SourceIndex(2) --- >>> c = 2 1->^^^^ @@ -818,15 +850,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(57, 5) Source(37, 41) + SourceIndex(2) -2 >Emitted(57, 6) Source(37, 42) + SourceIndex(2) -3 >Emitted(57, 10) Source(37, 42) + SourceIndex(2) +1->Emitted(58, 5) Source(37, 41) + SourceIndex(2) +2 >Emitted(58, 6) Source(37, 42) + SourceIndex(2) +3 >Emitted(58, 10) Source(37, 42) + SourceIndex(2) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(58, 2) Source(37, 44) + SourceIndex(2) +1 >Emitted(59, 2) Source(37, 44) + SourceIndex(2) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -840,9 +872,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(59, 1) Source(1, 1) + SourceIndex(3) -2 >Emitted(59, 15) Source(1, 7) + SourceIndex(3) -3 >Emitted(59, 16) Source(1, 8) + SourceIndex(3) +1->Emitted(60, 1) Source(1, 1) + SourceIndex(3) +2 >Emitted(60, 15) Source(1, 7) + SourceIndex(3) +3 >Emitted(60, 16) Source(1, 8) + SourceIndex(3) --- >>> doSomething(): void; 1->^^^^ @@ -850,8 +882,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(60, 5) Source(2, 5) + SourceIndex(3) -2 >Emitted(60, 16) Source(2, 16) + SourceIndex(3) +1->Emitted(61, 5) Source(2, 5) + SourceIndex(3) +2 >Emitted(61, 16) Source(2, 16) + SourceIndex(3) --- >>>} 1 >^ @@ -860,7 +892,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(61, 2) Source(5, 2) + SourceIndex(3) +1 >Emitted(62, 2) Source(5, 2) + SourceIndex(3) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2716,32 +2748,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 234, - "end": 322, + "end": 339, "kind": "internal" }, { - "pos": 324, - "end": 356, + "pos": 341, + "end": 373, "kind": "text" }, { - "pos": 356, - "end": 748, + "pos": 373, + "end": 765, "kind": "internal" }, { - "pos": 750, - "end": 753, + "pos": 767, + "end": 770, "kind": "text" }, { - "pos": 753, - "end": 1166, + "pos": 770, + "end": 1183, "kind": "internal" }, { - "pos": 1168, - "end": 1216, + "pos": 1185, + "end": 1233, "kind": "text" } ] @@ -2896,18 +2928,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (234-322) +internal: (234-339) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (324-356) +text: (341-373) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (356-748) +internal: (373-765) class C { } function foo(): void; @@ -2928,11 +2961,11 @@ internal: (356-748) c = 2 } ---------------------------------------------------------------------- -text: (750-753) +text: (767-770) } ---------------------------------------------------------------------- -internal: (753-1166) +internal: (770-1183) declare class internalC { } declare function internalfoo(): void; @@ -2953,7 +2986,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1168-1216) +text: (1185-1233) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js index d681812289135..80e0f71cc5505 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal-with-comments-emit-enabled.js @@ -29,7 +29,8 @@ declare class normalC { constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -77,7 +78,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;kBACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -177,35 +178,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^^^^^^^^^^^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(8, 5) Source(16, 19) + SourceIndex(0) 2 >Emitted(8, 11) Source(16, 25) + SourceIndex(0) --- ->>> /*@internal*/ c: number; -1->^^^^^^^^^^^^^^^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +>>> get c(): number; +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(9, 19) Source(17, 23) + SourceIndex(0) -2 >Emitted(9, 20) Source(17, 24) + SourceIndex(0) -3 >Emitted(9, 22) Source(18, 30) + SourceIndex(0) -4 >Emitted(9, 28) Source(18, 36) + SourceIndex(0) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(9, 5) Source(17, 19) + SourceIndex(0) +2 >Emitted(9, 9) Source(17, 23) + SourceIndex(0) +3 >Emitted(9, 10) Source(17, 24) + SourceIndex(0) +4 >Emitted(9, 14) Source(18, 30) + SourceIndex(0) +5 >Emitted(9, 20) Source(18, 36) + SourceIndex(0) +6 >Emitted(9, 21) Source(17, 41) + SourceIndex(0) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(10, 5) Source(18, 19) + SourceIndex(0) +2 >Emitted(10, 9) Source(18, 23) + SourceIndex(0) +3 >Emitted(10, 10) Source(18, 24) + SourceIndex(0) +4 >Emitted(10, 11) Source(18, 25) + SourceIndex(0) +5 >Emitted(10, 16) Source(18, 30) + SourceIndex(0) +6 >Emitted(10, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(10, 24) Source(18, 41) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(10, 2) Source(19, 2) + SourceIndex(0) +1 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) --- >>>declare namespace normalN { 1-> @@ -217,10 +249,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) -2 >Emitted(11, 19) Source(20, 11) + SourceIndex(0) -3 >Emitted(11, 26) Source(20, 18) + SourceIndex(0) -4 >Emitted(11, 27) Source(20, 19) + SourceIndex(0) +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 19) Source(20, 11) + SourceIndex(0) +3 >Emitted(12, 26) Source(20, 18) + SourceIndex(0) +4 >Emitted(12, 27) Source(20, 19) + SourceIndex(0) --- >>> class C { 1 >^^^^ @@ -230,15 +262,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(12, 5) Source(21, 19) + SourceIndex(0) -2 >Emitted(12, 11) Source(21, 32) + SourceIndex(0) -3 >Emitted(12, 12) Source(21, 33) + SourceIndex(0) +1 >Emitted(13, 5) Source(21, 19) + SourceIndex(0) +2 >Emitted(13, 11) Source(21, 32) + SourceIndex(0) +3 >Emitted(13, 12) Source(21, 33) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(13, 6) Source(21, 37) + SourceIndex(0) +1 >Emitted(14, 6) Source(21, 37) + SourceIndex(0) --- >>> function foo(): void; 1->^^^^ @@ -251,10 +283,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(14, 5) Source(22, 19) + SourceIndex(0) -2 >Emitted(14, 14) Source(22, 35) + SourceIndex(0) -3 >Emitted(14, 17) Source(22, 38) + SourceIndex(0) -4 >Emitted(14, 26) Source(22, 43) + SourceIndex(0) +1->Emitted(15, 5) Source(22, 19) + SourceIndex(0) +2 >Emitted(15, 14) Source(22, 35) + SourceIndex(0) +3 >Emitted(15, 17) Source(22, 38) + SourceIndex(0) +4 >Emitted(15, 26) Source(22, 43) + SourceIndex(0) --- >>> namespace someNamespace { 1->^^^^ @@ -266,10 +298,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(15, 5) Source(23, 19) + SourceIndex(0) -2 >Emitted(15, 15) Source(23, 36) + SourceIndex(0) -3 >Emitted(15, 28) Source(23, 49) + SourceIndex(0) -4 >Emitted(15, 29) Source(23, 50) + SourceIndex(0) +1->Emitted(16, 5) Source(23, 19) + SourceIndex(0) +2 >Emitted(16, 15) Source(23, 36) + SourceIndex(0) +3 >Emitted(16, 28) Source(23, 49) + SourceIndex(0) +4 >Emitted(16, 29) Source(23, 50) + SourceIndex(0) --- >>> class C { 1 >^^^^^^^^ @@ -278,20 +310,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(16, 9) Source(23, 52) + SourceIndex(0) -2 >Emitted(16, 15) Source(23, 65) + SourceIndex(0) -3 >Emitted(16, 16) Source(23, 66) + SourceIndex(0) +1 >Emitted(17, 9) Source(23, 52) + SourceIndex(0) +2 >Emitted(17, 15) Source(23, 65) + SourceIndex(0) +3 >Emitted(17, 16) Source(23, 66) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(17, 10) Source(23, 69) + SourceIndex(0) +1 >Emitted(18, 10) Source(23, 69) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(18, 6) Source(23, 71) + SourceIndex(0) +1 >Emitted(19, 6) Source(23, 71) + SourceIndex(0) --- >>> namespace someOther.something { 1->^^^^ @@ -307,12 +339,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(19, 5) Source(24, 19) + SourceIndex(0) -2 >Emitted(19, 15) Source(24, 36) + SourceIndex(0) -3 >Emitted(19, 24) Source(24, 45) + SourceIndex(0) -4 >Emitted(19, 25) Source(24, 46) + SourceIndex(0) -5 >Emitted(19, 34) Source(24, 55) + SourceIndex(0) -6 >Emitted(19, 35) Source(24, 56) + SourceIndex(0) +1->Emitted(20, 5) Source(24, 19) + SourceIndex(0) +2 >Emitted(20, 15) Source(24, 36) + SourceIndex(0) +3 >Emitted(20, 24) Source(24, 45) + SourceIndex(0) +4 >Emitted(20, 25) Source(24, 46) + SourceIndex(0) +5 >Emitted(20, 34) Source(24, 55) + SourceIndex(0) +6 >Emitted(20, 35) Source(24, 56) + SourceIndex(0) --- >>> class someClass { 1 >^^^^^^^^ @@ -321,20 +353,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(20, 9) Source(24, 58) + SourceIndex(0) -2 >Emitted(20, 15) Source(24, 71) + SourceIndex(0) -3 >Emitted(20, 24) Source(24, 80) + SourceIndex(0) +1 >Emitted(21, 9) Source(24, 58) + SourceIndex(0) +2 >Emitted(21, 15) Source(24, 71) + SourceIndex(0) +3 >Emitted(21, 24) Source(24, 80) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(21, 10) Source(24, 83) + SourceIndex(0) +1 >Emitted(22, 10) Source(24, 83) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(22, 6) Source(24, 85) + SourceIndex(0) +1 >Emitted(23, 6) Source(24, 85) + SourceIndex(0) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -356,15 +388,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(23, 5) Source(25, 19) + SourceIndex(0) -2 >Emitted(23, 11) Source(25, 25) + SourceIndex(0) -3 >Emitted(23, 19) Source(25, 33) + SourceIndex(0) -4 >Emitted(23, 29) Source(25, 43) + SourceIndex(0) -5 >Emitted(23, 32) Source(25, 46) + SourceIndex(0) -6 >Emitted(23, 45) Source(25, 59) + SourceIndex(0) -7 >Emitted(23, 46) Source(25, 60) + SourceIndex(0) -8 >Emitted(23, 47) Source(25, 61) + SourceIndex(0) -9 >Emitted(23, 48) Source(25, 62) + SourceIndex(0) +1->Emitted(24, 5) Source(25, 19) + SourceIndex(0) +2 >Emitted(24, 11) Source(25, 25) + SourceIndex(0) +3 >Emitted(24, 19) Source(25, 33) + SourceIndex(0) +4 >Emitted(24, 29) Source(25, 43) + SourceIndex(0) +5 >Emitted(24, 32) Source(25, 46) + SourceIndex(0) +6 >Emitted(24, 45) Source(25, 59) + SourceIndex(0) +7 >Emitted(24, 46) Source(25, 60) + SourceIndex(0) +8 >Emitted(24, 47) Source(25, 61) + SourceIndex(0) +9 >Emitted(24, 48) Source(25, 62) + SourceIndex(0) --- >>> type internalType = internalC; 1 >^^^^ @@ -380,12 +412,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(24, 5) Source(26, 19) + SourceIndex(0) -2 >Emitted(24, 10) Source(26, 31) + SourceIndex(0) -3 >Emitted(24, 22) Source(26, 43) + SourceIndex(0) -4 >Emitted(24, 25) Source(26, 46) + SourceIndex(0) -5 >Emitted(24, 34) Source(26, 55) + SourceIndex(0) -6 >Emitted(24, 35) Source(26, 56) + SourceIndex(0) +1 >Emitted(25, 5) Source(26, 19) + SourceIndex(0) +2 >Emitted(25, 10) Source(26, 31) + SourceIndex(0) +3 >Emitted(25, 22) Source(26, 43) + SourceIndex(0) +4 >Emitted(25, 25) Source(26, 46) + SourceIndex(0) +5 >Emitted(25, 34) Source(26, 55) + SourceIndex(0) +6 >Emitted(25, 35) Source(26, 56) + SourceIndex(0) --- >>> const internalConst = 10; 1 >^^^^ @@ -399,11 +431,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(25, 5) Source(27, 26) + SourceIndex(0) -2 >Emitted(25, 11) Source(27, 32) + SourceIndex(0) -3 >Emitted(25, 24) Source(27, 45) + SourceIndex(0) -4 >Emitted(25, 29) Source(27, 50) + SourceIndex(0) -5 >Emitted(25, 30) Source(27, 51) + SourceIndex(0) +1 >Emitted(26, 5) Source(27, 26) + SourceIndex(0) +2 >Emitted(26, 11) Source(27, 32) + SourceIndex(0) +3 >Emitted(26, 24) Source(27, 45) + SourceIndex(0) +4 >Emitted(26, 29) Source(27, 50) + SourceIndex(0) +5 >Emitted(26, 30) Source(27, 51) + SourceIndex(0) --- >>> enum internalEnum { 1 >^^^^ @@ -413,9 +445,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(26, 5) Source(28, 19) + SourceIndex(0) -2 >Emitted(26, 10) Source(28, 31) + SourceIndex(0) -3 >Emitted(26, 22) Source(28, 43) + SourceIndex(0) +1 >Emitted(27, 5) Source(28, 19) + SourceIndex(0) +2 >Emitted(27, 10) Source(28, 31) + SourceIndex(0) +3 >Emitted(27, 22) Source(28, 43) + SourceIndex(0) --- >>> a = 0, 1 >^^^^^^^^ @@ -425,9 +457,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(27, 9) Source(28, 46) + SourceIndex(0) -2 >Emitted(27, 10) Source(28, 47) + SourceIndex(0) -3 >Emitted(27, 14) Source(28, 47) + SourceIndex(0) +1 >Emitted(28, 9) Source(28, 46) + SourceIndex(0) +2 >Emitted(28, 10) Source(28, 47) + SourceIndex(0) +3 >Emitted(28, 14) Source(28, 47) + SourceIndex(0) --- >>> b = 1, 1->^^^^^^^^ @@ -437,9 +469,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(28, 9) Source(28, 49) + SourceIndex(0) -2 >Emitted(28, 10) Source(28, 50) + SourceIndex(0) -3 >Emitted(28, 14) Source(28, 50) + SourceIndex(0) +1->Emitted(29, 9) Source(28, 49) + SourceIndex(0) +2 >Emitted(29, 10) Source(28, 50) + SourceIndex(0) +3 >Emitted(29, 14) Source(28, 50) + SourceIndex(0) --- >>> c = 2 1->^^^^^^^^ @@ -448,21 +480,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(29, 9) Source(28, 52) + SourceIndex(0) -2 >Emitted(29, 10) Source(28, 53) + SourceIndex(0) -3 >Emitted(29, 14) Source(28, 53) + SourceIndex(0) +1->Emitted(30, 9) Source(28, 52) + SourceIndex(0) +2 >Emitted(30, 10) Source(28, 53) + SourceIndex(0) +3 >Emitted(30, 14) Source(28, 53) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(30, 6) Source(28, 55) + SourceIndex(0) +1 >Emitted(31, 6) Source(28, 55) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(31, 2) Source(29, 2) + SourceIndex(0) +1 >Emitted(32, 2) Source(29, 2) + SourceIndex(0) --- >>>declare class internalC { 1-> @@ -472,15 +504,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(32, 1) Source(30, 15) + SourceIndex(0) -2 >Emitted(32, 15) Source(30, 21) + SourceIndex(0) -3 >Emitted(32, 24) Source(30, 30) + SourceIndex(0) +1->Emitted(33, 1) Source(30, 15) + SourceIndex(0) +2 >Emitted(33, 15) Source(30, 21) + SourceIndex(0) +3 >Emitted(33, 24) Source(30, 30) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(33, 2) Source(30, 33) + SourceIndex(0) +1 >Emitted(34, 2) Source(30, 33) + SourceIndex(0) --- >>>declare function internalfoo(): void; 1-> @@ -493,10 +525,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(34, 1) Source(31, 15) + SourceIndex(0) -2 >Emitted(34, 18) Source(31, 24) + SourceIndex(0) -3 >Emitted(34, 29) Source(31, 35) + SourceIndex(0) -4 >Emitted(34, 38) Source(31, 40) + SourceIndex(0) +1->Emitted(35, 1) Source(31, 15) + SourceIndex(0) +2 >Emitted(35, 18) Source(31, 24) + SourceIndex(0) +3 >Emitted(35, 29) Source(31, 35) + SourceIndex(0) +4 >Emitted(35, 38) Source(31, 40) + SourceIndex(0) --- >>>declare namespace internalNamespace { 1-> @@ -508,10 +540,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(35, 1) Source(32, 15) + SourceIndex(0) -2 >Emitted(35, 19) Source(32, 25) + SourceIndex(0) -3 >Emitted(35, 36) Source(32, 42) + SourceIndex(0) -4 >Emitted(35, 37) Source(32, 43) + SourceIndex(0) +1->Emitted(36, 1) Source(32, 15) + SourceIndex(0) +2 >Emitted(36, 19) Source(32, 25) + SourceIndex(0) +3 >Emitted(36, 36) Source(32, 42) + SourceIndex(0) +4 >Emitted(36, 37) Source(32, 43) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -520,20 +552,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(36, 5) Source(32, 45) + SourceIndex(0) -2 >Emitted(36, 11) Source(32, 58) + SourceIndex(0) -3 >Emitted(36, 20) Source(32, 67) + SourceIndex(0) +1 >Emitted(37, 5) Source(32, 45) + SourceIndex(0) +2 >Emitted(37, 11) Source(32, 58) + SourceIndex(0) +3 >Emitted(37, 20) Source(32, 67) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(37, 6) Source(32, 70) + SourceIndex(0) +1 >Emitted(38, 6) Source(32, 70) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(38, 2) Source(32, 72) + SourceIndex(0) +1 >Emitted(39, 2) Source(32, 72) + SourceIndex(0) --- >>>declare namespace internalOther.something { 1-> @@ -549,12 +581,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(39, 1) Source(33, 15) + SourceIndex(0) -2 >Emitted(39, 19) Source(33, 25) + SourceIndex(0) -3 >Emitted(39, 32) Source(33, 38) + SourceIndex(0) -4 >Emitted(39, 33) Source(33, 39) + SourceIndex(0) -5 >Emitted(39, 42) Source(33, 48) + SourceIndex(0) -6 >Emitted(39, 43) Source(33, 49) + SourceIndex(0) +1->Emitted(40, 1) Source(33, 15) + SourceIndex(0) +2 >Emitted(40, 19) Source(33, 25) + SourceIndex(0) +3 >Emitted(40, 32) Source(33, 38) + SourceIndex(0) +4 >Emitted(40, 33) Source(33, 39) + SourceIndex(0) +5 >Emitted(40, 42) Source(33, 48) + SourceIndex(0) +6 >Emitted(40, 43) Source(33, 49) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -563,20 +595,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(40, 5) Source(33, 51) + SourceIndex(0) -2 >Emitted(40, 11) Source(33, 64) + SourceIndex(0) -3 >Emitted(40, 20) Source(33, 73) + SourceIndex(0) +1 >Emitted(41, 5) Source(33, 51) + SourceIndex(0) +2 >Emitted(41, 11) Source(33, 64) + SourceIndex(0) +3 >Emitted(41, 20) Source(33, 73) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(41, 6) Source(33, 76) + SourceIndex(0) +1 >Emitted(42, 6) Source(33, 76) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(42, 2) Source(33, 78) + SourceIndex(0) +1 >Emitted(43, 2) Source(33, 78) + SourceIndex(0) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -596,14 +628,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(43, 1) Source(34, 15) + SourceIndex(0) -2 >Emitted(43, 8) Source(34, 22) + SourceIndex(0) -3 >Emitted(43, 22) Source(34, 36) + SourceIndex(0) -4 >Emitted(43, 25) Source(34, 39) + SourceIndex(0) -5 >Emitted(43, 42) Source(34, 56) + SourceIndex(0) -6 >Emitted(43, 43) Source(34, 57) + SourceIndex(0) -7 >Emitted(43, 52) Source(34, 66) + SourceIndex(0) -8 >Emitted(43, 53) Source(34, 67) + SourceIndex(0) +1->Emitted(44, 1) Source(34, 15) + SourceIndex(0) +2 >Emitted(44, 8) Source(34, 22) + SourceIndex(0) +3 >Emitted(44, 22) Source(34, 36) + SourceIndex(0) +4 >Emitted(44, 25) Source(34, 39) + SourceIndex(0) +5 >Emitted(44, 42) Source(34, 56) + SourceIndex(0) +6 >Emitted(44, 43) Source(34, 57) + SourceIndex(0) +7 >Emitted(44, 52) Source(34, 66) + SourceIndex(0) +8 >Emitted(44, 53) Source(34, 67) + SourceIndex(0) --- >>>declare type internalType = internalC; 1 > @@ -619,12 +651,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(44, 1) Source(35, 15) + SourceIndex(0) -2 >Emitted(44, 14) Source(35, 20) + SourceIndex(0) -3 >Emitted(44, 26) Source(35, 32) + SourceIndex(0) -4 >Emitted(44, 29) Source(35, 35) + SourceIndex(0) -5 >Emitted(44, 38) Source(35, 44) + SourceIndex(0) -6 >Emitted(44, 39) Source(35, 45) + SourceIndex(0) +1 >Emitted(45, 1) Source(35, 15) + SourceIndex(0) +2 >Emitted(45, 14) Source(35, 20) + SourceIndex(0) +3 >Emitted(45, 26) Source(35, 32) + SourceIndex(0) +4 >Emitted(45, 29) Source(35, 35) + SourceIndex(0) +5 >Emitted(45, 38) Source(35, 44) + SourceIndex(0) +6 >Emitted(45, 39) Source(35, 45) + SourceIndex(0) --- >>>declare const internalConst = 10; 1 > @@ -640,12 +672,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(45, 1) Source(36, 15) + SourceIndex(0) -2 >Emitted(45, 9) Source(36, 15) + SourceIndex(0) -3 >Emitted(45, 15) Source(36, 21) + SourceIndex(0) -4 >Emitted(45, 28) Source(36, 34) + SourceIndex(0) -5 >Emitted(45, 33) Source(36, 39) + SourceIndex(0) -6 >Emitted(45, 34) Source(36, 40) + SourceIndex(0) +1 >Emitted(46, 1) Source(36, 15) + SourceIndex(0) +2 >Emitted(46, 9) Source(36, 15) + SourceIndex(0) +3 >Emitted(46, 15) Source(36, 21) + SourceIndex(0) +4 >Emitted(46, 28) Source(36, 34) + SourceIndex(0) +5 >Emitted(46, 33) Source(36, 39) + SourceIndex(0) +6 >Emitted(46, 34) Source(36, 40) + SourceIndex(0) --- >>>declare enum internalEnum { 1 > @@ -655,9 +687,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(46, 1) Source(37, 15) + SourceIndex(0) -2 >Emitted(46, 14) Source(37, 20) + SourceIndex(0) -3 >Emitted(46, 26) Source(37, 32) + SourceIndex(0) +1 >Emitted(47, 1) Source(37, 15) + SourceIndex(0) +2 >Emitted(47, 14) Source(37, 20) + SourceIndex(0) +3 >Emitted(47, 26) Source(37, 32) + SourceIndex(0) --- >>> a = 0, 1 >^^^^ @@ -667,9 +699,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(47, 5) Source(37, 35) + SourceIndex(0) -2 >Emitted(47, 6) Source(37, 36) + SourceIndex(0) -3 >Emitted(47, 10) Source(37, 36) + SourceIndex(0) +1 >Emitted(48, 5) Source(37, 35) + SourceIndex(0) +2 >Emitted(48, 6) Source(37, 36) + SourceIndex(0) +3 >Emitted(48, 10) Source(37, 36) + SourceIndex(0) --- >>> b = 1, 1->^^^^ @@ -679,9 +711,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(48, 5) Source(37, 38) + SourceIndex(0) -2 >Emitted(48, 6) Source(37, 39) + SourceIndex(0) -3 >Emitted(48, 10) Source(37, 39) + SourceIndex(0) +1->Emitted(49, 5) Source(37, 38) + SourceIndex(0) +2 >Emitted(49, 6) Source(37, 39) + SourceIndex(0) +3 >Emitted(49, 10) Source(37, 39) + SourceIndex(0) --- >>> c = 2 1->^^^^ @@ -690,15 +722,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(49, 5) Source(37, 41) + SourceIndex(0) -2 >Emitted(49, 6) Source(37, 42) + SourceIndex(0) -3 >Emitted(49, 10) Source(37, 42) + SourceIndex(0) +1->Emitted(50, 5) Source(37, 41) + SourceIndex(0) +2 >Emitted(50, 6) Source(37, 42) + SourceIndex(0) +3 >Emitted(50, 10) Source(37, 42) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(37, 44) + SourceIndex(0) +1 >Emitted(51, 2) Source(37, 44) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -712,9 +744,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(51, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(51, 15) Source(1, 7) + SourceIndex(1) -3 >Emitted(51, 16) Source(1, 8) + SourceIndex(1) +1->Emitted(52, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(52, 15) Source(1, 7) + SourceIndex(1) +3 >Emitted(52, 16) Source(1, 8) + SourceIndex(1) --- >>> doSomething(): void; 1->^^^^ @@ -722,8 +754,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(52, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(52, 16) Source(2, 16) + SourceIndex(1) +1->Emitted(53, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(53, 16) Source(2, 16) + SourceIndex(1) --- >>>} 1 >^ @@ -732,7 +764,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(53, 2) Source(5, 2) + SourceIndex(1) +1 >Emitted(54, 2) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2416,32 +2448,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 77, - "end": 165, + "end": 182, "kind": "internal" }, { - "pos": 167, - "end": 199, + "pos": 184, + "end": 216, "kind": "text" }, { - "pos": 199, - "end": 591, + "pos": 216, + "end": 608, "kind": "internal" }, { - "pos": 593, - "end": 596, + "pos": 610, + "end": 613, "kind": "text" }, { - "pos": 596, - "end": 1009, + "pos": 613, + "end": 1026, "kind": "internal" }, { - "pos": 1011, - "end": 1059, + "pos": 1028, + "end": 1076, "kind": "text" } ] @@ -2570,18 +2602,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (77-165) +internal: (77-182) constructor(); prop: string; method(): void; - /*@internal*/ c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (167-199) +text: (184-216) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (199-591) +internal: (216-608) class C { } function foo(): void; @@ -2602,11 +2635,11 @@ internal: (199-591) c = 2 } ---------------------------------------------------------------------- -text: (593-596) +text: (610-613) } ---------------------------------------------------------------------- -internal: (596-1009) +internal: (613-1026) declare class internalC { } declare function internalfoo(): void; @@ -2627,7 +2660,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (1011-1059) +text: (1028-1076) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js index 0f0cf474ca703..467077d6a669d 100644 --- a/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js +++ b/tests/baselines/reference/tsbuild/outfile-concat/initial-build/stripInternal.js @@ -49,7 +49,8 @@ declare class normalC { constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); } declare namespace normalN { class C { @@ -97,7 +98,7 @@ declare class C { //# sourceMappingURL=second-output.d.ts.map //// [/src/2/second-output.d.ts.map] -{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACF,CAAC,EACM,MAAM;CAClC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} +{"version":3,"file":"second-output.d.ts","sourceRoot":"","sources":["../second/second_part1.ts","../second/second_part2.ts"],"names":[],"mappings":"AAAA,kBAAU,CAAC,CAAC;CAEX;AAED,kBAAU,CAAC,CAAC;CAMX;AAED,cAAM,OAAO;;IAEK,IAAI,EAAE,MAAM,CAAC;IACb,MAAM;IACN,IAAI,CAAC,IACM,MAAM,CADK;IACtB,IAAI,CAAC,CAAC,KAAK,MAAM,EAAK;CACvC;AACD,kBAAU,OAAO,CAAC;IACA,MAAa,CAAC;KAAI;IAClB,SAAgB,GAAG,SAAK;IACxB,UAAiB,aAAa,CAAC;QAAE,MAAa,CAAC;SAAG;KAAE;IACpD,UAAiB,SAAS,CAAC,SAAS,CAAC;QAAE,MAAa,SAAS;SAAG;KAAE;IAClE,MAAM,QAAQ,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC;IAC3C,KAAY,YAAY,GAAG,SAAS,CAAC;IAC9B,MAAM,aAAa,KAAK,CAAC;IAChC,KAAY,YAAY;QAAG,CAAC,IAAA;QAAE,CAAC,IAAA;QAAE,CAAC,IAAA;KAAE;CACrD;AACa,cAAM,SAAS;CAAG;AAClB,iBAAS,WAAW,SAAK;AACzB,kBAAU,iBAAiB,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AACzD,kBAAU,aAAa,CAAC,SAAS,CAAC;IAAE,MAAa,SAAS;KAAG;CAAE;AAC/D,OAAO,cAAc,GAAG,iBAAiB,CAAC,SAAS,CAAC;AACpD,aAAK,YAAY,GAAG,SAAS,CAAC;AAC9B,QAAA,MAAM,aAAa,KAAK,CAAC;AACzB,aAAK,YAAY;IAAG,CAAC,IAAA;IAAE,CAAC,IAAA;IAAE,CAAC,IAAA;CAAE;ACpC3C,cAAM,CAAC;IACH,WAAW;CAGd"} //// [/src/2/second-output.d.ts.map.baseline.txt] =================================================================== @@ -197,35 +198,66 @@ sourceFile:../second/second_part1.ts >>> method(): void; 1->^^^^ 2 > ^^^^^^ -3 > ^^^^^-> +3 > ^^^^^^^^^^^-> 1-> > /*@internal*/ 2 > method 1->Emitted(8, 5) Source(16, 19) + SourceIndex(0) 2 >Emitted(8, 11) Source(16, 25) + SourceIndex(0) --- ->>> c: number; +>>> get c(): number; 1->^^^^ -2 > ^ -3 > ^^ -4 > ^^^^^^ +2 > ^^^^ +3 > ^ +4 > ^^^^ +5 > ^^^^^^ +6 > ^ +7 > ^^^^-> 1->() { } - > /*@internal*/ get -2 > c -3 > () { return 10; } - > /*@internal*/ set c(val: -4 > number -1->Emitted(9, 5) Source(17, 23) + SourceIndex(0) -2 >Emitted(9, 6) Source(17, 24) + SourceIndex(0) -3 >Emitted(9, 8) Source(18, 30) + SourceIndex(0) -4 >Emitted(9, 14) Source(18, 36) + SourceIndex(0) + > /*@internal*/ +2 > get +3 > c +4 > () { return 10; } + > /*@internal*/ set c(val: +5 > number +6 > +1->Emitted(9, 5) Source(17, 19) + SourceIndex(0) +2 >Emitted(9, 9) Source(17, 23) + SourceIndex(0) +3 >Emitted(9, 10) Source(17, 24) + SourceIndex(0) +4 >Emitted(9, 14) Source(18, 30) + SourceIndex(0) +5 >Emitted(9, 20) Source(18, 36) + SourceIndex(0) +6 >Emitted(9, 21) Source(17, 41) + SourceIndex(0) +--- +>>> set c(val: number); +1->^^^^ +2 > ^^^^ +3 > ^ +4 > ^ +5 > ^^^^^ +6 > ^^^^^^ +7 > ^^ +1-> + > /*@internal*/ +2 > set +3 > c +4 > ( +5 > val: +6 > number +7 > ) { } +1->Emitted(10, 5) Source(18, 19) + SourceIndex(0) +2 >Emitted(10, 9) Source(18, 23) + SourceIndex(0) +3 >Emitted(10, 10) Source(18, 24) + SourceIndex(0) +4 >Emitted(10, 11) Source(18, 25) + SourceIndex(0) +5 >Emitted(10, 16) Source(18, 30) + SourceIndex(0) +6 >Emitted(10, 22) Source(18, 36) + SourceIndex(0) +7 >Emitted(10, 24) Source(18, 41) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^-> -1 >) { } +1 > >} -1 >Emitted(10, 2) Source(19, 2) + SourceIndex(0) +1 >Emitted(11, 2) Source(19, 2) + SourceIndex(0) --- >>>declare namespace normalN { 1-> @@ -237,10 +269,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > normalN 4 > -1->Emitted(11, 1) Source(20, 1) + SourceIndex(0) -2 >Emitted(11, 19) Source(20, 11) + SourceIndex(0) -3 >Emitted(11, 26) Source(20, 18) + SourceIndex(0) -4 >Emitted(11, 27) Source(20, 19) + SourceIndex(0) +1->Emitted(12, 1) Source(20, 1) + SourceIndex(0) +2 >Emitted(12, 19) Source(20, 11) + SourceIndex(0) +3 >Emitted(12, 26) Source(20, 18) + SourceIndex(0) +4 >Emitted(12, 27) Source(20, 19) + SourceIndex(0) --- >>> class C { 1 >^^^^ @@ -250,15 +282,15 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export class 3 > C -1 >Emitted(12, 5) Source(21, 19) + SourceIndex(0) -2 >Emitted(12, 11) Source(21, 32) + SourceIndex(0) -3 >Emitted(12, 12) Source(21, 33) + SourceIndex(0) +1 >Emitted(13, 5) Source(21, 19) + SourceIndex(0) +2 >Emitted(13, 11) Source(21, 32) + SourceIndex(0) +3 >Emitted(13, 12) Source(21, 33) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^-> 1 > { } -1 >Emitted(13, 6) Source(21, 37) + SourceIndex(0) +1 >Emitted(14, 6) Source(21, 37) + SourceIndex(0) --- >>> function foo(): void; 1->^^^^ @@ -271,10 +303,10 @@ sourceFile:../second/second_part1.ts 2 > export function 3 > foo 4 > () {} -1->Emitted(14, 5) Source(22, 19) + SourceIndex(0) -2 >Emitted(14, 14) Source(22, 35) + SourceIndex(0) -3 >Emitted(14, 17) Source(22, 38) + SourceIndex(0) -4 >Emitted(14, 26) Source(22, 43) + SourceIndex(0) +1->Emitted(15, 5) Source(22, 19) + SourceIndex(0) +2 >Emitted(15, 14) Source(22, 35) + SourceIndex(0) +3 >Emitted(15, 17) Source(22, 38) + SourceIndex(0) +4 >Emitted(15, 26) Source(22, 43) + SourceIndex(0) --- >>> namespace someNamespace { 1->^^^^ @@ -286,10 +318,10 @@ sourceFile:../second/second_part1.ts 2 > export namespace 3 > someNamespace 4 > -1->Emitted(15, 5) Source(23, 19) + SourceIndex(0) -2 >Emitted(15, 15) Source(23, 36) + SourceIndex(0) -3 >Emitted(15, 28) Source(23, 49) + SourceIndex(0) -4 >Emitted(15, 29) Source(23, 50) + SourceIndex(0) +1->Emitted(16, 5) Source(23, 19) + SourceIndex(0) +2 >Emitted(16, 15) Source(23, 36) + SourceIndex(0) +3 >Emitted(16, 28) Source(23, 49) + SourceIndex(0) +4 >Emitted(16, 29) Source(23, 50) + SourceIndex(0) --- >>> class C { 1 >^^^^^^^^ @@ -298,20 +330,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > C -1 >Emitted(16, 9) Source(23, 52) + SourceIndex(0) -2 >Emitted(16, 15) Source(23, 65) + SourceIndex(0) -3 >Emitted(16, 16) Source(23, 66) + SourceIndex(0) +1 >Emitted(17, 9) Source(23, 52) + SourceIndex(0) +2 >Emitted(17, 15) Source(23, 65) + SourceIndex(0) +3 >Emitted(17, 16) Source(23, 66) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(17, 10) Source(23, 69) + SourceIndex(0) +1 >Emitted(18, 10) Source(23, 69) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(18, 6) Source(23, 71) + SourceIndex(0) +1 >Emitted(19, 6) Source(23, 71) + SourceIndex(0) --- >>> namespace someOther.something { 1->^^^^ @@ -327,12 +359,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(19, 5) Source(24, 19) + SourceIndex(0) -2 >Emitted(19, 15) Source(24, 36) + SourceIndex(0) -3 >Emitted(19, 24) Source(24, 45) + SourceIndex(0) -4 >Emitted(19, 25) Source(24, 46) + SourceIndex(0) -5 >Emitted(19, 34) Source(24, 55) + SourceIndex(0) -6 >Emitted(19, 35) Source(24, 56) + SourceIndex(0) +1->Emitted(20, 5) Source(24, 19) + SourceIndex(0) +2 >Emitted(20, 15) Source(24, 36) + SourceIndex(0) +3 >Emitted(20, 24) Source(24, 45) + SourceIndex(0) +4 >Emitted(20, 25) Source(24, 46) + SourceIndex(0) +5 >Emitted(20, 34) Source(24, 55) + SourceIndex(0) +6 >Emitted(20, 35) Source(24, 56) + SourceIndex(0) --- >>> class someClass { 1 >^^^^^^^^ @@ -341,20 +373,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(20, 9) Source(24, 58) + SourceIndex(0) -2 >Emitted(20, 15) Source(24, 71) + SourceIndex(0) -3 >Emitted(20, 24) Source(24, 80) + SourceIndex(0) +1 >Emitted(21, 9) Source(24, 58) + SourceIndex(0) +2 >Emitted(21, 15) Source(24, 71) + SourceIndex(0) +3 >Emitted(21, 24) Source(24, 80) + SourceIndex(0) --- >>> } 1 >^^^^^^^^^ 1 > {} -1 >Emitted(21, 10) Source(24, 83) + SourceIndex(0) +1 >Emitted(22, 10) Source(24, 83) + SourceIndex(0) --- >>> } 1 >^^^^^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(22, 6) Source(24, 85) + SourceIndex(0) +1 >Emitted(23, 6) Source(24, 85) + SourceIndex(0) --- >>> export import someImport = someNamespace.C; 1->^^^^ @@ -376,15 +408,15 @@ sourceFile:../second/second_part1.ts 7 > . 8 > C 9 > ; -1->Emitted(23, 5) Source(25, 19) + SourceIndex(0) -2 >Emitted(23, 11) Source(25, 25) + SourceIndex(0) -3 >Emitted(23, 19) Source(25, 33) + SourceIndex(0) -4 >Emitted(23, 29) Source(25, 43) + SourceIndex(0) -5 >Emitted(23, 32) Source(25, 46) + SourceIndex(0) -6 >Emitted(23, 45) Source(25, 59) + SourceIndex(0) -7 >Emitted(23, 46) Source(25, 60) + SourceIndex(0) -8 >Emitted(23, 47) Source(25, 61) + SourceIndex(0) -9 >Emitted(23, 48) Source(25, 62) + SourceIndex(0) +1->Emitted(24, 5) Source(25, 19) + SourceIndex(0) +2 >Emitted(24, 11) Source(25, 25) + SourceIndex(0) +3 >Emitted(24, 19) Source(25, 33) + SourceIndex(0) +4 >Emitted(24, 29) Source(25, 43) + SourceIndex(0) +5 >Emitted(24, 32) Source(25, 46) + SourceIndex(0) +6 >Emitted(24, 45) Source(25, 59) + SourceIndex(0) +7 >Emitted(24, 46) Source(25, 60) + SourceIndex(0) +8 >Emitted(24, 47) Source(25, 61) + SourceIndex(0) +9 >Emitted(24, 48) Source(25, 62) + SourceIndex(0) --- >>> type internalType = internalC; 1 >^^^^ @@ -400,12 +432,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(24, 5) Source(26, 19) + SourceIndex(0) -2 >Emitted(24, 10) Source(26, 31) + SourceIndex(0) -3 >Emitted(24, 22) Source(26, 43) + SourceIndex(0) -4 >Emitted(24, 25) Source(26, 46) + SourceIndex(0) -5 >Emitted(24, 34) Source(26, 55) + SourceIndex(0) -6 >Emitted(24, 35) Source(26, 56) + SourceIndex(0) +1 >Emitted(25, 5) Source(26, 19) + SourceIndex(0) +2 >Emitted(25, 10) Source(26, 31) + SourceIndex(0) +3 >Emitted(25, 22) Source(26, 43) + SourceIndex(0) +4 >Emitted(25, 25) Source(26, 46) + SourceIndex(0) +5 >Emitted(25, 34) Source(26, 55) + SourceIndex(0) +6 >Emitted(25, 35) Source(26, 56) + SourceIndex(0) --- >>> const internalConst = 10; 1 >^^^^ @@ -419,11 +451,11 @@ sourceFile:../second/second_part1.ts 3 > internalConst 4 > = 10 5 > ; -1 >Emitted(25, 5) Source(27, 26) + SourceIndex(0) -2 >Emitted(25, 11) Source(27, 32) + SourceIndex(0) -3 >Emitted(25, 24) Source(27, 45) + SourceIndex(0) -4 >Emitted(25, 29) Source(27, 50) + SourceIndex(0) -5 >Emitted(25, 30) Source(27, 51) + SourceIndex(0) +1 >Emitted(26, 5) Source(27, 26) + SourceIndex(0) +2 >Emitted(26, 11) Source(27, 32) + SourceIndex(0) +3 >Emitted(26, 24) Source(27, 45) + SourceIndex(0) +4 >Emitted(26, 29) Source(27, 50) + SourceIndex(0) +5 >Emitted(26, 30) Source(27, 51) + SourceIndex(0) --- >>> enum internalEnum { 1 >^^^^ @@ -433,9 +465,9 @@ sourceFile:../second/second_part1.ts > /*@internal*/ 2 > export enum 3 > internalEnum -1 >Emitted(26, 5) Source(28, 19) + SourceIndex(0) -2 >Emitted(26, 10) Source(28, 31) + SourceIndex(0) -3 >Emitted(26, 22) Source(28, 43) + SourceIndex(0) +1 >Emitted(27, 5) Source(28, 19) + SourceIndex(0) +2 >Emitted(27, 10) Source(28, 31) + SourceIndex(0) +3 >Emitted(27, 22) Source(28, 43) + SourceIndex(0) --- >>> a = 0, 1 >^^^^^^^^ @@ -445,9 +477,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(27, 9) Source(28, 46) + SourceIndex(0) -2 >Emitted(27, 10) Source(28, 47) + SourceIndex(0) -3 >Emitted(27, 14) Source(28, 47) + SourceIndex(0) +1 >Emitted(28, 9) Source(28, 46) + SourceIndex(0) +2 >Emitted(28, 10) Source(28, 47) + SourceIndex(0) +3 >Emitted(28, 14) Source(28, 47) + SourceIndex(0) --- >>> b = 1, 1->^^^^^^^^ @@ -457,9 +489,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(28, 9) Source(28, 49) + SourceIndex(0) -2 >Emitted(28, 10) Source(28, 50) + SourceIndex(0) -3 >Emitted(28, 14) Source(28, 50) + SourceIndex(0) +1->Emitted(29, 9) Source(28, 49) + SourceIndex(0) +2 >Emitted(29, 10) Source(28, 50) + SourceIndex(0) +3 >Emitted(29, 14) Source(28, 50) + SourceIndex(0) --- >>> c = 2 1->^^^^^^^^ @@ -468,21 +500,21 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(29, 9) Source(28, 52) + SourceIndex(0) -2 >Emitted(29, 10) Source(28, 53) + SourceIndex(0) -3 >Emitted(29, 14) Source(28, 53) + SourceIndex(0) +1->Emitted(30, 9) Source(28, 52) + SourceIndex(0) +2 >Emitted(30, 10) Source(28, 53) + SourceIndex(0) +3 >Emitted(30, 14) Source(28, 53) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > } -1 >Emitted(30, 6) Source(28, 55) + SourceIndex(0) +1 >Emitted(31, 6) Source(28, 55) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > >} -1 >Emitted(31, 2) Source(29, 2) + SourceIndex(0) +1 >Emitted(32, 2) Source(29, 2) + SourceIndex(0) --- >>>declare class internalC { 1-> @@ -492,15 +524,15 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >class 3 > internalC -1->Emitted(32, 1) Source(30, 15) + SourceIndex(0) -2 >Emitted(32, 15) Source(30, 21) + SourceIndex(0) -3 >Emitted(32, 24) Source(30, 30) + SourceIndex(0) +1->Emitted(33, 1) Source(30, 15) + SourceIndex(0) +2 >Emitted(33, 15) Source(30, 21) + SourceIndex(0) +3 >Emitted(33, 24) Source(30, 30) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > {} -1 >Emitted(33, 2) Source(30, 33) + SourceIndex(0) +1 >Emitted(34, 2) Source(30, 33) + SourceIndex(0) --- >>>declare function internalfoo(): void; 1-> @@ -513,10 +545,10 @@ sourceFile:../second/second_part1.ts 2 >function 3 > internalfoo 4 > () {} -1->Emitted(34, 1) Source(31, 15) + SourceIndex(0) -2 >Emitted(34, 18) Source(31, 24) + SourceIndex(0) -3 >Emitted(34, 29) Source(31, 35) + SourceIndex(0) -4 >Emitted(34, 38) Source(31, 40) + SourceIndex(0) +1->Emitted(35, 1) Source(31, 15) + SourceIndex(0) +2 >Emitted(35, 18) Source(31, 24) + SourceIndex(0) +3 >Emitted(35, 29) Source(31, 35) + SourceIndex(0) +4 >Emitted(35, 38) Source(31, 40) + SourceIndex(0) --- >>>declare namespace internalNamespace { 1-> @@ -528,10 +560,10 @@ sourceFile:../second/second_part1.ts 2 >namespace 3 > internalNamespace 4 > -1->Emitted(35, 1) Source(32, 15) + SourceIndex(0) -2 >Emitted(35, 19) Source(32, 25) + SourceIndex(0) -3 >Emitted(35, 36) Source(32, 42) + SourceIndex(0) -4 >Emitted(35, 37) Source(32, 43) + SourceIndex(0) +1->Emitted(36, 1) Source(32, 15) + SourceIndex(0) +2 >Emitted(36, 19) Source(32, 25) + SourceIndex(0) +3 >Emitted(36, 36) Source(32, 42) + SourceIndex(0) +4 >Emitted(36, 37) Source(32, 43) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -540,20 +572,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(36, 5) Source(32, 45) + SourceIndex(0) -2 >Emitted(36, 11) Source(32, 58) + SourceIndex(0) -3 >Emitted(36, 20) Source(32, 67) + SourceIndex(0) +1 >Emitted(37, 5) Source(32, 45) + SourceIndex(0) +2 >Emitted(37, 11) Source(32, 58) + SourceIndex(0) +3 >Emitted(37, 20) Source(32, 67) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(37, 6) Source(32, 70) + SourceIndex(0) +1 >Emitted(38, 6) Source(32, 70) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(38, 2) Source(32, 72) + SourceIndex(0) +1 >Emitted(39, 2) Source(32, 72) + SourceIndex(0) --- >>>declare namespace internalOther.something { 1-> @@ -569,12 +601,12 @@ sourceFile:../second/second_part1.ts 4 > . 5 > something 6 > -1->Emitted(39, 1) Source(33, 15) + SourceIndex(0) -2 >Emitted(39, 19) Source(33, 25) + SourceIndex(0) -3 >Emitted(39, 32) Source(33, 38) + SourceIndex(0) -4 >Emitted(39, 33) Source(33, 39) + SourceIndex(0) -5 >Emitted(39, 42) Source(33, 48) + SourceIndex(0) -6 >Emitted(39, 43) Source(33, 49) + SourceIndex(0) +1->Emitted(40, 1) Source(33, 15) + SourceIndex(0) +2 >Emitted(40, 19) Source(33, 25) + SourceIndex(0) +3 >Emitted(40, 32) Source(33, 38) + SourceIndex(0) +4 >Emitted(40, 33) Source(33, 39) + SourceIndex(0) +5 >Emitted(40, 42) Source(33, 48) + SourceIndex(0) +6 >Emitted(40, 43) Source(33, 49) + SourceIndex(0) --- >>> class someClass { 1 >^^^^ @@ -583,20 +615,20 @@ sourceFile:../second/second_part1.ts 1 >{ 2 > export class 3 > someClass -1 >Emitted(40, 5) Source(33, 51) + SourceIndex(0) -2 >Emitted(40, 11) Source(33, 64) + SourceIndex(0) -3 >Emitted(40, 20) Source(33, 73) + SourceIndex(0) +1 >Emitted(41, 5) Source(33, 51) + SourceIndex(0) +2 >Emitted(41, 11) Source(33, 64) + SourceIndex(0) +3 >Emitted(41, 20) Source(33, 73) + SourceIndex(0) --- >>> } 1 >^^^^^ 1 > {} -1 >Emitted(41, 6) Source(33, 76) + SourceIndex(0) +1 >Emitted(42, 6) Source(33, 76) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(42, 2) Source(33, 78) + SourceIndex(0) +1 >Emitted(43, 2) Source(33, 78) + SourceIndex(0) --- >>>import internalImport = internalNamespace.someClass; 1-> @@ -616,14 +648,14 @@ sourceFile:../second/second_part1.ts 6 > . 7 > someClass 8 > ; -1->Emitted(43, 1) Source(34, 15) + SourceIndex(0) -2 >Emitted(43, 8) Source(34, 22) + SourceIndex(0) -3 >Emitted(43, 22) Source(34, 36) + SourceIndex(0) -4 >Emitted(43, 25) Source(34, 39) + SourceIndex(0) -5 >Emitted(43, 42) Source(34, 56) + SourceIndex(0) -6 >Emitted(43, 43) Source(34, 57) + SourceIndex(0) -7 >Emitted(43, 52) Source(34, 66) + SourceIndex(0) -8 >Emitted(43, 53) Source(34, 67) + SourceIndex(0) +1->Emitted(44, 1) Source(34, 15) + SourceIndex(0) +2 >Emitted(44, 8) Source(34, 22) + SourceIndex(0) +3 >Emitted(44, 22) Source(34, 36) + SourceIndex(0) +4 >Emitted(44, 25) Source(34, 39) + SourceIndex(0) +5 >Emitted(44, 42) Source(34, 56) + SourceIndex(0) +6 >Emitted(44, 43) Source(34, 57) + SourceIndex(0) +7 >Emitted(44, 52) Source(34, 66) + SourceIndex(0) +8 >Emitted(44, 53) Source(34, 67) + SourceIndex(0) --- >>>declare type internalType = internalC; 1 > @@ -639,12 +671,12 @@ sourceFile:../second/second_part1.ts 4 > = 5 > internalC 6 > ; -1 >Emitted(44, 1) Source(35, 15) + SourceIndex(0) -2 >Emitted(44, 14) Source(35, 20) + SourceIndex(0) -3 >Emitted(44, 26) Source(35, 32) + SourceIndex(0) -4 >Emitted(44, 29) Source(35, 35) + SourceIndex(0) -5 >Emitted(44, 38) Source(35, 44) + SourceIndex(0) -6 >Emitted(44, 39) Source(35, 45) + SourceIndex(0) +1 >Emitted(45, 1) Source(35, 15) + SourceIndex(0) +2 >Emitted(45, 14) Source(35, 20) + SourceIndex(0) +3 >Emitted(45, 26) Source(35, 32) + SourceIndex(0) +4 >Emitted(45, 29) Source(35, 35) + SourceIndex(0) +5 >Emitted(45, 38) Source(35, 44) + SourceIndex(0) +6 >Emitted(45, 39) Source(35, 45) + SourceIndex(0) --- >>>declare const internalConst = 10; 1 > @@ -660,12 +692,12 @@ sourceFile:../second/second_part1.ts 4 > internalConst 5 > = 10 6 > ; -1 >Emitted(45, 1) Source(36, 15) + SourceIndex(0) -2 >Emitted(45, 9) Source(36, 15) + SourceIndex(0) -3 >Emitted(45, 15) Source(36, 21) + SourceIndex(0) -4 >Emitted(45, 28) Source(36, 34) + SourceIndex(0) -5 >Emitted(45, 33) Source(36, 39) + SourceIndex(0) -6 >Emitted(45, 34) Source(36, 40) + SourceIndex(0) +1 >Emitted(46, 1) Source(36, 15) + SourceIndex(0) +2 >Emitted(46, 9) Source(36, 15) + SourceIndex(0) +3 >Emitted(46, 15) Source(36, 21) + SourceIndex(0) +4 >Emitted(46, 28) Source(36, 34) + SourceIndex(0) +5 >Emitted(46, 33) Source(36, 39) + SourceIndex(0) +6 >Emitted(46, 34) Source(36, 40) + SourceIndex(0) --- >>>declare enum internalEnum { 1 > @@ -675,9 +707,9 @@ sourceFile:../second/second_part1.ts >/*@internal*/ 2 >enum 3 > internalEnum -1 >Emitted(46, 1) Source(37, 15) + SourceIndex(0) -2 >Emitted(46, 14) Source(37, 20) + SourceIndex(0) -3 >Emitted(46, 26) Source(37, 32) + SourceIndex(0) +1 >Emitted(47, 1) Source(37, 15) + SourceIndex(0) +2 >Emitted(47, 14) Source(37, 20) + SourceIndex(0) +3 >Emitted(47, 26) Source(37, 32) + SourceIndex(0) --- >>> a = 0, 1 >^^^^ @@ -687,9 +719,9 @@ sourceFile:../second/second_part1.ts 1 > { 2 > a 3 > -1 >Emitted(47, 5) Source(37, 35) + SourceIndex(0) -2 >Emitted(47, 6) Source(37, 36) + SourceIndex(0) -3 >Emitted(47, 10) Source(37, 36) + SourceIndex(0) +1 >Emitted(48, 5) Source(37, 35) + SourceIndex(0) +2 >Emitted(48, 6) Source(37, 36) + SourceIndex(0) +3 >Emitted(48, 10) Source(37, 36) + SourceIndex(0) --- >>> b = 1, 1->^^^^ @@ -699,9 +731,9 @@ sourceFile:../second/second_part1.ts 1->, 2 > b 3 > -1->Emitted(48, 5) Source(37, 38) + SourceIndex(0) -2 >Emitted(48, 6) Source(37, 39) + SourceIndex(0) -3 >Emitted(48, 10) Source(37, 39) + SourceIndex(0) +1->Emitted(49, 5) Source(37, 38) + SourceIndex(0) +2 >Emitted(49, 6) Source(37, 39) + SourceIndex(0) +3 >Emitted(49, 10) Source(37, 39) + SourceIndex(0) --- >>> c = 2 1->^^^^ @@ -710,15 +742,15 @@ sourceFile:../second/second_part1.ts 1->, 2 > c 3 > -1->Emitted(49, 5) Source(37, 41) + SourceIndex(0) -2 >Emitted(49, 6) Source(37, 42) + SourceIndex(0) -3 >Emitted(49, 10) Source(37, 42) + SourceIndex(0) +1->Emitted(50, 5) Source(37, 41) + SourceIndex(0) +2 >Emitted(50, 6) Source(37, 42) + SourceIndex(0) +3 >Emitted(50, 10) Source(37, 42) + SourceIndex(0) --- >>>} 1 >^ 2 > ^^^^^^^^^^^^^^^^^-> 1 > } -1 >Emitted(50, 2) Source(37, 44) + SourceIndex(0) +1 >Emitted(51, 2) Source(37, 44) + SourceIndex(0) --- ------------------------------------------------------------------- emittedFile:/src/2/second-output.d.ts @@ -732,9 +764,9 @@ sourceFile:../second/second_part2.ts 1-> 2 >class 3 > C -1->Emitted(51, 1) Source(1, 1) + SourceIndex(1) -2 >Emitted(51, 15) Source(1, 7) + SourceIndex(1) -3 >Emitted(51, 16) Source(1, 8) + SourceIndex(1) +1->Emitted(52, 1) Source(1, 1) + SourceIndex(1) +2 >Emitted(52, 15) Source(1, 7) + SourceIndex(1) +3 >Emitted(52, 16) Source(1, 8) + SourceIndex(1) --- >>> doSomething(): void; 1->^^^^ @@ -742,8 +774,8 @@ sourceFile:../second/second_part2.ts 1-> { > 2 > doSomething -1->Emitted(52, 5) Source(2, 5) + SourceIndex(1) -2 >Emitted(52, 16) Source(2, 16) + SourceIndex(1) +1->Emitted(53, 5) Source(2, 5) + SourceIndex(1) +2 >Emitted(53, 16) Source(2, 16) + SourceIndex(1) --- >>>} 1 >^ @@ -752,7 +784,7 @@ sourceFile:../second/second_part2.ts > console.log("something got done"); > } >} -1 >Emitted(53, 2) Source(5, 2) + SourceIndex(1) +1 >Emitted(54, 2) Source(5, 2) + SourceIndex(1) --- >>>//# sourceMappingURL=second-output.d.ts.map @@ -2336,32 +2368,32 @@ sourceFile:../second/second_part2.ts }, { "pos": 77, - "end": 151, + "end": 182, "kind": "internal" }, { - "pos": 153, - "end": 185, + "pos": 184, + "end": 216, "kind": "text" }, { - "pos": 185, - "end": 577, + "pos": 216, + "end": 608, "kind": "internal" }, { - "pos": 579, - "end": 582, + "pos": 610, + "end": 613, "kind": "text" }, { - "pos": 582, - "end": 995, + "pos": 613, + "end": 1026, "kind": "internal" }, { - "pos": 997, - "end": 1045, + "pos": 1028, + "end": 1076, "kind": "text" } ] @@ -2490,18 +2522,19 @@ declare namespace N { declare class normalC { ---------------------------------------------------------------------- -internal: (77-151) +internal: (77-182) constructor(); prop: string; method(): void; - c: number; + get c(): number; + set c(val: number); ---------------------------------------------------------------------- -text: (153-185) +text: (184-216) } declare namespace normalN { ---------------------------------------------------------------------- -internal: (185-577) +internal: (216-608) class C { } function foo(): void; @@ -2522,11 +2555,11 @@ internal: (185-577) c = 2 } ---------------------------------------------------------------------- -text: (579-582) +text: (610-613) } ---------------------------------------------------------------------- -internal: (582-995) +internal: (613-1026) declare class internalC { } declare function internalfoo(): void; @@ -2547,7 +2580,7 @@ declare enum internalEnum { c = 2 } ---------------------------------------------------------------------- -text: (997-1045) +text: (1028-1076) declare class C { doSomething(): void; } diff --git a/tests/baselines/reference/typeGuardOfFormThisMember.js b/tests/baselines/reference/typeGuardOfFormThisMember.js index 1d4d9df79e22d..50c8ff0f7890a 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMember.js +++ b/tests/baselines/reference/typeGuardOfFormThisMember.js @@ -178,8 +178,9 @@ declare namespace Test { class FileSystemObject { path: string; isFSO: this is FileSystemObject; - isFile: this is File; - readonly isDirectory: this is Directory; + get isFile(): this is File; + set isFile(param: this is File); + get isDirectory(): this is Directory; isNetworked: this is (Networked & this); constructor(path: string); } diff --git a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js index 1992c339b328d..8456dc1797ee8 100644 --- a/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js +++ b/tests/baselines/reference/typeGuardOfFormThisMemberErrors.js @@ -103,8 +103,9 @@ declare namespace Test { class FileSystemObject { path: string; isFSO: this is FileSystemObject; - isFile: this is File; - readonly isDirectory: this is Directory; + get isFile(): this is File; + set isFile(param: this is File); + get isDirectory(): this is Directory; isNetworked: this is (Networked & this); constructor(path: string); } diff --git a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.js b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.js index 871d8977a9de2..723ec89c0a65d 100644 --- a/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.js +++ b/tests/baselines/reference/uniqueSymbolsDeclarationsErrors.js @@ -141,7 +141,9 @@ export declare class ClassWithPrivateNamedMethods { static [s](): void; } export declare class ClassWithPrivateNamedAccessors { - [s]: any; - static [s]: any; + get [s](): any; + set [s](v: any); + static get [s](): any; + static set [s](v: any); } export {}; diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts new file mode 100644 index 0000000000000..7090c4c6c2a20 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideMethod.ts @@ -0,0 +1,8 @@ +// @target: esnext +// @useDefineForClassFields: true +class A { + m() { } +} +class B extends A { + get m() { return () => 1 } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts new file mode 100644 index 0000000000000..e23b28a18e9f1 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty.ts @@ -0,0 +1,16 @@ +// @target: esnext +// @useDefineForClassFields: true +class A { + p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} +class C { + p = 101 +} +class D extends C { + _secret = 11 + get p() { return this._secret } // error + set p(value) { this._secret = value } // error +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts new file mode 100644 index 0000000000000..a90b76ad23b99 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty2.ts @@ -0,0 +1,13 @@ +// @target: esnext +// @useDefineForClassFields: true +class Base { + x = 1; +} + +class Derived extends Base { + get x() { return 2; } // should be an error + set x(value) { console.log(`x was set to ${value}`); } +} + +const obj = new Derived(); // nothing printed +console.log(obj.x); // 1 diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts new file mode 100644 index 0000000000000..b081cef21e239 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty3.ts @@ -0,0 +1,10 @@ +// @target: esnext +// @useDefineForClassFields: true +declare class Animal { + sound: string +} +class Lion extends Animal { + _sound = 'grrr' + get sound() { return this._sound } // error here + set sound(val) { this._sound = val } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts new file mode 100644 index 0000000000000..021f81ea7e96d --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty4.ts @@ -0,0 +1,10 @@ +// @target: esnext +// @useDefineForClassFields: true +declare class Animal { + sound: string; +} +class Lion extends Animal { + _sound = 'roar' + get sound(): string { return this._sound } + set sound(val: string) { this._sound = val } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts new file mode 100644 index 0000000000000..fe8620d6f77e3 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty5.ts @@ -0,0 +1,11 @@ +// @target: esnext +// @useDefineForClassFields: true +interface I { + p: number +} +interface B extends I { } +class B { } +class C extends B { + get p() { return 1 } + set p(value) { } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts new file mode 100644 index 0000000000000..b782496f3fb84 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty6.ts @@ -0,0 +1,16 @@ +// @target: esnext +// @useDefineForClassFields: false +class A { + p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} +class C { + p = 101 +} +class D extends C { + _secret = 11 + get p() { return this._secret } // error + set p(value) { this._secret = value } // error +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts new file mode 100644 index 0000000000000..9be3dad44f832 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/accessorsOverrideProperty7.ts @@ -0,0 +1,8 @@ +// @target: es5 +// @useDefineForClassFields: true +abstract class A { + abstract p = 'yep' +} +class B extends A { + get p() { return 'oh no' } // error +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts new file mode 100644 index 0000000000000..73e1ee515d1d8 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyES5.ts @@ -0,0 +1,10 @@ +// @target: es5 +// @useDefineForClassFields: true +var x: "p" = "p" +class A { + a = 12 + b + ["computed"] = 13 + ;[x] = 14 + m() { } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts new file mode 100644 index 0000000000000..f6a62d32650fa --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/definePropertyOutputES3.ts @@ -0,0 +1,5 @@ +// @target: es3 +// @useDefineForClassFields: true +class A { + a = 12 +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts new file mode 100644 index 0000000000000..e2d7494dd6891 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/derivedUninitializedPropertyDeclaration.ts @@ -0,0 +1,67 @@ +// @strict: true +class A { + property = 'x'; + m() { return 1 } +} +class B extends A { + property: any; // error +} +class BD extends A { + declare property: any; // ok because it's implicitly initialised +} +class BDBang extends A { + declare property!: any; // ! is not allowed, this is an ambient declaration +} +class BOther extends A { + declare m() { return 2 } // not allowed on methods + declare nonce: any; // ok, even though it's not in the base + declare property = 'y' // initialiser not allowed with declare +} +class U { + declare nonce: any; // ok, even though there's no base +} + +class C { + p: string; +} +class D extends C { + p: 'hi'; // error +} +class DD extends C { + declare p: 'bye'; // ok +} + + +declare class E { + p1: string + p2: string +} +class F extends E { + p1!: 'z' + declare p2: 'alpha' +} + +class G extends E { + p1: 'z' + constructor() { + super() + this.p1 = 'z' + } +} + +abstract class H extends E { + abstract p1: 'a' | 'b' | 'c' + declare abstract p2: 'a' | 'b' | 'c' +} + +interface I { + q: number +} +interface J extends I { } +class J { + r = 5 +} +class K extends J { + q!: 1 | 2 | 3 // ok, extends a property from an interface + r!: 4 | 5 // error, from class +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/overrideInterfaceProperty.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/overrideInterfaceProperty.ts new file mode 100644 index 0000000000000..8b70357515cd2 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/overrideInterfaceProperty.ts @@ -0,0 +1,18 @@ +// @target: esnext +interface Mup { + readonly size: number; +} +interface MupConstructor { + new(): Mup; + new(entries?: readonly (readonly [K, V])[] | null): Mup; + readonly prototype: Mup; +} +declare var Mup: MupConstructor; + +class Sizz extends Mup { + // ok, because Mup is an interface + get size() { return 0 } +} +class Kasizz extends Mup { + size = -1 +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts new file mode 100644 index 0000000000000..aa00b32f64a4a --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors.ts @@ -0,0 +1,16 @@ +// @target: es2015 +// @useDefineForClassFields: true +class A { + get p() { return 'oh no' } +} +class B extends A { + p = 'yep' // error +} +class C { + _secret = 11 + get p() { return this._secret } + set p(value) { this._secret = value } +} +class D extends C { + p = 101 // error +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts new file mode 100644 index 0000000000000..51424d7f099ac --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors2.ts @@ -0,0 +1,13 @@ +// @target: esnext +// @useDefineForClassFields: true +class Base { + get x() { return 2; } + set x(value) { console.log(`x was set to ${value}`); } +} + +class Derived extends Base { + x = 1; +} + +const obj = new Derived(); // prints 'x was set to 1' +console.log(obj.x); // 2 diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts new file mode 100644 index 0000000000000..3376155a1506a --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors3.ts @@ -0,0 +1,25 @@ +// @target: esnext +// @useDefineForClassFields: true +class Animal { + _sound = 'rustling noise in the bushes' + + get sound() { return this._sound } + set sound(val) { + this._sound = val; + /* some important code here, perhaps tracking known sounds, etc */ + } + + makeSound() { + console.log(this._sound) + } +} + +const a = new Animal +a.makeSound() // 'rustling noise in the bushes' + +class Lion extends Animal { + sound = 'RAWR!' // error here +} + +const lion = new Lion +lion.makeSound() // with [[Define]]: Expected "RAWR!" but got "rustling noise in the bushes" diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts new file mode 100644 index 0000000000000..f4357465676f0 --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors4.ts @@ -0,0 +1,9 @@ +// @target: es5 +// @useDefineForClassFields: true +declare class Animal { + get sound(): string + set sound(val: string) +} +class Lion extends Animal { + sound = 'RAWR!' // error here +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts new file mode 100644 index 0000000000000..7f2947805013a --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesAccessors5.ts @@ -0,0 +1,10 @@ +// @target: esnext +// @useDefineForClassFields: true +class A { + get p() { return 'oh no' } +} +class B extends A { + constructor(public p: string) { + super() + } +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts new file mode 100644 index 0000000000000..ce0a03f15c68c --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/propertyOverridesMethod.ts @@ -0,0 +1,8 @@ +// @target: esnext +// @useDefineForClassFields: true +class A { + m() { } +} +class B extends A { + m = () => 1 +} diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/thisPropertyOverridesAccessors.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/thisPropertyOverridesAccessors.ts new file mode 100644 index 0000000000000..779d326fa6f3b --- /dev/null +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/thisPropertyOverridesAccessors.ts @@ -0,0 +1,17 @@ +// @target: esnext +// @allowjs: true +// @noemit: true +// @checkjs: true +// @Filename: foo.ts +class Foo { + get p() { return 1 } + set p(value) { } +} + +// @Filename: bar.js +class Bar extends Foo { + constructor() { + super() + this.p = 2 + } +} diff --git a/tests/cases/fourslash/codeFixAddMissingDeclareProperty.ts b/tests/cases/fourslash/codeFixAddMissingDeclareProperty.ts new file mode 100644 index 0000000000000..e4ebea338f6c3 --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingDeclareProperty.ts @@ -0,0 +1,19 @@ +/// +// @useDefineForClassFields: true + +////class B { +//// p = 1 +////} +////class C extends B { +//// p: number +////} + +verify.codeFix({ + description: "Prefix with 'declare'", + newFileContent: `class B { + p = 1 +} +class C extends B { + declare p: number +}` +}); diff --git a/tests/cases/fourslash/codeFixAddMissingDeclareProperty2.ts b/tests/cases/fourslash/codeFixAddMissingDeclareProperty2.ts new file mode 100644 index 0000000000000..5abf2b0e233fc --- /dev/null +++ b/tests/cases/fourslash/codeFixAddMissingDeclareProperty2.ts @@ -0,0 +1,26 @@ +/// +// @useDefineForClassFields: true + +////class B { +//// p = 1 +////} +////class C extends B { +//// p: number +////} +////class D extends B { +//// p: 1 | 2 | 3 +////} + +verify.codeFixAll({ + fixId: "addMissingDeclareProperty", + fixAllDescription: "Prefix all incorrect property declarations with 'declare'", + newFileContent: `class B { + p = 1 +} +class C extends B { + declare p: number +} +class D extends B { + declare p: 1 | 2 | 3 +}` +}); diff --git a/tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts b/tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts index 21489b5d8aa9b..82dfe9429e1b2 100644 --- a/tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts +++ b/tests/cases/fourslash/derivedTypeIndexerWithGenericConstraints.ts @@ -13,7 +13,7 @@ ////} ////class DbSet extends BaseCollection { // error -//// _itemsByKey: { [key: string]: TEntity; }; +//// _itemsByKey: { [key: string]: TEntity; } = {}; ////} ////var a: BaseCollection; diff --git a/tests/cases/fourslash/incompatibleOverride.ts b/tests/cases/fourslash/incompatibleOverride.ts index 0b3dd3230154c..1ce0b07def189 100644 --- a/tests/cases/fourslash/incompatibleOverride.ts +++ b/tests/cases/fourslash/incompatibleOverride.ts @@ -3,8 +3,8 @@ // Squiggle for implementing a derived class with an incompatible override is too large //// class Foo { xyz: string; } -//// class Bar extends Foo { /*1*/xyz/*2*/: number; } -//// class Baz extends Foo { public /*3*/xyz/*4*/: number; } +//// class Bar extends Foo { /*1*/xyz/*2*/: number = 1; } +//// class Baz extends Foo { public /*3*/xyz/*4*/: number = 2; } //// class /*5*/Baf/*6*/ extends Foo { //// constructor(public xyz: number) { //// super(); @@ -14,4 +14,4 @@ verify.errorExistsBetweenMarkers('1', '2'); verify.errorExistsBetweenMarkers('3', '4'); verify.errorExistsBetweenMarkers('5', '6'); -verify.numberOfErrorsInCurrentFile(3); \ No newline at end of file +verify.numberOfErrorsInCurrentFile(3); diff --git a/tests/cases/fourslash/squiggleIllegalSubclassOverride.ts b/tests/cases/fourslash/squiggleIllegalSubclassOverride.ts index 955d461b9f13a..c97c6c75fcf5b 100644 --- a/tests/cases/fourslash/squiggleIllegalSubclassOverride.ts +++ b/tests/cases/fourslash/squiggleIllegalSubclassOverride.ts @@ -5,8 +5,8 @@ ////} //// ////class Bar extends Foo { -//// public /*1*/x/*2*/: string; +//// public /*1*/x/*2*/: string = 'hi'; ////} verify.errorExistsBetweenMarkers("1", "2"); -verify.numberOfErrorsInCurrentFile(1); \ No newline at end of file +verify.numberOfErrorsInCurrentFile(1);