当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript List.toArray方法代码示例

本文整理汇总了TypeScript中Immutable.List.toArray方法的典型用法代码示例。如果您正苦于以下问题:TypeScript List.toArray方法的具体用法?TypeScript List.toArray怎么用?TypeScript List.toArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Immutable.List的用法示例。


在下文中一共展示了List.toArray方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: convertFromRichToData

export const convertFromBaseStateToData = (
    baseState: BaseState,
    baseProps: {
        comPath: string;
        childData: any;
    },
    offset: IOffset = { x: 0, y: 0 }
): {
        t: string;
        p: IComData
    } => {
    const content: ContentState = baseState.getCurrentContent();
    const sizeState: SizeState = content.getSizeState();
    const positionState: PositionState = content.getPositionState();
    const richChildNode: any = content.getRichChildNode();
    const commentsList: List<ICommentsList> = content.getCommentsList();
    const customState: any = content.getCustomState();

    return {
        t: baseProps.comPath,
        p: {
            id: content.getCid(),
            txt_v: convertFromRichToData(richChildNode, baseProps.comPath),
            w: sizeState.getWidth(),
            h: sizeState.getHeight(),
            l: positionState.getLeft() - offset.x,
            t: positionState.getTop() - offset.y,
            p: baseProps.childData,
            zIndex: content.getZIndex(),
            customState: convertFromCustomStateToData(customState, baseProps.comPath, offset),
            commentsList: commentsList.toArray(),
            comType: content.getComType()
        }
    };
};
开发者ID:xprst,项目名称:xprst-com,代码行数:35,代码来源:convertFromBaseStateToData.ts

示例2: immutableArraysEqual

export function immutableListsEqual<T extends Equalable>(listA: List<T>, listB: List<T>): boolean {
  if (listA === listB) return true;
  if (!listA !== !listB) return false;
  return immutableArraysEqual(listA.toArray(), listB.toArray());
}
开发者ID:fengweijp,项目名称:pivot,代码行数:5,代码来源:general.ts

示例3: toJS

 public toJS(): LinkViewConfigJS {
   return {
     title: this.title,
     linkItems: this.linkItems.toArray().map(linkItem => linkItem.toJS())
   };
 }
开发者ID:coconutpalm,项目名称:pivot,代码行数:6,代码来源:link-view-config.ts

示例4: arraysEqual

export function listsEqual<T>(listA: List<T>, listB: List<T>): boolean {
  if (listA === listB) return true;
  if (!listA || !listB) return false;
  return arraysEqual(listA.toArray(), listB.toArray());
}
开发者ID:codeaudit,项目名称:pivot,代码行数:5,代码来源:general.ts

示例5: transform

 transform(items: List<StoreModel>, ...args: any[]): any {
     var arr = items.toArray();
     return arr;
 }
开发者ID:born2net,项目名称:signagestudio_web-lite,代码行数:4,代码来源:list-to-array-pipe.ts

示例6: data

 get data(): Score[] {
   return this._data.toArray();
 }
开发者ID:bradyhouse,项目名称:house,代码行数:3,代码来源:score.service.ts

示例7: check

  check() {
    expect(this._issue.key).toEqual(this._key);
    expect(this._issue.projectCode).toEqual(IssueUtil.productCodeFromKey(this._key));
    if (this._assignee) {
      expect(this._issue.assignee).toBe(this._assignee);
    } else {
      expect(this._issue.assignee).not.toEqual(jasmine.anything());
    }

    expect(this._issue.priority).toBe(this._priority);
    expect(this._issue.type).toBe(this._type);

    if (this._components) {
      this.checkMultiSelectStringFieldValues(this._issue.components.toArray(), this._components);
    } else {
      expect(this._issue.components).not.toEqual(jasmine.anything());
    }

    if (this._labels) {
      this.checkMultiSelectStringFieldValues(this._issue.labels.toArray(), this._labels);
    } else {
      expect(this._issue.labels).not.toEqual(jasmine.anything());
    }

    if (this._fixVersions) {
      this.checkMultiSelectStringFieldValues(this._issue.fixVersions.toArray(), this._fixVersions);
    } else {
      expect(this._issue.fixVersions).not.toEqual(jasmine.anything(), this._issue.key);
    }

    if (this._summary) {
      expect(this._issue.summary).toEqual(this._summary);
    }

    expect(this._issue.ownState).toBe(this._ownState);

    if (this._linkedIssues) {
      expect(this._issue.linkedIssues).toBeTruthy();
      expect(this._issue.linkedIssues.size).toEqual(this._linkedIssues.length);
      this._issue.linkedIssues.forEach((issue, index) => {
        this._linkedIssues[index].check(this._issue.linkedIssues.get(index));
      });
    } else {
      expect(this._issue.linkedIssues).toBeTruthy();
      expect(this._issue.linkedIssues.size).toEqual(0);
    }

    if (this._customFields) {
      const issueFieldNames: string[] = this._issue.customFields.keySeq().toArray().sort();
      const expectedFieldNames: string[] = Object.keys(this._customFields);
      expect(expectedFieldNames).toEqual(issueFieldNames);

      for (const fieldName of issueFieldNames) {
        const customField: CustomField = this._issue.customFields.get(fieldName);
        const expectedField: CustomField = this._customFields[fieldName];
        expect(customField).toEqual(jasmine.anything());
        expect(customField.key).toEqual(expectedField.key);
        expect(customField.value).toEqual(expectedField.value);
      }
    } else {
      expect(this._issue.customFields).toEqual(Map<string, CustomField>());
    }

    if (this._parallelTasks) {
      const options: List<number> = this._issue.selectedParallelTasks;
      expect(options.toArray()).toEqual(this._parallelTasks);
    } else {
      expect(this._issue.selectedParallelTasks).not.toEqual(jasmine.anything());
    }
  }
开发者ID:rsvoboda,项目名称:overbaard-redux,代码行数:70,代码来源:issue.model.spec.ts

示例8: popUpConfig

 get popUpConfig(): number[] {
   return this._popUpConfig.toArray();
 }
开发者ID:bradyhouse,项目名称:bradyhouse.github.io,代码行数:3,代码来源:pop-up.service.ts

示例9: selectedNodes

 get selectedNodes(): any[] {
   return this._selectedNodes.toArray();
 }
开发者ID:bradyhouse,项目名称:house,代码行数:3,代码来源:state.service.ts


注:本文中的Immutable.List.toArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。