Skip to content

Instantly share code, notes, and snippets.

@Shinpeim
Created October 4, 2012 18:41
Show Gist options
  • Save Shinpeim/3835548 to your computer and use it in GitHub Desktop.
Save Shinpeim/3835548 to your computer and use it in GitHub Desktop.
TypeScriptで 少数を整数に丸めるやつ BKっぽい
parseInt(0.1); // -> error :Supplied parameters do not match any signature of call target
parseInt(<string> 0.1); // -> error :Cannot convert 'number' to 'string'
parseInt("" + 0.1); // OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment