mirror of
https://github.com/type-challenges/type-challenges.git
synced 2026-02-01 15:47:22 +00:00
1.3 KiB
1.3 KiB
Trunc

by jiangshan @jiangshanmeta
Implement the type version of Math.trunc, which takes string or number and returns the integer part of a number by removing any fractional digits.
For example:
type A = Trunc<12.34> // 12