# Compiler JSDoc Modifiers

Since *TypeScript* does not support decorators on anything but classes, class fields and class methods, you can use the following JSDoc *modifiers* to apply some customization:

### InspectorName

To change the name of an enum member, akin to unity's [InspectorNameAttribute](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/InspectorNameAttribute.html):

```typescript
export enum ModelImporterIndexFormat {
    Auto,
    /** @InspectorName 16 bits **/
    UInt16,
    /** @InspectorName 32 bits **/
    UInt32,
}
```

{% hint style="warning" %}
Do note *currently* with the editor API, this will also affect the name of the enum values.
{% endhint %}

### Flags

To mark an enum as a flag enum, you can use `@flags`

```typescript
/** @flags */
export enum ExampleFlags {
    A = 1,
    B = 2,
    C = 4,
    D = 8,
    E = 16,
    // ...
}
```

Do note that if it doesn't follow powers of 2, it will fall back to an integer enum.


---

# Agent Instructions: 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.airship.gg/typescript/compiler-jsdoc-modifiers.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.
