Type 'InputType' is not assignable to type 'Partial<INumberHash>'... and many others
- Dominant language
- TypeScript
- Stars
- 14.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
## _What_ is wrong?
With Angular 17 during the compilation errors like
`Error: node_modules/brain.js/dist/src/neural-network-gpu.d.ts:23:84 - error TS2344: Type 'InputType' does not satisfy the constraint 'INeuralNetworkData'. Type 'InputType' is not assignable to type 'Partial'.` and many others are in the bash.
IDE (VS Code) shows a lot errors inside the *.ts files. Eg.: neural-network-gpu.d.ts `Property 'outputs' in type 'NeuralNetworkGPU' is not assignable to the same property in base type 'NeuralNetwork'. Type 'KernelOutput[]' is not assignable to type 'Float32Array[]'. Type 'KernelOutput' is not assignable to type 'Float32Array'. Type 'number' is not assignable to type 'Float32Array'.`
## _Where_ does it happen?
Mac OS X Ventura
Typescript 5.3.3
Angular 17.2.1
node 18.17.0
brain.js 2.0.0-beta.23
## _How_ do we replicate the issue?
- install Angular `npm install -g @angular/cli `
- create new Angular project `ng new brain-test`
- install brain.js `npm i --save brain.js`
- import brain.js to eg. app.component.ts `import { NeuralNetwork } from 'brain.js'`
- run angular app `ng serve`
## Expected behavior (i.e. solution)
Should works ;)
Contributor guide
Assessment
This issue has not been assessed yet.