[typescript]interface function

Thu Mar 27

typescript

Author:Noritaka

Astro
type addFunc = (num1: number, num2: number) => numger;
let addFunc: addFunc;
addFunc = (n1: number, n2: number) => { return n1 + n2; }
 (
 use type alias 
 and then 
 define the type of addFunc
 and then
 define addFunc
 )

typescript