Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix return signature of peekRequest #9161

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/core-types/src/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,13 @@ export interface Cache {
* Peek the Cache for the existing request data associated with
* a cacheable request
*
* This is effectively the reverse of `put` for a request in
* that it will return the the request, response, and content
* whereas `peek` will return just the `content`.
*
* @method peekRequest
* @param {StableDocumentIdentifier}
* @return {StableDocumentIdentifier | null}
* @return {StructuredDocument<ResourceDocument> | null}
* @public
*/
peekRequest(identifier: StableDocumentIdentifier): StructuredDocument<ResourceDocument> | null;
Expand Down
8 changes: 6 additions & 2 deletions packages/json-api/src/-private/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,11 +481,15 @@ export default class JSONAPICache implements Cache {

/**
* Peek the Cache for the existing request data associated with
* a cacheable request
* a cacheable request.
*
* This is effectively the reverse of `put` for a request in
* that it will return the the request, response, and content
* whereas `peek` will return just the `content`.
*
* @method peekRequest
* @param {StableDocumentIdentifier}
* @return {StableDocumentIdentifier | null}
* @return {StructuredDocument<ResourceDocument> | null}
* @public
*/
peekRequest(identifier: StableDocumentIdentifier): StructuredDocument<ResourceDocument> | null {
Expand Down