---
title: "WeakRefConstructor | 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 WeakRefConstructor

interface WeakRefConstructor {  
    new [WeakRefConstructor](#constructorweakrefconstructor)<[T](#constructorweakrefconstructort) extends [WeakKey](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.WeakKey/)\>(target: [T](#constructorweakrefconstructort)): [WeakRef](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WeakRef/)<[T](#constructorweakrefconstructort)\>;  
    [prototype](#prototype): [WeakRef](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WeakRef/)<any\>;  
}

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[prototype](#prototype)

## Constructors[](#constructors-1)

### constructor[](#constructor)

-   new WeakRefConstructor<[T](#constructorweakrefconstructort) extends [WeakKey](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.WeakKey/)\>(target: [T](#constructorweakrefconstructort)): [WeakRef](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WeakRef/)<[T](#constructorweakrefconstructort)\>[](#constructorweakrefconstructor)
    
    Creates a WeakRef instance for the given target value. In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
    
    #### Type Parameters
    
    -   T extends [WeakKey](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.WeakKey/)
    
    #### Parameters
    
    -   target: [T](#constructorweakrefconstructort)
        
        The target value for the WeakRef instance.
        
    
    #### Returns [WeakRef](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WeakRef/)<[T](#constructorweakrefconstructort)\>
    

## Properties[](#properties-1)

### `Readonly`prototype[](#prototype)

prototype: [WeakRef](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.WeakRef/)<any\>
