danmarshall / deckgl-typescript-example Goto Github PK
View Code? Open in Web Editor NEWExample of consuming deck.gl with typescript and typings
License: MIT License
Example of consuming deck.gl with typescript and typings
License: MIT License
No problems at all running this standalone DeckGL
example, but I'm still unsure on how to use it with React. I'm thinking I must be doing something really silly at this points. Here's what I've tried:
Including the index.ts
file here as-is in my project, with just a slight change where I assign the DeckGL object to a variable and export that. Here's what I get:
/node_modules/deckgl-typings/node_modules/@types/react/index.d.ts
(2287,13): error TS2717: Subsequent property declarations must have the same type. Property 'a' must be of type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>', but here has type 'DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>'.
I've also tried just building a basic React overlay and I get an error about lerp
not being defined or exported in math.gl
. I'm thinking Typescript also expects for math.gl
to be typed?
This is my tsconfig
, maybe I messed up something here?
{
"compilerOptions": {
"outDir": "build/dist",
"module": "esnext",
"target": "es6",
"lib": ["es6", "dom", "esnext.asynciterable"],
"sourceMap": false,
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
"rootDir": "src",
"forceConsistentCasingInFileNames": true,
"noImplicitReturns": true,
"noImplicitThis": true,
"noImplicitAny": true,
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"noUnusedLocals": true,
"allowSyntheticDefaultImports": true,
"baseUrl": "."
},
"exclude": [
"node_modules",
"build",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
]
}
Wish I could narrow it down more... Please let me know if there's any other info that may be helpful.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.