react-bmapgl icon indicating copy to clipboard operation
react-bmapgl copied to clipboard

`types` field in package.json should be `dist/index.d.ts`

Open yifanwww opened this issue 2 years ago • 0 comments

Currently the types field targets to types/bmapgl/index.d.ts where defines GL JSAPI types in BMapGL namespace. There is a problem when we import this package:

image

Because of the types field, TypeScript can only find the BMapGL namespace in this package, all the types from the src are not exposed.

I think the types field should be dist/index.d.ts (not the previous dist/types/index.d.ts). If users complain they cannot get the type declarations for BMapGL, they should install @types/bmapgl.

This doc in this repo talks about the relations between types/bmapgl and @types/bmapgl. Users can just get BMapGL type definitions from @types/bmapgl, not from this project.

yifanwww avatar Aug 03 '22 17:08 yifanwww