3 ms·
Too late to EDIT: but "literal types" was the word I am looking for. I used "success:true" and "success:false" as part of the two types I was combining; it see
by xsmasher 4y ago
Too late to EDIT: but "literal types" was the word I am looking for.
I used "success:true" and "success:false" as part of the two types I was combining; it seems like "success:boolean" would server the same function, but it does not. The type I created has more information that that.
https://www.typescriptlang.org/docs/handbook/literal-types.html https://www.typescriptlang.org/docs/handbook/literal-types.h...