weave / op
Function: op()
op(fn, options)
op<동기 및 비동기 함수에서 작동하는 함수나 메서드를 weave op화하는 래퍼입니다. 래핑된 함수:T
>(fn
,options
?):Op
<(…args
) =>Promise
<Awaited
<ReturnType
<T
>>>>
- 원래 함수와 동일한 입력을 받고 동일한 출력을 반환합니다.
- Weave UI에서 호출을 자동으로 추적합니다.
weave.init
를 호출하지 않으면 함수는 래핑되지 않은 것처럼 동작합니다.
타입 매개변수
• T extends (…args
) => any
매개변수
• fn:T
래핑할 함수
• options?: OpOptions
<T
>
호출 및 매개변수 이름 지정과 같은 선택적 구성
반환
Op
<(…args
) => Promise
<Awaited
<ReturnType
<T
>>>>
래핑된 함수
예시
정의된 곳
op.ts:58op(thisArg, fn, options)
op<T
>(thisArg
,fn
,options
?):Op
<(…args
) =>Promise
<Awaited
<ReturnType
<T
>>>>
타입 매개변수
• T extends (…args
) => any
매개변수
• thisArg:any
• fn: T
• options?: OpOptions
<T
>
반환
Op
<(…args
) => Promise
<Awaited
<ReturnType
<T
>>>>