Typescript Interface With Functions In R