[tfjs-node-gpu] node_modules/typescript/lib/lib.dom.d.ts:15340:11 - error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'.
See original GitHub issueTensorFlow.js version
@tensorflow/tfjs-node-gpu 0.1.1
Browser version
node v9.9.0, npm 6.2.0
Describe the problem or feature request
I just freshly installed tfjs-node-gpu on windows 10. Now I copy-pasted the “get started” code and tried to transpile it with typescript (tsconfig below). The project has no other dependencies.
Error message:
tsc
node_modules/typescript/lib/lib.dom.d.ts:15340:11 - error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'.
Types of property 'getExtension' are incompatible.
Type '{ (name: "ANGLE_instanced_arrays"): ANGLEInstancedArrays; (name: "EXT_blend_minmax"): EXTBlendMinMax; (name: "EXT_color_buffer_half_float"): EXTColorBufferHalfFloat; (name: "EXT_frag_depth"): EXTFragDepth; (name: "EXT_sRGB"): EXTsRGB; (name: "EXT_shader_
texture_lod"): EXTShaderTextureLOD; (name: "EXT_texture_filter_...' is not assignable to type '{ (extensionName: "EXT_blend_minmax"): EXT_blend_minmax; (extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic; (extensionName: "EXT_frag_dep
th"): EXT_frag_depth; (extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod; (extensionName: "EXT_sRGB"): EXT_sRGB; (extensionName: "OES...'.
Types of parameters 'name' and 'extensionName' are incompatible.
Type '"OES_vertex_array_object"' is not assignable to type '"ANGLE_instanced_arrays"'.
15340 interface WebGLRenderingContext extends WebGLRenderingContextBase {
~~~~~~~~~~~~~~~~~~~~~
Code to reproduce the bug / link to feature request
index.ts:
import * as tf from '@tensorflow/tfjs';
import '@tensorflow/tfjs-node-gpu';
const shape = [2, 3];
const t = tf.tensor([1.0, 2.0, 3.0, 4.0, 5.5, 60.0], shape);
console.log(t);
tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"sourceMap": true
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
package.json:
{
"name": "js",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"@tensorflow/tfjs-node-gpu": "0.1.19"
},
"devDependencies": {
"typescript": "^3.1.3"
},
"scripts": {
"compile": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
package-lock.json: It’s quite spammy, heres a paste: https://pastebin.com/raw/nEiz26f7
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
error TS2430: Interface 'WebGLRenderingContext' incorrectly ...
ts(15340,11): error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'. Types of property ' ...
Read more >error TS2430: Interface 'WebGLRenderingContext'...anycodings
../../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(15340,11): error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface ' ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now I just use the
--skipLibCheck
option in tsc.I confirm that “skipLibCheck”: true in tsconfig.json works fine !