Adding typescript compile time checks