-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Domain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedDuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript 1.8.9:
Can there be a way to limit number value for example
an property that accepts 0-255 number or decimals as shown below
eg:
interface options{
red:number[0-255];//0 to 255
count:number[0-*];//0 to infinity
opacity:number[0.0-1.0];// decimal points from 0 to 1
}
this would let users limit the options that most javascript frameworks allow
Thanks
DmitryEfimenko, rob3c and BestGamer
Metadata
Metadata
Assignees
Labels
Domain: Literal TypesUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedUnit types including string literal types, numeric literal types, Boolean literals, null, undefinedDuplicateAn existing issue was already createdAn existing issue was already created