Migrate types from dt~leaflet to this repo and its `package.json`
See original GitHub issueHow to reproduce
- Leaflet version I’m using: 1.0.1
What behaviour I’m expecting and which behaviour I’m seeing
The package.json
does not define types
and the typescript definition is not included in this repo. See http://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html for new practice for publishing.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
Install @types packages as part of migrating #115 - GitHub
Following on from part of the discussion in #100, it would be really useful to install @types packages automatically as part of a...
Read more >package.json - npm Docs
This helps people discover your package as it's listed in npm search . ... If the git repo is on GitHub, then the...
Read more >Migrating an NPM package to use ES Modules - Medium
In this article, I'm going to show you the steps needed to convert an NPM package from using CommonJS (CJS) modules, to the...
Read more >Move a module from devDependencies to dependencies in ...
Shorthand to move from devDependencies to dependencies (prod): npm i <module_name> -P. If you want to do the opposite (i.e. move a module ......
Read more >The Basics of Package.json - NodeSource
json is an array that defines where the source code for the module lives. Typically, this would be a public GitHub repo for...
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
Yes, lets close these 👍 Currently a typescript user will
yarn add @types/leaflet
, and I advise we keep it that way.The types are hosted in the DefinitelyTyped repository, and can be contributed to there: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet By having these externally we are not held up waiting for
.d.ts
updates for each release, and the types can be improved without requiring a new release.This kind of thing happened with PouchDB https://github.com/pouchdb/pouchdb/issues/5389 and it’s
.d.ts
files. In particular https://github.com/pouchdb/pouchdb/issues/5389#issuecomment-228610251, particularly:Seeing that none of the Leaflet core team has any Typescript experiance, I think @mourner’s suggestion of creating a seperate repo like
leaflet-typings
that can simply serve as a common point of discussion for those willing to maintain the types.