JanGuillermo / vue3-markdown-it

✨ An awesome Vue 3 markdown-it wrapper plugin that can even support external plugins!
MIT License
238 stars 29 forks source link

Typescript Support #109

Open little3201 opened 3 years ago

little3201 commented 3 years ago

has typescript support plan ?

JanGuillermo commented 3 years ago

Hi @little3201!

This has been planned, although I haven't gotten to it. I'll get back to you later in this thread.

jackywu commented 3 years ago

@JanGuillermo

I guess it is the same problem.

vue 3 + typescript

ERROR in src/components/modules/Markdown.vue:7:27
TS7016: Could not find a declaration file for module 'vue3-markdown-it'. '/Users/wc/codebase/my-project/QuantiInvestSystem/frontend/node_modules/vue3-markdown-it/dist/vue3-markdown-it.umd.min.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/vue3-markdown-it` if it exists or add a new declaration (.d.ts) file containing `declare module 'vue3-markdown-it';`
     5 | <script lang="ts">
     6 | import { defineComponent } from "vue";
  >  7 | import VueMarkdownIt from "vue3-markdown-it";
       |                           ^^^^^^^^^^^^^^^^^^
     8 |
     9 | export default defineComponent({
    10 |   name: "markdown",
Artmorse commented 3 years ago

Yes, i've the same issue... 😞

jannikbuscha commented 3 years ago

Yes, i've the same issue... 😞

if not exist, create a shims-vue.d.ts file (next to package.json) and write in that file: declare module 'vue3-markdown-it';

mauriciabad commented 2 years ago

Typescript support should be pretty easy to add, just rename the files to .ts, use defineComponent and use PropType.

HugoJBello commented 2 years ago

Yes, i've the same issue... disappointed

if not exist, create a shims-vue.d.ts file (next to package.json) and write in that file: declare module 'vue3-markdown-it';

better in the src folder