---
title: "ExternRequirement: interface in Reflection, TypeShade API"
description: "ExternRequirement, an interface in Reflection. One host-provided global a module expects, declared with externVar."
url: https://typeshade.dev/api/externrequirement/
language: en
---

# `ExternRequirement`

Interface in Reflection

One host-provided global a module expects, declared with externVar.

`import type { ExternRequirement } from 'typeshade'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
interface ExternRequirement {
  readonly name: string;
  readonly type: string;
  readonly wgsl: string;
  readonly glsl: string;
  readonly stage?: 'vertex' | 'fragment' | 'compute';
}
```

## Description

`type` is the DSL type key (the string [`typeKey`](https://typeshade.dev/api/typekey/) returns). `wgsl` and `glsl` are the per-target spellings the emit writes, and the host provides the global under those; `name` is the logical name the module uses. `stage`, when present, is the advisory stage the declaration named.

## Instance properties

**`name` read only `string`**

**`type` read only `string`**

**`wgsl` read only `string`**

**`glsl` read only `string`**

**`stage` optional read only `'vertex' | 'fragment' | 'compute'`**

## See also

- [`externVar`](https://typeshade.dev/api/externvar/)
- [`typeKey`](https://typeshade.dev/api/typekey/)

## Source

[`src/core/reflect/entry-types.ts`, line 151](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/reflect/entry-types.ts#L151), at commit af54ddad5
