24 lines
No EOL
551 B
Text
24 lines
No EOL
551 B
Text
==== tests/cases/compiler/commentsOnObjectLiteral3.ts (2 errors) ====
|
|
|
|
var v = {
|
|
//property
|
|
prop: 1,
|
|
//property
|
|
func: function () {
|
|
},
|
|
//PropertyName + CallSignature
|
|
func1() { },
|
|
//getter
|
|
get a() {
|
|
~
|
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
|
return this.prop;
|
|
},
|
|
//setter
|
|
set a(value) {
|
|
~
|
|
!!! Accessors are only available when targeting ECMAScript 5 and higher.
|
|
this.prop = value;
|
|
}
|
|
};
|
|
|