传递参数数组以应用于Typescript

时间:2019-04-16 05:28:24

标签: typescript apply

解决方案:

"i%d86"

我只想使用private compiledFn: Maybe<(data: any) => void> = null;

传递参数数组
apply

但是出现此错误:

// function... I can see there is a problem here
private compiledFn: Maybe<() => void> = null;

// calling with apply
let arg = [data];
return this.compiledFn.apply(data, arg);

0 个答案:

没有答案