1
我有一個咖喱功能,我需要重載返回函數簽名(簡化的例子):功能的可調超載
const foo = (bar: string) => (tag: string, children?: string[]) => {
const foo = (bar: string) => (tag: string, props: Object, children?: string[]) => {
// Do something
};
重載的偉大工程,具有類方法或函數的聲明與function
關鍵字,但還沒沒有能力使它與咖喱功能一起工作。
這就是聰明! – marvinhagemeister