This message was deleted.
# typescript
s
This message was deleted.
a
actually, I can provoke the same error in another code-file by just adding:
Copy code
export interface ITest 
{
    get name(): string;
}
I will work around this for now by converting all the getters into methods, but why is this a problem? is there some setting I can change to allow getters?
l
Is the
get
syntax specific to a particular version? Check which version is defined in your package.json. Also, the default TS configuration uses es2016; was it in there? You might have to override that. See more here: https://www.pulumi.com/docs/intro/languages/javascript/#3-create-tsconfigjson
a
it seems to me that I used the
get and set
syntax 5+ years ago, and tsconfig says only this:
"compilerOptions": {
"strict": true,
"outDir": "bin",
"target": "es2016",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"experimentalDecorators": true,
"pretty": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"forceConsistentCasingInFileNames": true
},
also, I'm using VSCode, which in turn honors tsconfig. and VSCode is perfectly happy with the get declarations.
so, I think this is maybe something I should create an issue for
👍 1