Add a TS_REFCHECK flag for doing a one-to-one TS build with type checking