---
title: "ParamSpec: TypeShade 셰이더 API의 작성 분류 타입 참조 문서"
description: "ParamSpec, TypeShade API의 작성 분류에 속하는 타입입니다. externFn의 매개변수 레코드입니다. 매개변수 이름을 ShaderType에 대응시키는 맵이며 선언 순서를 따릅니다."
url: https://typeshade.dev/ko/api/paramspec/
language: ko
---

# `ParamSpec`

타입, 작성 분류

externFn의 매개변수 레코드입니다. 매개변수 이름을 ShaderType에 대응시키는 맵이며 선언 순서를 따릅니다.

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

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

## 구문

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

## 설명

extern 함수는 호출될 뿐, 파이프라인 진입점으로 쓰이지 않습니다. 그래서 이 레코드에는 스테이지 속성도, 구조체 핸들도 없습니다. [`FnParamSpec`](https://typeshade.dev/ko/api/fnparamspec/)은 `fn()`이 받는 더 풍부한 레코드입니다.

## 예제

### 예제

```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)
```

## 함께 보기

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

## 소스

[`src/core/ir/builder.ts`, 54행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/builder.ts#L54), 커밋 af54ddad5 기준
