问题
The @types/openlayers
package (https://www.npmjs.com/package/@types/openlayers) only supplies type definitions for OpenLayers 4.6
. This is stated explicitly at the top comment in file index.d.ts
.
Are types for OpenLayers 6 available and, failing that, what should be the course of action for developing Typescript applications with OpenLayers 6
?
回答1:
Take a look at @types/ol:
This package contains type definitions for ol (https://github.com/openlayers/openlayers).
Version 6.4.2
回答2:
If I believe this source the official package holding openlayers types is @types/ol
来源:https://stackoverflow.com/questions/65145589/typescript-type-definitions-for-open-layers-6