Commit Graph

2 Commits (334b09afa1e6a9052d35f8918c44bcb6a13bb704)

Author SHA1 Message Date
OFF0 334b09afa1
refactor: type elem and enforce inferred generic type
typed elem so that it returns the exact type of the HTMLElement,
and that name must be a key of HTMLElementTagNameMap.

example:

elem('form'); // returns HTMLFormElement

elem('abc'); // not assignable to parameter of type 'keyof HTMLElementTagNameMap'
2 years ago
OFF0 5e75b64619
refactor: type view.ts, dom.ts and time.ts 2 years ago