Skip to content

Commit 0fca74f

Browse files
committed
refactor: 🏷️ add type for custom action
closes #269
1 parent aa66ee6 commit 0fca74f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/app.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ declare namespace App {
88
// interface Session {}
99
// interface Stuff {}
1010
}
11+
12+
// https://stackoverflow.com/questions/73025100/svelte-svelte-kit-type-custom-action-event-with-typescript
13+
// https://github.com/sveltejs/language-tools/blob/master/docs/preprocessors/typescript.md#im-getting-deprecation-warnings-for-sveltejsx--i-want-to-migrate-to-the-new-typings
14+
declare namespace svelteHTML {
15+
interface HTMLAttributes<T> {
16+
'on:enterViewport'?: (event: any) => any
17+
}
18+
}

0 commit comments

Comments
 (0)