Skip to content

Commit a710f83

Browse files
author
Elias Mulhall
committed
Update Docs
1 parent f70f00c commit a710f83

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

docs/classes/_decoder_.decoder.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,19 @@ Note that `constant('string to match')` returns a `Decoder<string>` which fails
386386

387387
Providing the type parameter is only necessary for type-literal strings and numbers, as detailed by this table:
388388

389-
| Decoder | Type |
390-
| ---------------------------- | ----------------- |
391-
| constant(true) | Decoder<true> |
392-
| constant(false) | Decoder<false> |
393-
| constant(null) | Decoder<null> |
394-
| constant('alaska') | Decoder<string> |
395-
| constant<'alaska'>('alaska') | Decoder<'alaska'> |
396-
| constant(50) | Decoder<number> |
397-
| constant<50>(50) | Decoder<50> |
389+
| Decoder | Type |
390+
| ---------------------------- | ---------------------|
391+
| constant(true) | Decoder<true> |
392+
| constant(false) | Decoder<false> |
393+
| constant(null) | Decoder<null> |
394+
| constant('alaska') | Decoder<string> |
395+
| constant<'alaska'>('alaska') | Decoder<'alaska'> |
396+
| constant(50) | Decoder<number> |
397+
| constant<50>(50) | Decoder<50> |
398+
| constant([1,2,3]) | Decoder<number[]> |
399+
| constant<[1,2,3]>([1,2,3]) | Decoder<[1,2,3]> |
400+
| constant({x: 't'}) | Decoder<{x: string}> |
401+
| constant<{x: 't'}>({x: 't'}) | Decoder<{x: 't'}> |
398402

399403
One place where this happens is when a type-literal is in an interface:
400404

0 commit comments

Comments
 (0)