-
-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02b6b06
commit fe9ad7d
Showing
2 changed files
with
14 additions
and
4 deletions.
There are no files selected for viewing
13 changes: 11 additions & 2 deletions
13
packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/expected/TestRunes.svelte.d.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,8 +1,17 @@ | ||
export default TestRunes; | ||
type TestRunes = { | ||
$on?(type: string, callback: (e: any) => void): () => void; | ||
$set?(props: Partial<$$ComponentProps>): void; | ||
} & { | ||
baz: () => void; | ||
}; | ||
declare const TestRunes: import("svelte").Component<{ | ||
foo: string; | ||
bar?: number; | ||
}, { | ||
baz: () => void; | ||
}, "bar">; | ||
type TestRunes = ReturnType<typeof TestRunes>; | ||
export default TestRunes; | ||
type $$ComponentProps = { | ||
foo: string; | ||
bar?: number; | ||
}; |
5 changes: 3 additions & 2 deletions
5
packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/src/TestRunes.svelte
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,5 +1,6 @@ | ||
<script lang="ts"> | ||
let { foo, bar = $bindable() }: { foo: string, bar?: number } = $props(); | ||
<script> | ||
/** @type {{ foo: string, bar?: number }} */ | ||
let { foo, bar = $bindable() } = $props(); | ||
export function baz() {} | ||
</script> |