@Acer 接受一个类型为number 的参数,返回boolean

Follow

@zjutoe

謝謝 我之前好像看到用的是
(x : number) => boolean

@Acer 我猜是因为要在object里描述,所以得符合object的语法,不能直接用函数定义的语法。

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.