本文整理汇总了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()
}
};
};
示例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());
}
示例3: toJS
public toJS(): LinkViewConfigJS {
return {
title: this.title,
linkItems: this.linkItems.toArray().map(linkItem => linkItem.toJS())
};
}
示例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());
}
示例5: transform
transform(items: List<StoreModel>, ...args: any[]): any {
var arr = items.toArray();
return arr;
}
示例6: data
get data(): Score[] {
return this._data.toArray();
}
示例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());
}
}
示例8: popUpConfig
get popUpConfig(): number[] {
return this._popUpConfig.toArray();
}
示例9: selectedNodes
get selectedNodes(): any[] {
return this._selectedNodes.toArray();
}