Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mysticatea/tfjs-issue-ts
https://github.com/mysticatea/tfjs-issue-ts
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mysticatea/tfjs-issue-ts
- Owner: mysticatea
- License: mit
- Created: 2018-04-24T07:47:33.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-04-24T07:57:26.000Z (over 6 years ago)
- Last Synced: 2024-05-02T06:14:43.330Z (8 months ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TensorFlow.js TypeScript issue
The simple following code doesn't work:
```ts
import * as tf from "@tensorflow/tfjs"
``````
node_modules/@tensorflow/tfjs-layers/dist/models.d.ts:27:5 - error TS2416: Property 'build' in type 'Sequential' is not assignable to the same property in base type 'Model'.
Type '(inputShape?: number[] | undefined) => void' is not assignable to type '(inputShape: number[] | number[][]) => void'.
Types of parameters 'inputShape' and 'inputShape' are incompatible.
Type 'number[] | number[][]' is not assignable to type 'number[] | undefined'.
Type 'number[][]' is not assignable to type 'number[] | undefined'.
Type 'number[][]' is not assignable to type 'number[]'.
Type 'number[]' is not assignable to type 'number'.27 build(inputShape?: Shape): void;
~~~~~Files: 109
Lines: 26569
Nodes: 137798
Identifiers: 47922
Symbols: 48472
Types: 14570
Memory used: 80854K
I/O read: 0.03s
I/O write: 0.00s
Parse time: 0.52s
Bind time: 0.21s
Check time: 1.08s
Emit time: 0.00s
Total time: 1.81s
```## Repro steps
```
git clone https://github.com/mysticatea/tfjs-issue-ts.git
cd tfjs-issue-ts
npm install
npm run build
```