Typescript Check If Type Is Interface