> ## Documentation Index
> Fetch the complete documentation index at: https://gluals.arnux.net/llms.txt
> Use this file to discover all available pages before exploring further.

# @meta

> Mark a file as containing only type definitions, not runtime code.

## Overview

`@meta` marks a file as a **type-only declaration file**. GLuaLS reads it for type information. Your addon does not run it.

Use this for meta libraries, including the wiki-generated Garry's Mod annotations downloaded by the VS Code extension ([stable](https://github.com/Pollux12/annotations-gmod-glua-ls/tree/gluals-annotations), [pre-release](https://github.com/Pollux12/annotations-gmod-glua-ls/tree/gluals-annotations-prerelease)).

***

## Syntax

```lua theme={null}
---@meta
---@meta library_name
```

***

## Usage

Use meta files to define types for:

* External libraries
* Built-in APIs
* Code without implementation source

```lua theme={null}
---@meta

---@class JSONLib
local json = {}

---@param str string
---@return table
function json.decode(str) end

---@param value table
---@return string
function json.encode(value) end

return json
```

***

## Named meta files

Add a name after `@meta` to connect the file to a library name for documentation and tooling:

```lua theme={null}
---@meta mylib
```

***

## Common uses

* **Downloaded Garry's Mod annotations**: the VS Code extension loads wiki-generated API annotations as meta files
* **Third-party library stubs**: declare types for libraries loaded at runtime
* **Custom type files**: define extra types used across your workspace

***

## Meta files in workspace configuration

Add meta files or directories to `workspace.library` so GLuaLS analyzes them without treating them as project code:

<Tip>
  Use the settings menu instead of editing the JSON file directly. This helps you avoid config mistakes.
</Tip>

```json .gluarc.json theme={null}
{
  "workspace": {
    "library": ["./types", "./vendor/stubs"]
  }
}
```

***

## See also

* [Annotations management](/configuration/annotations-management): how the VS Code extension downloads and loads Garry's Mod annotations
