3 ms·
Apart from the explicit number types (`i32` instead of `number`, etc.) it looks like standard typescript. What looks different to you?
by saosebastiao 8y ago
Apart from the explicit number types (`i32` instead of `number`, etc.) it looks like standard typescript. What looks different to you?
- sramam 8y agoIncredibly, the segment below is valid TypeScript. @inline function rot(x: u32, y: u32, v: u32): void { var a = max<i32>((v >>> 24) - BIT_ROT, 0); set(x, y, (a << 24) | (v & 0x00ffffff)); } You must be working on a different set of problems than me to be able to identify this as vanilla TypeScript. Not given the context of a file extension, I would forgive anyone for mistaking this to be some kind of low level driver code and be confused on source language. It is so impressive that this is valid TS though! [edit: code formatting]