Interface type check with Typescript Interface type check with Typescript javascript javascript