From 28b5246ee0e9e5754cbcc3a68f5049b0aead2dd2 Mon Sep 17 00:00:00 2001 From: pablof7z Date: Wed, 13 Nov 2024 22:06:41 +0000 Subject: [PATCH] correct types --- ndk-svelte-components/src/lib/event/EventThread.svelte | 4 ++-- ndk-svelte-components/src/lib/event/content/Kind1.svelte | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ndk-svelte-components/src/lib/event/EventThread.svelte b/ndk-svelte-components/src/lib/event/EventThread.svelte index e06bd406..fa9ec263 100644 --- a/ndk-svelte-components/src/lib/event/EventThread.svelte +++ b/ndk-svelte-components/src/lib/event/EventThread.svelte @@ -2,13 +2,13 @@ import { NDKSubscriptionCacheUsage, type Hexpubkey, type NDKEvent, type NDKEventId } from "@nostr-dev-kit/ndk"; import type { Readable } from 'svelte/store'; import { fade } from 'svelte/transition'; - import { SvelteComponent, onDestroy } from "svelte"; + import { type ComponentType, onDestroy } from "svelte"; import EventCard from "./EventCard.svelte"; import ElementConnector from "./ElementConnector.svelte"; import type NDKSvelte from "@nostr-dev-kit/ndk-svelte"; type ExtraItem = { - component: typeof SvelteComponent; + component: ComponentType; props: any; } type ExtraItemFetcher = (event: NDKEvent) => Readable; diff --git a/ndk-svelte-components/src/lib/event/content/Kind1.svelte b/ndk-svelte-components/src/lib/event/content/Kind1.svelte index 4d65ca8f..e9a11e78 100644 --- a/ndk-svelte-components/src/lib/event/content/Kind1.svelte +++ b/ndk-svelte-components/src/lib/event/content/Kind1.svelte @@ -22,8 +22,7 @@ import NoteContentPerson from './NoteContentPerson.svelte'; import type NDK from '@nostr-dev-kit/ndk'; import EventCard from '../EventCard.svelte'; - import { pluck, values, without } from 'ramda'; - import type { ComponentType, SvelteComponent } from 'svelte'; + import type { ComponentType } from 'svelte'; import type { UrlFactory } from '$lib'; // import NoteContentEntity from "./NoteContentEntity.svelte" @@ -33,7 +32,7 @@ export let showEntire = false; export let showMedia = true; export let content = event.content; - export let mediaCollectionComponent: typeof SvelteComponent | undefined = undefined; + export let mediaCollectionComponent: ComponentType | undefined = undefined; export let eventCardComponent: ComponentType = EventCard; export let urlFactory: UrlFactory;