UsesHandle
On this page

UsesHandle

Type in Authoring

A declarator handle accepted by module({ uses }): anything that carries its own declaration or binding.

import type { UsesHandle } from 'typeshade'
import type { UsesHandle } from 'typeshade/core/ir'

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

Syntax

type UsesHandle =
| { readonly struct: StructDecl; readonly binding: BindingDecl }
| { readonly decl: StructDecl | ConstDecl }
| { readonly binding: BindingDecl; readonly elementDecl?: StructDecl };

Description

uniformStruct returns { struct, binding }; ioStruct, structDecl and constDecl return { decl }; storageBuffer returns { binding } plus an elementDecl for a struct element; resource returns { binding }.

See also

Source

src/core/ir/builder.ts, line 877, at commit af54ddad5

Edit this page Report a problem