# declaringPrototype() function · @imqueue/pg-cache

Source: https://imqueue.org/api/pg-cache/latest/pg-cache.declaringprototype/
Published: 2026-08-04
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-cache 5.0.6 — generated reference, not hand-written

Walks up from a constructed instance to the prototype that actually declares the given method, mirroring legacy decoration where the decorator target is the declaring prototype. Falls back to the instance's own prototype.

**Signature:**

```typescript
export declare function declaringPrototype(instance: any, methodName: string): any;
```

## Parameters


| Parameter | Type | Description |
| --- | --- | --- |
| instance | any | `this` inside a standard decorator initializer |
| methodName | string | method to locate on the prototype chain |


**Returns:**

any

the declaring prototype

