Merge pull request #3890 from sveltejs/gh-3877

add type info for createEventDispatcher
pull/3896/head
Rich Harris 5 years ago committed by GitHub
commit 8f83e8ad2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,7 +30,7 @@ export function onDestroy(fn) {
export function createEventDispatcher() { export function createEventDispatcher() {
const component = get_current_component(); const component = get_current_component();
return (type, detail) => { return (type: string, detail?: any) => {
const callbacks = component.$$.callbacks[type]; const callbacks = component.$$.callbacks[type];
if (callbacks) { if (callbacks) {

Loading…
Cancel
Save