Updated to be used with TypeScript 1.0 RC