mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-12 12:10:44 +08:00
Merge branch 'master' into rename-repo-url
This commit is contained in:
@@ -3,8 +3,8 @@
|
||||
|
||||
// borrowed from the Backbone.Associations tutorials
|
||||
// separated out into modules to avoid namespace clashes
|
||||
module Backbone.Associations.Tests {
|
||||
module OneToOne {
|
||||
namespace Backbone.Associations.Tests {
|
||||
namespace OneToOne {
|
||||
class EmployeeWithManager extends Backbone.AssociatedModel {
|
||||
constructor(options?) {
|
||||
super(options);
|
||||
@@ -28,7 +28,7 @@ module Backbone.Associations.Tests {
|
||||
}
|
||||
}
|
||||
|
||||
module OneToMany {
|
||||
namespace OneToMany {
|
||||
class Location extends Backbone.AssociatedModel {
|
||||
defaults() {
|
||||
return {
|
||||
@@ -76,4 +76,4 @@ module Backbone.Associations.Tests {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
/// <reference path="../backbone/backbone.d.ts" />
|
||||
|
||||
declare module Backbone {
|
||||
declare namespace Backbone {
|
||||
export module Associations {
|
||||
/** Defines a 1:Many relationship type */
|
||||
export var Many: string;
|
||||
@@ -41,7 +41,7 @@ declare module Backbone {
|
||||
/** A transformation function to convert the value before it is assigned to the key on the relatedModel */
|
||||
map?: (...args: any[]) => any;
|
||||
}
|
||||
|
||||
|
||||
/** A Backbone model with special provision for handling relations to other models */
|
||||
export class AssociatedModel extends Backbone.Model {
|
||||
/** Relations with their associated model */
|
||||
@@ -72,4 +72,4 @@ declare module Backbone {
|
||||
/** Cleans up any parent relations on other AssociatedModels */
|
||||
cleanup(): void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user