mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-02 14:48:32 -05:00
Updated baselines.
This commit is contained in:
@@ -22,7 +22,16 @@ declare var dec: any;
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [external.js]
|
||||
"use strict";
|
||||
|
||||
@@ -45,3 +45,47 @@ class C {
|
||||
>x : Symbol(x, Decl(script.ts, 7, 11))
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -45,3 +45,47 @@ class C {
|
||||
>x : number
|
||||
}
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
//// [tests/cases/compiler/importHelpersAmd.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export class A { }
|
||||
export class A { }
|
||||
|
||||
//// [b.ts]
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
define(["require", "exports"], function (require, exports) {
|
||||
|
||||
@@ -10,3 +10,46 @@ export class B extends A { }
|
||||
>B : Symbol(B, Decl(b.ts, 0, 24))
|
||||
>A : Symbol(A, Decl(b.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -10,3 +10,46 @@ export class B extends A { }
|
||||
>B : B
|
||||
>A : A
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
//// [tests/cases/compiler/importHelpersES6.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
declare var dec: any;
|
||||
@dec export class A {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
import * as tslib_1 from "tslib";
|
||||
|
||||
@@ -7,3 +7,47 @@ declare var dec: any;
|
||||
>A : Symbol(A, Decl(a.ts, 0, 21))
|
||||
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -7,3 +7,47 @@ declare var dec: any;
|
||||
>A : A
|
||||
|
||||
}
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
@@ -25,4 +25,13 @@ tests/cases/compiler/script.ts(1,1): error TS1208: Cannot compile namespaces whe
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/tslib.d.ts (0 errors) ====
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -22,7 +22,16 @@ declare var dec: any;
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [external.js]
|
||||
"use strict";
|
||||
|
||||
@@ -5,16 +5,25 @@ declare var React: any;
|
||||
declare var o: any;
|
||||
export const x = <span {...o} />
|
||||
|
||||
//// [internal.tsx]
|
||||
//// [script.tsx]
|
||||
declare var React: any;
|
||||
declare var o: any;
|
||||
const x = <span {...o} />
|
||||
const x = <span {...o} />
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [external.js]
|
||||
"use strict";
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = React.createElement("span", tslib_1.__assign({}, o));
|
||||
//// [internal.js]
|
||||
//// [script.js]
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
|
||||
@@ -10,15 +10,58 @@ export const x = <span {...o} />
|
||||
>span : Symbol(unknown)
|
||||
>o : Symbol(o, Decl(external.tsx, 1, 11))
|
||||
|
||||
=== tests/cases/compiler/internal.tsx ===
|
||||
=== tests/cases/compiler/script.tsx ===
|
||||
declare var React: any;
|
||||
>React : Symbol(React, Decl(internal.tsx, 0, 11))
|
||||
>React : Symbol(React, Decl(script.tsx, 0, 11))
|
||||
|
||||
declare var o: any;
|
||||
>o : Symbol(o, Decl(internal.tsx, 1, 11))
|
||||
>o : Symbol(o, Decl(script.tsx, 1, 11))
|
||||
|
||||
const x = <span {...o} />
|
||||
>x : Symbol(x, Decl(internal.tsx, 2, 5))
|
||||
>x : Symbol(x, Decl(script.tsx, 2, 5))
|
||||
>span : Symbol(unknown)
|
||||
>o : Symbol(o, Decl(internal.tsx, 1, 11))
|
||||
>o : Symbol(o, Decl(script.tsx, 1, 11))
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export const x = <span {...o} />
|
||||
>span : any
|
||||
>o : any
|
||||
|
||||
=== tests/cases/compiler/internal.tsx ===
|
||||
=== tests/cases/compiler/script.tsx ===
|
||||
declare var React: any;
|
||||
>React : any
|
||||
|
||||
@@ -24,3 +24,46 @@ const x = <span {...o} />
|
||||
>span : any
|
||||
>o : any
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
36
tests/baselines/reference/importHelpersNoHelpers.errors.txt
Normal file
36
tests/baselines/reference/importHelpersNoHelpers.errors.txt
Normal file
@@ -0,0 +1,36 @@
|
||||
error TS2305: Module 'tslib' has no exported member '__decorate'.
|
||||
error TS2305: Module 'tslib' has no exported member '__extends'.
|
||||
error TS2305: Module 'tslib' has no exported member '__metadata'.
|
||||
error TS2305: Module 'tslib' has no exported member '__param'.
|
||||
|
||||
|
||||
!!! error TS2305: Module 'tslib' has no exported member '__decorate'.
|
||||
!!! error TS2305: Module 'tslib' has no exported member '__extends'.
|
||||
!!! error TS2305: Module 'tslib' has no exported member '__metadata'.
|
||||
!!! error TS2305: Module 'tslib' has no exported member '__param'.
|
||||
==== tests/cases/compiler/external.ts (0 errors) ====
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/script.ts (0 errors) ====
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/tslib.d.ts (0 errors) ====
|
||||
export {}
|
||||
110
tests/baselines/reference/importHelpersNoHelpers.js
Normal file
110
tests/baselines/reference/importHelpersNoHelpers.js
Normal file
@@ -0,0 +1,110 @@
|
||||
//// [tests/cases/compiler/importHelpersNoHelpers.ts] ////
|
||||
|
||||
//// [external.ts]
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
//// [script.ts]
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export {}
|
||||
|
||||
//// [external.js]
|
||||
"use strict";
|
||||
var tslib_1 = require("tslib");
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
exports.A = A;
|
||||
var B = (function (_super) {
|
||||
tslib_1.__extends(B, _super);
|
||||
function B() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
exports.B = B;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.method = function (x) {
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
tslib_1.__decorate([
|
||||
tslib_1.__param(0, dec),
|
||||
tslib_1.__metadata("design:type", Function),
|
||||
tslib_1.__metadata("design:paramtypes", [Number]),
|
||||
tslib_1.__metadata("design:returntype", void 0)
|
||||
], C.prototype, "method", null);
|
||||
C = tslib_1.__decorate([
|
||||
dec,
|
||||
tslib_1.__metadata("design:paramtypes", [])
|
||||
], C);
|
||||
//// [script.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
var B = (function (_super) {
|
||||
__extends(B, _super);
|
||||
function B() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.method = function (x) {
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
__decorate([
|
||||
__param(0, dec),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], C.prototype, "method", null);
|
||||
C = __decorate([
|
||||
dec,
|
||||
__metadata("design:paramtypes", [])
|
||||
], C);
|
||||
28
tests/baselines/reference/importHelpersNoModule.errors.txt
Normal file
28
tests/baselines/reference/importHelpersNoModule.errors.txt
Normal file
@@ -0,0 +1,28 @@
|
||||
error TS2307: Cannot find module 'tslib'.
|
||||
|
||||
|
||||
!!! error TS2307: Cannot find module 'tslib'.
|
||||
==== tests/cases/compiler/external.ts (0 errors) ====
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
==== tests/cases/compiler/script.ts (0 errors) ====
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
108
tests/baselines/reference/importHelpersNoModule.js
Normal file
108
tests/baselines/reference/importHelpersNoModule.js
Normal file
@@ -0,0 +1,108 @@
|
||||
//// [tests/cases/compiler/importHelpersNoModule.ts] ////
|
||||
|
||||
//// [external.ts]
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
//// [script.ts]
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [external.js]
|
||||
"use strict";
|
||||
var tslib_1 = require("tslib");
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
exports.A = A;
|
||||
var B = (function (_super) {
|
||||
tslib_1.__extends(B, _super);
|
||||
function B() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
exports.B = B;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.method = function (x) {
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
tslib_1.__decorate([
|
||||
tslib_1.__param(0, dec),
|
||||
tslib_1.__metadata("design:type", Function),
|
||||
tslib_1.__metadata("design:paramtypes", [Number]),
|
||||
tslib_1.__metadata("design:returntype", void 0)
|
||||
], C.prototype, "method", null);
|
||||
C = tslib_1.__decorate([
|
||||
dec,
|
||||
tslib_1.__metadata("design:paramtypes", [])
|
||||
], C);
|
||||
//// [script.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
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 __param = (this && this.__param) || function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
return A;
|
||||
}());
|
||||
var B = (function (_super) {
|
||||
__extends(B, _super);
|
||||
function B() {
|
||||
_super.apply(this, arguments);
|
||||
}
|
||||
return B;
|
||||
}(A));
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.prototype.method = function (x) {
|
||||
};
|
||||
return C;
|
||||
}());
|
||||
__decorate([
|
||||
__param(0, dec),
|
||||
__metadata("design:type", Function),
|
||||
__metadata("design:paramtypes", [Number]),
|
||||
__metadata("design:returntype", void 0)
|
||||
], C.prototype, "method", null);
|
||||
C = __decorate([
|
||||
dec,
|
||||
__metadata("design:paramtypes", [])
|
||||
], C);
|
||||
@@ -1,14 +1,24 @@
|
||||
//// [tests/cases/compiler/importHelpersOutFile.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export class A { }
|
||||
export class A { }
|
||||
|
||||
//// [b.ts]
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
export class B extends A { }
|
||||
|
||||
//// [c.ts]
|
||||
import { A } from "./a";
|
||||
export class C extends A { }
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [out.js]
|
||||
define("a", ["require", "exports"], function (require, exports) {
|
||||
|
||||
@@ -18,3 +18,46 @@ export class C extends A { }
|
||||
>C : Symbol(C, Decl(c.ts, 0, 24))
|
||||
>A : Symbol(A, Decl(c.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -18,3 +18,46 @@ export class C extends A { }
|
||||
>C : C
|
||||
>A : A
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
//// [tests/cases/compiler/importHelpersSystem.ts] ////
|
||||
|
||||
//// [a.ts]
|
||||
export class A { }
|
||||
export class A { }
|
||||
|
||||
//// [b.ts]
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
|
||||
//// [tslib.d.ts]
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
System.register([], function (exports_1, context_1) {
|
||||
|
||||
@@ -10,3 +10,46 @@ export class B extends A { }
|
||||
>B : Symbol(B, Decl(b.ts, 0, 24))
|
||||
>A : Symbol(A, Decl(b.ts, 0, 8))
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : Symbol(__extends, Decl(tslib.d.ts, --, --))
|
||||
>d : Symbol(d, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>b : Symbol(b, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : Symbol(__assign, Decl(tslib.d.ts, --, --))
|
||||
>t : Symbol(t, Decl(tslib.d.ts, --, --))
|
||||
>sources : Symbol(sources, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : Symbol(__decorate, Decl(tslib.d.ts, --, --))
|
||||
>decorators : Symbol(decorators, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>target : Symbol(target, Decl(tslib.d.ts, --, --))
|
||||
>key : Symbol(key, Decl(tslib.d.ts, --, --))
|
||||
>desc : Symbol(desc, Decl(tslib.d.ts, --, --))
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : Symbol(__param, Decl(tslib.d.ts, --, --))
|
||||
>paramIndex : Symbol(paramIndex, Decl(tslib.d.ts, --, --))
|
||||
>decorator : Symbol(decorator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : Symbol(__metadata, Decl(tslib.d.ts, --, --))
|
||||
>metadataKey : Symbol(metadataKey, Decl(tslib.d.ts, --, --))
|
||||
>metadataValue : Symbol(metadataValue, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : Symbol(__awaiter, Decl(tslib.d.ts, --, --))
|
||||
>thisArg : Symbol(thisArg, Decl(tslib.d.ts, --, --))
|
||||
>_arguments : Symbol(_arguments, Decl(tslib.d.ts, --, --))
|
||||
>P : Symbol(P, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>generator : Symbol(generator, Decl(tslib.d.ts, --, --))
|
||||
>Function : Symbol(Function, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
|
||||
|
||||
@@ -10,3 +10,46 @@ export class B extends A { }
|
||||
>B : B
|
||||
>A : A
|
||||
|
||||
=== tests/cases/compiler/tslib.d.ts ===
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
>__extends : (d: Function, b: Function) => void
|
||||
>d : Function
|
||||
>Function : Function
|
||||
>b : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
>__assign : (t: any, ...sources: any[]) => any
|
||||
>t : any
|
||||
>sources : any[]
|
||||
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
>__decorate : (decorators: Function[], target: any, key?: string | symbol, desc?: any) => any
|
||||
>decorators : Function[]
|
||||
>Function : Function
|
||||
>target : any
|
||||
>key : string | symbol
|
||||
>desc : any
|
||||
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
>__param : (paramIndex: number, decorator: Function) => Function
|
||||
>paramIndex : number
|
||||
>decorator : Function
|
||||
>Function : Function
|
||||
>Function : Function
|
||||
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
>__metadata : (metadataKey: any, metadataValue: any) => Function
|
||||
>metadataKey : any
|
||||
>metadataValue : any
|
||||
>Function : Function
|
||||
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
>__awaiter : (thisArg: any, _arguments: any, P: Function, generator: Function) => any
|
||||
>thisArg : any
|
||||
>_arguments : any
|
||||
>P : Function
|
||||
>Function : Function
|
||||
>generator : Function
|
||||
>Function : Function
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// @importHelpers: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @moduleResolution: classic
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @filename: external.ts
|
||||
@@ -25,4 +26,12 @@ declare var dec: any;
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
// @module: amd
|
||||
// @filename: a.ts
|
||||
export class A { }
|
||||
|
||||
// @filename: b.ts
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -5,4 +5,12 @@
|
||||
declare var dec: any;
|
||||
@dec export class A {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// @isolatedModules: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @moduleResolution: classic
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @filename: external.ts
|
||||
@@ -26,4 +27,12 @@ declare var dec: any;
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// @importHelpers: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @moduleResolution: classic
|
||||
// @jsx: react
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
@@ -9,7 +10,15 @@ declare var React: any;
|
||||
declare var o: any;
|
||||
export const x = <span {...o} />
|
||||
|
||||
// @filename: internal.tsx
|
||||
// @filename: script.tsx
|
||||
declare var React: any;
|
||||
declare var o: any;
|
||||
const x = <span {...o} />
|
||||
const x = <span {...o} />
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
32
tests/cases/compiler/importHelpersNoHelpers.ts
Normal file
32
tests/cases/compiler/importHelpersNoHelpers.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
// @importHelpers: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @moduleResolution: classic
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @filename: external.ts
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: script.ts
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export {}
|
||||
29
tests/cases/compiler/importHelpersNoModule.ts
Normal file
29
tests/cases/compiler/importHelpersNoModule.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
// @importHelpers: true
|
||||
// @target: es5
|
||||
// @module: commonjs
|
||||
// @moduleResolution: classic
|
||||
// @experimentalDecorators: true
|
||||
// @emitDecoratorMetadata: true
|
||||
// @filename: external.ts
|
||||
export class A { }
|
||||
export class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
|
||||
// @filename: script.ts
|
||||
class A { }
|
||||
class B extends A { }
|
||||
|
||||
declare var dec: any;
|
||||
|
||||
@dec
|
||||
class C {
|
||||
method(@dec x: number) {
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,19 @@
|
||||
// @outfile: out.js
|
||||
// @filename: a.ts
|
||||
export class A { }
|
||||
|
||||
// @filename: b.ts
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
|
||||
// @filename: c.ts
|
||||
import { A } from "./a";
|
||||
export class C extends A { }
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
// @module: system
|
||||
// @filename: a.ts
|
||||
export class A { }
|
||||
|
||||
// @filename: b.ts
|
||||
import { A } from "./a";
|
||||
export class B extends A { }
|
||||
|
||||
// @filename: tslib.d.ts
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
|
||||
Reference in New Issue
Block a user