Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a type predicate.

function isString(anything: any): anything is string {}
function assert(condition: boolean): asserts condition {}

Hierarchy

Index

Constructors

constructor

Properties

asserts

asserts: boolean

True if the type is of the form asserts val is string, false if the type is of the form val is string

name

name: string

The identifier name which is tested by the predicate.

Optional targetType

targetType?: Type

The type that the identifier is tested to be. May be undefined if the type is of the form asserts val. Will be defined if the type is of the form asserts val is string or val is string.

Readonly type

type: "predicate" = "predicate"

The type name identifier.

Methods

toString

  • toString(): string

visit

Generated using TypeDoc