TODO: Simplify this class, keep only what is needed.

An abstraction for defining and operating with the cardinality of a (composite or simple) type.

Simple types (the ones that are directly encodable) have a fixed cardinality: [lower = 1, upper = 1]. Composite types (not directly encodable) do not follow this constraint. For example:

  • VarArgs: [lower = 0, upper = *]
  • OptionalResult: [lower = 0, upper = 1]

Constructors

Properties

lowerBound: number
upperBound?: number
MaxCardinality: number = 4096

An arbitrarily chosen, reasonably large number.

Methods