@types/object-refs
TypeScript icon, indicating that this package has built-in type declarations

0.1.5 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/object-refs

Weekly Downloads

174

Version

0.1.5

License

MIT

Unpacked Size

5.32 kB

Total Files

5

Last publish

Collaborators

  • types