Avatar ·

Warning "Experimental decorators" when compiling TypeScript

Hello everyone! I just started learning TypeScript and encountered an unclear problem. I'm writing a simple class with a decorator, but when compiling I get a warning: "Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option in your 'tsconfig.json' or 'jsconfig.json' to remove this warning."\n\nHere is my code:\n\n```typescript\nfunction log(target: any, key: string, descriptor: PropertyDescriptor) {\n const original = descriptor.value;\n descriptor.value = function(...args: any[]) {\n console.log(`Calling method ${key} with arguments:`, args);\n return original.apply(this, args);\n };\n return descriptor;\n}\n\nclass Calculator {\n @log\n add(a: number, b: number): number {\n return a + b;\n }\n}\n\nconst c