ancient-eve-13947
05/18/2022, 11:32 AMget
? as in
export interface IScalerRule {
get kedaDefinition(): object;
createSecretAndAuthentication(): pulumi.Resource
}
i'm getting all kinds of errors when I run pulumi preview, and only since I added code using getters:
TSError: ⨯ Unable to compile TypeScript:
keda.ts(8,5): error TS1131: Property or signature expected.
keda.ts(8,9): error TS1005: ';' expected.
keda.ts(8,25): error TS1005: ';' expected.
keda.ts(9,36): error TS1005: ';' expected.
keda.ts(10,1): error TS1128: Declaration or statement expected.
keda.ts(8,5): error TS2304: Cannot find name 'get'.
keda.ts(8,9): error TS2304: Cannot find name 'kedaDefinition'.
keda.ts(8,27): error TS2552: Cannot find name 'object'. Did you mean 'Object'?
keda.ts(9,5): error TS2304: Cannot find name 'createSecretAndAuthentication'.
keda.ts(150,47): error TS2339: Property 'createSecretAndAuthentication' does not exist on type 'IScalerRule'.
keda.ts(151,43): error TS2339: Property 'kedaDefinition' does not exist on type 'IScalerRule'.VSCode is fine with the code, though.
export interface ITest
{
get name(): string;
}
little-cartoon-10569
05/18/2022, 8:54 PMget
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-tsconfigjsonancient-eve-13947
05/19/2022, 11:45 AMget 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
},