---
title: "GPUCompilationMessage | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

# Interface GPUCompilationMessage

The **`GPUCompilationMessage`** interface of the WebGPU API represents a single informational, warning, or error message generated by the GPU shader module compiler. Available only in secure contexts.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage)

interface GPUCompilationMessage {  
    [length](#length): number;  
    [lineNum](#linenum): number;  
    [linePos](#linepos): number;  
    [message](#message): string;  
    [offset](#offset): number;  
    [type](#type): [GPUCompilationMessageType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GPUCompilationMessageType/);  
}

##### Index

### Properties[](#properties)

[length](#length) [lineNum](#linenum) [linePos](#linepos) [message](#message) [offset](#offset) [type](#type)

## Properties[](#properties-1)

### `Readonly`length[](#length)

length: number

The **`length`** read-only property of the GPUCompilationMessage interface is a number representing the length of the substring that the message corresponds to.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/length)

### `Readonly`lineNum[](#linenum)

lineNum: number

The **`lineNum`** read-only property of the GPUCompilationMessage interface is a number representing the line number in the shader code that the message corresponds to.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/lineNum)

### `Readonly`linePos[](#linepos)

linePos: number

The **`linePos`** read-only property of the GPUCompilationMessage interface is a number representing the position in the code line that the message corresponds to. This could be an exact point, or the start of the relevant substring.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/linePos)

### `Readonly`message[](#message)

message: string

The **`message`** read-only property of the GPUCompilationMessage interface is a string representing human-readable message text.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/message)

### `Readonly`offset[](#offset)

offset: number

The **`offset`** read-only property of the GPUCompilationMessage interface is a number representing the offset from the start of the shader code to the exact point, or the start of the relevant substring, that the message corresponds to.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/offset)

### `Readonly`type[](#type)

type: [GPUCompilationMessageType](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GPUCompilationMessageType/)

The **`type`** read-only property of the GPUCompilationMessage interface is an enumerated value representing the type of the message. Each type represents a different severity level.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/GPUCompilationMessage/type)
