[Typescript] Function defination
Posted Answer1215
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[Typescript] Function defination相关的知识,希望对你有一定的参考价值。
Define a function type and params type:
// The function init // Accept two params which are both type string // Return void const init: (s: string, e: string) => void = (start, end) => { console.log(start, end); } init("start", "end");
以上是关于[Typescript] Function defination的主要内容,如果未能解决你的问题,请参考以下文章