>>761
せめて関数のオーバーロード定義みたいなことが出来ればコードが整理しやすくなると思うんだよね。

つまり
export function h(name, attributes /*, ...rest*/) {
// 省略
return typeof name === "function"
? name(attributes || {}, children)
: {
nodeName: name,
attributes: attributes || {},
children: children,
key: attributes && attributes.key
}
}
ってあった時に
export function h(name: string, attributes:obj /*, ...rest*/) {}
export function h(nextFunc: (attributes:obj)=>void, attributes:obj /*, ...rest*/) {}
みたく出来れば型定義自体も綺麗にできる気がする。
でも今のTypeScriptってこれできんよね。