From 4ae79aa5e8cbc90081a7f644e1305ca8b3ca3672 Mon Sep 17 00:00:00 2001 From: Chris Krycho Date: Mon, 12 Feb 2018 20:30:08 -0700 Subject: [PATCH] Ember Data: further fix `Snapshot.belongsTo`, `Snapshot.attr`. # Conflicts: # types/ember-data/index.d.ts --- types/ember-data/index.d.ts | 4 ++-- types/ember-data/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/types/ember-data/index.d.ts b/types/ember-data/index.d.ts index c23c8cb59f..a2ad80faff 100644 --- a/types/ember-data/index.d.ts +++ b/types/ember-data/index.d.ts @@ -942,7 +942,7 @@ declare module 'ember-data' { /** * Returns the value of an attribute. */ - attr(keyName: L): {}; + attr(keyName: L): ModelRegistry[K][L]; /** * Returns all attributes and their corresponding values. */ @@ -957,7 +957,7 @@ declare module 'ember-data' { belongsTo( keyName: L, options?: {} - ): Snapshot | string | null | undefined; + ): Snapshot['record'][L] | string | null | undefined; /** * Returns the current value of a hasMany relationship. */ diff --git a/types/ember-data/tsconfig.json b/types/ember-data/tsconfig.json index 0845f9e795..399268d6b2 100644 --- a/types/ember-data/tsconfig.json +++ b/types/ember-data/tsconfig.json @@ -34,4 +34,4 @@ "test/injections.ts", "test/error.ts" ] -} \ No newline at end of file +}