type of htm/preact and htm directly are different
- Vorherrschende Sprache
- JavaScript
- Sterne
- 9k
- Forks
- 181
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
https://github.com/developit/htm/blob/d62dcfdc721e47bc1923a2cb7a01ebd594ab0c25/src/integrations/preact/index.d.ts#L4
this returns VNode, while if you do `htm.bind(h)` the inferred return type is `VNode | VNode[]`
https://github.com/developit/htm/blob/d62dcfdc721e47bc1923a2cb7a01ebd594ab0c25/src/index.d.ts#L2-L4
Which one of the two types is correct? Should this be changed in the htm/preact type?
Beitragsleitfaden
Rechercherichtung
Start with src/integrations/preact/index.d.ts and src/index.d.ts at the referenced lines, then compare how the two declarations infer the tagged-template return type. Resolve which type matches the intended API and apply that choice consistently; done when the direct htm/preact type and htm.bind(h) type no longer disagree.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100