TypeScript/tests/baselines/reference/indexSignatureWithInitializer.errors.txt

16 lines
541 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/indexSignatureWithInitializer.ts (4 errors) ====
interface I {
[x = '']: string;
~
!!! An index signature parameter cannot have an initializer.
~~~~~~
!!! A parameter initializer is only allowed in a function or constructor implementation.
}
class C {
[x = 0]: string
~
!!! An index signature parameter cannot have an initializer.
~~~~~
!!! A parameter initializer is only allowed in a function or constructor implementation.
}