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

Patch for issue #32951 #54621

Closed
wants to merge 2 commits into from
Closed

Patch for issue #32951 #54621

wants to merge 2 commits into from

Conversation

spamshaker
Copy link

@spamshaker spamshaker commented Jun 12, 2023

relaxed interface to fit with javascript behaviour

Fixes microsoft/TypeScript-DOM-lib-generator#1568

relaxed interface to fit with javascript behaviour
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 12, 2023
@typescript-bot
Copy link
Collaborator

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 12, 2023
Copy link
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add a type parameter, just change the relevant occurrences of string.

The issue only mentions number, not boolean - please don't make unrequested changes

Copy link
Member

@DanielRosenwasser DanielRosenwasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the generic addition, this change is incorrect. When values are iterated, they are always stringified. The only type that should be modified is for values that are allowed to be set.

@DanielRosenwasser
Copy link
Member

I think that the change should actually happen on TypeScript-DOM-lib-generator.

@jakebailey
Copy link
Member

This change is in a non-.generated. file, so I would think that it would be here (if at all).

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 12, 2023

But the correct fix and its relevant changes would be to generated files which originate from the generator.

@spamshaker
Copy link
Author

spamshaker commented Jun 27, 2023

@RyanCavanaugh @jakebailey @DanielRosenwasser Thanks for reviewing

But the correct fix and its relevant changes would be to generated files which originate from the generator.

That's what I thought at the beginning when I realised that the affected lib.dom.d.ts is not here.

Don't add a type parameter, just change the relevant occurrences of string.

The issue only mentions number, not boolean - please don't make unrequested changes

I am sorry for confusing, but the engines also transforms boolean to string "true"/"false" out of the box so I would suggest to update the original issue to handle all subject with the correct resolution.

I am going to use pnpm patch to handle it for now

@spamshaker spamshaker deleted the patch-1 branch June 27, 2023 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URLSearchParams API should accept numbers for values
5 participants