From 1d471358e01b302c39da10d9b10236b84e88b7f2 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 10 Jul 2024 11:03:38 -0700 Subject: [PATCH 1/2] Improve error message for unserializable private and public class members --- src/compiler/diagnosticMessages.json | 2 +- src/compiler/transformers/declarations.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index ee05ca893c7e6..93addf68f2d33 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -4212,7 +4212,7 @@ "category": "Error", "code": 4092 }, - "Property '{0}' of exported class expression may not be private or protected.": { + "Property '{0}' of exported anonymous class type may not be private or protected.": { "category": "Error", "code": 4094 }, diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 52210a876f2a8..166431a745069 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -357,7 +357,10 @@ export function transformDeclarations(context: TransformationContext) { function reportPrivateInBaseOfClassExpression(propertyName: string) { if (errorNameNode || errorFallbackNode) { context.addDiagnostic( - createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName), + addRelatedInfo( + createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.Property_0_of_exported_anonymous_class_type_may_not_be_private_or_protected, propertyName), + ...(isVariableDeclaration((errorNameNode || errorFallbackNode)!.parent) ? [createDiagnosticForNode((errorNameNode || errorFallbackNode)!, Diagnostics.Add_a_type_annotation_to_the_variable_0, errorDeclarationNameWithFallback())] : []), + ), ); } } From 38c2ca4d85937126d15a5ff505cc3473ab6b001e Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 10 Jul 2024 11:12:28 -0700 Subject: [PATCH 2/2] Baseline updates --- ...rationEmitMixinPrivateProtected.errors.txt | 24 +- ...assExpressionInDeclarationFile2.errors.txt | 18 +- .../multiFile/dts-errors-with-incremental.js | 108 +++++-- .../tsbuild/noCheck/multiFile/dts-errors.js | 35 +- .../outFile/dts-errors-with-incremental.js | 96 ++++-- .../tsbuild/noCheck/outFile/dts-errors.js | 35 +- ...ble-changes-with-incremental-as-modules.js | 48 ++- ...aration-enable-changes-with-incremental.js | 48 ++- ...tion-enable-changes-with-multiple-files.js | 202 +++++++++--- ...-errors-with-declaration-enable-changes.js | 21 +- .../dts-errors-with-incremental-as-modules.js | 94 ++++-- .../multiFile/dts-errors-with-incremental.js | 94 ++++-- ...dts-enabled-with-incremental-as-modules.js | 16 +- ...rs-without-dts-enabled-with-incremental.js | 16 +- .../tsbuild/noEmit/multiFile/dts-errors.js | 35 +- ...ble-changes-with-incremental-as-modules.js | 72 ++++- ...aration-enable-changes-with-incremental.js | 72 ++++- ...tion-enable-changes-with-multiple-files.js | 304 ++++++++++++++---- ...-errors-with-declaration-enable-changes.js | 21 +- .../dts-errors-with-incremental-as-modules.js | 86 ++++- .../outFile/dts-errors-with-incremental.js | 86 ++++- .../tsbuild/noEmit/outFile/dts-errors.js | 35 +- ...rrors-with-declaration-with-incremental.js | 31 +- .../multiFile/dts-errors-with-declaration.js | 14 +- ...rrors-with-declaration-with-incremental.js | 31 +- .../outFile/dts-errors-with-declaration.js | 14 +- .../dts-errors-with-incremental-as-modules.js | 87 +++-- .../multiFile/dts-errors-with-incremental.js | 87 +++-- ...dts-enabled-with-incremental-as-modules.js | 16 +- ...rs-without-dts-enabled-with-incremental.js | 16 +- .../noEmit/multiFile/dts-errors.js | 28 +- .../dts-errors-with-incremental-as-modules.js | 79 ++++- .../outFile/dts-errors-with-incremental.js | 79 ++++- .../tsbuildWatch/noEmit/outFile/dts-errors.js | 28 +- ...Error-with-declaration-with-incremental.js | 35 +- .../noEmitOnError-with-declaration.js | 14 +- .../noEmitOnError-with-incremental.js | 8 +- ...Error-with-declaration-with-incremental.js | 31 +- .../outFile/noEmitOnError-with-declaration.js | 14 +- .../when-file-with-no-error-changes.js | 56 +++- ...ing-errors-only-changed-file-is-emitted.js | 28 +- .../when-file-with-no-error-changes.js | 48 ++- ...ixing-error-files-all-files-are-emitted.js | 24 +- ...ion-field-with-declaration-emit-enabled.js | 35 +- ...e-to-modifier-of-class-expression-field.js | 8 +- .../multiFile/dts-errors-with-incremental.js | 122 +++++-- .../tsc/noCheck/multiFile/dts-errors.js | 42 ++- .../outFile/dts-errors-with-incremental.js | 110 +++++-- .../tsc/noCheck/outFile/dts-errors.js | 42 ++- ...tion-enable-changes-with-multiple-files.js | 202 +++++++++--- .../dts-errors-with-incremental-as-modules.js | 94 ++++-- .../multiFile/dts-errors-with-incremental.js | 94 ++++-- ...dts-enabled-with-incremental-as-modules.js | 16 +- ...rs-without-dts-enabled-with-incremental.js | 16 +- .../tsc/noEmit/multiFile/dts-errors.js | 35 +- ...tion-enable-changes-with-multiple-files.js | 304 ++++++++++++++---- .../dts-errors-with-incremental-as-modules.js | 86 ++++- .../outFile/dts-errors-with-incremental.js | 86 ++++- .../tsc/noEmit/outFile/dts-errors.js | 35 +- ...rrors-with-declaration-with-incremental.js | 31 +- .../multiFile/dts-errors-with-declaration.js | 14 +- ...rrors-with-declaration-with-incremental.js | 31 +- .../outFile/dts-errors-with-declaration.js | 14 +- .../dts-errors-with-incremental-as-modules.js | 87 +++-- .../multiFile/dts-errors-with-incremental.js | 87 +++-- ...dts-enabled-with-incremental-as-modules.js | 16 +- ...rs-without-dts-enabled-with-incremental.js | 16 +- .../tscWatch/noEmit/multiFile/dts-errors.js | 28 +- .../dts-errors-with-incremental-as-modules.js | 79 ++++- .../outFile/dts-errors-with-incremental.js | 79 ++++- .../tscWatch/noEmit/outFile/dts-errors.js | 28 +- ...Error-with-declaration-with-incremental.js | 28 +- .../noEmitOnError-with-declaration.js | 7 +- .../noEmitOnError-with-incremental.js | 8 +- ...Error-with-declaration-with-incremental.js | 24 +- .../outFile/noEmitOnError-with-declaration.js | 7 +- 76 files changed, 3355 insertions(+), 890 deletions(-) diff --git a/tests/baselines/reference/declarationEmitMixinPrivateProtected.errors.txt b/tests/baselines/reference/declarationEmitMixinPrivateProtected.errors.txt index fc22a0e6d9107..8b35fc36cc480 100644 --- a/tests/baselines/reference/declarationEmitMixinPrivateProtected.errors.txt +++ b/tests/baselines/reference/declarationEmitMixinPrivateProtected.errors.txt @@ -1,9 +1,9 @@ -another.ts(11,1): error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. -another.ts(11,1): error TS4094: Property '_onDispose' of exported class expression may not be private or protected. -first.ts(12,1): error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. -first.ts(12,1): error TS4094: Property '_onDispose' of exported class expression may not be private or protected. -first.ts(13,14): error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. -first.ts(13,14): error TS4094: Property '_onDispose' of exported class expression may not be private or protected. +another.ts(11,1): error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. +another.ts(11,1): error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. +first.ts(12,1): error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. +first.ts(12,1): error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. +first.ts(13,14): error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. +first.ts(13,14): error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. ==== first.ts (4 errors) ==== @@ -20,14 +20,14 @@ first.ts(13,14): error TS4094: Property '_onDispose' of exported class expressio // No error, but definition is wrong. export default mix(DisposableMixin); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. +!!! error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4094: Property '_onDispose' of exported class expression may not be private or protected. +!!! error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. export class Monitor extends mix(DisposableMixin) { ~~~~~~~ -!!! error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. +!!! error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. ~~~~~~~ -!!! error TS4094: Property '_onDispose' of exported class expression may not be private or protected. +!!! error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. protected _onDispose() { } } @@ -45,9 +45,9 @@ first.ts(13,14): error TS4094: Property '_onDispose' of exported class expressio export default class extends mix(DisposableMixin) { ~~~~~~ -!!! error TS4094: Property '_assertIsStripped' of exported class expression may not be private or protected. +!!! error TS4094: Property '_assertIsStripped' of exported anonymous class type may not be private or protected. ~~~~~~ -!!! error TS4094: Property '_onDispose' of exported class expression may not be private or protected. +!!! error TS4094: Property '_onDispose' of exported anonymous class type may not be private or protected. protected _onDispose() { } } \ No newline at end of file diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt index 450f3de1c3b6f..e755cfdfa259b 100644 --- a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt @@ -1,15 +1,17 @@ -emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported class expression may not be private or protected. -emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. -emitClassExpressionInDeclarationFile2.ts(16,17): error TS4094: Property 'property' of exported class expression may not be private or protected. -emitClassExpressionInDeclarationFile2.ts(23,14): error TS4094: Property 'property' of exported class expression may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported anonymous class type may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported anonymous class type may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(16,17): error TS4094: Property 'property' of exported anonymous class type may not be private or protected. +emitClassExpressionInDeclarationFile2.ts(23,14): error TS4094: Property 'property' of exported anonymous class type may not be private or protected. ==== emitClassExpressionInDeclarationFile2.ts (4 errors) ==== export var noPrivates = class { ~~~~~~~~~~ -!!! error TS4094: Property 'p' of exported class expression may not be private or protected. +!!! error TS4094: Property 'p' of exported anonymous class type may not be private or protected. +!!! related TS9027 emitClassExpressionInDeclarationFile2.ts:1:12: Add a type annotation to the variable noPrivates. ~~~~~~~~~~ -!!! error TS4094: Property 'ps' of exported class expression may not be private or protected. +!!! error TS4094: Property 'ps' of exported anonymous class type may not be private or protected. +!!! related TS9027 emitClassExpressionInDeclarationFile2.ts:1:12: Add a type annotation to the variable noPrivates. static getTags() { } tags() { } private static ps = -1 @@ -26,7 +28,7 @@ emitClassExpressionInDeclarationFile2.ts(23,14): error TS4094: Property 'propert export type Constructor = new(...args: any[]) => T; export function WithTags>(Base: T) { ~~~~~~~~ -!!! error TS4094: Property 'property' of exported class expression may not be private or protected. +!!! error TS4094: Property 'property' of exported anonymous class type may not be private or protected. return class extends Base { static getTags(): void { } tags(): void { } @@ -35,7 +37,7 @@ emitClassExpressionInDeclarationFile2.ts(23,14): error TS4094: Property 'propert export class Test extends WithTags(FooItem) {} ~~~~ -!!! error TS4094: Property 'property' of exported class expression may not be private or protected. +!!! error TS4094: Property 'property' of exported anonymous class type may not be private or protected. const test = new Test(); diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js index 2b8ec7f8baafb..4f56ab3b48b51 100644 --- a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors-with-incremental.js @@ -40,11 +40,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -98,7 +103,7 @@ exports.b = 10; //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -164,16 +169,25 @@ exports.b = 10; { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1007 + "size": 1140 } @@ -474,11 +488,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -520,7 +539,7 @@ exports.a = /** @class */ (function () { //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -542,10 +561,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -582,16 +601,25 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1207 + "size": 1345 } @@ -625,11 +653,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -657,7 +690,7 @@ No shapes updated in the builder:: //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -679,10 +712,10 @@ No shapes updated in the builder:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -713,15 +746,24 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1154 + "size": 1292 } @@ -1089,11 +1131,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -1137,7 +1184,7 @@ exports.a = /** @class */ (function () { //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1160,10 +1207,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -1223,16 +1270,25 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1460 + "size": 1598 } diff --git a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js index 950a2216c968b..f8474c1b1355e 100644 --- a/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck/multiFile/dts-errors.js @@ -39,11 +39,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -127,11 +132,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -362,11 +372,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -458,11 +473,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -744,11 +764,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js index 508d4c8ee1f81..f300a4516fb9f 100644 --- a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors-with-incremental.js @@ -42,11 +42,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -96,7 +101,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -146,16 +151,25 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 943 + "size": 1076 } @@ -432,11 +446,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -486,7 +505,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -536,16 +555,25 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 943 + "size": 1076 } @@ -579,11 +607,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -615,7 +648,7 @@ No shapes updated in the builder:: //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -651,15 +684,24 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 886 + "size": 1019 } @@ -1006,11 +1048,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -1068,7 +1115,7 @@ define("c", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1127,16 +1174,25 @@ define("c", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1010 + "size": 1143 } diff --git a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js index 0943e3419535b..afae5e88d4d60 100644 --- a/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js +++ b/tests/baselines/reference/tsbuild/noCheck/outFile/dts-errors.js @@ -41,11 +41,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -125,11 +130,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -364,11 +374,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -465,11 +480,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... @@ -766,11 +786,16 @@ Output:: [HH:MM:SS AM] Building project '/src/tsconfig.json'... -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/src/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js index 3243a484d0b02..522cc445902ce 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js @@ -151,11 +151,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -183,7 +188,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -231,9 +236,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -255,7 +269,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 933 + "size": 1066 } @@ -391,11 +405,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -445,7 +464,7 @@ exports.b = 10; //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -497,15 +516,24 @@ exports.b = 10; { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 959 + "size": 1092 } diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental.js index 3933ef21d638a..6df06eba3f887 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-incremental.js @@ -136,11 +136,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -166,7 +171,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -210,9 +215,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -227,7 +241,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 908 + "size": 1040 } @@ -350,11 +364,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -388,7 +407,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -432,15 +451,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 872 + "size": 1004 } diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js index 5294f6174b6ff..40810085eaf8b 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js @@ -187,21 +187,36 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors. @@ -233,7 +248,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17],[5,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17],[5,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -295,9 +310,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -307,9 +331,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -319,9 +352,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -357,7 +399,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 1375 + "size": 1774 } @@ -525,21 +567,36 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors. @@ -617,7 +674,7 @@ exports.d = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -683,9 +740,18 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -695,9 +761,18 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -707,15 +782,24 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1387 + "size": 1786 } @@ -765,7 +849,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -832,9 +916,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -844,9 +937,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -858,7 +960,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1352 + "size": 1618 } @@ -876,16 +978,26 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors. @@ -917,7 +1029,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,16],[4,16],[5,16]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,16],[4,16],[5,16]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -987,9 +1099,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -999,9 +1120,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -1037,7 +1167,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 1409 + "size": 1675 } diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes.js index 079a2e65c561a..ceae566a8fac9 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-declaration-enable-changes.js @@ -124,11 +124,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -184,11 +189,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -284,11 +294,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental-as-modules.js index 096c05cebd2c9..2828df7289897 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental-as-modules.js @@ -40,11 +40,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -78,7 +83,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -126,9 +131,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -150,7 +164,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 933 + "size": 1066 } @@ -168,11 +182,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -471,11 +490,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -505,7 +529,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -527,10 +551,10 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -561,9 +585,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -578,7 +611,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1199 + "size": 1337 } @@ -596,11 +629,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -639,7 +677,7 @@ exports.a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -661,10 +699,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -695,15 +733,24 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1163 + "size": 1301 } @@ -721,11 +768,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental.js index 8fa2618b0637c..d1948b4bbffbb 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-with-incremental.js @@ -37,11 +37,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -71,7 +76,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -115,9 +120,18 @@ Shape signatures in builder refreshed for:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -132,7 +146,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 908 + "size": 1040 } @@ -150,11 +164,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -409,11 +428,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -442,7 +466,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -463,11 +487,11 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -487,9 +511,18 @@ Shape signatures in builder refreshed for:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -504,7 +537,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1092 + "size": 1228 } @@ -522,11 +555,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -560,7 +598,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -581,11 +619,11 @@ var a = /** @class */ (function () { "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -605,15 +643,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1056 + "size": 1192 } @@ -631,11 +678,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js index 2973ac52377cb..2ab008bb3192e 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js @@ -407,7 +407,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -429,10 +429,10 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -456,7 +456,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 921 + "size": 926 } @@ -508,7 +508,7 @@ exports.a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -530,10 +530,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -551,7 +551,7 @@ exports.a = /** @class */ (function () { ] ], "version": "FakeTSVersion", - "size": 890 + "size": 895 } diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js index 1ee9d031e5088..29a64d95fdcf5 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js @@ -360,7 +360,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -381,11 +381,11 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -402,7 +402,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 884 + "size": 888 } @@ -449,7 +449,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -470,11 +470,11 @@ var a = /** @class */ (function () { "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -485,7 +485,7 @@ var a = /** @class */ (function () { ] ], "version": "FakeTSVersion", - "size": 853 + "size": 857 } diff --git a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors.js b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors.js index e466c16b3b0fb..4879d4ae1cf03 100644 --- a/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/multiFile/dts-errors.js @@ -36,11 +36,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -96,11 +101,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -307,11 +317,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -367,11 +382,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... @@ -427,11 +447,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js index db2986c4b3d4b..f57c10c47a161 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental-as-modules.js @@ -136,11 +136,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -170,7 +175,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -206,9 +211,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -218,7 +232,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 918 + "size": 1051 } @@ -236,11 +250,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -271,7 +290,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -308,9 +327,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -320,7 +348,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 940 + "size": 1073 } @@ -354,11 +382,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -407,7 +440,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -443,15 +476,24 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 901 + "size": 1034 } diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental.js index 1c057f6ec493a..ca867b9921c5a 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-incremental.js @@ -121,11 +121,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -152,7 +157,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -181,9 +186,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -193,7 +207,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 843 + "size": 975 } @@ -211,11 +225,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -243,7 +262,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"declarationMap":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"declarationMap":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -273,9 +292,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -285,7 +313,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 865 + "size": 997 } @@ -319,11 +347,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -358,7 +391,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -387,15 +420,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 826 + "size": 958 } diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js index 102e0ea355f6a..5e7226ff27550 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js @@ -156,21 +156,36 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors. @@ -204,7 +219,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -248,9 +263,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -260,9 +284,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -272,9 +305,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -284,7 +326,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1362 + "size": 1761 } @@ -302,21 +344,36 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors. @@ -351,7 +408,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -396,9 +453,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -408,9 +474,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -420,9 +495,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -432,7 +516,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1384 + "size": 1783 } @@ -466,21 +550,36 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors. @@ -555,7 +654,7 @@ define("d", ["require", "exports"], function (require, exports) { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -599,9 +698,18 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -611,9 +719,18 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -623,15 +740,24 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1345 + "size": 1744 } @@ -745,16 +871,26 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors. @@ -788,7 +924,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -832,9 +968,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -844,9 +989,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -856,7 +1010,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1215 + "size": 1481 } @@ -874,16 +1028,26 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors. @@ -918,7 +1082,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -963,9 +1127,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -975,9 +1148,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -987,7 +1169,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1237 + "size": 1503 } @@ -1008,11 +1190,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 1 error. @@ -1052,7 +1239,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-15184115393-export const c = class { public p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-15184115393-export const c = class { public p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1097,9 +1284,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -1109,6 +1305,6 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1090 + "size": 1223 } diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes.js index 3370cfbd077c1..cb596d12a7647 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-declaration-enable-changes.js @@ -124,11 +124,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -183,11 +188,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -281,11 +291,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental-as-modules.js index 8350ee6f74419..de1f264878f39 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental-as-modules.js @@ -42,11 +42,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -79,7 +84,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -115,9 +120,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -127,7 +141,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 918 + "size": 1051 } @@ -145,11 +159,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -409,11 +428,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -446,7 +470,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -482,9 +506,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -494,7 +527,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 918 + "size": 1051 } @@ -512,11 +545,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -565,7 +603,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -601,15 +639,24 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 901 + "size": 1034 } @@ -627,11 +674,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental.js index 52096d340eda5..0b2e7bac091e1 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors-with-incremental.js @@ -38,11 +38,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -71,7 +76,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -100,9 +105,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -112,7 +126,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 843 + "size": 975 } @@ -130,11 +144,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -354,11 +373,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -387,7 +411,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -416,9 +440,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -428,7 +461,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 843 + "size": 975 } @@ -446,11 +479,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -485,7 +523,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -514,15 +552,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 826 + "size": 958 } @@ -540,11 +587,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors.js b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors.js index 2ccad5295c726..536603a464c63 100644 --- a/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors.js +++ b/tests/baselines/reference/tsbuild/noEmit/outFile/dts-errors.js @@ -37,11 +37,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -96,11 +101,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -303,11 +313,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -362,11 +377,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... @@ -421,11 +441,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js index c7a71ad86a284..5da7217ca3c39 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js @@ -52,11 +52,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -95,7 +100,7 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -163,9 +168,18 @@ Shape signatures in builder refreshed for:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -194,7 +208,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1182 + "size": 1315 } @@ -212,11 +226,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration.js index d6f15f28e9f10..54602900f5696 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/multiFile/dts-errors-with-declaration.js @@ -51,11 +51,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -122,11 +127,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js index 4b4d464949594..1f7c57a71e8a2 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js @@ -53,11 +53,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -93,7 +98,7 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -135,9 +140,18 @@ No shapes updated in the builder:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -147,7 +161,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1124 + "size": 1257 } @@ -165,11 +179,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration.js b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration.js index 2de91ad7b61b0..7e6e18be3d610 100644 --- a/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration.js +++ b/tests/baselines/reference/tsbuild/noEmitOnError/outFile/dts-errors-with-declaration.js @@ -52,11 +52,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. @@ -120,11 +125,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js index ae395d7305dff..a15edbb64aa11 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js @@ -43,17 +43,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -101,9 +106,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -125,7 +139,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 935 + "size": 1068 } @@ -507,17 +521,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -539,10 +558,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -573,9 +592,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -590,7 +618,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1201 + "size": 1339 } @@ -649,17 +677,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -681,10 +714,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -715,15 +748,24 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1165 + "size": 1303 } //// [/home/src/projects/project/a.js] @@ -792,11 +834,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental.js index ce5289e38085b..c8c64df6dbddc 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-with-incremental.js @@ -40,17 +40,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -94,9 +99,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -111,7 +125,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 910 + "size": 1042 } @@ -443,17 +457,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -474,11 +493,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -498,9 +517,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -515,7 +543,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1094 + "size": 1230 } @@ -573,17 +601,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -604,11 +637,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -628,15 +661,24 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1058 + "size": 1194 } //// [/home/src/projects/project/a.js] @@ -700,11 +742,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js index 115b9ea4aa5cf..34819a05c53ed 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js @@ -453,7 +453,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -475,10 +475,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -502,7 +502,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 923 + "size": 928 } @@ -564,7 +564,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -586,10 +586,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -607,7 +607,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 892 + "size": 897 } //// [/home/src/projects/project/a.js] diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js index 99c67ebf4dfa1..4dcf73f36ecc3 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js @@ -403,7 +403,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -424,11 +424,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -445,7 +445,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 886 + "size": 890 } @@ -506,7 +506,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -527,11 +527,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -542,7 +542,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 855 + "size": 859 } //// [/home/src/projects/project/a.js] diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors.js b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors.js index 307218a51481b..c85a39b65caae 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/multiFile/dts-errors.js @@ -39,11 +39,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -303,11 +308,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -378,11 +388,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -451,11 +466,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js index 375bad2f20102..cd0f9b2da48c7 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js @@ -45,17 +45,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -91,9 +96,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -103,7 +117,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 920 + "size": 1053 } @@ -449,17 +463,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -495,9 +514,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -507,7 +535,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 920 + "size": 1053 } @@ -571,17 +599,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -617,15 +650,24 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 903 + "size": 1036 } //// [/home/src/projects/outFile.js] @@ -706,11 +748,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental.js index 9e7f9ade2a504..c8e8394931f89 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors-with-incremental.js @@ -41,17 +41,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -80,9 +85,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -92,7 +106,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 845 + "size": 977 } @@ -390,17 +404,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -429,9 +448,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -441,7 +469,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 845 + "size": 977 } @@ -500,17 +528,22 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -539,15 +572,24 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 828 + "size": 960 } //// [/home/src/projects/outFile.js] @@ -613,11 +655,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors.js b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors.js index 67ea67b59906c..7dd72a6089ff8 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors.js +++ b/tests/baselines/reference/tsbuildWatch/noEmit/outFile/dts-errors.js @@ -40,11 +40,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -307,11 +312,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -383,11 +393,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Updating unchanged output timestamps of project '/home/src/projects/project/tsconfig.json'... [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -458,11 +473,16 @@ Output:: [HH:MM:SS AM] Building project '/home/src/projects/project/tsconfig.json'... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js index 2ae6b355e94c3..da9b25be04dbd 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js @@ -865,17 +865,22 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[3,17]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -907,10 +912,10 @@ Output:: "../src/main.ts": { "original": { "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "../src/other.ts": { "original": { @@ -951,9 +956,18 @@ Output:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -968,7 +982,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1423 + "size": 1560 } @@ -1023,11 +1037,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js index 3173036158946..adce4fe545ad2 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js @@ -663,11 +663,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -738,11 +743,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js index 9bd0010b46ea9..ee224a7c2c108 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js @@ -832,7 +832,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -864,10 +864,10 @@ Output:: "../src/main.ts": { "original": { "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "../src/other.ts": { "version": "9084524823-console.log(\"hi\");\nexport { }\n", @@ -897,7 +897,7 @@ Output:: ] }, "version": "FakeTSVersion", - "size": 1144 + "size": 1148 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js index ac08fc8677ccd..c7936aad83c57 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js @@ -743,17 +743,22 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -795,9 +800,18 @@ Output:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -807,7 +821,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 1124 + "size": 1257 } @@ -865,11 +879,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js index 4a0320fd7f999..6d24c3a898251 100644 --- a/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js +++ b/tests/baselines/reference/tsbuildWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js @@ -669,11 +669,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -747,11 +752,16 @@ Output:: [HH:MM:SS AM] Building project '/user/username/projects/noEmitOnError/tsconfig.json'... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js index effddb855e312..cc76ddf73c2c9 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-file-with-no-error-changes.js @@ -194,11 +194,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -217,7 +222,7 @@ exports.myClassWithError = /** @class */ (function () { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -239,10 +244,10 @@ exports.myClassWithError = /** @class */ (function () { "./filewitherror.ts": { "original": { "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./filewithouterror.ts": { "original": { @@ -273,9 +278,18 @@ exports.myClassWithError = /** @class */ (function () { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -288,7 +302,7 @@ exports.myClassWithError = /** @class */ (function () { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1381 + "size": 1534 } @@ -336,11 +350,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -363,7 +382,7 @@ export declare class myClass2 { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -385,10 +404,10 @@ export declare class myClass2 { "./filewitherror.ts": { "original": { "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./filewithouterror.ts": { "original": { @@ -419,9 +438,18 @@ export declare class myClass2 { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -434,7 +462,7 @@ export declare class myClass2 { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1383 + "size": 1536 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js index 7c363fac00ec1..17c3dd5bf27ae 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/introduceError/when-fixing-errors-only-changed-file-is-emitted.js @@ -194,11 +194,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -217,7 +222,7 @@ exports.myClassWithError = /** @class */ (function () { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},{"version":"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };","signature":"1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[[2,"6892461904-export declare var myClassWithError: {\n new (): {\n tags(): void;\n };\n};\n"]],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -239,10 +244,10 @@ exports.myClassWithError = /** @class */ (function () { "./filewitherror.ts": { "original": { "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };", - "signature": "7927555551-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "1132390746-export declare var myClassWithError: {\n new (): {\n tags(): void;\n p: number;\n };\n};\n(11,16)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./filewithouterror.ts": { "original": { @@ -273,9 +278,18 @@ exports.myClassWithError = /** @class */ (function () { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -288,7 +302,7 @@ exports.myClassWithError = /** @class */ (function () { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1381 + "size": 1534 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js index 9f9f0d052a2c7..926d8233f971b 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-file-with-no-error-changes.js @@ -35,11 +35,16 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -75,7 +80,7 @@ export declare class myClass { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -127,9 +132,18 @@ export declare class myClass { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -139,7 +153,7 @@ export declare class myClass { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1035 + "size": 1184 } @@ -202,11 +216,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -229,7 +248,7 @@ export declare class myClass2 { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-10959532701-export class myClass2 { }","signature":"-8459626297-export declare class myClass2 {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -281,9 +300,18 @@ export declare class myClass2 { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -293,7 +321,7 @@ export declare class myClass2 { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1037 + "size": 1186 } diff --git a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js index 1d0451aecbbf1..1ea1b9c68a523 100644 --- a/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js +++ b/tests/baselines/reference/tsbuildWatch/programUpdates/reportErrors/declarationEmitErrors/when-fixing-error-files-all-files-are-emitted.js @@ -35,11 +35,16 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported class expression may not be private or protected. +app/fileWithError.ts:1:12 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export var myClassWithError = class {    ~~~~~~~~~~~~~~~~ + app/fileWithError.ts:1:12 + 1 export var myClassWithError = class { +    ~~~~~~~~~~~~~~~~ + Add a type annotation to the variable myClassWithError. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -75,7 +80,7 @@ export declare class myClass { //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","./filewitherror.ts","./filewithouterror.ts"],"fileInfos":[{"version":"-7698705165-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }","affectsGlobalScope":true},"-8103865863-export var myClassWithError = class {\n tags() { }\n private p = 12\n };",{"version":"-11785903855-export class myClass { }","signature":"-7432826827-export declare class myClass {\n}\n"}],"root":[2,3],"options":{"composite":true},"emitDiagnosticsPerFile":[[2,[{"start":11,"length":16,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":11,"length":16,"messageText":"Add a type annotation to the variable myClassWithError.","category":1,"code":9027}]}]]],"emitSignatures":[2],"latestChangedDtsFile":"./fileWithoutError.d.ts","version":"FakeTSVersion"} //// [/user/username/projects/solution/app/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -127,9 +132,18 @@ export declare class myClass { { "start": 11, "length": 16, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 11, + "length": 16, + "messageText": "Add a type annotation to the variable myClassWithError.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -139,7 +153,7 @@ export declare class myClass { ], "latestChangedDtsFile": "./fileWithoutError.d.ts", "version": "FakeTSVersion", - "size": 1035 + "size": 1184 } diff --git a/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js b/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js index 64efb458d65b6..f1b544c6bbdc5 100644 --- a/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js +++ b/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field-with-declaration-emit-enabled.js @@ -180,11 +180,16 @@ Output:: 3 console.log( person.message );    ~~~~~~~ -src/project/MessageablePerson.ts:6:7 - error TS4094: Property 'message' of exported class expression may not be private or protected. +src/project/MessageablePerson.ts:6:7 - error TS4094: Property 'message' of exported anonymous class type may not be private or protected. 6 const wrapper = () => Messageable();    ~~~~~~~ + src/project/MessageablePerson.ts:6:7 + 6 const wrapper = () => Messageable(); +    ~~~~~~~ + Add a type annotation to the variable wrapper. + Found 2 errors in 2 files. @@ -198,7 +203,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped //// [/src/project/main.js] file written with same contents //// [/src/project/MessageablePerson.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./messageableperson.ts","./main.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"5700251342-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };type ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true},{"version":"3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected."},{"version":"4191603667-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"-3531856636-export {};\n"}],"root":[2,3],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":131,"length":7,"messageText":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses.","category":1,"code":2445}]]],"emitDiagnosticsPerFile":[[2,[{"start":116,"length":7,"messageText":"Property 'message' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./messageableperson.ts","./main.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"5700251342-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };type ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true},{"version":"3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected."},{"version":"4191603667-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"-3531856636-export {};\n"}],"root":[2,3],"options":{"declaration":true},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":131,"length":7,"messageText":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses.","category":1,"code":2445}]]],"emitDiagnosticsPerFile":[[2,[{"start":116,"length":7,"messageText":"Property 'message' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":116,"length":7,"messageText":"Add a type annotation to the variable wrapper.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -225,10 +230,10 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped "./messageableperson.ts": { "original": { "version": "3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;", - "signature": "-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected." + "signature": "-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected." }, "version": "3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;", - "signature": "-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected." + "signature": "-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected." }, "./main.ts": { "original": { @@ -278,15 +283,24 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsSkipped { "start": 116, "length": 7, - "messageText": "Property 'message' of exported class expression may not be private or protected.", + "messageText": "Property 'message' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 116, + "length": 7, + "messageText": "Add a type annotation to the variable wrapper.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 2096 + "size": 2239 } @@ -302,11 +316,16 @@ Output:: 3 console.log( person.message );    ~~~~~~~ -src/project/MessageablePerson.ts:6:7 - error TS4094: Property 'message' of exported class expression may not be private or protected. +src/project/MessageablePerson.ts:6:7 - error TS4094: Property 'message' of exported anonymous class type may not be private or protected. 6 const wrapper = () => Messageable();    ~~~~~~~ + src/project/MessageablePerson.ts:6:7 + 6 const wrapper = () => Messageable(); +    ~~~~~~~ + Add a type annotation to the variable wrapper. + Found 2 errors in 2 files. diff --git a/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js b/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js index 861d74f95decc..5ef1f4487dffb 100644 --- a/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js +++ b/tests/baselines/reference/tsc/incremental/change-to-modifier-of-class-expression-field.js @@ -167,7 +167,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated //// [/src/project/main.js] file written with same contents //// [/src/project/MessageablePerson.js] file written with same contents //// [/src/project/tsconfig.tsbuildinfo] -{"fileNames":["../../lib/lib.d.ts","./messageableperson.ts","./main.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"5700251342-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };type ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true},{"version":"3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected."},{"version":"4191603667-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"-3531856636-export {};\n"}],"root":[2,3],"options":{"declaration":false},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":131,"length":7,"messageText":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses.","category":1,"code":2445}]]],"version":"FakeTSVersion"} +{"fileNames":["../../lib/lib.d.ts","./messageableperson.ts","./main.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"5700251342-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };type ReturnType any> = T extends (...args: any) => infer R ? R : any;\ntype InstanceType any> = T extends abstract new (...args: any) => infer R ? R : any;","affectsGlobalScope":true},{"version":"3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;","signature":"-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected."},{"version":"4191603667-import MessageablePerson from './MessageablePerson.js';\nfunction logMessage( person: MessageablePerson ) {\n console.log( person.message );\n}","signature":"-3531856636-export {};\n"}],"root":[2,3],"options":{"declaration":false},"referencedMap":[[3,1]],"semanticDiagnosticsPerFile":[[3,[{"start":131,"length":7,"messageText":"Property 'message' is protected and only accessible within class 'MessageableClass' and its subclasses.","category":1,"code":2445}]]],"version":"FakeTSVersion"} //// [/src/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -194,10 +194,10 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated "./messageableperson.ts": { "original": { "version": "3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;", - "signature": "-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected." + "signature": "-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected." }, "version": "3462418372-const Messageable = () => {\n return class MessageableClass {\n protected message = 'hello';\n }\n};\nconst wrapper = () => Messageable();\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;", - "signature": "-21450256696-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported class expression may not be private or protected." + "signature": "-6547480893-declare const wrapper: () => {\n new (): {\n message: string;\n };\n};\ntype MessageablePerson = InstanceType>;\nexport default MessageablePerson;\n(116,7)Error4094: Property 'message' of exported anonymous class type may not be private or protected." }, "./main.ts": { "original": { @@ -241,7 +241,7 @@ exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated ] ], "version": "FakeTSVersion", - "size": 1917 + "size": 1920 } diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js index 8ac646bbe7409..f782228229ca4 100644 --- a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors-with-incremental.js @@ -33,11 +33,16 @@ export const b = 10; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -91,7 +96,7 @@ exports.b = 10; //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -157,16 +162,25 @@ exports.b = 10; { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1007 + "size": 1140 } @@ -177,11 +191,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -513,11 +532,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -559,7 +583,7 @@ exports.a = /** @class */ (function () { //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -581,10 +605,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -621,16 +645,25 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1207 + "size": 1345 } @@ -641,11 +674,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -681,11 +719,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -713,7 +756,7 @@ No shapes updated in the builder:: //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -735,10 +778,10 @@ No shapes updated in the builder:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -769,15 +812,24 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1154 + "size": 1292 } @@ -1117,11 +1169,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -1165,7 +1222,7 @@ exports.a = /** @class */ (function () { //// [/src/tsconfig.tsbuildinfo] -{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["../lib/lib.d.ts","./a.ts","./b.ts","./c.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},{"version":"-9150421116-export const c: number = \"hello\";","signature":"1429704745-export declare const c: number;\n"}],"root":[[2,4]],"options":{"declaration":true},"semanticDiagnosticsPerFile":[2,[4,[{"start":13,"length":1,"code":2322,"category":1,"messageText":"Type 'string' is not assignable to type 'number'."}]]],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/src/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -1188,10 +1245,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -1251,16 +1308,25 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1460 + "size": 1598 } diff --git a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js index dedde28258462..5a9f0616febfc 100644 --- a/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js +++ b/tests/baselines/reference/tsc/noCheck/multiFile/dts-errors.js @@ -32,11 +32,16 @@ export const b = 10; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -89,11 +94,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -289,11 +299,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -337,11 +352,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -374,11 +394,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -534,11 +559,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 diff --git a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js index bc64ad79f1fd3..0a76bec4671c8 100644 --- a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors-with-incremental.js @@ -35,11 +35,16 @@ export const b = 10; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -89,7 +94,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -139,16 +144,25 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 943 + "size": 1076 } @@ -159,11 +173,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -479,11 +498,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -533,7 +557,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -583,16 +607,25 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 943 + "size": 1076 } @@ -603,11 +636,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -644,11 +682,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -680,7 +723,7 @@ No shapes updated in the builder:: //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -716,15 +759,24 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 886 + "size": 1019 } @@ -1043,11 +1095,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -1105,7 +1162,7 @@ define("c", ["require", "exports"], function (require, exports) { //// [/outFile.tsbuildinfo] -{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"checkPending":true,"version":"FakeTSVersion"} +{"fileNames":["./lib/lib.d.ts","./src/a.ts","./src/b.ts","./src/c.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-9150421116-export const c: number = \"hello\";"],"root":[[2,4]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"semanticDiagnosticsPerFile":[1,2,3,4],"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"checkPending":true,"version":"FakeTSVersion"} //// [/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1164,16 +1221,25 @@ define("c", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "checkPending": true, "version": "FakeTSVersion", - "size": 1010 + "size": 1143 } diff --git a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js index cb3011eb46f5b..6a0d853ef6121 100644 --- a/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js +++ b/tests/baselines/reference/tsc/noCheck/outFile/dts-errors.js @@ -34,11 +34,16 @@ export const b = 10; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -90,11 +95,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -303,11 +313,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -359,11 +374,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -396,11 +416,16 @@ Input:: Output:: /lib/tsc -p /src/tsconfig.json -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 @@ -584,11 +609,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /src/tsconfig.json --noCheck -src/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + src/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js index c6cd75c791aff..e6c1141a39e20 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js @@ -191,21 +191,36 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors in 3 files. @@ -241,7 +256,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17],[5,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17],[5,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -303,9 +318,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -315,9 +339,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -327,9 +360,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -365,7 +407,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 1375 + "size": 1774 } @@ -537,21 +579,36 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --declaration -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors in 3 files. @@ -633,7 +690,7 @@ exports.d = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };",{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -699,9 +756,18 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -711,9 +777,18 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -723,15 +798,24 @@ exports.d = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1387 + "size": 1786 } @@ -774,7 +858,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -841,9 +925,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -853,9 +946,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -867,7 +969,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1352 + "size": 1618 } @@ -878,16 +980,26 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors in 2 files. @@ -922,7 +1034,7 @@ No shapes updated in the builder:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,16],[4,16],[5,16]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts","./c.ts","./d.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9483521475-export const a = class { public p = 10; };","signature":"4346604020-export declare const a: {\n new (): {\n p: number;\n };\n};\n"},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"},"-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,16],[4,16],[5,16]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -992,9 +1104,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -1004,9 +1125,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -1042,7 +1172,7 @@ No shapes updated in the builder:: ] ], "version": "FakeTSVersion", - "size": 1409 + "size": 1675 } diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental-as-modules.js index 2c1ecdcfa8529..5323ae3a82e1a 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental-as-modules.js @@ -33,11 +33,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -71,7 +76,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -119,9 +124,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -143,7 +157,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 933 + "size": 1066 } @@ -154,11 +168,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -466,11 +485,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -500,7 +524,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -522,10 +546,10 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -556,9 +580,18 @@ Shape signatures in builder refreshed for:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -573,7 +606,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1199 + "size": 1337 } @@ -584,11 +617,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -627,7 +665,7 @@ exports.a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -649,10 +687,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -683,15 +721,24 @@ exports.a = /** @class */ (function () { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1163 + "size": 1301 } @@ -702,11 +749,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental.js index 5357908bb250d..486fb5a30ff07 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-with-incremental.js @@ -30,11 +30,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -64,7 +69,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -108,9 +113,18 @@ Shape signatures in builder refreshed for:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -125,7 +139,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 908 + "size": 1040 } @@ -136,11 +150,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -400,11 +419,16 @@ const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -433,7 +457,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -454,11 +478,11 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -478,9 +502,18 @@ Shape signatures in builder refreshed for:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -495,7 +528,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1092 + "size": 1228 } @@ -506,11 +539,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -544,7 +582,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -565,11 +603,11 @@ var a = /** @class */ (function () { "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -589,15 +627,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1056 + "size": 1192 } @@ -608,11 +655,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js index 890ebc65eb209..ad12886f0d0be 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js @@ -421,7 +421,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -443,10 +443,10 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -470,7 +470,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 921 + "size": 926 } @@ -515,7 +515,7 @@ exports.a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -537,10 +537,10 @@ exports.a = /** @class */ (function () { "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -558,7 +558,7 @@ exports.a = /** @class */ (function () { ] ], "version": "FakeTSVersion", - "size": 890 + "size": 895 } diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js index b8c3df7f8a2b6..b83d810f7ca8b 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js @@ -368,7 +368,7 @@ Shape signatures in builder refreshed for:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -389,11 +389,11 @@ Shape signatures in builder refreshed for:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -410,7 +410,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 884 + "size": 888 } @@ -450,7 +450,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -471,11 +471,11 @@ var a = /** @class */ (function () { "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -486,7 +486,7 @@ var a = /** @class */ (function () { ] ], "version": "FakeTSVersion", - "size": 853 + "size": 857 } diff --git a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors.js b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors.js index aa82569939323..4b4baa37da3b5 100644 --- a/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors.js +++ b/tests/baselines/reference/tsc/noEmit/multiFile/dts-errors.js @@ -29,11 +29,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -61,11 +66,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -202,11 +212,16 @@ const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -234,11 +249,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -274,11 +294,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js index 690283be6b9ae..36de1e18f6752 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-declaration-enable-changes-with-multiple-files.js @@ -162,21 +162,36 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors in 3 files. @@ -214,7 +229,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -258,9 +273,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -270,9 +294,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -282,9 +315,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -294,7 +336,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1362 + "size": 1761 } @@ -305,21 +347,36 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration --declarationMap -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors in 3 files. @@ -358,7 +415,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -403,9 +460,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -415,9 +481,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -427,9 +502,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -439,7 +523,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1384 + "size": 1783 } @@ -486,21 +570,36 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --declaration -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 3 errors in 3 files. @@ -579,7 +678,7 @@ define("d", ["require", "exports"], function (require, exports) { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]],[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -623,9 +722,18 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -635,9 +743,18 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -647,15 +764,24 @@ define("d", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1345 + "size": 1744 } @@ -755,16 +881,26 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors in 2 files. @@ -801,7 +937,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -845,9 +981,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -857,9 +1002,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -869,7 +1023,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1215 + "size": 1481 } @@ -880,16 +1034,26 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration --declarationMap -home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/c.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const c = class { private p = 10; };    ~ -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. + home/src/projects/project/c.ts:1:14 + 1 export const c = class { private p = 10; }; +    ~ + Add a type annotation to the variable c. + +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 2 errors in 2 files. @@ -927,7 +1091,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-17233149573-export const c = class { private p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[4,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable c.","category":1,"code":9027}]}]],[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -972,9 +1136,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable c.", + "category": 1, + "code": 9027 + } + ] } ] ], @@ -984,9 +1157,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -996,7 +1178,7 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1237 + "size": 1503 } @@ -1010,11 +1192,16 @@ export const c = class { public p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit --declaration --declarationMap -home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/d.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const d = class { private p = 10; };    ~ + home/src/projects/project/d.ts:1:14 + 1 export const d = class { private p = 10; }; +    ~ + Add a type annotation to the variable d. + Found 1 error in home/src/projects/project/d.ts:1 @@ -1054,7 +1241,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-15184115393-export const c = class { public p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":49,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts","./project/c.ts","./project/d.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9483521475-export const a = class { public p = 10; };","-13368947479-export const b = 10;","-15184115393-export const c = class { public p = 10; };","2523684124-export const d = class { private p = 10; };"],"root":[[2,5]],"options":{"declaration":true,"declarationMap":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[5,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable d.","category":1,"code":9027}]}]]],"pendingEmit":49,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -1099,9 +1286,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable d.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -1111,6 +1307,6 @@ No shapes updated in the builder:: 49 ], "version": "FakeTSVersion", - "size": 1090 + "size": 1223 } diff --git a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental-as-modules.js index e775985e62a97..3a72268a24e6d 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental-as-modules.js @@ -35,11 +35,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -72,7 +77,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -108,9 +113,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -120,7 +134,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 918 + "size": 1051 } @@ -131,11 +145,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -408,11 +427,16 @@ export const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -445,7 +469,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -481,9 +505,18 @@ No shapes updated in the builder:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -493,7 +526,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 918 + "size": 1051 } @@ -504,11 +537,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -557,7 +595,7 @@ define("b", ["require", "exports"], function (require, exports) { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -593,15 +631,24 @@ define("b", ["require", "exports"], function (require, exports) { { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 901 + "size": 1034 } @@ -612,11 +659,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental.js index 3c6f932c43fa1..a7e0cea9ffbc6 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors-with-incremental.js @@ -31,11 +31,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -64,7 +69,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -93,9 +98,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -105,7 +119,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 843 + "size": 975 } @@ -116,11 +130,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -347,11 +366,16 @@ const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -380,7 +404,7 @@ No shapes updated in the builder:: //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -409,9 +433,18 @@ No shapes updated in the builder:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -421,7 +454,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 843 + "size": 975 } @@ -432,11 +465,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -471,7 +509,7 @@ var a = /** @class */ (function () { //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -500,15 +538,24 @@ var a = /** @class */ (function () { { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 826 + "size": 958 } @@ -519,11 +566,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors.js b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors.js index d1bbaee52a143..d29fe38ccc39b 100644 --- a/tests/baselines/reference/tsc/noEmit/outFile/dts-errors.js +++ b/tests/baselines/reference/tsc/noEmit/outFile/dts-errors.js @@ -30,11 +30,16 @@ declare const console: { log(msg: any): void; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -63,11 +68,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -209,11 +219,16 @@ const a = class { private p = 10; }; Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -242,11 +257,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 @@ -283,11 +303,16 @@ Input:: Output:: /lib/tsc -p /home/src/projects/project --noEmit -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in home/src/projects/project/a.ts:1 diff --git a/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js index 847f269056ac9..5f11f04a2f17e 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration-with-incremental.js @@ -45,11 +45,16 @@ export { } Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 @@ -87,7 +92,7 @@ Shape signatures in builder refreshed for:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17],[4,17]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -155,9 +160,18 @@ Shape signatures in builder refreshed for:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -186,7 +200,7 @@ Shape signatures in builder refreshed for:: ] ], "version": "FakeTSVersion", - "size": 1182 + "size": 1315 } @@ -197,11 +211,16 @@ Input:: Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 diff --git a/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration.js b/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration.js index 29f4547d50b31..cf725df15af1a 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration.js +++ b/tests/baselines/reference/tsc/noEmitOnError/multiFile/dts-errors-with-declaration.js @@ -44,11 +44,16 @@ export { } Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 @@ -80,11 +85,16 @@ Input:: Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 diff --git a/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js b/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js index d3cadfee88a02..366a5037277b6 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration-with-incremental.js @@ -46,11 +46,16 @@ export { } Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 @@ -85,7 +90,7 @@ No shapes updated in the builder:: //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -127,9 +132,18 @@ No shapes updated in the builder:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -139,7 +153,7 @@ No shapes updated in the builder:: 17 ], "version": "FakeTSVersion", - "size": 1124 + "size": 1257 } @@ -150,11 +164,16 @@ Input:: Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 diff --git a/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration.js b/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration.js index 3b3cabb3db733..12ec8fc04ad39 100644 --- a/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration.js +++ b/tests/baselines/reference/tsc/noEmitOnError/outFile/dts-errors-with-declaration.js @@ -45,11 +45,16 @@ export { } Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 @@ -82,11 +87,16 @@ Input:: Output:: /a/lib/tsc -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + Found 1 error in src/main.ts:2 diff --git a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js index 85fbaf20fada4..7180238c763eb 100644 --- a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental-as-modules.js @@ -36,17 +36,22 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17],[3,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -94,9 +99,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -118,7 +132,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 935 + "size": 1068 } @@ -492,17 +506,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -524,10 +543,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -558,9 +577,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -575,7 +603,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1201 + "size": 1339 } @@ -630,17 +658,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"-13368947479-export const b = 10;","signature":"-3829150557-export declare const b = 10;\n"}],"root":[2,3],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -662,10 +695,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "original": { @@ -696,15 +729,24 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1165 + "size": 1303 } //// [/home/src/projects/project/a.js] @@ -769,11 +811,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental.js b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental.js index 2900fea6b2905..05e0dabc57dcb 100644 --- a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-with-incremental.js @@ -33,17 +33,22 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -87,9 +92,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -104,7 +118,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 910 + "size": 1042 } @@ -428,17 +442,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[2,17]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -459,11 +478,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -483,9 +502,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -500,7 +528,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1094 + "size": 1230 } @@ -554,17 +582,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"options":{"declaration":true},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -585,11 +618,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -609,15 +642,24 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 1058 + "size": 1194 } //// [/home/src/projects/project/a.js] @@ -677,11 +719,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js index fc207d0e61105..b966fc6d78b46 100644 --- a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js +++ b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental-as-modules.js @@ -438,7 +438,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -460,10 +460,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -487,7 +487,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 923 + "size": 928 } @@ -545,7 +545,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts","./b.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"-9502176711-export const a = class { private p = 10; };","signature":"-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"-13368947479-export const b = 10;"],"root":[2,3],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -567,10 +567,10 @@ Output:: "./a.ts": { "original": { "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "-9502176711-export const a = class { private p = 10; };", - "signature": "-7147472585-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-11414918990-export declare const a: {\n new (): {\n p: number;\n };\n};\n(13,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "./b.ts": { "version": "-13368947479-export const b = 10;", @@ -588,7 +588,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 892 + "size": 897 } //// [/home/src/projects/project/a.js] diff --git a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js index a98b6580da090..0c5d3566c458a 100644 --- a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors-without-dts-enabled-with-incremental.js @@ -388,7 +388,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"affectedFilesPendingEmit":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -409,11 +409,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -430,7 +430,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 886 + "size": 890 } @@ -487,7 +487,7 @@ Output:: //// [/home/src/projects/project/tsconfig.tsbuildinfo] -{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} +{"fileNames":["../../../../a/lib/lib.d.ts","./a.ts"],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},{"version":"7752727223-const a = class { private p = 10; };","signature":"10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.","affectsGlobalScope":true}],"root":[2],"version":"FakeTSVersion"} //// [/home/src/projects/project/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -508,11 +508,11 @@ Output:: "./a.ts": { "original": { "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true }, "version": "7752727223-const a = class { private p = 10; };", - "signature": "-6162671385-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported class expression may not be private or protected.", + "signature": "10386759778-declare const a: {\n new (): {\n p: number;\n };\n};\n(6,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected.", "affectsGlobalScope": true } }, @@ -523,7 +523,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 855 + "size": 859 } //// [/home/src/projects/project/a.js] diff --git a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors.js b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors.js index b684b5e5ac509..4918a392fed96 100644 --- a/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors.js +++ b/tests/baselines/reference/tscWatch/noEmit/multiFile/dts-errors.js @@ -32,11 +32,16 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -261,11 +266,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -319,11 +329,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -383,11 +398,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js index 69d678475c081..aa4a8d89c1b0c 100644 --- a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js +++ b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental-as-modules.js @@ -38,17 +38,22 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -84,9 +89,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -96,7 +110,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 920 + "size": 1053 } @@ -434,17 +448,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -480,9 +499,18 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -492,7 +520,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 920 + "size": 1053 } @@ -552,17 +580,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts","./project/b.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-9502176711-export const a = class { private p = 10; };","-13368947479-export const b = 10;"],"root":[2,3],"options":{"declaration":true,"module":2,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":13,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":13,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -598,15 +631,24 @@ Output:: { "start": 13, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 13, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 903 + "size": 1036 } //// [/home/src/projects/outFile.js] @@ -683,11 +725,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 export const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:14 + 1 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental.js b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental.js index 77e8634b377cc..d4595093ddb14 100644 --- a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors-with-incremental.js @@ -34,17 +34,22 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -73,9 +78,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -85,7 +99,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 845 + "size": 977 } @@ -375,17 +389,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -414,9 +433,18 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -426,7 +454,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 845 + "size": 977 } @@ -481,17 +509,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/home/src/projects/outFile.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./project/a.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","7752727223-const a = class { private p = 10; };"],"root":[2],"options":{"declaration":true,"outFile":"./outFile.js"},"emitDiagnosticsPerFile":[[2,[{"start":6,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":6,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"version":"FakeTSVersion"} //// [/home/src/projects/outFile.tsbuildinfo.readable.baseline.txt] { @@ -520,15 +553,24 @@ Output:: { "start": 6, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 6, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] ], "version": "FakeTSVersion", - "size": 828 + "size": 960 } //// [/home/src/projects/outFile.js] @@ -590,11 +632,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors.js b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors.js index ec750180d6af2..6b991d613e376 100644 --- a/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors.js +++ b/tests/baselines/reference/tscWatch/noEmit/outFile/dts-errors.js @@ -33,11 +33,16 @@ Output:: >> Screen clear [HH:MM:SS AM] Starting compilation in watch mode... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -265,11 +270,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -324,11 +334,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. @@ -390,11 +405,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported class expression may not be private or protected. +home/src/projects/project/a.ts:1:7 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 1 const a = class { private p = 10; };    ~ + home/src/projects/project/a.ts:1:7 + 1 const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js index e547ba209f917..a74d960cbfd15 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration-with-incremental.js @@ -736,17 +736,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected."},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"affectedFilesPendingEmit":[[3,17]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},{"version":"9084524823-console.log(\"hi\");\nexport { }\n","signature":"-3531856636-export {};\n"}],"root":[[2,4]],"options":{"declaration":true,"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"affectedFilesPendingEmit":[[3,17]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -778,10 +783,10 @@ Output:: "../src/main.ts": { "original": { "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "../src/other.ts": { "original": { @@ -822,9 +827,18 @@ Output:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -839,7 +853,7 @@ Output:: ] ], "version": "FakeTSVersion", - "size": 1423 + "size": 1560 } diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js index c4496aaca4f47..13453fcce4948 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-declaration.js @@ -408,11 +408,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js index eede79b45059c..744c18cfec6bf 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/multiFile/noEmitOnError-with-incremental.js @@ -705,7 +705,7 @@ Output:: //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo] -{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected."},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} +{"fileNames":["../../../../../a/lib/lib.d.ts","../shared/types/db.ts","../src/main.ts","../src/other.ts"],"fileIdsList":[[2]],"fileInfos":[{"version":"3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","affectsGlobalScope":true},"-5014788164-export interface A {\n name: string;\n}\n",{"version":"5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","signature":"-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected."},"9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"noEmitOnError":true,"outDir":"./"},"referencedMap":[[3,1]],"version":"FakeTSVersion"} //// [/user/username/projects/noEmitOnError/dev-build/tsconfig.tsbuildinfo.readable.baseline.txt] { @@ -737,10 +737,10 @@ Output:: "../src/main.ts": { "original": { "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "version": "5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n", - "signature": "-8511871557-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported class expression may not be private or protected." + "signature": "-3419031754-export declare const a: {\n new (): {\n p: number;\n };\n};\n(53,1)Error4094: Property 'p' of exported anonymous class type may not be private or protected." }, "../src/other.ts": { "version": "9084524823-console.log(\"hi\");\nexport { }\n", @@ -770,7 +770,7 @@ Output:: ] }, "version": "FakeTSVersion", - "size": 1144 + "size": 1148 } //// [/user/username/projects/noEmitOnError/dev-build/src/main.js] diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js index b8d246c4cbba8..a4d9114dda6f8 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration-with-incremental.js @@ -612,17 +612,22 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes. //// [/user/username/projects/dev-build.tsbuildinfo] -{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported class expression may not be private or protected.","category":1,"code":4094}]]],"pendingEmit":17,"version":"FakeTSVersion"} +{"fileNames":["../../../a/lib/lib.d.ts","./noemitonerror/shared/types/db.ts","./noemitonerror/src/main.ts","./noemitonerror/src/other.ts"],"fileInfos":["3858781397-/// \ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array { length: number; [n: number]: T; }\ninterface ReadonlyArray {}\ndeclare const console: { log(msg: any): void; };","-5014788164-export interface A {\n name: string;\n}\n","5099365167-import { A } from \"../shared/types/db\";\nexport const a = class { private p = 10; };\n","9084524823-console.log(\"hi\");\nexport { }\n"],"root":[[2,4]],"options":{"declaration":true,"module":2,"noEmitOnError":true,"outFile":"./dev-build.js"},"emitDiagnosticsPerFile":[[3,[{"start":53,"length":1,"messageText":"Property 'p' of exported anonymous class type may not be private or protected.","category":1,"code":4094,"relatedInformation":[{"start":53,"length":1,"messageText":"Add a type annotation to the variable a.","category":1,"code":9027}]}]]],"pendingEmit":17,"version":"FakeTSVersion"} //// [/user/username/projects/dev-build.tsbuildinfo.readable.baseline.txt] { @@ -664,9 +669,18 @@ Output:: { "start": 53, "length": 1, - "messageText": "Property 'p' of exported class expression may not be private or protected.", + "messageText": "Property 'p' of exported anonymous class type may not be private or protected.", "category": 1, - "code": 4094 + "code": 4094, + "relatedInformation": [ + { + "start": 53, + "length": 1, + "messageText": "Add a type annotation to the variable a.", + "category": 1, + "code": 9027 + } + ] } ] ] @@ -676,7 +690,7 @@ Output:: 17 ], "version": "FakeTSVersion", - "size": 1124 + "size": 1257 } diff --git a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js index 58f7b4019b9b4..aa9ebd23482e8 100644 --- a/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js +++ b/tests/baselines/reference/tscWatch/noEmitOnError/outFile/noEmitOnError-with-declaration.js @@ -424,11 +424,16 @@ Output:: >> Screen clear [HH:MM:SS AM] File change detected. Starting incremental compilation... -src/main.ts:2:14 - error TS4094: Property 'p' of exported class expression may not be private or protected. +src/main.ts:2:14 - error TS4094: Property 'p' of exported anonymous class type may not be private or protected. 2 export const a = class { private p = 10; };    ~ + src/main.ts:2:14 + 2 export const a = class { private p = 10; }; +    ~ + Add a type annotation to the variable a. + [HH:MM:SS AM] Found 1 error. Watching for file changes.