Closed jjangga0214 closed 1 month ago
i think we also need to add this to the tsconfig.json
- "sourceMap": true
+ "sourceMap": true,
+ "lib": ["ESNext", "dom"] // Add "es2020" or a later version
}
}
"dom"
should be added to web
, not agent
. And it's already there.
https://github.com/livekit-examples/realtime-playground/blob/0ea85162bd81f4d6f6131b2c18650ad40feac5b7/web/tsconfig.json#L3
You shouldn't set a version of "lib"
higher than "target"
. You’re making tsc think newer APIs and language features are available at runtime. But you’re compiling down to the older JavaScript version. This mismatch can lead to issues.
This resolves type errors like these.