-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: 📌 Fixed a type error on import of
App.vue
in sample code. (#236)
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.
- Loading branch information
1 parent
db5e45d
commit 131a9e0
Showing
4 changed files
with
4 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
book/impls/10_minimum_example/070_sfc_compiler/plugin-sample/src/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
book/impls/10_minimum_example/070_sfc_compiler2/examples/playground/src/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { createApp } from 'chibivue' | ||
// @ts-ignore | ||
import App from './App.vue' | ||
|
||
const app = createApp(App) | ||
|
1 change: 1 addition & 0 deletions
1
book/impls/10_minimum_example/070_sfc_compiler3/examples/playground/src/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { createApp } from 'chibivue' | ||
// @ts-ignore | ||
import App from './App.vue' | ||
|
||
const app = createApp(App) | ||
|
1 change: 1 addition & 0 deletions
1
book/impls/10_minimum_example/070_sfc_compiler4/examples/playground/src/main.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import { createApp } from 'chibivue' | ||
// @ts-ignore | ||
import App from './App.vue' | ||
|
||
const app = createApp(App) | ||
|