About the author


Author: https://t.me/ahillary

Resources


Channel: https://t.me/semolina_code_python

Chat: https://t.me/python_with_ahillary

YouTube: https://www.youtube.com/@semolinacode

Coding training: https://t.me/how_to_code_web3

Prop trading: https://t.me/semolina_prop


Содержание

Преобразование типов

Явное приведение типа (Type Assertion)

Описание:

Синтаксис:

let someValue: any = "This is a string";
let strLength: number = (someValue as string).length; // Использование `as`
let someValue: any = "This is a string";
let strLength: number = (<string>someValue).length; // Использование угловых скобок