This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
generated from JoshuaKGoldberg/create-typescript-app
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split up deserialization and start on support for SSE (#67)
- Loading branch information
Showing
18 changed files
with
383 additions
and
156 deletions.
There are no files selected for viewing
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
import { TsonAsyncOptions } from "./asyncTypes.js"; | ||
import { createTsonParseAsync } from "./deserializeAsync.js"; | ||
import { createTsonStringifyAsync } from "./serializeAsync.js"; | ||
import { | ||
createTsonSSEResponse, | ||
createTsonStreamAsync, | ||
} from "./serializeAsync.js"; | ||
|
||
/** | ||
* Only used for testing - when using the async you gotta pick which one you want | ||
* @internal | ||
*/ | ||
export const createTsonAsync = (opts: TsonAsyncOptions) => ({ | ||
parse: createTsonParseAsync(opts), | ||
stringify: createTsonStringifyAsync(opts), | ||
parseJsonStream: createTsonParseAsync(opts), | ||
stringifyJsonStream: createTsonStreamAsync(opts), | ||
toSSEResponse: createTsonSSEResponse(opts), | ||
}); |
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
Oops, something went wrong.