masotime / react-leaflet-universal

Painlessly use react-mapbox in universal apps
53 stars 17 forks source link

typescript type schould be the same as react-leaflet #19

Open BjoernRave opened 5 years ago

BjoernRave commented 5 years ago

hey, because the types of this should be the same as the ones of react-leaflet, it would be easy to publish types for this library or?

mz8i commented 5 years ago

It would be great to have the types definition. But before someone publishes them, here's my workaround: install @types/react-leaflet. In your project, create a file react-leaflet-universal.d.ts with the content:

declare module 'react-leaflet-universal` {
    export * from 'react-leaflet';
}

Note that that this just uses react-leaflet so doesn't contain the properties from the decorated components. But at least it will give you type checking for standard properties.