Completed

This commit is contained in:
aet
2021-07-21 23:37:51 -04:00
parent 2c504997af
commit 4c8f3424ce
23 changed files with 602 additions and 34 deletions

View File

@ -0,0 +1 @@
*

View File

@ -0,0 +1,4 @@
class A {
@decorator
[Symbol.iterator]() {}
}

View File

@ -0,0 +1,5 @@
let _a;
class A {
[_a = Symbol.iterator]() { }
}
__decorate([decorator], A.prototype, _a, null);

View File

@ -0,0 +1,4 @@
@classDecorator
class A {
@prop string: string;
}

View File

@ -0,0 +1,8 @@
import { __decorate } from "tslib";
let A = class A {
string: string;
}
__decorate([prop], A.prototype, "string", void 0);
A = __decorate([classDecorator], A);

View File

@ -0,0 +1,9 @@
export class NormalDecorated {
@prop a: string
}
@classDecorator
export class ClassDecorated {}
@classDecorator
export default class DefaultExport {}

View File

@ -0,0 +1,15 @@
import { __decorate } from "tslib";
export class NormalDecorated {
a: string;
}
__decorate([prop], NormalDecorated.prototype, "a", void 0);
let ClassDecorated = class ClassDecorated {};
ClassDecorated = __decorate([classDecorator], ClassDecorated);
export { ClassDecorated };
let DefaultExport = class DefaultExport {};
DefaultExport = __decorate([classDecorator], DefaultExport);
export default DefaultExport;

View File

@ -0,0 +1,3 @@
class A {
@dec method(): string {}
}

View File

@ -0,0 +1,7 @@
import { __decorate } from "tslib";
class A {
method(): string {}
}
__decorate([dec], A.prototype, "method", null);

View File

@ -0,0 +1,6 @@
import { __decorate } from "tslib"
class A {
method1(skipped: string, @Arg() b: string) {}
method2(@Arg() a: string, @Arg() b: string) {}
}

View File

@ -0,0 +1,10 @@
import { __param, __decorate as _decorate } from "tslib";
import { __decorate } from "tslib";
class A {
method1(skipped: string, b: string) {}
method2(a: string, b: string) {}
}
_decorate([__param(1, Arg())], A.prototype, "method1", null);
_decorate([__param(0, Arg()), __param(1, Arg())], A.prototype, "method2", null);

View File

@ -0,0 +1,4 @@
class A {
@dec prop: string
@dec @dec2 prop2: string
}

View File

@ -0,0 +1,9 @@
import { __decorate } from "tslib"
class A {
prop: string;
prop2: string;
}
__decorate([dec], A.prototype, "prop", void 0);
__decorate([dec, dec2], A.prototype, "prop2", void 0);