---
title: "ParamSpec: type in Authoring, TypeShade API reference"
description: "ParamSpec, a type in Authoring. The parameter record externFn takes: a plain map from parameter name to ShaderType, in declaration order."
url: https://typeshade.dev/api/paramspec/
language: en
---

# `ParamSpec`

Type in Authoring

The parameter record externFn takes: a plain map from parameter name to ShaderType, in declaration order.

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

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

## Syntax

```ts
type ParamSpec = Record<string, ShaderType>;
```

## Description

An extern function is only ever called, never used as a pipeline entry point, so its record carries no stage attribute and no struct handle. [`FnParamSpec`](https://typeshade.dev/api/fnparamspec/) is the richer record `fn()` accepts.

## Examples

### Example

```ts
import { type ParamSpec } from 'typeshade'
import { externFn, f32T, vec2fT } from 'typeshade/core/ir'

const WARP_PARAMS = { x: f32T, y: f32T, scale: f32T } satisfies ParamSpec
export const warp = externFn('warp', WARP_PARAMS, vec2fT)
```

## See also

- [`externFn`](https://typeshade.dev/api/externfn/)
- [`ShaderType`](https://typeshade.dev/api/shadertype/)
- [`FnParamSpec`](https://typeshade.dev/api/fnparamspec/)

## Source

[`src/core/ir/builder.ts`, line 54](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/builder.ts#L54), at commit af54ddad5
