mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-10 09:40:21 +08:00
backbone-associations: use new() => T instead of typeof T
This commit is contained in:
4
types/backbone-associations/index.d.ts
vendored
4
types/backbone-associations/index.d.ts
vendored
@@ -25,14 +25,14 @@ declare module 'backbone' {
|
||||
|
||||
interface IRelation {
|
||||
/** The type of model for this relationship */
|
||||
relatedModel: string|typeof Backbone.Associations.AssociatedModel;
|
||||
relatedModel: string | (new() => AssociatedModel);
|
||||
/** The key for this relationship on this model */
|
||||
key: string;
|
||||
// meh, no string enums in TS. Just have to trust the user not to be a fool
|
||||
/** The cardinality of this relationship. */
|
||||
type: string;
|
||||
/** Determines the type of collection used. If used, the relatedModel property is ignored */
|
||||
collectionType?: typeof Backbone.Collection|string;
|
||||
collectionType?: string | (new() => Backbone.Collection<any>);
|
||||
/** If set to true, then the attribute will not be serialized in toJSON() calls. Defaults to false */
|
||||
isTransient?: boolean;
|
||||
/** Specify remoteKey to serialize the key to a different key name in toJSON() calls. Useful in ROR nested-attributes like scenarios. */
|
||||
|
||||
Reference in New Issue
Block a user