24 lines
551 B
Plaintext
24 lines
551 B
Plaintext
==== 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;
|
|
}
|
|
};
|
|
|