Skip to content

Instantly share code, notes, and snippets.

@patrickmichalina
patrickmichalina / collection.ts
Created March 25, 2017 20:16
Paging example with hapi and typescript
import { applyToDefaults } from 'hoek';
import { Request } from 'hapi';
var URI = require('URIjs');
export class Collection {
public count: number;
constructor(public items: any[] = [], public total: number) {
this.count = this.items.length;
this.total = total || this.items.length;
}