---
title: "TS8019 ARITY_MISMATCH: TypeShade 컴파일러가 진단에 붙이는 오류 코드 한 가지"
description: "TS8019 ARITY_MISMATCH, TypeShade 컴파일러의 오류 코드입니다. 호출이나 생성자에서 인자, 요소, 필드의 개수가 맞지 않습니다."
url: https://typeshade.dev/ko/reference/errors/ts8019/
language: ko
---

# `TS8019`

프런트엔드 코드 `ARITY_MISMATCH`

호출이나 생성자에서 인자, 요소, 필드의 개수가 맞지 않습니다.

레지스트리에는 이 상수에 대한 문서 주석이 없습니다. 그래서 위 설명은 컴파일러가 이 코드와 함께 내는 메시지를 보고 이 사이트가 쓴 것입니다.

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 예제

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  return vec4(uv, 0.)
}
```

빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.

**TS8019** error, 5행: Vector constructor component count mismatch.

## 고치는 법

같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.

example.shade.ts

```ts
"use typeshade"

@fragment
export function main(uv: location<0, vec2>): vec4 {
  return vec4(uv, 0., 1.)
}
```

## 이 코드가 적용하는 규칙

**[규칙 2.2](https://typeshade.dev/ko/reference/rules/2-2/) 테스트**

A compiler-internal name (§2.1) must not be authorable.

**[규칙 7.10](https://typeshade.dev/ko/reference/rules/7-10/) 테스트**

`T | undefined` and `T | null` are optional values.

**[규칙 8.18](https://typeshade.dev/ko/reference/rules/8-18/) 테스트**

A function whose parameter has a function type, written out (`f: (x: f32) => f32`) or through a type alias of one, takes a function: a function declared at the top of the file or of a namespace, a method, a static method, a constructor, a field that holds a function ([Rule 8.16](https://typeshade.dev/ko/reference/rules/8-16/)) and a local function ([Rule 8.17](https://typeshade.dev/ko/reference/rules/8-17/)).

**[규칙 9.2](https://typeshade.dev/ko/reference/rules/9-2/) 테스트**

A builtin’s signature must be WGSL’s, checked at the call.

**[규칙 9.9](https://typeshade.dev/ko/reference/rules/9-9/) 테스트**

A WGSL built-in function, an overload of one, or a §9.3 name must not be authorable when an ECMAScript spelling the compiler supports carries every case it accepts with the same meaning ([Rule 1.4](https://typeshade.dev/ko/reference/rules/1-4/)).

## 함께 보기

- [함수](https://typeshade.dev/ko/guide/language/functions/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

- [`src/compiler/ts/generic-structs.ts:84`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/generic-structs.ts#L84) (2곳)
- [`src/compiler/ts/internal-ops.ts:62`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/internal-ops.ts#L62)
- [`src/compiler/ts/lower/array-constructor/lower.ts:80`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-constructor/lower.ts#L80)
- [`src/compiler/ts/lower/array-methods.ts:80`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods.ts#L80) (4곳)
- [`src/compiler/ts/lower/array-methods/value-methods.ts:53`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/array-methods/value-methods.ts#L53)
- [`src/compiler/ts/lower/atomics.ts:94`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/atomics.ts#L94) (2곳)
- [`src/compiler/ts/lower/barriers.ts:35`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/barriers.ts#L35) (2곳)
- [`src/compiler/ts/lower/class-methods/construct.ts:250`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/class-methods/construct.ts#L250)
- [`src/compiler/ts/lower/expression-array.ts:52`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-array.ts#L52) (3곳)
- [`src/compiler/ts/lower/expression-array/fold.ts:51`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-array/fold.ts#L51) (2곳)
- [`src/compiler/ts/lower/expression-call.ts:450`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call.ts#L450) (7곳)
- [`src/compiler/ts/lower/expression-call/args.ts:186`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/args.ts#L186) (2곳)
- [`src/compiler/ts/lower/expression-call/bit-builtins.ts:161`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/bit-builtins.ts#L161)
- [`src/compiler/ts/lower/expression-call/matrix-ctor.ts:140`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/matrix-ctor.ts#L140)
- [`src/compiler/ts/lower/expression-call/select-and-reduce.ts:27`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/select-and-reduce.ts#L27) (2곳)
- [`src/compiler/ts/lower/expression-call/storage-depth.ts:33`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-call/storage-depth.ts#L33)
- [`src/compiler/ts/lower/expression-misc.ts:143`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-misc.ts#L143)
- [`src/compiler/ts/lower/expression-misc/scalar-calls.ts:54`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/expression-misc/scalar-calls.ts#L54) (2곳)
- [`src/compiler/ts/lower/function-args.ts:112`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-args.ts#L112) (2곳)
- [`src/compiler/ts/lower/function/type-arguments.ts:57`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function/type-arguments.ts#L57)
- [`src/compiler/ts/lower/statement/binding-pattern.ts:133`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/statement/binding-pattern.ts#L133)
- [`src/compiler/ts/lower/subgroups.ts:69`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/subgroups.ts#L69)
