I'm trying to get a basic decorator example to work in TypeScript without any luck.

I'm constantly seeing the error message:

> 
> Experimental support for decorators is a feature that is subject to
>  change in a future release. Set the 'experimentalDecorators' option in
>  your 'tsconfig' or 'jsconfig' to remove this warning.
> 
> 
> 

My tsconfig.json looks as follows (tsconfig in the same folder as index.ts):

```
{
    "compilerOptions": {
        "target": "esnext",
        "watch": true,
        "experimentalDecorators": true,
    }
}

```

This seems to be a pretty popular problem and has been asked multiple times on SO e. g.: [Experimental decorators warning in TypeScript compilation](https://stackoverflow.com/questions/38271273/experimental-decorators-warning-in-typescript-compilation)

I have tried all the solutions without luck. Also, my problem does not seem to be related to vscode. I get the same error trying to run the file from the shell.

What I've tried so far:

1. Restart VC Code
2. EmitDecoratorMetaData: true
3. Allow experimental decorators as an implicit config in VC Code
in VC code
4. Set TS version manually
5. Create new tsconfig.json

---

EDIT

index.ts

```
function f(): any {
    console.log("f(): evaluated");
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        console.log("f(): called");
    }
}

function g(): any {
    console.log("g(): evaluated");
    return function (target, propertyKey: string, descriptor: PropertyDescriptor) {
        console.log("g(): called");
    }
}

class C {
    @f()
    @g()
    method() {}
}

```