From c4960346d7ae3c29f3a7567d9c20cbf4844b5383 Mon Sep 17 00:00:00 2001 From: kukeiko Date: Thu, 28 Dec 2017 19:34:33 +0100 Subject: [PATCH] fix: identity literal typing was missing @ d.ts + ts to 2.6.2 see https://github.com/Microsoft/TypeScript/issues/15881 --- package.json | 4 ++-- src/elements/identity.ts | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3b3cd3a3..ab9a72ce 100644 --- a/package.json +++ b/package.json @@ -48,8 +48,8 @@ "reflect-metadata": "0.1.10", "rimraf": "2.6.1", "tslint": "4.5.1", - "typescript": "2.4.2", + "typescript": "2.6.2", "webpack": "2.3.2", "webpack-dev-server": "2.4.2" } -} \ No newline at end of file +} diff --git a/src/elements/identity.ts b/src/elements/identity.ts index e8fd1c62..4905c0eb 100644 --- a/src/elements/identity.ts +++ b/src/elements/identity.ts @@ -63,7 +63,8 @@ export abstract class IdentityBase { * Points to all entities. */ export class All extends IdentityBase { - readonly type = "all"; + // we have to explicitly state the type, otherwise its missing @ d.ts + readonly type: "all" = "all"; /** @inheritdoc */ readonly priority = 0; @@ -82,7 +83,8 @@ export class All extends IdentityBase { * Points a set of entities specified by their primary keys. */ export class ByIds extends IdentityBase { - readonly type = "ids"; + // we have to explicitly state the type, otherwise its missing @ d.ts + readonly type: "ids" = "ids"; /** @inheritdoc */ readonly priority = 1; @@ -119,7 +121,8 @@ export class ByIds extends IdentityBase { * Points to a set of entities specified by the values of indexed properties. */ export class ByIndexes extends IdentityBase { - readonly type = "indexes"; + // we have to explicitly state the type, otherwise its missing @ d.ts + readonly type: "indexes" = "indexes"; /** @inheritdoc */ readonly priority = 2;