Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 📌 Fixed a type error on import of App.vue in sample code. #236

Merged

Conversation

madogiwa0124
Copy link
Contributor

fixed #233

As shown below, a type error TS2307 occurs when importing App.vue in the sample code.

$ pnpm tsc --noEmit --project book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/tsconfig.json
book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/src/main.ts:3:17 - error TS2307: Cannot find module './App.vue' or its corresponding type declarations.

3 import App from './App.vue'
                  ~~~~~~~~~~~

Found 1 error in book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/src/main.ts:3

App.vue is written in javascript and has no type definitions, so @ts-ignore is added to ignore type checking.

As shown below, a type error TS2307 occurs when importing `App.vue` in the sample code.

```sh
$ pnpm tsc --noEmit --project book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/tsconfig.json
book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/src/main.ts:3:17 - error TS2307: Cannot find module './App.vue' or its corresponding type declarations.

3 import App from './App.vue'
                  ~~~~~~~~~~~

Found 1 error in book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/src/main.ts:3
```

`App.vue` is written in javascript and has no type definitions, so `@ts-ignore` is added to ignore type checking.
@Ubugeeei
Copy link
Owner

Ubugeeei commented Jan 8, 2024

Thanks 😸

@Ubugeeei Ubugeeei self-assigned this Jan 8, 2024
@Ubugeeei Ubugeeei self-requested a review January 8, 2024 08:40
@Ubugeeei Ubugeeei merged commit 131a9e0 into Ubugeeei:main Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: A type error occurs when importing App.vue in the sample code.
2 participants