Typescript Class Methods And Instance