Wrapped

Wrapped<Opening, Text, Closing>

The Wrapped type indicates the text wrapped by the opening characters at the beginning and the closing characters at the end of the text. It's built from generic type variables in order Opening, Text and Closing on the template ${Opening}${Text}${Closing}.

wrapped.type.ts
export type Wrapped<
  Opening extends string = '',
  Text extends string = '',
  Closing extends string = ''
> = `${Opening}${Text}${Closing}`;

Generic type variables

Openingextendsstring=''

A generic type variable determines the opening characters placed before the text on the template ${Opening}${Text}${Closing}.

Textextendsstring=''

A generic type variable determines the text between the opening and closing characters on the template ${Opening}${Text}${Closing}.

Closingextendsstring=''

A generic type variable determines the closing characters placed after the text on the template ${Opening}${Text}${Closing}.

Returns

The type returns template literal of generic type variables in order Opening, Text and Closing indicating wrapped text.

Last updated