Typescript Function Type Declaration