Generic type variables

For an instance.

Wrapped<Closing>

Closing extends string

​A generic type variable constrained by the string, by default of the value captured from the provided wrap indicates the closing type of a new Wrapped instance.

Wrapped<Opening>

Opening extends string

​A generic type variable constrained by the string, by default of the value captured from the provided wrap indicates the opening type of a new Wrapped instance.

Wrapped<Text>

Text extends string

​A generic type variable constrained by the string by default of the value captured from the provided text parameter indicates the text type of a new Wrapped instance.

wrapped.class.ts
class Wrapped<
  Text extends string = string,
  Opening extends string = string,
  Closing extends string = string
> extends String {

Last updated