---
title: "ConstHandle: interface in Layout, TypeShade API reference"
description: "ConstHandle, an interface in Layout. The handle constDecl returns: a module-level constant and its typed reference…"
url: https://typeshade.dev/api/consthandle/
language: en
---

# `ConstHandle`

Interface in Layout

The handle constDecl returns: a module-level constant and its typed reference, declared together so the name is written once.

`import type { ConstHandle } from 'typeshade'`
`import type { ConstHandle } from 'typeshade/core/ir'`

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

## Syntax

```ts
interface ConstHandle<T extends ShaderType> {
  readonly decl: ConstDecl;
  readonly node: ReadonlyNode<KeyOf<T>>;
}
```

## Instance properties

**`decl` read only `ConstDecl`**

The constant’s declaration, for `module({ consts })` or `module({ uses })`.

**`node` read only `ReadonlyNode<KeyOf<T>>`**

The typed reference to read the constant through at call sites.

## See also

- [`constDecl`](https://typeshade.dev/api/constdecl/)

## Source

[`src/core/sot.ts`, line 41](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/sot.ts#L41), at commit af54ddad5
