Skip to content

Commit 4af61ea

Browse files
committed
Add types to options object
1 parent d9c2306 commit 4af61ea

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
@@ -4,6 +4,7 @@ import { pluralize } from 'ember-inflector';
44
import type { RequestSignature } from '@warp-drive/core-types/symbols';
55
import type { TypeFromInstance } from '@warp-drive/core-types/record';
66
import type { FindRecordOptions } from '@warp-drive/core-types/request';
7+
import type { UrlOptions } from '@ember-data/request-utils'
78

89
type MyRequest<Type> = {
910
url: string
@@ -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<UrlOptions> = {
2122
op: 'findRecord',
2223
identifier,
2324
resourcePath: pluralize(identifier.type),

0 commit comments

Comments
 (0)