Can i use TypeScript? #45
-
Is your feature request related to a problem? Please describe. Describe the solution you'd like openlayer 已经有 @types/ol ,但是 vue3-openlayers不能使用它 现在vue3-openlayers内是通过 provide , inject来获取。但是这样没有类型了 我要怎么做才能在const selectConditions = inject('ol-selectconditions') 获取到selectConditions的类型呢 Describe alternatives you've considered Additional context |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Yes BUT d.ts files is not written without type checking you can use this lib like that: In shims-vue.d.ts you should add this line: in main.ts :
|
Beta Was this translation helpful? Give feedback.
Yes BUT d.ts files is not written without type checking you can use this lib like that:
In shims-vue.d.ts you should add this line:
declare module 'vue3-openlayers
in main.ts :