* If target:esnext,then useDefineForClassFields: true will now be the default. * Added error if a private identifier is used in a static a initializer if target:ESNext and useDefineForClassFields:false. * Added test for new useDefineForClassFields default and error message. * Fixed tests after changing the default of useDefineForClassFields to true for target esnext * Fixed code review suggestions. * Updated error message. * Added missing static check for the containing property. Fixed other code review issues.
34 lines
693 B
TypeScript
34 lines
693 B
TypeScript
// @target: esnext
|
|
// @lib: esnext
|
|
// @declaration: true
|
|
// @allowJs: true
|
|
// @checkJs: true
|
|
// @filename: uniqueSymbolsDeclarationsInJs.js
|
|
// @out: uniqueSymbolsDeclarationsInJs-out.js
|
|
// @useDefineForClassFields: false
|
|
|
|
// classes
|
|
class C {
|
|
/**
|
|
* @readonly
|
|
*/
|
|
static readonlyStaticCall = Symbol();
|
|
/**
|
|
* @type {unique symbol}
|
|
* @readonly
|
|
*/
|
|
static readonlyStaticType;
|
|
/**
|
|
* @type {unique symbol}
|
|
* @readonly
|
|
*/
|
|
static readonlyStaticTypeAndCall = Symbol();
|
|
static readwriteStaticCall = Symbol();
|
|
|
|
/**
|
|
* @readonly
|
|
*/
|
|
readonlyCall = Symbol();
|
|
readwriteCall = Symbol();
|
|
}
|