diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-02-21 23:03:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 23:03:11 +0000 |
commit | 197d2480bbfd57c6c5213ae12ce1e71b7d03f896 (patch) | |
tree | 778f00fcacaf6421f374d11cfabea534a45f2407 /tests/testdata/compile/compiler_options/main.ts | |
parent | 190776f30d8a3900c03e097ed4b9209db447301b (diff) |
fix(compile): respect compiler options for emit (#22521)
`deno compile` was ignoring configuration file and thus not applying
`compilerOptions` to influence the way files were emitted.
Diffstat (limited to 'tests/testdata/compile/compiler_options/main.ts')
-rw-r--r-- | tests/testdata/compile/compiler_options/main.ts | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/testdata/compile/compiler_options/main.ts b/tests/testdata/compile/compiler_options/main.ts new file mode 100644 index 000000000..40a26bbd4 --- /dev/null +++ b/tests/testdata/compile/compiler_options/main.ts @@ -0,0 +1,42 @@ +// deno-lint-ignore-file +function a() { + console.log("@A evaluated"); + return function ( + target: any, + propertyKey: string, + descriptor: PropertyDescriptor, + ) { + console.log("@A called"); + const fn = descriptor.value; + descriptor.value = function () { + console.log("fn() called from @A"); + fn(); + }; + }; +} + +function b() { + console.log("@B evaluated"); + return function ( + target: any, + propertyKey: string, + descriptor: PropertyDescriptor, + ) { + console.log("@B called"); + const fn = descriptor.value; + descriptor.value = function () { + console.log("fn() called from @B"); + fn(); + }; + }; +} + +class C { + @a() + @b() + static test() { + console.log("C.test() called"); + } +} + +C.test(); |