Add basic Backbone type definitions
parent
9d84b2f420
commit
e07458d886
@ -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>;
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* @prettier
|
||||||
|
*/
|
||||||
|
|
||||||
|
export interface Model<T> {
|
||||||
|
toJSON(): T;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue