Comment

Comment by mbell

What I'm getting at is how it handles type safety at the browser API boundary. e.g. how does it handle a situation like:

`eventTgt.addEventListener('whatever', fn, true)`

vs

`eventTgt.addEventListener('whatever', fn, { passive: true })`

Does it just allow 'Any' for the type of the third param and thus somewhat punt on type safety at the browser API boundary or is there some attempt at defining an algebraic type for that param?

Or as another example, how would it handle the object passed to `fn` above, presumably some sort of event type, having different properties in different browsers?

parent mbell 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton