From c676342d34a1a986bf9a798cd582af80819a5f8e Mon Sep 17 00:00:00 2001 From: Abanoub Ghadban Date: Wed, 11 Dec 2024 19:50:15 +0200 Subject: [PATCH] move react-server-dom-webpack.d.ts to types directory --- node_package/{src => types}/react-server-dom-webpack.d.ts | 3 ++- tsconfig.json | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) rename node_package/{src => types}/react-server-dom-webpack.d.ts (60%) diff --git a/node_package/src/react-server-dom-webpack.d.ts b/node_package/types/react-server-dom-webpack.d.ts similarity index 60% rename from node_package/src/react-server-dom-webpack.d.ts rename to node_package/types/react-server-dom-webpack.d.ts index 26e2948d1..31c75a634 100644 --- a/node_package/src/react-server-dom-webpack.d.ts +++ b/node_package/types/react-server-dom-webpack.d.ts @@ -1,4 +1,5 @@ declare module 'react-server-dom-webpack/client' { - // eslint-disable-next-line import/prefer-default-export export const createFromFetch: (promise: Promise) => Promise; + + export const createFromReadableStream: (stream: ReadableStream) => Promise; } diff --git a/tsconfig.json b/tsconfig.json index 13fa3eb7a..9f0fe6f51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -9,7 +9,11 @@ "outDir": "node_package/lib", "strict": true, "incremental": true, - "target": "es5" + "target": "es5", + "typeRoots": ["./node_modules/@types", "./node_package/types"] }, - "include": ["node_package/src/**/*"] + "include": [ + "node_package/src/**/*", + "node_package/types/**/*" + ] }