SuperMap / iClient-JavaScript

Modern GIS Web Client for JavaScript, based on Leaflet\OpenLayers\MapboxGL-JS\Classic(iClient8C), enhanced with ECharts\D3\MapV etc. Contributed by SuperMap & community.
https://iclient.supermap.io
Apache License 2.0
825 stars 281 forks source link

TypeScript support #448

Open DSYZayn opened 11 months ago

DSYZayn commented 11 months ago

Request a feature or report a bug? [这是一个需求还是一个缺陷]

One-line summary [问题简述]

Version [产品及版本]


Actual Behavior [当前现象]

can not support typescript, IDE error:无法找到模块“@supermap/iclient-leaflet”的声明文件。“e:/browserDown/code/gest_webgis/node_modules/@supermap/iclient-leaflet/namespace.js”隐式拥有 "any" 类型。 尝试使用 npm i --save-dev @types/supermap__iclient-leaflet (如果存在),或者添加一个包含 declare module '@supermap/iclient-leaflet'; 的新声明(.d.ts)文件ts(7016)

Expected Behavior [期望现象]

提供@types/supermap-iclient-leaflet扩展类型包

Example of reproducing the issue [重现现象的例子]

use typescript & es6 with @supermap/iclient-leaflet


What is motivation or use case for changing the behavior? [需求的场景和目的是什么?]