mirror of https://github.com/sveltejs/svelte
				
				
				
			Merge pull request #2990 from mrkishi/component-type
	
		
	
				
					
				
			Add ambient types for `*.svelte` filespull/3030/head
						commit
						98b8ca7c20
					
				@ -0,0 +1,19 @@
 | 
				
			||||
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;
 | 
				
			||||
	}
 | 
				
			||||
}
 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue