---
title: "DiagnosticDirective: TypeShade 셰이더 API의 IR 분류 인터페이스 참조 문서"
description: "DiagnosticDirective, TypeShade API의 IR 분류에 속하는 인터페이스입니다. WGSL `diagnostic(severity, rule);` 지시문입니다."
url: https://typeshade.dev/ko/api/diagnosticdirective/
language: ko
---

# `DiagnosticDirective`

인터페이스, IR 분류

WGSL \`diagnostic(severity, rule);\` 지시문입니다.

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

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

## 구문

```ts
interface DiagnosticDirective {
  readonly severity: 'off' | 'info' | 'warning' | 'error';
  readonly rule: string;
}
```

## 인스턴스 속성

**`severity` 읽기 전용 `'off' | 'info' | 'warning' | 'error'`**

**`rule` 읽기 전용 `string`**

## 소스

[`src/core/ir/nodes/entry-and-directive.ts`, 4행](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/nodes/entry-and-directive.ts#L4), 커밋 af54ddad5 기준
