Skip to content

Commit

Permalink
Merge pull request #16 from Baltazore/add-types-options
Browse files Browse the repository at this point in the history
Add types to options object
  • Loading branch information
jaredgalanis authored Jul 8, 2024
2 parents d9c2306 + fa9d1ce commit 4f9572a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion snippets/fetching-data/find-record/own-builder.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Bring your own builder
import { buildBaseURL, buildQueryParams } from '@ember-data/request-utils'
import { pluralize } from 'ember-inflector';
import type { FindRecordUrlOptions } from '@ember-data/request-utils';
import type { RequestSignature } from '@warp-drive/core-types/symbols';
import type { TypeFromInstance } from '@warp-drive/core-types/record';
import type { FindRecordOptions } from '@warp-drive/core-types/request';
Expand All @@ -17,7 +18,7 @@ type MyRequest<Type> = {
function findRecord<Type>(type: TypeFromInstance<Type>, id: string, options: FindRecordOptions<Type>): MyRequest<Type> {
const identifier = { type, id };

const urlOptions = {
const urlOptions: Partial<FindRecordUrlOptions> = {
op: 'findRecord',
identifier,
resourcePath: pluralize(identifier.type),
Expand Down

0 comments on commit 4f9572a

Please sign in to comment.