From b8d83eb5d585926a9de82f04dfcf1da708e39d1a Mon Sep 17 00:00:00 2001 From: Andy Hanson Date: Thu, 17 Aug 2017 13:01:55 -0700 Subject: [PATCH] backbone-associations: use `new() => T` instead of `typeof T` --- types/backbone-associations/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/backbone-associations/index.d.ts b/types/backbone-associations/index.d.ts index 9d0aa36614..b9d110f9fe 100644 --- a/types/backbone-associations/index.d.ts +++ b/types/backbone-associations/index.d.ts @@ -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); /** 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. */