> For the complete documentation index, see [llms.txt](https://docs.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.angular-package.dev/text/tag/bbcodetag/static-methods.md).

# Static methods

## Public

### `define()`

The static method defines the BBCode tag of a specified name.

```typescript
public static define<Name extends string>(name: Name): BBCodeTag<Name> {
  return new this(name);
}
```

#### Generic Type variables

| Name / Description                                                                                                                                                                                                                                                                              |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong><code>Name extends string</code></strong></p><p>A generic type variable constrained by the <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#string"><code>string</code></a> indicates the type of the <code>BBCodeTag</code> instance via the return type.</p> |

#### Parameters

| Name: type   | Description                       |
| ------------ | --------------------------------- |
| `value: any` | The name of BBCode tag to define. |

#### Returns

| Return type                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><strong><code>BBCodeTag\<Name></code></strong></p><p>A return type is a <code>BBCodeTag</code> object indicating that the returned value is an instance of <code>BBCodeTag</code> that takes a generic type variable <code>Name</code> as a tag name.</p> |

The **return value** is a new instance of `BBCodeTag` of a given `name`.

#### Example usage

```typescript
// Example usage.
import { BBCodeTag } from '@angular-package/text';


```

### `isBBCode()`

The static method checks if the value of any type is an instance of a `BBCodeTag`.

```typescript
public static isBBCode<Name extends string>(
  value: any,
  name?: Name
): value is BBCodeTag<Name> {
  return isInstance(value, BBCodeTag)
    ? isDefined(name) && value.name === name
    : false;
}
```

#### Generic Type variables

| Name / Description                                                                                                                                                                                                                                                                                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong><code>Name extends string</code></strong></p><p>A generic type variable constrained by the <a href="https://www.typescriptlang.org/docs/handbook/basic-types.html#string"><code>string</code></a> by default of the value from the provided <code>name</code> indicates the type of the <code>BBCodeTag</code> instance via the return type.</p> |

#### Parameters

| Name: type    | Description                                                                   |
| ------------- | ----------------------------------------------------------------------------- |
| `value: any`  | The value of any type to check against the instance of `BBCodeTag`.           |
| `name?: Name` | Optional name of a generic type variable `Name` as tag name of a given value. |

#### Returns

| Return type                                                                                                                                                                                                                                                                 |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong><code>value is BBCodeTag\<Name></code></strong></p><p>The return type is a <code>boolean</code> indicating the <code>value</code> parameter is an instance of <code>BBCodeTag</code> that takes a generic type variable <code>Name</code> the name of a tag.</p> |

The **return value** is a `boolean` type indicating whether the value is the `BBCodeTag` instance of any or a given name.

#### Example usage

```typescript
// Example usage.
import { BBCodeTag } from '@angular-package/text';


```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/text/tag/bbcodetag/static-methods.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
