2016-05-11 23:14:52 +02:00
|
|
|
//@target: ES5
|
|
|
|
|
|
|
|
// `readonly` won't work outside of property parameters
|
|
|
|
class X {
|
|
|
|
method(readonly x: number) {}
|
|
|
|
set x(readonly value: number) {}
|
|
|
|
}
|
2016-05-11 23:32:59 +02:00
|
|
|
(readonly x) => 0;
|
|
|
|
// OK to use `readonly` as a name
|
|
|
|
(readonly) => 0;
|