Skip to content

ancestorsOf

@tsed/core

Usage

typescript
import { ancestorsOf } from "@tsed/core";

See /packages/core/src/utils/ancestorsOf.ts.

Overview

ts
function ancestorsOf(target: any): any[];

Description

Returns all ancestor classes in the prototype chain of the target.

Traverses the prototype chain from the target's class up to the root, returning an array of all named constructor functions encountered.

Released under the MIT License.