Log in Sign up
2 Matching Annotations
  1. Oct 2019
  2. stackoverflow.com stackoverflow.com
    Narrowing a type to its properties that are index signatures
    2
    1. TylerRick 28 Oct 2019
      in Public
      type A = string extends keyof Person["favouriteNumbers"] ? true : false; // true
      TypeScript: debugging types TypeScript: conditional types TypeScript: union
    2. TylerRick 28 Oct 2019
      in Public
      type A = keyof Person["favouriteNumbers"]; // string | number type B = keyof Person["address"]; // "street" | "postcode"
      TypeScript: keyof TypeScript: debugging types
    Visit annotations in context

    Tags

    • TypeScript: debugging types
    • TypeScript: conditional types
    • TypeScript: union
    • TypeScript: keyof

    Annotators

    • TylerRick

    URL

    stackoverflow.com/questions/56422807/narrowing-a-type-to-its-properties-that-are-index-signatures
Share:
Group. Only group members will be able to view this annotation.
Only me. No one else will be able to view this annotation.
Hypothes.is
  • About
  • Blog
  • Bioscience
  • Education
  • Jobs
  • Help
  • Contact
  • Terms of Service
  • Privacy Policy