Rexport SvelteComponent as SvelteComponent API

pull/3893/head
Nitay Rabinovich 5 years ago
parent ad2aac509d
commit a7a75cb550

@ -1,19 +1,4 @@
declare module '*.svelte' {
type Props = Record<string, any>;
export default class {
constructor(options: {
target: Element;
anchor?: Element;
props?: Props;
hydrate?: boolean;
intro?: boolean;
});
$set(props: Props): void;
$on<T = any>(event: string, callback: (event: CustomEvent<T>) => void): () => void;
$destroy(): void;
[accessor: string]: any;
}
type SvelteComponent = typeof import('./internal/ComponentApi').SvelteComponentApi
export default SvelteComponent
}

@ -8,5 +8,6 @@ export {
setContext,
getContext,
tick,
createEventDispatcher
createEventDispatcher,
SvelteComponentApi as SvelteComponent
} from 'svelte/internal';

@ -0,0 +1,16 @@
type Props = Record<string, any>;
export declare class SvelteComponentApi {
constructor(options: {
target: Element;
anchor?: Element;
props?: Props;
hydrate?: boolean;
intro?: boolean;
});
$set(props: Props): void;
$on<T = any>(event: string, callback: (event: CustomEvent<T>) => void): () => void;
$destroy(): void;
[accessor: string]: any;
}

@ -12,4 +12,5 @@ export * from './ssr';
export * from './transitions';
export * from './utils';
export * from './Component';
export * from './ComponentApi';
export * from './dev';

Loading…
Cancel
Save