Skip to content
This repository was archived by the owner on Sep 22, 2024. It is now read-only.

Commit c0235e1

Browse files
committed
docs(service): adds better comments
1 parent 8801435 commit c0235e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: src/service/mod.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const createServiceRequest = (item: ItemServiceRequest): ServiceRequest => {
2828
// or at least $fetch/useFetch/unfetch client which supports
2929
// entire service request options (for example hooks, etc.)
3030
const invoke = async () => {
31+
// [variables] adds support for templated options via {{•}} syntax
3132
const { variables = {} } = item
3233
const { url, baseURL, method, headers, body } = replace(item, variables)
3334
const href = new URL(url, baseURL).href // ensures url is absolute and valid
@@ -48,7 +49,7 @@ export const createService = (api: ClientBuilder) => {
4849
const client = getClient(item)
4950

5051
const requests = item.requests.reduce((previousValue, currentValue, index) => {
51-
// NOTE: merges service.client (of service) with client (of service request)
52+
// [inheritance] merges service.client (of service) with client (of service request)
5253
const serviceRequest = createServiceRequest(merge(item.client, currentValue))
5354
return {
5455
...previousValue,

0 commit comments

Comments
 (0)