UNPKG

882 BTypeScriptView Raw
1import { HasGuid } from './guid';
2import { Option } from './platform-utils';
3import { Dict, Stack } from '@glimmer/interfaces';
4export interface Set<T> {
5 add(value: T): Set<T>;
6 delete(value: T): void;
7}
8export declare function dict<T = unknown>(): Dict<T>;
9export declare function isDict<T>(u: T): u is Dict & T;
10export declare function isObject<T>(u: T): u is object & T;
11export declare type SetMember = HasGuid | string;
12export declare class DictSet<T extends SetMember> implements Set<T> {
13 private dict;
14 constructor();
15 add(obj: T): Set<T>;
16 delete(obj: T): void;
17}
18export declare class StackImpl<T> implements Stack<T> {
19 private stack;
20 current: Option<T>;
21 get size(): number;
22 push(item: T): void;
23 pop(): Option<T>;
24 nth(from: number): Option<T>;
25 isEmpty(): boolean;
26 toArray(): T[];
27}
28//# sourceMappingURL=collections.d.ts.map
\No newline at end of file