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

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Interface WeakRef<T>

interface WeakRef<[T](#t) extends [WeakKey](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.WeakKey/)\> {  
    ["\[toStringTag\]"](#tostringtag): "WeakRef";  
    [deref](#deref-1)(): [T](#t) | undefined;  
}

#### Type Parameters

-   T extends [WeakKey](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.WeakKey/)

##### Index

### Properties[](#properties)

[\[toStringTag\]](#tostringtag)

### Methods[](#methods)

[deref](#deref)

## Properties[](#properties-1)

### `Readonly`\[toStringTag\][](#tostringtag)

"\[toStringTag\]": "WeakRef"

## Methods[](#methods-1)

### deref[](#deref)

-   deref(): [T](#t) | undefined[](#deref-1)
    
    Returns the WeakRef instance's target value, or undefined if the target value has been reclaimed. In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
    
    #### Returns [T](#t) | undefined
