From c97b967b481189d77064e227616a3d5a8fa92b55 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 15 Feb 2024 23:22:15 -0500 Subject: [PATCH] Fix types --- tsconfig.json | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 348ae5b5..68574cd9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,10 +12,23 @@ "experimentalDecorators": true, "esModuleInterop": true, "noUnusedLocals": true, - "moduleResolution": "Bundler", + "moduleResolution": "bundler", "declaration": true, "resolveJsonModule": true, - "types": ["vitest/globals"], + "paths": { + // These imports within @livekit/components-core and + // @livekit/components-react are broken under the "bundler" module + // resolution mode, so we need to resolve them manually + "livekit-client/dist/src/room/Room": [ + "./node_modules/livekit-client/dist/src/room/Room.d.ts" + ], + "livekit-client/dist/src/room/participant/Participant": [ + "./node_modules/livekit-client/dist/src/room/participant/Participant.d.ts" + ], + "livekit-client/dist/src/proto/livekit_models_pb": [ + "./node_modules/livekit-client/dist/src/proto/livekit_models_pb.d.ts" + ] + }, // TODO: Enable the following options later. // "forceConsistentCasingInFileNames": true, @@ -30,6 +43,7 @@ }, "include": [ "./node_modules/matrix-js-sdk/src/@types/*.d.ts", + "./node_modules/vitest/globals.d.ts", "./src/**/*.ts", "./src/**/*.tsx", "./test/**/*.ts",