mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-31 11:40:47 +08:00
Backbone tests added
This commit is contained in:
+20
-1
@@ -67,4 +67,23 @@ note.get("title")
|
||||
|
||||
note.set({title: "March 20", content: "In his eyes she eclipses..."});
|
||||
|
||||
note.set("title", "A Scandal in Bohemia");
|
||||
note.set("title", "A Scandal in Bohemia");
|
||||
|
||||
//////////
|
||||
|
||||
class Employee extends Backbone.Model {
|
||||
reports: EmployeeCollection;
|
||||
|
||||
constructor (options? ) {
|
||||
super(options);
|
||||
this.reports = new EmployeeCollection();
|
||||
this.reports.url = '../api/employees/' + this.id + '/reports';
|
||||
}
|
||||
}
|
||||
|
||||
class EmployeeCollection extends Backbone.Collection {
|
||||
|
||||
url: string = "../api/employees";
|
||||
model = Employee;
|
||||
findByName(key) {}
|
||||
}
|
||||
Reference in New Issue
Block a user