Answer the question
In order to leave comments, you need to log in
How to create a byte type using TypeScript?
Greetings.
We need a type that only accepts an integer between 0 and 255.
let n: byte = 128; // ok
let n: byte = 256; // error
let n: byte = 16.4; // error
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question