私は次のコードを持っています:
class Student extends Backbone.Model {
// id, lastname, firstname, birthdate
}
class StudentList extends Backbone.Collection {
model = Student;
...
}
私はいつもこのようなエラーが発生します。
Type of overridden member 'model' is not subtype of original member defined by type 'Collection' ...
公式の例では、ほぼ同じコードです。そこで動作します (Todo->TodoList)。私の backbone.d.ts での Collection の宣言はこれです。
...
model:Model;
...
何か案は?