Typescript Declare Interface With Function