mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-04 21:53:42 -06:00
Merge branch 'release-2.0'
This commit is contained in:
commit
59c4d3fc3b
@ -24051,6 +24051,7 @@ var ts;
|
||||
var parameter = local_1.valueDeclaration;
|
||||
if (compilerOptions.noUnusedParameters &&
|
||||
!ts.isParameterPropertyDeclaration(parameter) &&
|
||||
!parameterIsThisKeyword(parameter) &&
|
||||
!parameterNameStartsWithUnderscore(parameter)) {
|
||||
error(local_1.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local_1.name);
|
||||
}
|
||||
@ -24066,6 +24067,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
function parameterIsThisKeyword(parameter) {
|
||||
return parameter.name && parameter.name.originalKeywordKind === 97;
|
||||
}
|
||||
function parameterNameStartsWithUnderscore(parameter) {
|
||||
return parameter.name && parameter.name.kind === 69 && parameter.name.text.charCodeAt(0) === 95;
|
||||
}
|
||||
|
||||
@ -24969,6 +24969,7 @@ var ts;
|
||||
var parameter = local_1.valueDeclaration;
|
||||
if (compilerOptions.noUnusedParameters &&
|
||||
!ts.isParameterPropertyDeclaration(parameter) &&
|
||||
!parameterIsThisKeyword(parameter) &&
|
||||
!parameterNameStartsWithUnderscore(parameter)) {
|
||||
error(local_1.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local_1.name);
|
||||
}
|
||||
@ -24984,6 +24985,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
function parameterIsThisKeyword(parameter) {
|
||||
return parameter.name && parameter.name.originalKeywordKind === 97;
|
||||
}
|
||||
function parameterNameStartsWithUnderscore(parameter) {
|
||||
return parameter.name && parameter.name.kind === 69 && parameter.name.text.charCodeAt(0) === 95;
|
||||
}
|
||||
@ -50793,7 +50797,6 @@ var ts;
|
||||
if (isOpen === void 0) { isOpen = false; }
|
||||
this.host = host;
|
||||
this.fileName = fileName;
|
||||
this.content = content;
|
||||
this.isOpen = isOpen;
|
||||
this.children = [];
|
||||
this.formatCodeOptions = ts.clone(CompilerService.getDefaultFormatCodeOptions(this.host));
|
||||
@ -53197,7 +53200,7 @@ var ts;
|
||||
return this.shimHost.getCurrentDirectory();
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
|
||||
return this.shimHost.getDirectories(path);
|
||||
return JSON.parse(this.shimHost.getDirectories(path));
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
|
||||
3
lib/tsserverlibrary.d.ts
vendored
3
lib/tsserverlibrary.d.ts
vendored
@ -8388,7 +8388,6 @@ declare namespace ts.server {
|
||||
class ScriptInfo {
|
||||
private host;
|
||||
fileName: string;
|
||||
content: string;
|
||||
isOpen: boolean;
|
||||
svc: ScriptVersionCache;
|
||||
children: ScriptInfo[];
|
||||
@ -8729,7 +8728,7 @@ declare namespace ts {
|
||||
getLocalizedDiagnosticMessages(): string;
|
||||
getCancellationToken(): HostCancellationToken;
|
||||
getCurrentDirectory(): string;
|
||||
getDirectories(path: string): string[];
|
||||
getDirectories(path: string): string;
|
||||
getDefaultLibFileName(options: string): string;
|
||||
getNewLine?(): string;
|
||||
getProjectVersion?(): string;
|
||||
|
||||
@ -24969,6 +24969,7 @@ var ts;
|
||||
var parameter = local_1.valueDeclaration;
|
||||
if (compilerOptions.noUnusedParameters &&
|
||||
!ts.isParameterPropertyDeclaration(parameter) &&
|
||||
!parameterIsThisKeyword(parameter) &&
|
||||
!parameterNameStartsWithUnderscore(parameter)) {
|
||||
error(local_1.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local_1.name);
|
||||
}
|
||||
@ -24984,6 +24985,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
function parameterIsThisKeyword(parameter) {
|
||||
return parameter.name && parameter.name.originalKeywordKind === 97;
|
||||
}
|
||||
function parameterNameStartsWithUnderscore(parameter) {
|
||||
return parameter.name && parameter.name.kind === 69 && parameter.name.text.charCodeAt(0) === 95;
|
||||
}
|
||||
@ -50793,7 +50797,6 @@ var ts;
|
||||
if (isOpen === void 0) { isOpen = false; }
|
||||
this.host = host;
|
||||
this.fileName = fileName;
|
||||
this.content = content;
|
||||
this.isOpen = isOpen;
|
||||
this.children = [];
|
||||
this.formatCodeOptions = ts.clone(CompilerService.getDefaultFormatCodeOptions(this.host));
|
||||
@ -52963,7 +52966,7 @@ var ts;
|
||||
return this.shimHost.getCurrentDirectory();
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
|
||||
return this.shimHost.getDirectories(path);
|
||||
return JSON.parse(this.shimHost.getDirectories(path));
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
|
||||
@ -29341,6 +29341,7 @@ var ts;
|
||||
var parameter = local_1.valueDeclaration;
|
||||
if (compilerOptions.noUnusedParameters &&
|
||||
!ts.isParameterPropertyDeclaration(parameter) &&
|
||||
!parameterIsThisKeyword(parameter) &&
|
||||
!parameterNameStartsWithUnderscore(parameter)) {
|
||||
error(local_1.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local_1.name);
|
||||
}
|
||||
@ -29356,6 +29357,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
function parameterIsThisKeyword(parameter) {
|
||||
return parameter.name && parameter.name.originalKeywordKind === 97 /* ThisKeyword */;
|
||||
}
|
||||
function parameterNameStartsWithUnderscore(parameter) {
|
||||
return parameter.name && parameter.name.kind === 69 /* Identifier */ && parameter.name.text.charCodeAt(0) === 95 /* _ */;
|
||||
}
|
||||
@ -59701,7 +59705,7 @@ var ts;
|
||||
return this.shimHost.getCurrentDirectory();
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
|
||||
return this.shimHost.getDirectories(path);
|
||||
return JSON.parse(this.shimHost.getDirectories(path));
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
|
||||
@ -29341,6 +29341,7 @@ var ts;
|
||||
var parameter = local_1.valueDeclaration;
|
||||
if (compilerOptions.noUnusedParameters &&
|
||||
!ts.isParameterPropertyDeclaration(parameter) &&
|
||||
!parameterIsThisKeyword(parameter) &&
|
||||
!parameterNameStartsWithUnderscore(parameter)) {
|
||||
error(local_1.valueDeclaration.name, ts.Diagnostics._0_is_declared_but_never_used, local_1.name);
|
||||
}
|
||||
@ -29356,6 +29357,9 @@ var ts;
|
||||
}
|
||||
}
|
||||
}
|
||||
function parameterIsThisKeyword(parameter) {
|
||||
return parameter.name && parameter.name.originalKeywordKind === 97 /* ThisKeyword */;
|
||||
}
|
||||
function parameterNameStartsWithUnderscore(parameter) {
|
||||
return parameter.name && parameter.name.kind === 69 /* Identifier */ && parameter.name.text.charCodeAt(0) === 95 /* _ */;
|
||||
}
|
||||
@ -59701,7 +59705,7 @@ var ts;
|
||||
return this.shimHost.getCurrentDirectory();
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDirectories = function (path) {
|
||||
return this.shimHost.getDirectories(path);
|
||||
return JSON.parse(this.shimHost.getDirectories(path));
|
||||
};
|
||||
LanguageServiceShimHostAdapter.prototype.getDefaultLibFileName = function (options) {
|
||||
return this.shimHost.getDefaultLibFileName(JSON.stringify(options));
|
||||
|
||||
@ -13277,7 +13277,7 @@ namespace ts {
|
||||
checkAsyncFunctionReturnType(<FunctionLikeDeclaration>node);
|
||||
}
|
||||
}
|
||||
if (!(<FunctionDeclaration>node).body) {
|
||||
if (noUnusedIdentifiers && !(<FunctionDeclaration>node).body) {
|
||||
checkUnusedTypeParameters(node);
|
||||
}
|
||||
}
|
||||
@ -14612,8 +14612,15 @@ namespace ts {
|
||||
function checkUnusedTypeParameters(node: ClassDeclaration | ClassExpression | FunctionDeclaration | MethodDeclaration | FunctionExpression | ArrowFunction | ConstructorDeclaration | SignatureDeclaration | InterfaceDeclaration) {
|
||||
if (compilerOptions.noUnusedLocals && !isInAmbientContext(node)) {
|
||||
if (node.typeParameters) {
|
||||
// Only report errors on the last declaration for the type parameter container;
|
||||
// this ensures that all uses have been accounted for.
|
||||
const symbol = getSymbolOfNode(node);
|
||||
const lastDeclaration = symbol && symbol.declarations && lastOrUndefined(symbol.declarations);
|
||||
if (lastDeclaration !== node) {
|
||||
return;
|
||||
}
|
||||
for (const typeParameter of node.typeParameters) {
|
||||
if (!typeParameter.symbol.isReferenced) {
|
||||
if (!getMergedSymbol(typeParameter.symbol).isReferenced) {
|
||||
error(typeParameter.name, Diagnostics._0_is_declared_but_never_used, typeParameter.symbol.name);
|
||||
}
|
||||
}
|
||||
@ -16122,7 +16129,7 @@ namespace ts {
|
||||
|
||||
if (produceDiagnostics) {
|
||||
checkTypeForDuplicateIndexSignatures(node);
|
||||
checkUnusedTypeParameters(node);
|
||||
registerForUnusedIdentifiersCheck(node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2749,7 +2749,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
* if we should also export the value after its it changed
|
||||
* - check if node is a source level declaration to emit it differently,
|
||||
* i.e non-exported variable statement 'var x = 1' is hoisted so
|
||||
* we we emit variable statement 'var' should be dropped.
|
||||
* when we emit variable statement 'var' should be dropped.
|
||||
*/
|
||||
function isSourceFileLevelDeclarationInSystemJsModule(node: Node, isExported: boolean): boolean {
|
||||
if (!node || !isCurrentFileSystemExternalModule()) {
|
||||
@ -5503,16 +5503,15 @@ const _super = (function (geti, seti) {
|
||||
write("export ");
|
||||
}
|
||||
|
||||
if (!isHoistedDeclarationInSystemModule) {
|
||||
write("let ");
|
||||
}
|
||||
if (decoratedClassAlias !== undefined) {
|
||||
write(`${decoratedClassAlias}`);
|
||||
write(`let ${decoratedClassAlias}`);
|
||||
}
|
||||
else {
|
||||
if (!isHoistedDeclarationInSystemModule) {
|
||||
write("let ");
|
||||
}
|
||||
emitDeclarationName(node);
|
||||
}
|
||||
|
||||
write(" = ");
|
||||
}
|
||||
else if (isES6ExportedDeclaration(node)) {
|
||||
@ -5530,7 +5529,9 @@ const _super = (function (geti, seti) {
|
||||
//
|
||||
// We'll emit:
|
||||
//
|
||||
// (_temp = class C { ... }, _temp.a = 1, _temp.b = 2, _temp)
|
||||
// let C_1 = class C{};
|
||||
// C_1.a = 1;
|
||||
// C_1.b = 2; // so forth and so on
|
||||
//
|
||||
// This keeps the expression as an expression, while ensuring that the static parts
|
||||
// of it have been initialized by the time it is used.
|
||||
|
||||
@ -2912,7 +2912,6 @@ namespace ts {
|
||||
getCancellationToken?(): CancellationToken;
|
||||
getDefaultLibFileName(options: CompilerOptions): string;
|
||||
getDefaultLibLocation?(): string;
|
||||
getDefaultTypeDirectiveNames?(rootPath: string): string[];
|
||||
writeFile: WriteFileCallback;
|
||||
getCurrentDirectory(): string;
|
||||
getDirectories(path: string): string[];
|
||||
|
||||
28
tests/baselines/reference/decoratedClassExportsCommonJS1.js
Normal file
28
tests/baselines/reference/decoratedClassExportsCommonJS1.js
Normal file
@ -0,0 +1,28 @@
|
||||
//// [decoratedClassExportsCommonJS1.ts]
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 {
|
||||
static prop0: string;
|
||||
static prop1 = Testing123.prop0;
|
||||
}
|
||||
|
||||
//// [decoratedClassExportsCommonJS1.js]
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
let Testing123_1 = class Testing123 {
|
||||
};
|
||||
let Testing123 = Testing123_1;
|
||||
Testing123.prop1 = Testing123.prop0;
|
||||
Testing123 = Testing123_1 = __decorate([
|
||||
Something({ v: () => Testing123 }),
|
||||
__metadata('design:paramtypes', [])
|
||||
], Testing123);
|
||||
exports.Testing123 = Testing123;
|
||||
@ -0,0 +1,21 @@
|
||||
=== tests/cases/conformance/decorators/class/decoratedClassExportsCommonJS1.ts ===
|
||||
declare var Something: any;
|
||||
>Something : Symbol(Something, Decl(decoratedClassExportsCommonJS1.ts, 0, 11))
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something : Symbol(Something, Decl(decoratedClassExportsCommonJS1.ts, 0, 11))
|
||||
>v : Symbol(v, Decl(decoratedClassExportsCommonJS1.ts, 1, 12))
|
||||
>Testing123 : Symbol(Testing123, Decl(decoratedClassExportsCommonJS1.ts, 0, 27))
|
||||
|
||||
export class Testing123 {
|
||||
>Testing123 : Symbol(Testing123, Decl(decoratedClassExportsCommonJS1.ts, 0, 27))
|
||||
|
||||
static prop0: string;
|
||||
>prop0 : Symbol(Testing123.prop0, Decl(decoratedClassExportsCommonJS1.ts, 2, 25))
|
||||
|
||||
static prop1 = Testing123.prop0;
|
||||
>prop1 : Symbol(Testing123.prop1, Decl(decoratedClassExportsCommonJS1.ts, 3, 25))
|
||||
>Testing123.prop0 : Symbol(Testing123.prop0, Decl(decoratedClassExportsCommonJS1.ts, 2, 25))
|
||||
>Testing123 : Symbol(Testing123, Decl(decoratedClassExportsCommonJS1.ts, 0, 27))
|
||||
>prop0 : Symbol(Testing123.prop0, Decl(decoratedClassExportsCommonJS1.ts, 2, 25))
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
=== tests/cases/conformance/decorators/class/decoratedClassExportsCommonJS1.ts ===
|
||||
declare var Something: any;
|
||||
>Something : any
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something({ v: () => Testing123 }) : any
|
||||
>Something : any
|
||||
>{ v: () => Testing123 } : { v: () => typeof Testing123; }
|
||||
>v : () => typeof Testing123
|
||||
>() => Testing123 : () => typeof Testing123
|
||||
>Testing123 : typeof Testing123
|
||||
|
||||
export class Testing123 {
|
||||
>Testing123 : Testing123
|
||||
|
||||
static prop0: string;
|
||||
>prop0 : string
|
||||
|
||||
static prop1 = Testing123.prop0;
|
||||
>prop1 : string
|
||||
>Testing123.prop0 : string
|
||||
>Testing123 : typeof Testing123
|
||||
>prop0 : string
|
||||
}
|
||||
26
tests/baselines/reference/decoratedClassExportsCommonJS2.js
Normal file
26
tests/baselines/reference/decoratedClassExportsCommonJS2.js
Normal file
@ -0,0 +1,26 @@
|
||||
//// [a.ts]
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 { }
|
||||
|
||||
//// [a.js]
|
||||
"use strict";
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
let Testing123_1 = class Testing123 {
|
||||
};
|
||||
let Testing123 = Testing123_1;
|
||||
Testing123 = Testing123_1 = __decorate([
|
||||
Something({ v: () => Testing123 }),
|
||||
__metadata('design:paramtypes', [])
|
||||
], Testing123);
|
||||
exports.Testing123 = Testing123;
|
||||
@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : Symbol(forwardRef, Decl(a.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(a.ts, 1, 28))
|
||||
|
||||
declare var Something: any;
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
>v : Symbol(v, Decl(a.ts, 3, 12))
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
export class Testing123 { }
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : (x: any) => any
|
||||
>x : any
|
||||
|
||||
declare var Something: any;
|
||||
>Something : any
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something({ v: () => Testing123 }) : any
|
||||
>Something : any
|
||||
>{ v: () => Testing123 } : { v: () => typeof Testing123; }
|
||||
>v : () => typeof Testing123
|
||||
>() => Testing123 : () => typeof Testing123
|
||||
>Testing123 : typeof Testing123
|
||||
|
||||
export class Testing123 { }
|
||||
>Testing123 : Testing123
|
||||
|
||||
39
tests/baselines/reference/decoratedClassExportsSystem1.js
Normal file
39
tests/baselines/reference/decoratedClassExportsSystem1.js
Normal file
@ -0,0 +1,39 @@
|
||||
//// [a.ts]
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 {
|
||||
static prop0: string;
|
||||
static prop1 = Testing123.prop0;
|
||||
}
|
||||
|
||||
//// [a.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var Testing123;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
let Testing123_1 = class Testing123 {
|
||||
};
|
||||
let Testing123 = Testing123_1;
|
||||
Testing123.prop1 = Testing123.prop0;
|
||||
Testing123 = Testing123_1 = __decorate([
|
||||
Something({ v: () => Testing123 }),
|
||||
__metadata('design:paramtypes', [])
|
||||
], Testing123);
|
||||
exports_1("Testing123", Testing123);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,26 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : Symbol(forwardRef, Decl(a.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(a.ts, 1, 28))
|
||||
|
||||
declare var Something: any;
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
>v : Symbol(v, Decl(a.ts, 3, 12))
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
export class Testing123 {
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
static prop0: string;
|
||||
>prop0 : Symbol(Testing123.prop0, Decl(a.ts, 4, 25))
|
||||
|
||||
static prop1 = Testing123.prop0;
|
||||
>prop1 : Symbol(Testing123.prop1, Decl(a.ts, 5, 25))
|
||||
>Testing123.prop0 : Symbol(Testing123.prop0, Decl(a.ts, 4, 25))
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
>prop0 : Symbol(Testing123.prop0, Decl(a.ts, 4, 25))
|
||||
}
|
||||
29
tests/baselines/reference/decoratedClassExportsSystem1.types
Normal file
29
tests/baselines/reference/decoratedClassExportsSystem1.types
Normal file
@ -0,0 +1,29 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : (x: any) => any
|
||||
>x : any
|
||||
|
||||
declare var Something: any;
|
||||
>Something : any
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something({ v: () => Testing123 }) : any
|
||||
>Something : any
|
||||
>{ v: () => Testing123 } : { v: () => typeof Testing123; }
|
||||
>v : () => typeof Testing123
|
||||
>() => Testing123 : () => typeof Testing123
|
||||
>Testing123 : typeof Testing123
|
||||
|
||||
export class Testing123 {
|
||||
>Testing123 : Testing123
|
||||
|
||||
static prop0: string;
|
||||
>prop0 : string
|
||||
|
||||
static prop1 = Testing123.prop0;
|
||||
>prop1 : string
|
||||
>Testing123.prop0 : string
|
||||
>Testing123 : typeof Testing123
|
||||
>prop0 : string
|
||||
}
|
||||
35
tests/baselines/reference/decoratedClassExportsSystem2.js
Normal file
35
tests/baselines/reference/decoratedClassExportsSystem2.js
Normal file
@ -0,0 +1,35 @@
|
||||
//// [a.ts]
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 { }
|
||||
|
||||
//// [a.js]
|
||||
System.register([], function(exports_1, context_1) {
|
||||
"use strict";
|
||||
var __moduleName = context_1 && context_1.id;
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
var __metadata = (this && this.__metadata) || function (k, v) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
||||
};
|
||||
var Testing123;
|
||||
return {
|
||||
setters:[],
|
||||
execute: function() {
|
||||
let Testing123_1 = class Testing123 {
|
||||
};
|
||||
let Testing123 = Testing123_1;
|
||||
Testing123 = Testing123_1 = __decorate([
|
||||
Something({ v: () => Testing123 }),
|
||||
__metadata('design:paramtypes', [])
|
||||
], Testing123);
|
||||
exports_1("Testing123", Testing123);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,17 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : Symbol(forwardRef, Decl(a.ts, 0, 0))
|
||||
>x : Symbol(x, Decl(a.ts, 1, 28))
|
||||
|
||||
declare var Something: any;
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something : Symbol(Something, Decl(a.ts, 2, 11))
|
||||
>v : Symbol(v, Decl(a.ts, 3, 12))
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
export class Testing123 { }
|
||||
>Testing123 : Symbol(Testing123, Decl(a.ts, 2, 27))
|
||||
|
||||
20
tests/baselines/reference/decoratedClassExportsSystem2.types
Normal file
20
tests/baselines/reference/decoratedClassExportsSystem2.types
Normal file
@ -0,0 +1,20 @@
|
||||
=== tests/cases/conformance/decorators/class/a.ts ===
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
>forwardRef : (x: any) => any
|
||||
>x : any
|
||||
|
||||
declare var Something: any;
|
||||
>Something : any
|
||||
|
||||
@Something({ v: () => Testing123 })
|
||||
>Something({ v: () => Testing123 }) : any
|
||||
>Something : any
|
||||
>{ v: () => Testing123 } : { v: () => typeof Testing123; }
|
||||
>v : () => typeof Testing123
|
||||
>() => Testing123 : () => typeof Testing123
|
||||
>Testing123 : typeof Testing123
|
||||
|
||||
export class Testing123 { }
|
||||
>Testing123 : Testing123
|
||||
|
||||
16
tests/baselines/reference/unusedTypeParameters6.js
Normal file
16
tests/baselines/reference/unusedTypeParameters6.js
Normal file
@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/unusedTypeParameters6.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
|
||||
class C<T> { }
|
||||
|
||||
//// [b.ts]
|
||||
interface C<T> { a: T; }
|
||||
|
||||
//// [a.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
//// [b.js]
|
||||
13
tests/baselines/reference/unusedTypeParameters6.symbols
Normal file
13
tests/baselines/reference/unusedTypeParameters6.symbols
Normal file
@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class C<T> { }
|
||||
>C : Symbol(C, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
interface C<T> { a: T; }
|
||||
>C : Symbol(C, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
>a : Symbol(C.a, Decl(b.ts, 0, 16))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
|
||||
13
tests/baselines/reference/unusedTypeParameters6.types
Normal file
13
tests/baselines/reference/unusedTypeParameters6.types
Normal file
@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class C<T> { }
|
||||
>C : C<T>
|
||||
>T : T
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
interface C<T> { a: T; }
|
||||
>C : C<T>
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
|
||||
16
tests/baselines/reference/unusedTypeParameters7.js
Normal file
16
tests/baselines/reference/unusedTypeParameters7.js
Normal file
@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/unusedTypeParameters7.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
|
||||
class C<T> { a: T; }
|
||||
|
||||
//// [b.ts]
|
||||
interface C<T> { }
|
||||
|
||||
//// [a.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
//// [b.js]
|
||||
13
tests/baselines/reference/unusedTypeParameters7.symbols
Normal file
13
tests/baselines/reference/unusedTypeParameters7.symbols
Normal file
@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class C<T> { a: T; }
|
||||
>C : Symbol(C, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
>a : Symbol(C.a, Decl(a.ts, 1, 12))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
interface C<T> { }
|
||||
>C : Symbol(C, Decl(a.ts, 0, 0), Decl(b.ts, 0, 0))
|
||||
>T : Symbol(T, Decl(a.ts, 1, 8), Decl(b.ts, 0, 12))
|
||||
|
||||
13
tests/baselines/reference/unusedTypeParameters7.types
Normal file
13
tests/baselines/reference/unusedTypeParameters7.types
Normal file
@ -0,0 +1,13 @@
|
||||
=== tests/cases/compiler/a.ts ===
|
||||
|
||||
class C<T> { a: T; }
|
||||
>C : C<T>
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
|
||||
=== tests/cases/compiler/b.ts ===
|
||||
interface C<T> { }
|
||||
>C : C<T>
|
||||
>T : T
|
||||
|
||||
11
tests/baselines/reference/unusedTypeParameters8.errors.txt
Normal file
11
tests/baselines/reference/unusedTypeParameters8.errors.txt
Normal file
@ -0,0 +1,11 @@
|
||||
tests/cases/compiler/b.ts(1,13): error TS6133: 'T' is declared but never used.
|
||||
|
||||
|
||||
==== tests/cases/compiler/a.ts (0 errors) ====
|
||||
|
||||
class C<T> { }
|
||||
|
||||
==== tests/cases/compiler/b.ts (1 errors) ====
|
||||
interface C<T> { }
|
||||
~
|
||||
!!! error TS6133: 'T' is declared but never used.
|
||||
16
tests/baselines/reference/unusedTypeParameters8.js
Normal file
16
tests/baselines/reference/unusedTypeParameters8.js
Normal file
@ -0,0 +1,16 @@
|
||||
//// [tests/cases/compiler/unusedTypeParameters8.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
|
||||
class C<T> { }
|
||||
|
||||
//// [b.ts]
|
||||
interface C<T> { }
|
||||
|
||||
//// [a.js]
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
//// [b.js]
|
||||
30
tests/baselines/reference/unusedTypeParameters9.js
Normal file
30
tests/baselines/reference/unusedTypeParameters9.js
Normal file
@ -0,0 +1,30 @@
|
||||
//// [unusedTypeParameters9.ts]
|
||||
|
||||
// clas + interface
|
||||
class C1<T> { }
|
||||
interface C1<T> { a: T; }
|
||||
|
||||
// interface + class
|
||||
class C2<T> { a: T; }
|
||||
interface C2<T> { }
|
||||
|
||||
// interfaces
|
||||
interface C3<T> { a(c: (p: T) => void): void; }
|
||||
interface C3<T> { b: string; }
|
||||
interface C3<T> { c: number; }
|
||||
interface C3<T> { d: boolean; }
|
||||
interface C3<T> { e: any; }
|
||||
|
||||
//// [unusedTypeParameters9.js]
|
||||
// clas + interface
|
||||
var C1 = (function () {
|
||||
function C1() {
|
||||
}
|
||||
return C1;
|
||||
}());
|
||||
// interface + class
|
||||
var C2 = (function () {
|
||||
function C2() {
|
||||
}
|
||||
return C2;
|
||||
}());
|
||||
53
tests/baselines/reference/unusedTypeParameters9.symbols
Normal file
53
tests/baselines/reference/unusedTypeParameters9.symbols
Normal file
@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/unusedTypeParameters9.ts ===
|
||||
|
||||
// clas + interface
|
||||
class C1<T> { }
|
||||
>C1 : Symbol(C1, Decl(unusedTypeParameters9.ts, 0, 0), Decl(unusedTypeParameters9.ts, 2, 15))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 2, 9), Decl(unusedTypeParameters9.ts, 3, 13))
|
||||
|
||||
interface C1<T> { a: T; }
|
||||
>C1 : Symbol(C1, Decl(unusedTypeParameters9.ts, 0, 0), Decl(unusedTypeParameters9.ts, 2, 15))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 2, 9), Decl(unusedTypeParameters9.ts, 3, 13))
|
||||
>a : Symbol(C1.a, Decl(unusedTypeParameters9.ts, 3, 17))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 2, 9), Decl(unusedTypeParameters9.ts, 3, 13))
|
||||
|
||||
// interface + class
|
||||
class C2<T> { a: T; }
|
||||
>C2 : Symbol(C2, Decl(unusedTypeParameters9.ts, 3, 25), Decl(unusedTypeParameters9.ts, 6, 21))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 6, 9), Decl(unusedTypeParameters9.ts, 7, 13))
|
||||
>a : Symbol(C2.a, Decl(unusedTypeParameters9.ts, 6, 13))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 6, 9), Decl(unusedTypeParameters9.ts, 7, 13))
|
||||
|
||||
interface C2<T> { }
|
||||
>C2 : Symbol(C2, Decl(unusedTypeParameters9.ts, 3, 25), Decl(unusedTypeParameters9.ts, 6, 21))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 6, 9), Decl(unusedTypeParameters9.ts, 7, 13))
|
||||
|
||||
// interfaces
|
||||
interface C3<T> { a(c: (p: T) => void): void; }
|
||||
>C3 : Symbol(C3, Decl(unusedTypeParameters9.ts, 7, 19), Decl(unusedTypeParameters9.ts, 10, 47), Decl(unusedTypeParameters9.ts, 11, 30), Decl(unusedTypeParameters9.ts, 12, 30), Decl(unusedTypeParameters9.ts, 13, 32))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
>a : Symbol(C3.a, Decl(unusedTypeParameters9.ts, 10, 17))
|
||||
>c : Symbol(c, Decl(unusedTypeParameters9.ts, 10, 20))
|
||||
>p : Symbol(p, Decl(unusedTypeParameters9.ts, 10, 24))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
|
||||
interface C3<T> { b: string; }
|
||||
>C3 : Symbol(C3, Decl(unusedTypeParameters9.ts, 7, 19), Decl(unusedTypeParameters9.ts, 10, 47), Decl(unusedTypeParameters9.ts, 11, 30), Decl(unusedTypeParameters9.ts, 12, 30), Decl(unusedTypeParameters9.ts, 13, 32))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
>b : Symbol(C3.b, Decl(unusedTypeParameters9.ts, 11, 17))
|
||||
|
||||
interface C3<T> { c: number; }
|
||||
>C3 : Symbol(C3, Decl(unusedTypeParameters9.ts, 7, 19), Decl(unusedTypeParameters9.ts, 10, 47), Decl(unusedTypeParameters9.ts, 11, 30), Decl(unusedTypeParameters9.ts, 12, 30), Decl(unusedTypeParameters9.ts, 13, 32))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
>c : Symbol(C3.c, Decl(unusedTypeParameters9.ts, 12, 17))
|
||||
|
||||
interface C3<T> { d: boolean; }
|
||||
>C3 : Symbol(C3, Decl(unusedTypeParameters9.ts, 7, 19), Decl(unusedTypeParameters9.ts, 10, 47), Decl(unusedTypeParameters9.ts, 11, 30), Decl(unusedTypeParameters9.ts, 12, 30), Decl(unusedTypeParameters9.ts, 13, 32))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
>d : Symbol(C3.d, Decl(unusedTypeParameters9.ts, 13, 17))
|
||||
|
||||
interface C3<T> { e: any; }
|
||||
>C3 : Symbol(C3, Decl(unusedTypeParameters9.ts, 7, 19), Decl(unusedTypeParameters9.ts, 10, 47), Decl(unusedTypeParameters9.ts, 11, 30), Decl(unusedTypeParameters9.ts, 12, 30), Decl(unusedTypeParameters9.ts, 13, 32))
|
||||
>T : Symbol(T, Decl(unusedTypeParameters9.ts, 10, 13), Decl(unusedTypeParameters9.ts, 11, 13), Decl(unusedTypeParameters9.ts, 12, 13), Decl(unusedTypeParameters9.ts, 13, 13), Decl(unusedTypeParameters9.ts, 14, 13))
|
||||
>e : Symbol(C3.e, Decl(unusedTypeParameters9.ts, 14, 17))
|
||||
|
||||
53
tests/baselines/reference/unusedTypeParameters9.types
Normal file
53
tests/baselines/reference/unusedTypeParameters9.types
Normal file
@ -0,0 +1,53 @@
|
||||
=== tests/cases/compiler/unusedTypeParameters9.ts ===
|
||||
|
||||
// clas + interface
|
||||
class C1<T> { }
|
||||
>C1 : C1<T>
|
||||
>T : T
|
||||
|
||||
interface C1<T> { a: T; }
|
||||
>C1 : C1<T>
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
|
||||
// interface + class
|
||||
class C2<T> { a: T; }
|
||||
>C2 : C2<T>
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
|
||||
interface C2<T> { }
|
||||
>C2 : C2<T>
|
||||
>T : T
|
||||
|
||||
// interfaces
|
||||
interface C3<T> { a(c: (p: T) => void): void; }
|
||||
>C3 : C3<T>
|
||||
>T : T
|
||||
>a : (c: (p: T) => void) => void
|
||||
>c : (p: T) => void
|
||||
>p : T
|
||||
>T : T
|
||||
|
||||
interface C3<T> { b: string; }
|
||||
>C3 : C3<T>
|
||||
>T : T
|
||||
>b : string
|
||||
|
||||
interface C3<T> { c: number; }
|
||||
>C3 : C3<T>
|
||||
>T : T
|
||||
>c : number
|
||||
|
||||
interface C3<T> { d: boolean; }
|
||||
>C3 : C3<T>
|
||||
>T : T
|
||||
>d : boolean
|
||||
|
||||
interface C3<T> { e: any; }
|
||||
>C3 : C3<T>
|
||||
>T : T
|
||||
>e : any
|
||||
|
||||
8
tests/cases/compiler/unusedTypeParameters6.ts
Normal file
8
tests/cases/compiler/unusedTypeParameters6.ts
Normal file
@ -0,0 +1,8 @@
|
||||
//@noUnusedLocals:true
|
||||
//@noUnusedParameters:true
|
||||
|
||||
// @fileName: a.ts
|
||||
class C<T> { }
|
||||
|
||||
// @fileName: b.ts
|
||||
interface C<T> { a: T; }
|
||||
8
tests/cases/compiler/unusedTypeParameters7.ts
Normal file
8
tests/cases/compiler/unusedTypeParameters7.ts
Normal file
@ -0,0 +1,8 @@
|
||||
//@noUnusedLocals:true
|
||||
//@noUnusedParameters:true
|
||||
|
||||
// @fileName: a.ts
|
||||
class C<T> { a: T; }
|
||||
|
||||
// @fileName: b.ts
|
||||
interface C<T> { }
|
||||
8
tests/cases/compiler/unusedTypeParameters8.ts
Normal file
8
tests/cases/compiler/unusedTypeParameters8.ts
Normal file
@ -0,0 +1,8 @@
|
||||
//@noUnusedLocals:true
|
||||
//@noUnusedParameters:true
|
||||
|
||||
// @fileName: a.ts
|
||||
class C<T> { }
|
||||
|
||||
// @fileName: b.ts
|
||||
interface C<T> { }
|
||||
17
tests/cases/compiler/unusedTypeParameters9.ts
Normal file
17
tests/cases/compiler/unusedTypeParameters9.ts
Normal file
@ -0,0 +1,17 @@
|
||||
//@noUnusedLocals:true
|
||||
//@noUnusedParameters:true
|
||||
|
||||
// clas + interface
|
||||
class C1<T> { }
|
||||
interface C1<T> { a: T; }
|
||||
|
||||
// interface + class
|
||||
class C2<T> { a: T; }
|
||||
interface C2<T> { }
|
||||
|
||||
// interfaces
|
||||
interface C3<T> { a(c: (p: T) => void): void; }
|
||||
interface C3<T> { b: string; }
|
||||
interface C3<T> { c: number; }
|
||||
interface C3<T> { d: boolean; }
|
||||
interface C3<T> { e: any; }
|
||||
@ -0,0 +1,13 @@
|
||||
// @target: es6
|
||||
// @experimentaldecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @module: commonjs
|
||||
// @filename: a.ts
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 {
|
||||
static prop0: string;
|
||||
static prop1 = Testing123.prop0;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
// @target: es6
|
||||
// @experimentaldecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @module: commonjs
|
||||
// @filename: a.ts
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 { }
|
||||
@ -0,0 +1,13 @@
|
||||
// @target: es6
|
||||
// @experimentaldecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @module: system
|
||||
// @filename: a.ts
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 {
|
||||
static prop0: string;
|
||||
static prop1 = Testing123.prop0;
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
// @target: es6
|
||||
// @experimentaldecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @module: system
|
||||
// @filename: a.ts
|
||||
|
||||
declare function forwardRef(x: any): any;
|
||||
declare var Something: any;
|
||||
@Something({ v: () => Testing123 })
|
||||
export class Testing123 { }
|
||||
Loading…
x
Reference in New Issue
Block a user