bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte

Home Page:https://sveltestrap.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Argument of type 'typeof ModalHeader' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'

JandosKh opened this issue · comments

I'm using VS Code 1.72 with extension for Svelte v106.2.0. With Sveltekit rc1 and typescript, I have a lot of errors like below:
Argument of type 'typeof ModalHeader' is not assignable to parameter of type 'ConstructorOfATypedSvelteComponent'.
Sample code:

<Modal isOpen={showDialog} toggle={toggleDialog} class="mt-5">
	<ModalHeader toggle={toggleDialog}>{t('Company deletion')}</ModalHeader>
	<ModalBody class="font-sm">
		{t('The company will be deleted. Continue?')}
	</ModalBody>
	<ModalFooter>
		<Button class="btn-sm" color="primary" on:click={async () => await deleteCompany()}>{t('Yes')}</Button>
		<Button class="btn-sm" color="secondary" on:click={toggleDialog}>{t('No')}</Button>
	</ModalFooter>
</Modal>

This happened when I upgraded from sveltestrap v5.7.0 to v5.9.0.
The code actually runs without an issue, but VS Code shows the above errors. What am I missing?

I am seeing the same

I'm also seeing the same after upgrading, is this a bug?

Any word on this? It makes it super hard to code with errors everywhere.

Any word on this? I'm all in on this thing but man I need help on this. Anyone out there? Ideas? Is there a workaround? Do I need to downgrade a version to something older so it will work until it can be addressed?

Upgraded to the latest versions of everything and seemed to go away.

Looks like, the new version solved this issue. Closing.