Skip to content

Property 'close' does not exist on type 'unknown' #88

@KoljaL

Description

@KoljaL

My Login.svelteModal starts like this:

<script lang="ts">
	import { getContext } from 'svelte';
	const { close } = getContext('simple-modal');

	export let title: string;
	export let callbackFCN = (value: boolean) => {};
    ....

    if (login === true) { 
        close();
        callbackFCN(true);
    } else {
        errorMsg = 'wrong password';
    }
</script>

It should close itself, if the login is true, and it does.
But in VSCode i got this error for { close } : Property 'close' does not exist on type 'unknown'. ts(2339)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions