Skip to content

Can i use TypeScript? #45

Answered by MelihAltintas
hotuns asked this question in Q&A
Nov 4, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

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 :

import { createApp } from 'vue'
import App from './App.vue'

import OpenLayersMap from 'vue3-openlayers'
import 'vue3-openlayers/dist/vue3-openlayers.css'

const app = createApp(App);
app.use(OpenLayersMap)

app.mount('#app')

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BernhardSchlegel
Comment options

@MelihAltintas
Comment options

Answer selected by MelihAltintas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #42 on November 17, 2021 10:13.