HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to TypeScriptBasic TypesUnion & Literal TypesInterfacesTyped FunctionsArrays & TuplesGenerics & Enums
REFERENCE
📖 Overview
🖥️ Basics & Output
🏷️ Types
📐 Interface & Type Alias
🧩 Function
📋 Array & Object Types
🚀 Next
TypeScript›REFERENCE

TypeScript — Command Reference

TypeScript adds type safety to JavaScript — errors are caught before running. Most used type structures, each with an explanation and working example.

6 categories · 18 commands

🖥️

Basics & Output

Output and the basic logic of TypeScript.

console.log()Adding types ( : )Type inference
3 commands →
🏷️

Types

Union types, literal types, and special cases.

Union type ( | )Literal typeany / unknown
3 commands →
📐

Interface & Type Alias

Defining object shapes: interface and type.

interfaceOptional area ( ? )type (alias)
3 commands →
🧩

Function

Safe functions with parameter and return types.

Typed functionTyped arrow functionvoid (no return value)
3 commands →
📋

Array & Object Types

Typed arrays, tuples, and record types.

Typed arr ( type[] )Tuple (tuple)Record<K, V>
3 commands →
🚀

Next

Generics, enums, and type casting.

Generic ( <T> )enumas (type assertion)
3 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code