Typescript utilities