---
title: "DiagnosticDirective: interface in IR, TypeShade API"
description: "DiagnosticDirective, an interface in IR. A WGSL `diagnostic(severity, rule);` directive."
url: https://typeshade.dev/api/diagnosticdirective/
language: en
---

# `DiagnosticDirective`

Interface in IR

A WGSL \`diagnostic(severity, rule);\` directive.

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

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

## Syntax

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

## Instance properties

**`severity` read only `'off' | 'info' | 'warning' | 'error'`**

**`rule` read only `string`**

## Source

[`src/core/ir/nodes/entry-and-directive.ts`, line 4](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/nodes/entry-and-directive.ts#L4), at commit af54ddad5
