meteorlxy / vue-showdown

:page_with_curl: Use showdown as a vue component
https://vue-showdown.js.org
MIT License
129 stars 23 forks source link

[Bug report] #46

Closed reiyanyan closed 1 year ago

reiyanyan commented 1 year ago

Description

Argument of type '{ markdown: string; }' is not assignable to parameter of type 'App & { install: (app: App, ...options: any[]) => any; } & Record<string, unknown>'. Type '{ markdown: string; }' is missing the following properties from type 'App': version, config, use, mixin, and 11 more.

which text = ref("")

Reproduction

tsc noEmit & implicitAny

Used Package Manager

npm

System Info

System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
    Memory: 95.61 MB / 8.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 112.0.5615.137
    Safari: 15.6.1
  npmPackages:
    vue: ^3.0.0 => 3.2.47 
    vue-showdown: ^4.0.0 => 4.0.0
reiyanyan commented 1 year ago

Solved my fault

wrong import: import VueShowdown from "vue-showdown"

correct import: import { VueShowdown } from "vue-showdown"