enums - Define interface variable with only two string hardcoded values -
i have following code:
interface responsefromserver { type:string; message:string; }
how can restrict type
variable being 1 of 2 following values:
"success" "error"
this isn't possible. types shape of data, not content.
Comments
Post a Comment