Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Typescript V5.7.3] - Conflict with typescript lib.dom.d.ts #471

Open
yasharth-98 opened this issue Feb 28, 2025 · 4 comments
Open

[Typescript V5.7.3] - Conflict with typescript lib.dom.d.ts #471

yasharth-98 opened this issue Feb 28, 2025 · 4 comments

Comments

@yasharth-98
Copy link

I am experiencing a TypeScript type conflict when using the @types/css-font-loading-module package in conjunction with TypeScript 5.0. The conflict arises from the display property in the FontFace interface, which is defined with different types in lib.dom.d.ts and @types/css-font-loading-module.

Expected Behavior

The TypeScript compiler should not throw any type errors related to the display property in the FontFace interface.

Actual Behavior

node_modules/@types/css-font-loading-module/index.d.ts:22:9 - error TS2717: Subsequent property declarations must have the same type. Property 'display' must be of type 'FontDisplay', but here has type 'string'.

22 display?: string | undefined; ~~~~~~~

node_modules/typescript/lib/lib.dom.d.ts:515:5 515 display?: FontDisplay; ~~~~~~~ 'display' was also declared here.

node_modules/@types/css-font-loading-module/index.d.ts:42:9 - error TS2717: Subsequent property declarations must have the same type. Property 'display' must be of type 'FontDisplay', but here has type 'string'.

42 display: string; ~~~~~~~

node_modules/typescript/lib/lib.dom.d.ts:5537:5 5537 display: FontDisplay; ~~~~~~~ 'display' was also declared here.

@tdumitrescu
Copy link
Member

Did you mean to open this issue on a different repo?

@yasharth-98
Copy link
Author

Did you mean to open this issue on a different repo?

mixpanel-browser has dependency on @types/css-font-loading-module

@tdumitrescu
Copy link
Member

It appears to be a subdependency via rrweb. Have you tried anything from this issue yet? rrweb-io/rrweb#813

@Yejin0O0
Copy link

Yejin0O0 commented Mar 1, 2025

It appears to be a subdependency via rrweb. Have you tried anything from this issue yet? rrweb-io/rrweb#813

I had a same issue.
With "skipLibCheck": true option in tsconfig.json, I can fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants