UNPKG

igniteui-react-core

Version:
38 lines (37 loc) 1.27 kB
import { IgCollection } from './IgCollection'; import { SyncableObservableCollection$2 } from './SyncableObservableCollection$2'; import { markType } from './type'; import { ToolCommandArgument } from './ToolCommandArgument'; export class IgrToolCommandArgumentCollection extends IgCollection { constructor(list) { super(); if (!ToolCommandArgument.$type) { ToolCommandArgument.$type = markType(ToolCommandArgument, "ToolCommandArgument"); } if (list) { for (let i = 0; i < list.length; i++) { this.add(list[i]); } } } _createInnerColl() { if (!ToolCommandArgument.$type) { ToolCommandArgument.$type = markType(ToolCommandArgument, "ToolCommandArgument"); } let coll = new SyncableObservableCollection$2(ToolCommandArgument.$type, ToolCommandArgument.$type, 0); coll.compare = (ext, int) => { let comp = ext; if (comp.equals) { return comp.equals(int); } return comp === int; }; coll.createTo = (ext) => { return ext; }; coll.createFrom = (int) => { return int; }; return coll; } }