mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
adjusted the tests. Added the possible arguments to the generic constructor.
This commit is contained in:
@@ -179,7 +179,7 @@ module Marionette.Tests {
|
||||
}
|
||||
}
|
||||
|
||||
class MyCollectionView extends Marionette.CollectionView<MyModel> {
|
||||
class MyCollectionView extends Marionette.CollectionView<MyModel, MyView> {
|
||||
constructor() {
|
||||
this.childView = MyView;
|
||||
this.childEvents = {
|
||||
|
||||
6
marionette/marionette.d.ts
vendored
6
marionette/marionette.d.ts
vendored
@@ -864,7 +864,7 @@ declare module Marionette {
|
||||
* Backbone view object definition, not an instance. It can be any
|
||||
* Backbone.View or be derived from Marionette.ItemView
|
||||
*/
|
||||
childView: new () => TView;
|
||||
childView: new (...args:any[]) => TView;
|
||||
|
||||
/**
|
||||
* There may be scenarios where you need to pass data from your parent
|
||||
@@ -995,7 +995,7 @@ declare module Marionette {
|
||||
* instantiated when a Model needs to be initially rendered. This method
|
||||
* also gives you the ability to customize per Model ChildViews.
|
||||
*/
|
||||
getChildView<M extends Backbone.Model>(item: M): new () => TView;
|
||||
getChildView<M extends Backbone.Model>(item: M): new (...args:any[]) => TView;
|
||||
|
||||
/**
|
||||
* If you need the emptyView's class chosen dynamically, specify
|
||||
@@ -1058,7 +1058,7 @@ declare module Marionette {
|
||||
* CompositeView's template is rendered and the childView's templates are
|
||||
* added to this.
|
||||
*/
|
||||
childView: new () => TView;
|
||||
childView: new (...args:any[]) => TView;
|
||||
|
||||
/**
|
||||
* By default the composite view uses the same attachHtml method that the
|
||||
|
||||
Reference in New Issue
Block a user