Ember Data: further fix Snapshot.belongsTo, Snapshot.attr.

# Conflicts:
#	types/ember-data/index.d.ts
This commit is contained in:
Chris Krycho
2018-02-12 20:53:14 -07:00
parent 32035394c2
commit 4ae79aa5e8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -942,7 +942,7 @@ declare module 'ember-data' {
/**
* Returns the value of an attribute.
*/
attr<L extends keyof ModelRegistry[K]>(keyName: L): {};
attr<L extends keyof ModelRegistry[K]>(keyName: L): ModelRegistry[K][L];
/**
* Returns all attributes and their corresponding values.
*/
@@ -957,7 +957,7 @@ declare module 'ember-data' {
belongsTo<L extends keyof ModelRegistry & keyof ModelRegistry[K]>(
keyName: L,
options?: {}
): Snapshot<L> | string | null | undefined;
): Snapshot<K>['record'][L] | string | null | undefined;
/**
* Returns the current value of a hasMany relationship.
*/
+1 -1
View File
@@ -34,4 +34,4 @@
"test/injections.ts",
"test/error.ts"
]
}
}