This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // First, let's define the generic result type | |
| type Success<T> = { | |
| success: true; | |
| value: T; | |
| }; | |
| // Pay attention to the fact that | |
| // Error is not a generic type | |
| // we will use it for our advantage | |
| type Error = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Don't forget to enable autoprefixer. | |
| // The escape-svg() function and checkmark SVG are taken from Bootstrap. | |
| $escaped-characters: ( | |
| ('<', '%3c'), | |
| ('>', '%3e'), | |
| ('#', '%23'), | |
| ('(', '%28'), | |
| (')', '%29') | |
| ) !default; |