You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
App.svelte
Expected behaviour
No errors are thrown for any exports
System Info
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
The text was updated successfully, but these errors were encountered: