import type { SvelteComponent } from 'svelte'; import type { ConstructorOfATypedSvelteComponent } from './svelteTypes.js'; import type { AnimatePresenceProps, MotionConfigProps, MotionProps, SharedLayoutProps } from '../../types/index.js' import { Motion, AnimatePresence, AnimateSharedLayout, MotionConfig, UseDomEvent } from '../../types/index.js'; import type { ConditionalGeneric } from '../../types/components/AnimatePresence/index.js'; import type { CustomMotionComponentConfig } from '../../types/render/dom/motion-proxy.js'; import type { IsSVG } from '../../types/render/dom/motion.js'; import type { UseDomEventProps } from '../../types/events/use-dom-event.js'; describe('test components type - svelte 4', () => { it('should have Svelte legacy component type for Motion', () => { assertType>(new Motion({target: new Element })); }) it('should have Svelte legacy component type for AnimatePresence', () => { assertType, {}, {default:{ item: ConditionalGeneric }}>>(new AnimatePresence({ target: new Element })); }) it('should have Svelte legacy component type for AnimateSharedLayout', () => { assertType>(new AnimateSharedLayout({ target: new Element })); }) it('should have Svelte legacy component type for MotionConfig', () => { assertType>(new MotionConfig({ target: new Element })); }) it('should have Svelte legacy component type for UseDomEvent', () => { assertType>(new UseDomEvent({ target: new Element })); }) }) describe('test components type - svelte 5', () => { it('should have Svelte component type for Motion', () => { assertType(Motion); }) it('should have Svelte component type for AnimatePresence', () => { assertType(AnimatePresence); }) it('should have Svelte component type for AnimateSharedLayout', () => { assertType(AnimateSharedLayout); }) it('should have Svelte component type for MotionConfig', () => { assertType(MotionConfig); }) it('should have Svelte component type for UseDomEvent', () => { assertType(UseDomEvent); }) })