Svelte & bind:this #580
|
I'm trying to create a reference to the calendar in svelte so I can call methods from other components. However, I'm running into some TypeScript errors. <script lang="ts">
import {Calendar, TimeGrid} from '@event-calendar/core';
let options = $state({
view: 'timeGridWeek',
events: [
// your list of events
]
});
let calendar: Calendar;
</script>
<Calendar bind:this={calendar} plugins={[TimeGrid]} {options} />This works, however, I have the following error in VS Code:
If I try to remove the typing from What is the preferred way to clear this error? |
Answered by
slashinfty
Nov 23, 2025
Replies: 1 comment
|
If anyone needs the solution to this: let calendar: SvelteComponent; |
0 replies
Answer selected by
slashinfty
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anyone needs the solution to this: