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