Im tryng to define a generic type that takes a number and its defined as true if the number provided is divisible by 4. Is that possible ? The code Im tryng is this:
type isDivisibleBy4<T extends number> = T extends number ? (T%4 extends 0 ?true:never) :never
So for starters I need to Know if aritmetic operation are possible involving types. And then how do i make that happen?