2017-11-06T14:05:46Z||2017-11-06T14:05:46Z


类似这样:callback: (a: number) => number;.

更完整的代码:

class Test {
  callback: (a: number) => number;
}

const test = new Test();
test.callback = (x) => {
  return x + 1;
};

console.log(test.callback(3));

输出:

4