Files
tsgo/testdata/baselines/reference/submodule/compiler/duplicateIdentifierDifferentModifiers.errors.txt

37 lines
1.2 KiB
Plaintext

duplicateIdentifierDifferentModifiers.ts(2,15): error TS2687: All declarations of 'x' must have identical modifiers.
duplicateIdentifierDifferentModifiers.ts(3,15): error TS2687: All declarations of 'x' must have identical modifiers.
duplicateIdentifierDifferentModifiers.ts(16,11): error TS2687: All declarations of 'y' must have identical modifiers.
duplicateIdentifierDifferentModifiers.ts(20,3): error TS2687: All declarations of 'y' must have identical modifiers.
==== duplicateIdentifierDifferentModifiers.ts (4 errors) ====
// Not OK
interface B { x; }
~
!!! error TS2687: All declarations of 'x' must have identical modifiers.
interface B { x?; }
~
!!! error TS2687: All declarations of 'x' must have identical modifiers.
// OK
class A {
public y: string;
}
interface A {
y: string;
}
// Not OK
class C {
private y: string;
~
!!! error TS2687: All declarations of 'y' must have identical modifiers.
}
interface C {
y: string;
~
!!! error TS2687: All declarations of 'y' must have identical modifiers.
}