vue3-markdown-it icon indicating copy to clipboard operation
vue3-markdown-it copied to clipboard

Typescript Support

Open little3201 opened this issue 4 years ago • 6 comments

has typescript support plan ?

little3201 avatar Jan 27 '21 01:01 little3201

Hi @little3201!

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

JanGuillermo avatar Feb 24 '21 06:02 JanGuillermo

@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",


jackywu avatar Apr 03 '21 01:04 jackywu

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

Artmorse avatar Oct 02 '21 21:10 Artmorse

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';

jannikbuscha avatar Oct 25 '21 12:10 jannikbuscha

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

mauriciabad avatar Feb 23 '22 21:02 mauriciabad

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

HugoJBello avatar Sep 26 '22 10:09 HugoJBello