fix typing again

pull/7064/head
bluwy 5 years ago
parent 6333f79580
commit 97b6f2af53

@ -221,7 +221,7 @@ Retrieves the whole context map that belongs to the closest parent component. Mu
#### `createEventDispatcher` #### `createEventDispatcher`
```js ```js
dispatch: ((name: string, detail?: any) => void) = createEventDispatcher(); dispatch: ((name: string, detail?: any, options?: DispatchOptions) => boolean) = createEventDispatcher();
``` ```
--- ---

@ -37,7 +37,7 @@ export function createEventDispatcher<EventMap extends {} = any>(): <
type: EventKey, type: EventKey,
detail?: EventMap[EventKey], detail?: EventMap[EventKey],
options?: DispatchOptions options?: DispatchOptions
) => void { ) => boolean {
const component = get_current_component(); const component = get_current_component();
return (type: string, detail?: any, { cancelable = false } = {}): boolean => { return (type: string, detail?: any, { cancelable = false } = {}): boolean => {

Loading…
Cancel
Save