Skip to content

Commit 7be3b12

Browse files
author
Ivan Hofer
committed
upgrade to svelte 4
1 parent 63eae60 commit 7be3b12

File tree

9 files changed

+702
-450
lines changed

9 files changed

+702
-450
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ type-checking features.
114114

115115
### How does TypeScript work inside Svelte-Components?
116116

117+
> Svelte has added a [`TypeScript`-section](https://svelte.dev/docs/typescript) to their official docs.
118+
117119
Per default the `Svelte`-compiler only understands plain `HTML`, `CSS` and `JavaScript`. But we can
118120
add support for other languages to the compiler via custom
119121
[`preprocessors`](https://svelte.dev/docs#compile-time-svelte-preprocess). Luckily, we don't have to
@@ -322,7 +324,7 @@ This chapter shows how you can define events that a component emits.
322324

323325
#### external components
324326

325-
- **[SvelteComponentTyped](https://github.com/ivanhofer/sveltekit-typescript-showcase/tree/main/src/05-external-components)**:
327+
- **[SvelteComponent](https://github.com/ivanhofer/sveltekit-typescript-showcase/tree/main/src/05-external-components)**:
326328
how to write type definitions for external components
327329
- **[`svelte-kit package`](https://github.com/ivanhofer/sveltekit-typescript-showcase/tree/main/src/lib)**:
328330
how to create a `Svelte` component library
@@ -565,10 +567,6 @@ splitting the model into two different interfaces and then use an union type to.
565567

566568
#### #2 extend existing type definitions
567569

568-
> [Example](https://github.com/ivanhofer/sveltekit-typescript-showcase/blob/main/src/createEventDispatcher.d.ts)\
569-
> a more complex example you don't need to fully understand. But this example can show you what is possible
570-
> with `TypeScript` if you know how to use it ;)
571-
572570
Sometimes it is possible that a library contains missing or incomplete type definitions. You could
573571
either use `// @ts-ignore` comments and live with it or you can write the type declaration yourself.
574572

0 commit comments

Comments
 (0)