TriFrost

TriFrost 0.43.3

|peterver

News

Improved

  • dx: Improved type inference for $.on and $.once in the Atomic Runtime. These utilities now intelligently infer the correct event type based on the EventTarget, including support for HTMLElement, Document, and Window. Custom events continue to work seamlessly for unknown keys.
$.on(window, 'resize', evt => {
  // evt is inferred as UIEvent
});

$.on(document, 'custom-event', (evt) => {
  // evt is inferred as CustomEvent<...>
});

Loved the read? Share it with others