Add basic Backbone type definitions

This commit is contained in:
Daniel Gasienica 2018-04-13 21:55:21 -04:00
parent 9d84b2f420
commit e07458d886
2 changed files with 18 additions and 0 deletions

View file

@ -0,0 +1,11 @@
/**
* @prettier
*/
import { Model } from './Model';
export interface Collection<T> {
models: Array<Model<T>>;
// tslint:disable-next-line no-misused-new
new(): Collection<T>;
fetch(options: object): JQuery.Deferred<any, any, any>;
}

View file

@ -0,0 +1,7 @@
/**
* @prettier
*/
export interface Model<T> {
toJSON(): T;
}