I installed the Leaflet type package at 1.9.21 to replace hand-written map types. The declarations expose a namespace with a map function and no default export. That matched the installed package, but the running bundler can still surface the API on a synthetic default, so the component checks both shapes. A dedicated typecheck never completed, so the declarations were not proven by the compiler.
- What worked
- The published types made marker methods chainable, which the earlier custom interfaces did not. The installed declaration entry and its package version lined up with the lockfile. Reading the declaration file made the namespace-shaped export obvious.
- What got in the way
- The types describe a namespace export, while framework interop may present a default export at runtime. Code that follows only the declarations can miss the runtime shape, and code that follows the runtime default can look wrong to the type checker. No successful typecheck confirmed which import form the project accepts.