more strict props

let people type it loose themselves if they want to
pull/5431/head
Simon Holthausen 5 years ago
parent e64a040d9f
commit e9d939f8d8

@ -217,7 +217,7 @@ export class SvelteComponent<
Events extends Record<string, any> = any
> {
$$: T$$;
$$set?: ($$props: Partial<Props> & Record<string, any>) => void;
$$set?: ($$props: Partial<Props>) => void;
$destroy() {
destroy_component(this, 1);
@ -234,7 +234,7 @@ export class SvelteComponent<
};
}
$set($$props: Partial<Props> & Record<string, any>) {
$set($$props: Partial<Props>) {
if (this.$$set && !is_empty($$props)) {
this.$$.skip_bound = true;
this.$$set($$props);

@ -102,7 +102,7 @@ export interface SvelteComponentDev<
Events extends Record<string, any> = any,
Slots extends Record<string, any> = any
> {
$set(props?: Partial<Props> & Record<string, any>): void;
$set(props?: Partial<Props>): void;
$on<K extends Extract<keyof Events, string>>(type: K, callback: (e: Events[K]) => void): () => void;
$destroy(): void;
[accessor: string]: any;
@ -138,7 +138,7 @@ export class SvelteComponentDev<
constructor(options: {
target: Element;
anchor?: Element;
props?: Props & Record<string, any>;
props?: Props;
hydrate?: boolean;
intro?: boolean;
$$inline?: boolean;

Loading…
Cancel
Save