4.0.7 • Published 4 months ago

@types/ember__ordered-set v4.0.7

Weekly downloads
21
License
MIT
Repository
github
Last release
4 months ago

Installation

npm install --save @types/ember__ordered-set

Summary

This package contains type definitions for @ember/ordered-set (https://github.com/emberjs/ember-ordered-set).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ember__ordered-set/v3.

index.d.ts

// Type definitions for @ember/ordered-set 3.0
// Project: https://github.com/emberjs/ember-ordered-set
// Definitions by: Chris Krycho <https://github.com/chriskrycho>
//                 Mike North <https://github.com/mike-north>
//                 Dan Freeman <https://github.com/dfreeman>
//                 James C. Davis <https://github.com/jamescdavis>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.7

/**
 * The `OrderedSet` class lets you store unique values of any type, whether
 * primitive values or object references. It is mostly similar to the native
 * `Set` class introduced in ES2015.
 */
export default class OrderedSet<T = unknown> {
    constructor();

    // Disable this to let users call like `OrderedSet.create<string>();`. This
    // is a rare case where it's preferable, because it's *much* briefer than
    // `let set: OrderedSet<string> = OrderedSet.create();`. If TS could infer
    // from usage what the type would be, this wouldn't be required, but until
    // it does, this is better than *not* allowing it.
    // tslint:disable-next-line:no-unnecessary-generics
    static create<T = unknown>(): OrderedSet<T>;

    add(value: T): this;
    clear(): void;
    delete(value: T): boolean;
    forEach(callbackfn: (this: undefined, value: T, value2: T, set: OrderedSet<T>) => void): void;
    forEach<Ctx>(callbackfn: (this: Ctx, value: T, value2: T, set: OrderedSet<T>) => void, context: Ctx): void;
    has(value: T): boolean;
    isEmpty(): boolean;
    toArray(): T[];
    copy(): OrderedSet<T>;
}

Additional Details

  • Last updated: Fri, 21 Jan 2022 19:02:08 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Chris Krycho, Mike North, Dan Freeman, and James C. Davis.

3.0.6

4 months ago

4.0.7

4 months ago

3.0.4

7 months ago

3.0.3

9 months ago

3.0.5

6 months ago

4.0.5

7 months ago

4.0.4

9 months ago

4.0.6

6 months ago

3.0.2

11 months ago

4.0.3

11 months ago

3.0.1

1 year ago

4.0.2

1 year ago

4.0.1

2 years ago

4.0.0

2 years ago

3.0.0

2 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

5 years ago