-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
397df6e
commit e79e2eb
Showing
6 changed files
with
26 additions
and
44 deletions.
There are no files selected for viewing
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
7 changes: 2 additions & 5 deletions
7
packages/package/test/fixtures/typescript-declaration-map/expected/Test.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,8 +1,5 @@ | ||
<script lang="ts"> | ||
import { createEventDispatcher } from 'svelte'; | ||
export const astring = 'potato'; | ||
const dispatch = createEventDispatcher(); | ||
dispatch('event', true); | ||
let { foo } = $props(); | ||
</script> | ||
|
||
<slot {astring} /> | ||
{foo} |
27 changes: 5 additions & 22 deletions
27
packages/package/test/fixtures/typescript-declaration-map/expected/Test.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,24 +1,7 @@ | ||
import { SvelteComponentTyped } from 'svelte'; | ||
declare const __propDef: { | ||
props: { | ||
astring?: string; | ||
}; | ||
events: { | ||
event: CustomEvent<boolean>; | ||
} & { | ||
[evt: string]: CustomEvent<any>; | ||
}; | ||
slots: { | ||
default: { | ||
astring: string; | ||
}; | ||
}; | ||
type $$ComponentProps = { | ||
foo: string; | ||
}; | ||
export type TestProps = typeof __propDef.props; | ||
export type TestEvents = typeof __propDef.events; | ||
export type TestSlots = typeof __propDef.slots; | ||
export default class Test extends SvelteComponentTyped<TestProps, TestEvents, TestSlots> { | ||
get astring(): string; | ||
} | ||
export {}; | ||
declare const Test: import("svelte").Component<$$ComponentProps, {}, "">; | ||
type Test = ReturnType<typeof Test>; | ||
export default Test | ||
//# sourceMappingURL=Test.svelte.d.ts.map |
2 changes: 1 addition & 1 deletion
2
packages/package/test/fixtures/typescript-declaration-map/expected/Test.svelte.d.ts.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
8 changes: 2 additions & 6 deletions
8
packages/package/test/fixtures/typescript-declaration-map/src/lib/Test.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,9 +1,5 @@ | ||
<script lang="ts"> | ||
import { createEventDispatcher } from 'svelte'; | ||
export const astring: string = 'potato'; | ||
const dispatch = createEventDispatcher<{ event: boolean }>(); | ||
dispatch('event', true); | ||
let { foo }: { foo: string } = $props(); | ||
</script> | ||
|
||
<slot {astring} /> | ||
{foo} |