Skip to content

Commit 02ee24b

Browse files
committed
fix: update readme error
1 parent d75c0c2 commit 02ee24b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,13 @@ When succeded with OK, the data comes in the `AspiSuccessOk` type, where additio
204204

205205
By default, the response is not wrapped in the Result type. It will be a tuple of the value and error. both can be null but only one will be non-null at a time. If you want the response to be wrapped in the Result type, you can call `withResult` method on the response.
206206

207-
````typescript
207+
```typescript
208208
const response = await new Aspi({ baseUrl: '...' })
209209
.get('...')
210210
.json<{ data: any }>();
211211

212212
// [AspiResultOk<AspiRequestInit, { data: any; }> | null, JSONParseError | AspiError<AspiRequestInit> | null]
213-
```typescript
213+
```
214214

215215
The above response is a tuple of the value and error. The value itself is wrapped in the AspiResultOk type. It contains the request and response information as well as the data. If you want the response to be wrapped in the Result type, you can call `withResult` method on the response.
216216

@@ -221,7 +221,7 @@ const response = await new Aspi({ baseUrl: '...' })
221221
.json<{ data: any }>();
222222

223223
// Result<AspiResultOk<AspiRequestInit, { data: any; }>, JSONParseError | AspiError<AspiRequestInit>>
224-
```typescript
224+
```
225225

226226
The above response is a Result type. It can be pattern matched using any pattern matching library. We also pack one custom Result implementation that can be used to pattern match the response.
227227

@@ -244,7 +244,7 @@ const resultWithoutError = Result.pipe(
244244
.execute();
245245

246246
// Result<AspiResultOk<AspiRequestInit, { data: any; }>, never>
247-
````
247+
```
248248

249249
##### Schema Validation
250250

0 commit comments

Comments
 (0)