zernonia / vue3-notion

An unofficial Notion renderer (Vue 3) version
https://vue3-notion.vercel.app/
MIT License
134 stars 20 forks source link

Could not find a declaration file for module #30

Closed brachkow closed 1 year ago

brachkow commented 1 year ago

Describe the bug While this project is written in TS, it does not automatically provide types so any import results in this error:

error TS7016: Could not find a declaration file for module 'vue3-notion'. '/home/runner/work/example/node_modules/vue3-notion/dist/index.umd.js' implicitly has an 'any' type

To Reproduce Steps to reproduce the behavior:

  1. Import NotionRenderer to Vue3 SFC
    
    <script lang="ts" setup>
    import { NotionRenderer } from 'vue3-notion';
    </script>

2. Run typecheck
3. See error

**Expected behavior**
No type error
zernonia commented 1 year ago

Hi @brachkow . NotionRenderer require props, that why Typescript is shouting for type error. Please see Basic Example.

Do let me know if issue persist ya

brachkow commented 1 year ago

It was minimal example, so I striped down props. Actual problem is on import level.

You can see real world example and its error message there.

image