Typescript Add Function To Interface Meaning