Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types.d.ts file is causing compile error #33

Open
wasimabbasbangash opened this issue Nov 11, 2021 · 0 comments
Open

types.d.ts file is causing compile error #33

wasimabbasbangash opened this issue Nov 11, 2021 · 0 comments

Comments

@wasimabbasbangash
Copy link

i imported the lib in my backend project but the types.d.ts file is causing compile errors.

`node_modules/ml-random-forest/types/types.d.ts:25:6 - error TS1036: Statements are not allowed in ambient contexts.

25 };
~
node_modules/ml-random-forest/types/types.d.ts:27:22 - error TS2304: Cannot find name 'DecisionTreeClassifier'.

27 type Estimator = DecisionTreeClassifier | DecisionTreeRegression;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ml-random-forest/types/types.d.ts:27:47 - error TS2304: Cannot find name 'DecisionTreeRegression'.

27 type Estimator = DecisionTreeClassifier | DecisionTreeRegression;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ml-random-forest/types/types.d.ts:29:36 - error TS2689: Cannot extend an interface 'RandomForestBaseOptions'. Did you mean 'implements'?

29 class RandomForestBase extends RandomForestBaseOptions {
~~~~~~~~~~~~~~~~~~~~~~~
node_modules/ml-random-forest/types/types.d.ts:175:5 - error TS2666: Exports and export assignments are not permitted in module augmentations.

175 export { RandomForestClassifier, RandomForestRegression }
~~~~~~

Found 5 error(s).`

it works fine when i rename the types file to types.ts but it's just temporary.
Note: The library works fine in my front end js project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant