-
-
Notifications
You must be signed in to change notification settings - Fork 219
Closed
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working
Description
Describe the bug
I've highlighted the important parts to explain the issue but basically trying to add type definition to an exported const function throws a ts error. This is similar to #2268 but doesn't involve bindings.
Reproduction
app.ts
export type CommonFunction = () => void;
App.svelte
<script lang="ts">
import type { CommonFunction } from "$lib/app";
export interface Props {
name?: string;
}
let { name = "world" }: Props = $props();
export const MyFunction2: CommonFunction = () =>{
console.log("Hello from MyFunction!");
}
</script>
Expected behaviour
No errors are thrown for any exports
System Info
- OS: [e.g. Windows]
- IDE: [e.g. VSCode, Atom]
Which package is the issue about?
No response
Additional Information, eg. Screenshots
Note adding //@ts-ignore silences the error, everything does work but would rather not ignore all these errors
Metadata
Metadata
Assignees
Labels
FixedFixed in master branch. Pending production release.Fixed in master branch. Pending production release.bugSomething isn't workingSomething isn't working