例如:
const myFunc = () => 'result';
myFunc.myKey = 'value';
type func = () => string;
// AND
type func = {
myKey: string;
}
我如何定义myFunc
的类型?
谢谢!
转载请注明出处:http://www.xiangbinbaiyi.com/article/20230505/1306962.html
例如:
const myFunc = () => 'result';
myFunc.myKey = 'value';
type func = () => string;
// AND
type func = {
myKey: string;
}
我如何定义myFunc
的类型?
谢谢!
转载请注明出处:http://www.xiangbinbaiyi.com/article/20230505/1306962.html