---
hide_title: false
hide_table_of_contents: false
pagination_next: null
pagination_prev: null
---
# WeakRef

The **`WeakRef`** constructor creates a `WeakRef`
object referring to a given target object.

## Syntax

```js
new WeakRef(targetObject)
```

> **Note:** `WeakRef()` can only be constructed with `new`. Attempting to call it without `new` throws a [`TypeError`](../../globals/TypeError/TypeError.mdx).

### Parameters

- `targetObject`
  - : The target object the WeakRef should refer to (also called the _referent_).
