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

Type misalign between webpack and webpack-sources #12294

Closed
Austaras opened this issue Dec 31, 2020 · 9 comments · Fixed by #16805
Closed

Type misalign between webpack and webpack-sources #12294

Austaras opened this issue Dec 31, 2020 · 9 comments · Fixed by #16805

Comments

@Austaras
Copy link

Austaras commented Dec 31, 2020

Bug report

In webpack's declarations.d.ts, Source is

export abstract class Source {
		size(): number;

		map(options?: MapOptions): Object;

while in @types/webpack-sources, it is

    map(options?: MapOptions): RawSourceMap | null;

What is the expected behavior?
typing of webpack and webpack-sources should be compatible.

In this case I believe the latter is more detailed, so it should be used. BTW, why doesn't webpack use this declaration but instead write its own?

Other relevant information:
webpack version: 5.11.1

@alexander-akait
Copy link
Member

Please respect time of other developers and use the issue template

@Austaras
Copy link
Author

updated

@alexander-akait
Copy link
Member

Update we can improve types here, PR welcome

@webpack-bot
Copy link
Contributor

This issue had no activity for at least three months.

It's subject to automatic issue closing if there is no activity in the next 15 days.

@alexander-akait
Copy link
Member

bump

@webpack-bot
Copy link
Contributor

Issue was closed because of inactivity.

If you think this is still a valid issue, please file a new issue with additional information.

@alexander-akait
Copy link
Member

@TheLarkInn Should be easy, very annoing to lose types here

@TheLarkInn
Copy link
Member

@Austaras would you be willing to submit a fix here?

@alexander-akait
Copy link
Member

@TheLarkInn We already have fix #16805 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Shipped
Development

Successfully merging a pull request may close this issue.

5 participants