react-streaming
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -15,7 +15,11 @@ export { renderToStream }; | ||
}; | ||
declare type Result = { | ||
pipe: null | Pipe; | ||
readable: null | ReadableStream; | ||
declare type Result = ({ | ||
pipe: Pipe; | ||
readable: null; | ||
} | { | ||
pipe: null; | ||
readable: ReadableStream; | ||
}) & { | ||
injectToStream: (chunk: string) => void; | ||
}; | ||
declare function renderToStream(element: React.ReactNode, options?: Options): Promise<Result>; |
@@ -104,2 +104,5 @@ "use strict"; | ||
} | ||
// To debug wrong peer dependency loading: | ||
// - https://stackoverflow.com/questions/21056748/seriously-debugging-node-js-cannot-find-module-xyz-abcd | ||
// - https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results | ||
function assertReact() { | ||
@@ -106,0 +109,0 @@ const versionMajor = parseInt(server_1.version.split('.')[0], 10); |
@@ -15,7 +15,11 @@ export { renderToStream }; | ||
}; | ||
declare type Result = { | ||
pipe: null | Pipe; | ||
readable: null | ReadableStream; | ||
declare type Result = ({ | ||
pipe: Pipe; | ||
readable: null; | ||
} | { | ||
pipe: null; | ||
readable: ReadableStream; | ||
}) & { | ||
injectToStream: (chunk: string) => void; | ||
}; | ||
declare function renderToStream(element: React.ReactNode, options?: Options): Promise<Result>; |
@@ -98,2 +98,5 @@ export { renderToStream }; | ||
} | ||
// To debug wrong peer dependency loading: | ||
// - https://stackoverflow.com/questions/21056748/seriously-debugging-node-js-cannot-find-module-xyz-abcd | ||
// - https://stackoverflow.com/questions/59865584/how-to-invalidate-cached-require-resolve-results | ||
function assertReact() { | ||
@@ -100,0 +103,0 @@ const versionMajor = parseInt(reactDomVersion.split('.')[0], 10); |
{ | ||
"name": "react-streaming", | ||
"description": "React 18 Streaming. Full-fledged & Easy.", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"main": "./dist/cjs/index.js", | ||
@@ -6,0 +6,0 @@ "peerDependencies": { |
58103
1225