Step 3 / Select topic TypeScript Hard

What this bank covers

  • Distributive conditional with infer
  • Excess property checks need a fresh literal
  • const assertions on array literals
  • Inference through keyof and indexed access
  • unknown is not assignable downward
  • keyof with a string index signature
  • Template literal inference over a union
  • Distribution happens before the array wrap
  • Tuple inference from rest parameters
  • satisfies and literal widening
  • typeof "object" keeps null in the union
  • Fall-through cases narrow to a sub-union
  • Truthiness checks also exclude 0
  • User-defined type guards narrow both branches
  • Array.isArray narrows a union element
  • Exhaustiveness checks need every member handled
  • Boolean literals work as discriminants
  • typeof "function" narrows callable union members
  • instanceof narrowing with a subclass
  • Truthiness narrowing discards falsy members
  • Interface declaration merging
  • An interface can extend an object type alias
  • implements requires statically known members
  • Type aliases do not merge
  • extends checks member compatibility
  • keyof over a merged interface
  • Intersections combine conflicting members as never
  • Implicit index signatures: alias yes, interface no
  • Call signatures vs function type aliases
  • Intersecting an optional member with a required one
  • Generic pick and duplicate keys
  • Distributive conditional types with infer
  • Constrained generic over a record of numbers
  • One type parameter, two conflicting inference sites
  • Recursive generic tuple building
  • Variadic infer in tuple patterns
  • Distribution over the never type
  • Key remapping in a generic mapped type
  • Indexed access types link key and value
  • Method bivariance in generic interfaces
  • Exclude over keyof unions
  • ReturnType with overloads
  • Parameters with optional and rest parameters
  • Key remapping with Capitalize
  • Awaited unwraps recursively
  • Omit over a union type
  • Readonly is shallow
  • ReturnType of an uninstantiated generic signature
  • NonNullable over a union
  • Which arguments still carry a literal type
  • Template literal types distribute over unions
  • Key remapping keeps the original literal available
  • Numeric keys yield numeric literal types
  • Widening inside mutable object literals
  • Literal inference from a string constraint
  • Template literal types distribute and are case-sensitive
  • Assignability between literal unions and related types
  • Literal discriminants drive narrowing
  • as const tuples as a source of key literal types
  • Distributive conditional types and never
  • unknown as the top type
  • keyof any
  • unknown is not assignable to anything but unknown and any
  • never as an exhaustiveness check
  • Assignability among any, unknown and never
  • any, unknown and never in intersections
  • unknown in unions
  • any in conditional types
  • any disables property checking
  • Field initialization order with inheritance
  • Static property initialization order
  • Private-field brand checks
  • Abstract classes and constructor types
  • Class expressions as mixins
  • Arrow-function fields and dynamic dispatch
  • Accessors versus instance fields in serialization
  • Derived field initializers run after super()
  • Static blocks interleave with static fields
  • Reverse mapping after an explicit initializer
  • String enums have no reverse mapping
  • Key count of a numeric enum object
  • Enum nominality for string enums
  • Constant enum expressions in a const enum
  • as const produces a readonly tuple
  • const assertions are erased at runtime
  • Merged enum declarations and key ordering
  • Duplicate enum values collide in the reverse map
  • Merging a namespace into an enum
  • Non-null assertion is erased
  • Casts do not convert values
  • Abstract classes survive erasure
  • Overload signatures are compile-time only
  • Optional parameters are not filled in
  • Predicates are trusted, not verified
  • readonly is checked, not enforced
  • private vs #private at runtime
  • satisfies has no runtime effect
  • Optional properties are not created
  • Field initialization order vs. overridden methods