Open Haroenv opened 1 year ago
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[]
htm.bind(h)
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?
The React typings also don't allow the array form:
https://github.com/developit/htm/blob/d62dcfdc721e47bc1923a2cb7a01ebd594ab0c25/src/integrations/react/index.d.ts#L2
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 isVNode | 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?