mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-06 02:00:01 -06:00
Code review comments
This commit is contained in:
parent
3492542ebb
commit
f0a430aef8
@ -5,6 +5,7 @@ export class C {
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
export { C as C2 };
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
@foo
|
||||
@ -13,9 +14,11 @@ export class D {
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
export { D as D2 };
|
||||
|
||||
class E { }
|
||||
export {E};
|
||||
export {E};
|
||||
|
||||
|
||||
//// [es6modulekindWithES5Target.js]
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
@ -32,6 +35,7 @@ export var C = (function () {
|
||||
C.s = 0;
|
||||
return C;
|
||||
}());
|
||||
export { C as C2 };
|
||||
export var D = (function () {
|
||||
function D() {
|
||||
this.p = 1;
|
||||
@ -43,6 +47,7 @@ export var D = (function () {
|
||||
], D);
|
||||
return D;
|
||||
}());
|
||||
export { D as D2 };
|
||||
var E = (function () {
|
||||
function E() {
|
||||
}
|
||||
|
||||
@ -12,30 +12,36 @@ export class C {
|
||||
method() { }
|
||||
>method : Symbol(C.method, Decl(es6modulekindWithES5Target.ts, 3, 10))
|
||||
}
|
||||
export { C as C2 };
|
||||
>C : Symbol(C2, Decl(es6modulekindWithES5Target.ts, 6, 8))
|
||||
>C2 : Symbol(C2, Decl(es6modulekindWithES5Target.ts, 6, 8))
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target.ts, 5, 1))
|
||||
>args : Symbol(args, Decl(es6modulekindWithES5Target.ts, 7, 21))
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target.ts, 6, 19))
|
||||
>args : Symbol(args, Decl(es6modulekindWithES5Target.ts, 8, 21))
|
||||
|
||||
@foo
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target.ts, 5, 1))
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target.ts, 6, 19))
|
||||
|
||||
export class D {
|
||||
>D : Symbol(D, Decl(es6modulekindWithES5Target.ts, 7, 42))
|
||||
>D : Symbol(D, Decl(es6modulekindWithES5Target.ts, 8, 42))
|
||||
|
||||
static s = 0;
|
||||
>s : Symbol(D.s, Decl(es6modulekindWithES5Target.ts, 9, 16))
|
||||
>s : Symbol(D.s, Decl(es6modulekindWithES5Target.ts, 10, 16))
|
||||
|
||||
p = 1;
|
||||
>p : Symbol(D.p, Decl(es6modulekindWithES5Target.ts, 10, 17))
|
||||
>p : Symbol(D.p, Decl(es6modulekindWithES5Target.ts, 11, 17))
|
||||
|
||||
method() { }
|
||||
>method : Symbol(D.method, Decl(es6modulekindWithES5Target.ts, 11, 10))
|
||||
>method : Symbol(D.method, Decl(es6modulekindWithES5Target.ts, 12, 10))
|
||||
}
|
||||
export { D as D2 };
|
||||
>D : Symbol(D2, Decl(es6modulekindWithES5Target.ts, 15, 8))
|
||||
>D2 : Symbol(D2, Decl(es6modulekindWithES5Target.ts, 15, 8))
|
||||
|
||||
class E { }
|
||||
>E : Symbol(E, Decl(es6modulekindWithES5Target.ts, 13, 1))
|
||||
>E : Symbol(E, Decl(es6modulekindWithES5Target.ts, 15, 19))
|
||||
|
||||
export {E};
|
||||
>E : Symbol(E, Decl(es6modulekindWithES5Target.ts, 16, 8))
|
||||
>E : Symbol(E, Decl(es6modulekindWithES5Target.ts, 18, 8))
|
||||
|
||||
|
||||
@ -14,6 +14,9 @@ export class C {
|
||||
method() { }
|
||||
>method : () => void
|
||||
}
|
||||
export { C as C2 };
|
||||
>C : typeof C
|
||||
>C2 : typeof C
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
>foo : (...args: any[]) => any
|
||||
@ -36,6 +39,9 @@ export class D {
|
||||
method() { }
|
||||
>method : () => void
|
||||
}
|
||||
export { D as D2 };
|
||||
>D : typeof D
|
||||
>D2 : typeof D
|
||||
|
||||
class E { }
|
||||
>E : E
|
||||
|
||||
31
tests/baselines/reference/es6modulekindWithES5Target11.js
Normal file
31
tests/baselines/reference/es6modulekindWithES5Target11.js
Normal file
@ -0,0 +1,31 @@
|
||||
//// [es6modulekindWithES5Target11.ts]
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
@foo
|
||||
export default class C {
|
||||
static x() { return C.y; }
|
||||
static y = 1
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
|
||||
//// [es6modulekindWithES5Target11.js]
|
||||
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 C = (function () {
|
||||
function C() {
|
||||
this.p = 1;
|
||||
}
|
||||
C.x = function () { return C.y; };
|
||||
C.prototype.method = function () { };
|
||||
C.y = 1;
|
||||
C = __decorate([
|
||||
foo
|
||||
], C);
|
||||
return C;
|
||||
}());
|
||||
export default C;
|
||||
@ -0,0 +1,27 @@
|
||||
=== tests/cases/compiler/es6modulekindWithES5Target11.ts ===
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target11.ts, 0, 0))
|
||||
>args : Symbol(args, Decl(es6modulekindWithES5Target11.ts, 1, 21))
|
||||
|
||||
@foo
|
||||
>foo : Symbol(foo, Decl(es6modulekindWithES5Target11.ts, 0, 0))
|
||||
|
||||
export default class C {
|
||||
>C : Symbol(C, Decl(es6modulekindWithES5Target11.ts, 1, 42))
|
||||
|
||||
static x() { return C.y; }
|
||||
>x : Symbol(C.x, Decl(es6modulekindWithES5Target11.ts, 3, 24))
|
||||
>C.y : Symbol(C.y, Decl(es6modulekindWithES5Target11.ts, 4, 30))
|
||||
>C : Symbol(C, Decl(es6modulekindWithES5Target11.ts, 1, 42))
|
||||
>y : Symbol(C.y, Decl(es6modulekindWithES5Target11.ts, 4, 30))
|
||||
|
||||
static y = 1
|
||||
>y : Symbol(C.y, Decl(es6modulekindWithES5Target11.ts, 4, 30))
|
||||
|
||||
p = 1;
|
||||
>p : Symbol(C.p, Decl(es6modulekindWithES5Target11.ts, 5, 16))
|
||||
|
||||
method() { }
|
||||
>method : Symbol(C.method, Decl(es6modulekindWithES5Target11.ts, 6, 10))
|
||||
}
|
||||
29
tests/baselines/reference/es6modulekindWithES5Target11.types
Normal file
29
tests/baselines/reference/es6modulekindWithES5Target11.types
Normal file
@ -0,0 +1,29 @@
|
||||
=== tests/cases/compiler/es6modulekindWithES5Target11.ts ===
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
>foo : (...args: any[]) => any
|
||||
>args : any[]
|
||||
|
||||
@foo
|
||||
>foo : (...args: any[]) => any
|
||||
|
||||
export default class C {
|
||||
>C : C
|
||||
|
||||
static x() { return C.y; }
|
||||
>x : () => number
|
||||
>C.y : number
|
||||
>C : typeof C
|
||||
>y : number
|
||||
|
||||
static y = 1
|
||||
>y : number
|
||||
>1 : number
|
||||
|
||||
p = 1;
|
||||
>p : number
|
||||
>1 : number
|
||||
|
||||
method() { }
|
||||
>method : () => void
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(2,15): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(4,17): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(6,20): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(10,15): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(12,17): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(14,15): error TS2307: Cannot find module 'mod'.
|
||||
tests/cases/compiler/es6modulekindWithES5Target9.ts(16,17): error TS2307: Cannot find module 'mod'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/es6modulekindWithES5Target9.ts (5 errors) ====
|
||||
@ -21,6 +21,10 @@ tests/cases/compiler/es6modulekindWithES5Target9.ts(12,17): error TS2307: Cannot
|
||||
|
||||
export {a};
|
||||
|
||||
export {M};
|
||||
|
||||
export {d};
|
||||
|
||||
export * from "mod";
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find module 'mod'.
|
||||
|
||||
@ -8,6 +8,10 @@ import * as M from "mod";
|
||||
|
||||
export {a};
|
||||
|
||||
export {M};
|
||||
|
||||
export {d};
|
||||
|
||||
export * from "mod";
|
||||
|
||||
export {b} from "mod"
|
||||
@ -18,7 +22,10 @@ export default d;
|
||||
//// [es6modulekindWithES5Target9.js]
|
||||
import d from "mod";
|
||||
import { a } from "mod";
|
||||
import * as M from "mod";
|
||||
export { a };
|
||||
export { M };
|
||||
export { d };
|
||||
export * from "mod";
|
||||
export { b } from "mod";
|
||||
export default d;
|
||||
|
||||
@ -7,6 +7,7 @@ export class C {
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
export { C as C2 };
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
@foo
|
||||
@ -15,6 +16,7 @@ export class D {
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
export { D as D2 };
|
||||
|
||||
class E { }
|
||||
export {E};
|
||||
export {E};
|
||||
|
||||
12
tests/cases/compiler/es6modulekindWithES5Target11.ts
Normal file
12
tests/cases/compiler/es6modulekindWithES5Target11.ts
Normal file
@ -0,0 +1,12 @@
|
||||
// @target: es5
|
||||
// @module: es2015
|
||||
// @experimentalDecorators: true
|
||||
|
||||
declare function foo(...args: any[]): any;
|
||||
@foo
|
||||
export default class C {
|
||||
static x() { return C.y; }
|
||||
static y = 1
|
||||
p = 1;
|
||||
method() { }
|
||||
}
|
||||
@ -9,6 +9,10 @@ import * as M from "mod";
|
||||
|
||||
export {a};
|
||||
|
||||
export {M};
|
||||
|
||||
export {d};
|
||||
|
||||
export * from "mod";
|
||||
|
||||
export {b} from "mod"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user