Aliases for Concatenating Strings in TypeScript

To concatenate strings, you can enter your own type using a given alias. Let's do that:

typescripttype message = 'success' | 'error';

Let's declare a variable with our new type:

typescriptlet str: message;

Let's write some value into this variable:

typescriptstr = 'success';
Задание 1

Make a data type that will allow a variable to take on one of three values: 'error', 'warning', or 'success'.