Created
December 28, 2022 02:39
-
-
Save nickserv/7d0fb73a626d83d0c0d0b7057912a269 to your computer and use it in GitHub Desktop.
Generic TypeScript parser type (similar to JSON)
This file contains 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
interface Parser<T> { | |
parse(text: string): T | |
stringify(value: T): string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment