From fe9ad7dac05efc6d5a3bc249e69ec132a91fdf04 Mon Sep 17 00:00:00 2001 From: Simon Holthausen Date: Thu, 7 Nov 2024 16:59:45 +0100 Subject: [PATCH] chore: fix dts jsdoc test --- .../expected/TestRunes.svelte.d.ts | 13 +++++++++++-- .../javascript-runes.v5/src/TestRunes.svelte | 5 +++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/expected/TestRunes.svelte.d.ts b/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/expected/TestRunes.svelte.d.ts index 350d1d487..f13d96674 100644 --- a/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/expected/TestRunes.svelte.d.ts +++ b/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/expected/TestRunes.svelte.d.ts @@ -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; -export default TestRunes; +type $$ComponentProps = { + foo: string; + bar?: number; +}; diff --git a/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/src/TestRunes.svelte b/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/src/TestRunes.svelte index cd9f8382b..cfc7c166f 100644 --- a/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/src/TestRunes.svelte +++ b/packages/svelte2tsx/test/emitDts/samples/javascript-runes.v5/src/TestRunes.svelte @@ -1,5 +1,6 @@ -