Skip to content

Commit

Permalink
docs: fix return signature of peekRequest (emberjs#9161)
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired authored and Baltazore committed Dec 21, 2023
1 parent 022ec9d commit ef62094
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit ef62094

Please sign in to comment.