标签: typescript typescript-typings typescript2.0 tsc
假设我在TypeScript中有这样的函数:
export const foo = function(){ return { a: 1, b: true, c: 'bar' } };
如果我将此函数导入另一个文件:
import {foo} from './foobar';
我的问题是 - 有没有办法让返回类型foo 而实际调用foo?
foo
答案 0 :(得分:2)
现在可以使用Typescript 2.8
vars