Chevron DownAPI Reference

Using with TypeScript

Starting from v8.8, publishes "public preview" TypeScript types via an opt-in only entry point. To use the official types in your application, find the following statements:

import DeckGL from '';
import {GeoJsonLayer} from '';

and replace the package name with<module_name>/typed:

import DeckGL from '';
import {GeoJsonLayer} from '';

You can also import additional type definitions:

import type {DeckGLRef} from '';
import type {GeoJsonLayerProps} from '';

Note that the typed exports are a work in progress. They are not exposed by default to prevent any typing errors from breaking existing TypeScript applications. Help us improve them by reporting any issues or suggestions on GitHub!

The typed exports will remain at the typed entry points throughout the rest of the 8.x releases. They will be exposed directly at the package roots starting in v9.0.

Alternative Solution for Legacy Versions

If you are using a version before v8.8, a third-party typings library is available.

Find the compatible version of @danmarshall/deckgl-typings based on your version: versiondeckgl-typings version

For example, for 7.x, install the following package:

npm install @danmarshall/deckgl-typings@^3.0.0

Create a new file like deckgl.d.ts in your source directory with the following code:

import * as DeckTypings from "@danmarshall/deckgl-typings"
declare module "" {
    export namespace DeckTypings {}