A generic type variable constrained by the string, by default of the value captured from the provided opening indicates the type of the opening in the Wrapper via return type.
A generic type variable constrained by the string, by default of the value captured from the provided closing indicates the type of the closing in the Wrapper via return type.
A generic type variable constrained by the string, by default of the value captured from the provided text indicates the type of the text in the Wrapper via return type.
// Example usage.import { Wrapper } from'@angular-package/wrapper';consttagWrapper=newWrapper('[',']','quote');// Returns true confirming the type Wrapper<string, string, string>Wrapper.isWrapper(tagWrapper);// Returns true confirming the type Wrapper<"[", string, string>Wrapper.isWrapper(tagWrapper,'[');// Returns true confirming the type Wrapper<"[", string, "]">Wrapper.isWrapper(tagWrapper,'[',']');// Returns true confirming the type Wrapper<"[", "quote", "]">Wrapper.isWrapper(tagWrapper,'[',']','quote');// Returns true confirming the type Wrapper<string, "quote", "]">Wrapper.isWrapper(tagWrapper,undefined,']','quote');// Returns true confirming the type Wrapper<"[", "quote", string>Wrapper.isWrapper(tagWrapper,'[',undefined,'quote');// Returns true confirming the type Wrapper<string, "quote", string>Wrapper.isWrapper(tagWrapper,undefined,undefined,'quote');// Returns true confirming the type Wrapper<string, string, "]">Wrapper.isWrapper(tagWrapper,undefined,']');// Returns true confirming the type Wrapper<"[", string, "]">Wrapper.isWrapper<'[',']'>(tagWrapper);
Return false
// Example usage.import { Wrapper } from'@angular-package/wrapper';consttagWrapper=newWrapper('[',']','quote');// Returns false denying the type Wrapper<"<", string, string>Wrapper.isWrapper(tagWrapper,'<');// Returns false denying the type Wrapper<"<", string, ">">Wrapper.isWrapper(tagWrapper,'<','>');// Returns false denying the type Wrapper<"<", "quote", ">">Wrapper.isWrapper(tagWrapper,'<','>','quote');// Returns false denying the type Wrapper<string, "quote", ">">Wrapper.isWrapper(tagWrapper,undefined,'>','quote');// Returns false denying the type Wrapper<"<", "quote", string>Wrapper.isWrapper(tagWrapper,'<',undefined,'quote');// Returns false denying the type Wrapper<string, "no-quote", string>Wrapper.isWrapper(tagWrapper,undefined,undefined,'no-quote');// Returns false denying the type Wrapper<string, string, ">">Wrapper.isWrapper(tagWrapper,undefined,'>');// Returns false denying the type Wrapper<"[", "", "]">Wrapper.isWrapper<'[',']'>(nullasany);
Confirms the wrong type
// Example usage.import { Wrapper } from'@angular-package/wrapper';consttagWrapper=newWrapper('[',']','quote');// Returns true confirming the type Wrapper<"<", string, ">">Wrapper.isWrapper<'<','>'>(tagWrapper);