Skip to content

Commit fa9d1ce

Browse files
committed
Update with better type
1 parent 40a2e26 commit fa9d1ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

snippets/fetching-data/find-record/own-builder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// Bring your own builder
22
import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils'
33
import { pluralize } from 'ember-inflector';
4+
import type { FindRecordUrlOptions } from '@ember-data/request-utils';
45
import type { RequestSignature } from '@warp-drive/core-types/symbols';
56
import type { TypeFromInstance } from '@warp-drive/core-types/record';
67
import type { FindRecordOptions } from '@warp-drive/core-types/request';
7-
import type { UrlOptions } from '@ember-data/request-utils';
88

99
type MyRequest<Type> = {
1010
url: string
@@ -18,7 +18,7 @@ type MyRequest<Type> = {
1818
function findRecord<Type>(type: TypeFromInstance<Type>, id: string, options: FindRecordOptions<Type>): MyRequest<Type> {
1919
const identifier = { type, id };
2020

21-
const urlOptions: Partial<UrlOptions> = {
21+
const urlOptions: Partial<FindRecordUrlOptions> = {
2222
op: 'findRecord',
2323
identifier,
2424
resourcePath: pluralize(identifier.type),

0 commit comments

Comments
 (0)