Completed
This commit is contained in:
1
test/snapshots/.eslintignore
Normal file
1
test/snapshots/.eslintignore
Normal file
@ -0,0 +1 @@
|
||||
*
|
4
test/snapshots/computedProperties/input.txt
Normal file
4
test/snapshots/computedProperties/input.txt
Normal file
@ -0,0 +1,4 @@
|
||||
class A {
|
||||
@decorator
|
||||
[Symbol.iterator]() {}
|
||||
}
|
5
test/snapshots/computedProperties/output.txt
Normal file
5
test/snapshots/computedProperties/output.txt
Normal file
@ -0,0 +1,5 @@
|
||||
let _a;
|
||||
class A {
|
||||
[_a = Symbol.iterator]() { }
|
||||
}
|
||||
__decorate([decorator], A.prototype, _a, null);
|
4
test/snapshots/constructor/input.txt
Normal file
4
test/snapshots/constructor/input.txt
Normal file
@ -0,0 +1,4 @@
|
||||
@classDecorator
|
||||
class A {
|
||||
@prop string: string;
|
||||
}
|
8
test/snapshots/constructor/output.txt
Normal file
8
test/snapshots/constructor/output.txt
Normal 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);
|
9
test/snapshots/exports/input.txt
Normal file
9
test/snapshots/exports/input.txt
Normal file
@ -0,0 +1,9 @@
|
||||
export class NormalDecorated {
|
||||
@prop a: string
|
||||
}
|
||||
|
||||
@classDecorator
|
||||
export class ClassDecorated {}
|
||||
|
||||
@classDecorator
|
||||
export default class DefaultExport {}
|
15
test/snapshots/exports/output.txt
Normal file
15
test/snapshots/exports/output.txt
Normal 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;
|
3
test/snapshots/methods/input.txt
Normal file
3
test/snapshots/methods/input.txt
Normal file
@ -0,0 +1,3 @@
|
||||
class A {
|
||||
@dec method(): string {}
|
||||
}
|
7
test/snapshots/methods/output.txt
Normal file
7
test/snapshots/methods/output.txt
Normal file
@ -0,0 +1,7 @@
|
||||
import { __decorate } from "tslib";
|
||||
|
||||
class A {
|
||||
method(): string {}
|
||||
}
|
||||
|
||||
__decorate([dec], A.prototype, "method", null);
|
6
test/snapshots/params/input.txt
Normal file
6
test/snapshots/params/input.txt
Normal file
@ -0,0 +1,6 @@
|
||||
import { __decorate } from "tslib"
|
||||
|
||||
class A {
|
||||
method1(skipped: string, @Arg() b: string) {}
|
||||
method2(@Arg() a: string, @Arg() b: string) {}
|
||||
}
|
10
test/snapshots/params/output.txt
Normal file
10
test/snapshots/params/output.txt
Normal 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);
|
4
test/snapshots/properties/input.txt
Normal file
4
test/snapshots/properties/input.txt
Normal file
@ -0,0 +1,4 @@
|
||||
class A {
|
||||
@dec prop: string
|
||||
@dec @dec2 prop2: string
|
||||
}
|
9
test/snapshots/properties/output.txt
Normal file
9
test/snapshots/properties/output.txt
Normal 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);
|
Reference in New Issue
Block a user