You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
leaflet-components/src/index.npm.ts

16 lines
784 B
TypeScript

// npm package entry point.
//
// Identical to `./index.ts` (every element class, every helper, and the
// side-effect `customElements.define` calls) but additionally installs the
// ambient DOM augmentations from `./core/globals.ts` -- the `leaflet-*` tag
// map and the custom-event map -- so `document.querySelector('leaflet-map')`
// and `el.addEventListener('leaflet-register', ...)` are typed out of the box.
//
// `./index.ts` is kept free of that import because it is the module JSR
// publishes, and JSR's "no slow types" rule forbids `declare global` anywhere
// in the published graph. JSR consumers import `./index.ts` and can pull in
// `leaflet-components/elements` etc.; they just don't get the ambient globals.
import './core/globals.ts';
export * from './index.ts';