mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
The following syntax is supported in Backbone, but is currently not compileable in Typescript:
var data = [
{ id: 1, bar: 'foo' },
{ id: 2, bar: 'baz' }
];
var myCollection = new Backbone.Collection(data);
As of now, the constructor expects an array of models. I've added the Object[] parameter type, in addition to the TModel[] type to support this syntax.