Skip to content

Expanded type guard suggestions #4868

Closed
@RyanCavanaugh

Description

@RyanCavanaugh

Potential "safe" type guards based on in-office discussion:

  • When guarded by typeof x === 'function', remove any types from the union that do not have call or construct signatures
  • When guarded by typeof x === 'object', remove all primitives from the union, as well as any types that have any call or construct signatures

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions