mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
50 lines
2.5 KiB
Plaintext
50 lines
2.5 KiB
Plaintext
classWithDuplicateIdentifier.ts(2,5): error TS2300: Duplicate identifier 'a'.
|
|
classWithDuplicateIdentifier.ts(3,5): error TS2300: Duplicate identifier 'a'.
|
|
classWithDuplicateIdentifier.ts(3,5): error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.
|
|
classWithDuplicateIdentifier.ts(6,5): error TS2300: Duplicate identifier 'b'.
|
|
classWithDuplicateIdentifier.ts(6,5): error TS2564: Property 'b' has no initializer and is not definitely assigned in the constructor.
|
|
classWithDuplicateIdentifier.ts(7,5): error TS2300: Duplicate identifier 'b'.
|
|
classWithDuplicateIdentifier.ts(10,5): error TS2300: Duplicate identifier 'c'.
|
|
classWithDuplicateIdentifier.ts(10,5): error TS2564: Property 'c' has no initializer and is not definitely assigned in the constructor.
|
|
classWithDuplicateIdentifier.ts(11,5): error TS2300: Duplicate identifier 'c'.
|
|
classWithDuplicateIdentifier.ts(11,5): error TS2564: Property 'c' has no initializer and is not definitely assigned in the constructor.
|
|
classWithDuplicateIdentifier.ts(11,5): error TS2717: Subsequent property declarations must have the same type. Property 'c' must be of type 'number', but here has type 'string'.
|
|
|
|
|
|
==== classWithDuplicateIdentifier.ts (11 errors) ====
|
|
class C {
|
|
a(): number { return 0; } // error: duplicate identifier
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
a: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'a'.
|
|
~
|
|
!!! error TS2564: Property 'a' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
class K {
|
|
b: number; // error: duplicate identifier
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'b'.
|
|
~
|
|
!!! error TS2564: Property 'b' has no initializer and is not definitely assigned in the constructor.
|
|
b(): number { return 0; }
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'b'.
|
|
}
|
|
class D {
|
|
c: number;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'c'.
|
|
~
|
|
!!! error TS2564: Property 'c' has no initializer and is not definitely assigned in the constructor.
|
|
c: string;
|
|
~
|
|
!!! error TS2300: Duplicate identifier 'c'.
|
|
~
|
|
!!! error TS2564: Property 'c' has no initializer and is not definitely assigned in the constructor.
|
|
~
|
|
!!! error TS2717: Subsequent property declarations must have the same type. Property 'c' must be of type 'number', but here has type 'string'.
|
|
!!! related TS6203 classWithDuplicateIdentifier.ts:10:5: 'c' was also declared here.
|
|
}
|
|
|