Static Taint Analysis via Type-checking in TypeScript