# @types/object-refs

> TypeScript definitions for object-refs

Latest version **0.1.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/object-refs
pnpm add @types/object-refs
yarn add @types/object-refs
bun add @types/object-refs
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2023-11-07 |
| First published | 2016-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/object-refs
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-refs
- npm.io page: https://npm.io/package/@types/object-refs

## Recent versions

- 0.1.5 (latest) — 2023-11-07
- 0.1.3 (ts4.3) — 2023-09-03
- 0.1.2 (ts3.6) — 2021-07-08
- 0.1.1 (ts2.0) — 2016-10-05
- 0.1.4 — 2023-10-18

## README

# Installation
> `npm install --save @types/object-refs`

# Summary
This package contains type definitions for object-refs (https://github.com/bpmn-io/object-refs).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-refs.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/object-refs/index.d.ts)
````ts
export = Refs;

declare class Refs {
    /**
     * Creates a new references object defining two inversly related
     * attribute descriptors a and b.
     * @param {Refs.AttributeDescriptor} a property descriptor
     * @param {Refs.AttributeDescriptor} b property descriptor
     */
    constructor(a: Refs.AttributeDescriptor, b: Refs.AttributeDescriptor);

    /**
     * Binds one side of a bi-directional reference to a target object.
     * @param {*} target
     * @param {string|Refs.AttributeDescriptor} property
     */
    bind(target: any, property: string | Refs.AttributeDescriptor): void;

    ensureBound(target: any, property: string | Refs.AttributeDescriptor): void;

    ensureRefsCollection(target: any, property: Refs.AttributeDescriptor): any;

    set(target: any, property: string | Refs.AttributeDescriptor, value: any): void;

    unset(target: any, property: string | Refs.AttributeDescriptor, value: any): void;
}

declare namespace Refs {
    interface AttributeDescriptor {
        name: string;
        collection?: boolean | undefined;
        enumerable?: boolean | undefined;
    }

    namespace Collection {
        /** Extends a collection with Refs aware methods */
        function extend(collection: any[], refs: Refs, property: string | AttributeDescriptor, target: any): any;

        function isExtended(collection: any[]): boolean;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: none

# Credits
These definitions were written by [Jan Steinbruecker](https://github.com/3fd).

---
_Source: https://npm.io/package/@types/object-refs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
