summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/run/runtime_decorators.ts
diff options
context:
space:
mode:
authorBartek Iwańczuk <biwanczuk@gmail.com>2024-01-24 14:16:23 +0100
committerGitHub <noreply@github.com>2024-01-24 18:46:23 +0530
commitb66f5ed00e83927a976ffdbe45c2ace9641de086 (patch)
tree60442b72d7f91659715d578c7d4d59c78c8537a9 /cli/tests/testdata/run/runtime_decorators.ts
parentaac0ad32bd589394316223f75e6f511331ff124c (diff)
feat: TC39 decorator proposal support (#22040)
This commit adds support for [TC39 Decorator Proposal](https://github.com/tc39/proposal-decorators). These decorators are only available in transpiled sources - ie. non-JavaScript files (because of lack of support in V8). This entails that "experimental TypeScript decorators" are not available by default and require to be configured, with a configuration like this: ``` { "compilerOptions": { "experimentalDecorators": true } } ``` Closes https://github.com/denoland/deno/issues/19160 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Diffstat (limited to 'cli/tests/testdata/run/runtime_decorators.ts')
-rw-r--r--cli/tests/testdata/run/runtime_decorators.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/tests/testdata/run/runtime_decorators.ts b/cli/tests/testdata/run/runtime_decorators.ts
index 5da109110..40a26bbd4 100644
--- a/cli/tests/testdata/run/runtime_decorators.ts
+++ b/cli/tests/testdata/run/runtime_decorators.ts
@@ -1,5 +1,5 @@
// deno-lint-ignore-file
-function A() {
+function a() {
console.log("@A evaluated");
return function (
target: any,
@@ -15,7 +15,7 @@ function A() {
};
}
-function B() {
+function b() {
console.log("@B evaluated");
return function (
target: any,
@@ -32,8 +32,8 @@ function B() {
}
class C {
- @A()
- @B()
+ @a()
+ @b()
static test() {
console.log("C.test() called");
}