Each time I attempt to execute the testClass.ts, I encounter an error with these two simple files:
PS C:\Deno\pancakes> deno run testClass.ts
Compile file:///C:/Deno/pancakes/testClass.ts
error: TS1219 [ERROR]: Experimental support for decorators is a feature that may change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig' or 'jsconfig' to remove this warning.
name: string;
~~~~
at file:///C:/Deno/pancakes/testClass.ts:5:5
testClass.ts
import { notNull } from "./mod.ts";
class Person {
@notNull
name: string;
constructor(name: string) {
this.name = name;
}
}
let newPerson = new Person("");
mod.ts
export function notNull(target: any, propertyKey: string) {
console.log(target, propertyKey);
}
I've tried enabling the experimentalDecorators option in VSCode and creating the tsconfig.json, but still cannot get the program to run. There are no errors showing up in VSCode, yet I can't execute it.
Edit: this is what happens