Skip to content

Commit 4f9572a

Browse files
authored
Merge pull request #16 from Baltazore/add-types-options
Add types to options object
2 parents d9c2306 + fa9d1ce commit 4f9572a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
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';
@@ -17,7 +18,7 @@ type MyRequest<Type> = {
1718
function findRecord<Type>(type: TypeFromInstance<Type>, id: string, options: FindRecordOptions<Type>): MyRequest<Type> {
1819
const identifier = { type, id };
1920

20-
const urlOptions = {
21+
const urlOptions: Partial<FindRecordUrlOptions> = {
2122
op: 'findRecord',
2223
identifier,
2324
resourcePath: pluralize(identifier.type),

0 commit comments

Comments
 (0)