Следите за новинками
в нашем Telegram канале. Жми, чтобы подписаться:)
⊗jstsPmBsSLA 21 of 55 menu
◀ ▶

Aliases for Concatenating Strings in TypeScript

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

type message = 'success' | 'error';

Let's declare a variable with our new type:

let str: message;

Let's write some value into this variable:

str = 'success';

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

← →
↑
English▼
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline