TypeScript by EezyTutorials
Home iOS
Tutorials
HTML CSS C++ Java Python C Programming SQL TypeScript Go Machine Learning React Redux
Tools
  • Getting Started
  • TypeScript - Introduction
  • TypeScript - Installation & Toolchain
  • TypeScript - First Program
  • Language Basics
  • TypeScript - Basic Types
  • TypeScript - Type Inference
  • TypeScript - Literal, Union & Intersection Types
  • TypeScript - any, unknown, never
  • TypeScript - Arrays & Tuples
  • TypeScript - Enums
  • Functions & Objects
  • TypeScript - Functions, Parameters, Overloads, this
  • TypeScript - Objects, Interfaces & Type Aliases
  • TypeScript - Classes, Access Modifiers, Getters/Setters, Abstract
  • Advanced Types
  • TypeScript - Narrowing & Type Guards
  • TypeScript - Generics: Basics, Constraints & Defaults
  • TypeScript - Type Manipulation: keyof, Indexed & Mapped Types
  • TypeScript - Conditional Types & infer
  • TypeScript - Template Literal Types & satisfies
  • TypeScript - Utility Types
  • TypeScript - Assertion Functions & asserts
  • TypeScript - Structural Typing & Variance
  • Modules, Config & Interop
  • TypeScript - Modules: import/export
  • TypeScript - Namespaces (Legacy)
  • TypeScript - tsconfig Deep Dive
  • TypeScript - Node Interop: ESM/CJS
  • TypeScript - DOM & Node lib types
  • TypeScript - Declaration Files (.d.ts)
  • TypeScript - Ambient & Module Augmentation
  • TypeScript - Project References & Monorepos
  • Tooling & Quality
  • TypeScript - Build & Tooling
  • TypeScript - Testing (Jest/Vitest)
  • TypeScript - Linting & Formatting (ESLint & Prettier)
  • Patterns & Advanced
  • TypeScript - Error Handling & Exhaustive Checks
  • TypeScript - Patterns & Best Practices
  • TypeScript - Iterators, Iterables & Async Iterators
  • TypeScript - Maps, Sets & Records
  • TypeScript - Symbols & BigInt
  • TypeScript - Decorators (TS 5.x)
  • TypeScript - JSX & React Basics
  • Publishing, Migration & Performance
  • TypeScript - Migrating from JavaScript
  • TypeScript - Performance & Compiler Speed
  • TypeScript - Publishing Types & DefinitelyTyped

TypeScript - Symbols & BigInt

On this page
    Back to top ↑

    Symbols

    const ID: unique symbol = Symbol('ID');
    
    interface HasId { [ID]: string }
    
    const item: HasId = { [ID]: 'abc' };
    

    BigInt

    const n: bigint = 10n ** 20n;
    

    Use appropriate target/lib to support BigInt (ES2020+).

    « Prev: TypeScript - Maps, Sets & Records Next: TypeScript - Decorators (TS 5.x) »

    ★ EezyTutorials

    • ℹAbout
    • ✉Contact
    • 📢Advertise
    • 🔒Privacy Policy

    Connect

    🗨 🐦 ▶️
    © 2014–2025 Eezy Tutorials
    Up ↑