Skip to content

Commit

Permalink
[update] 주석 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongbaebang committed Jul 5, 2023
1 parent ae8e276 commit afc5286
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import { createOn, createPromiseRecursiveFn, promisify } from './utils/fn';
* **Note:** Regardless of the value passed as the first argument, it will always be wrapped in a promise and passed as an argument.
*
* @param callbacks An array of callback functions to be executed in the `then` method.
* @param option (optional): An optional object that provides onError, onSettled and onSuccess callback functions.
* @param option (optional): An optional object that provides onError, onSettled, and onSuccess callback functions.
* @returns A `Promise` object.
*
* @example
* ```typescript
* // Promisify and execute a sequence of callback functions
* vigilAsync(placeId, [getPlaceDetailResult, createAddress], {
* onError: () => {
* return mapErrorHandler(location, ErrorType.network);
Expand All @@ -23,6 +24,15 @@ import { createOn, createPromiseRecursiveFn, promisify } from './utils/fn';
* cache.set(data.place_id, data);
* },
* });
*
* vigilAsync([placeId, getPlaceDetailResult, createAddress], {
* onError: () => {
* return mapErrorHandler(location, ErrorType.network);
* },
* onSuccess: data => {
* cache.set(data.place_id, data);
* },
* });
* ```
*/

Expand Down

0 comments on commit afc5286

Please sign in to comment.