mirror of https://github.com/sveltejs/svelte
Makes it possible to explicitly type which events can be dispatched like so: ```ts const bla2 = createEventDispatcher<{click: boolean}>(); bla2('click', ''); // error, type string not assignable to type boolean bla2('qwd', true); // error, "qwd" not assignable to "click" ``` #5211pull/5260/head
parent
a1cb70dde4
commit
0e9158b352
Loading…
Reference in new issue