typescript - create type that denotes the set of even numbers

0 votes

Can anyone know how to create this kind of type? if 'evenNumbers" is the name of the type, i want for example that:

let a:evenNumbers = 3

will return error and

let a:evenNumbers = 4

will not.

Aug 3, 2022 in TypeSript by Abhinaya
• 1,160 points

edited 5 days ago 96 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP