mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 23:08:20 -06:00
Added tests for issue #3932
This commit is contained in:
parent
bcf89e89e6
commit
6895237f9a
31
tests/baselines/reference/emitVoid0ReturnType.js
Normal file
31
tests/baselines/reference/emitVoid0ReturnType.js
Normal file
@ -0,0 +1,31 @@
|
||||
//// [emitVoid0ReturnType.ts]
|
||||
|
||||
declare var decorator: any;
|
||||
|
||||
class MyClass {
|
||||
constructor(test: string, test2: number) {
|
||||
|
||||
}
|
||||
|
||||
@decorator
|
||||
doSomething() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//// [emitVoid0ReturnType.js]
|
||||
var MyClass = (function () {
|
||||
function MyClass(test, test2) {
|
||||
}
|
||||
MyClass.prototype.doSomething = function () {
|
||||
};
|
||||
Object.defineProperty(MyClass.prototype, "doSomething",
|
||||
__decorate([
|
||||
decorator,
|
||||
__metadata('design:type', Function),
|
||||
__metadata('design:paramtypes', []),
|
||||
__metadata('design:returntype', void 0)
|
||||
], MyClass.prototype, "doSomething", Object.getOwnPropertyDescriptor(MyClass.prototype, "doSomething")));
|
||||
return MyClass;
|
||||
})();
|
||||
23
tests/baselines/reference/emitVoid0ReturnType.symbols
Normal file
23
tests/baselines/reference/emitVoid0ReturnType.symbols
Normal file
@ -0,0 +1,23 @@
|
||||
=== tests/cases/compiler/emitVoid0ReturnType.ts ===
|
||||
|
||||
declare var decorator: any;
|
||||
>decorator : Symbol(decorator, Decl(emitVoid0ReturnType.ts, 1, 11))
|
||||
|
||||
class MyClass {
|
||||
>MyClass : Symbol(MyClass, Decl(emitVoid0ReturnType.ts, 1, 27))
|
||||
|
||||
constructor(test: string, test2: number) {
|
||||
>test : Symbol(test, Decl(emitVoid0ReturnType.ts, 4, 16))
|
||||
>test2 : Symbol(test2, Decl(emitVoid0ReturnType.ts, 4, 29))
|
||||
|
||||
}
|
||||
|
||||
@decorator
|
||||
>decorator : Symbol(decorator, Decl(emitVoid0ReturnType.ts, 1, 11))
|
||||
|
||||
doSomething() {
|
||||
>doSomething : Symbol(doSomething, Decl(emitVoid0ReturnType.ts, 6, 5))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
23
tests/baselines/reference/emitVoid0ReturnType.types
Normal file
23
tests/baselines/reference/emitVoid0ReturnType.types
Normal file
@ -0,0 +1,23 @@
|
||||
=== tests/cases/compiler/emitVoid0ReturnType.ts ===
|
||||
|
||||
declare var decorator: any;
|
||||
>decorator : any
|
||||
|
||||
class MyClass {
|
||||
>MyClass : MyClass
|
||||
|
||||
constructor(test: string, test2: number) {
|
||||
>test : string
|
||||
>test2 : number
|
||||
|
||||
}
|
||||
|
||||
@decorator
|
||||
>decorator : any
|
||||
|
||||
doSomething() {
|
||||
>doSomething : () => void
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
17
tests/cases/compiler/emitVoid0ReturnType.ts
Normal file
17
tests/cases/compiler/emitVoid0ReturnType.ts
Normal file
@ -0,0 +1,17 @@
|
||||
// @noemithelpers: true
|
||||
// @experimentaldecorators: true
|
||||
// @emitdecoratormetadata: true
|
||||
// @target: es5
|
||||
|
||||
declare var decorator: any;
|
||||
|
||||
class MyClass {
|
||||
constructor(test: string, test2: number) {
|
||||
|
||||
}
|
||||
|
||||
@decorator
|
||||
doSomething() {
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user