I have a protractor project, where I want to export multiple classes from another project into my test class. The first class of Helper
imports ok, but for the rest, I get an error: has no exported member - People, Groups
sub-project code
app.ts
export { Helper } from './src/helpers/helper';
export { People } from './src/helpers/people';
export { Groups } from './src/helpers/groups';
package.json
{
...
"name": "sub-project",
"main": "app.ts",
...
}
helper.ts
import { HttpClient } from './http-client';
export class Helper {
private httpClient = new HttpClient();
public async myFunction(): { }
}
people.ts
import { HttpClient } from './http-client';
export class People {
private httpClient = new HttpClient();
public async myFunction(): { }
}
main-project code
test.ts
import { Helper, People, Groups} from 'sub-project'; // error, has no exported member - People, Groups, (Helper - ok)
tsconfig
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "lib",
"rootDir": ".",
"target": "es5",
"module": "commonjs",
"types": [
"chai",
"chai-as-promised",
"mocha"
],
}
}
people
file. I think you don't export class in a proper way in this file. – Oleksiiimport { Helper } from './src/helpers/helper'; export { Helper }
? – Nino Filiu