File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
snippets/fetching-data/find-record Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { pluralize } from 'ember-inflector';
4
4
import type { RequestSignature } from '@warp-drive/core-types/symbols' ;
5
5
import type { TypeFromInstance } from '@warp-drive/core-types/record' ;
6
6
import type { FindRecordOptions } from '@warp-drive/core-types/request' ;
7
+ import type { UrlOptions } from '@ember-data/request-utils'
7
8
8
9
type MyRequest < Type > = {
9
10
url : string
@@ -17,7 +18,7 @@ type MyRequest<Type> = {
17
18
function findRecord < Type > ( type : TypeFromInstance < Type > , id : string , options : FindRecordOptions < Type > ) : MyRequest < Type > {
18
19
const identifier = { type, id } ;
19
20
20
- const urlOptions = {
21
+ const urlOptions : Partial < UrlOptions > = {
21
22
op : 'findRecord' ,
22
23
identifier,
23
24
resourcePath : pluralize ( identifier . type ) ,
You can’t perform that action at this time.
0 commit comments