---
title: "WgslMessage: interface in Variants, TypeShade API reference"
description: "WgslMessage, an interface in Variants. One compilation message, narrowed to what a gate reports."
url: https://typeshade.dev/api/wgslmessage/
language: en
---

# `WgslMessage`

Interface in Variants

One compilation message, narrowed to what a gate reports.

`import type { WgslMessage } from 'typeshade'`

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

## Syntax

```ts
interface WgslMessage {
  readonly type: string;
  readonly message: string;
  readonly lineNum?: number;
}
```

## Description

Mirrors `GPUCompilationMessage` without depending on its type.

## Instance properties

**`type` read only `string`**

**`message` read only `string`**

**`lineNum` optional read only `number`**

## Source

[`src/core/variant-link.ts`, line 187](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/variant-link.ts#L187), at commit af54ddad5
