From 5b251be6e19c94e0088019d7c3d8f8ea0b63f9b6 Mon Sep 17 00:00:00 2001 From: aet Date: Wed, 21 Jul 2021 23:41:50 -0400 Subject: [PATCH] Add test for parameter decorator in construtor function --- test/snapshots/params/input.txt | 4 ++++ test/snapshots/params/output.txt | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/test/snapshots/params/input.txt b/test/snapshots/params/input.txt index ebc4d42..b96e077 100644 --- a/test/snapshots/params/input.txt +++ b/test/snapshots/params/input.txt @@ -4,3 +4,7 @@ class A { method1(skipped: string, @Arg() b: string) {} method2(@Arg() a: string, @Arg() b: string) {} } + +class B { + constructor(@Arg() a: string) {} +} \ No newline at end of file diff --git a/test/snapshots/params/output.txt b/test/snapshots/params/output.txt index 5b390a4..69183a0 100644 --- a/test/snapshots/params/output.txt +++ b/test/snapshots/params/output.txt @@ -8,3 +8,8 @@ class A { _decorate([__param(1, Arg())], A.prototype, "method1", null); _decorate([__param(0, Arg()), __param(1, Arg())], A.prototype, "method2", null); + +let B = class B { + constructor(a: string) {} +}; +B = _decorate([__param(0, Arg())], B); \ No newline at end of file