Skip to content

Numberflow svelte 5 props seem to be wrongly typed as any #182

Description

@cachesdev

Minimal reproduction

type bug, sandbox not really useful here

Describe the bug and the steps to reproduce it

1 - install and import NumberFlow on a svelte component
2 - go to definition on NumberFlow
3 - props will be typed as any

possibly a recent issue only on svelte 5?

this is the d.ts code I see:

import { SvelteComponent } from "svelte";
import NumberFlowLite, { type Data } from 'number-flow/lite';
export declare class NumberFlowElement extends NumberFlowLite {
    set __svelte_batched(batched: boolean);
    set data(data: Data | undefined);
}
declare const __propDef: {
    props: any; // <- typed as any
    slots: {};
    events: {
        animationsstart: CustomEvent<undefined>;
        animationsfinish: CustomEvent<undefined>;
    };
};
type NumberFlowProps_ = typeof __propDef.props; // <- typed as any
export { NumberFlowProps_ as NumberFlowProps };
export type NumberFlowEvents = typeof __propDef.events;
export type NumberFlowSlots = typeof __propDef.slots;
export default class NumberFlow extends SvelteComponent<NumberFlowProps_, NumberFlowEvents, NumberFlowSlots> {
}  // <- typed as any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions