This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
22 lines
No EOL
1.2 KiB
Text
22 lines
No EOL
1.2 KiB
Text
tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(2,6): error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(2,13): error TS1018: An index signature parameter cannot have an accessibility modifier.
|
|
tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(6,6): error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts(6,13): error TS1018: An index signature parameter cannot have an accessibility modifier.
|
|
|
|
|
|
==== tests/cases/compiler/indexSignatureWithAccessibilityModifier.ts (4 errors) ====
|
|
interface I {
|
|
[public x: string]: string;
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
~
|
|
!!! error TS1018: An index signature parameter cannot have an accessibility modifier.
|
|
}
|
|
|
|
class C {
|
|
[public x: string]: string
|
|
~~~~~~~~~~~~~~~~
|
|
!!! error TS2369: A parameter property is only allowed in a constructor implementation.
|
|
~
|
|
!!! error TS1018: An index signature parameter cannot have an accessibility modifier.
|
|
} |