We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 840f9c7 commit 3eb3961Copy full SHA for 3eb3961
packages/react-on-rails-pro/tests/testUtils.js renamed to packages/react-on-rails-pro/tests/testUtils.ts
@@ -9,8 +9,8 @@ import { Readable } from 'stream';
9
* }} Object containing the stream and push function
10
*/
11
export const createNodeReadableStream = () => {
12
- const pendingChunks = [];
13
- let pushFn;
+ const pendingChunks: Buffer[] = [];
+ let pushFn: ((chunk: Buffer | undefined) => void) | null = null;
14
const stream = new Readable({
15
read() {
16
pushFn = this.push.bind(this);
@@ -20,7 +20,7 @@ export const createNodeReadableStream = () => {
20
},
21
});
22
23
- const push = (chunk) => {
+ const push = (chunk: Buffer) => {
24
if (pushFn) {
25
pushFn(chunk);
26
} else {
0 commit comments