MCPcopy Create free account
hub / github.com/Wscats/vscode-explore / constructor

Method constructor

contributes/src/vs/base/common/paging.ts:67–76  ·  view source on GitHub ↗
(arg: IPager<T> | T[])

Source from the content-addressed store, hash-verified

65 get length(): number { return this.pager.total; }
66
67 constructor(arg: IPager<T> | T[]) {
68 this.pager = isArray(arg) ? singlePagePager<T>(arg) : arg;
69
70 const totalPages = Math.ceil(this.pager.total / this.pager.pageSize);
71
72 this.pages = [
73 createPage(this.pager.firstPage.slice()),
74 ...range(totalPages - 1).map(() => createPage<T>())
75 ];
76 }
77
78 isResolved(index: number): boolean {
79 const pageIndex = Math.floor(index / this.pager.pageSize);

Callers

nothing calls this directly

Calls 6

isArrayFunction · 0.90
rangeFunction · 0.90
singlePagePagerFunction · 0.85
createPageFunction · 0.85
sliceMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected