I have this simple Typescript class
export class Hello{
myname: string = 'Scott';
sayHello() {
console.log(this.myname);
}
}
From one of my Protractor Typescript files I do this
import { Hello } from './hello';
const hello = new Hello();
hello.sayHello();
However this results in a Typescript compilation error:
[11:48:33] E/launcher - Error: TSError: тип Unable to compile TypeScript: projects/cxone-component-showcase/e2e/src/hello.ts(3,14): error TS2339: Property 'myname' does not exist on type 'Hello'. projects/cxone-component-showcase/e2e/src/hello.ts(6,26): error TS2339: Property 'myname' does not exist on type 'Hello'.
I can take the same exact Typescript class and use it the actual Angular app and it works just fine. Do I need to update something in the tsconfig file for the e2e tests? Currently for e2e the config is
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
Any ideas this is driving me crazy.