Skip to content

Conversation

@leaysgur
Copy link
Member

@leaysgur leaysgur commented Apr 14, 2025

Part of #9705

In this PR, I've tried to align TSMappedType with TS-ESLint.

https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/ast-spec/src/type/TSMappedType/spec.ts

// BEFORE
{
  type: "TSMappedType",
  typeParameter: {
    name: Identifier,
    constraint: TypeNode,
  },
  // ...
}

// AFTER
{
  type: "TSMappedType",  
  key: Identifier,
  constraint: TypeNode,
  // ...
}

And also fixed serializer for optional and readonly types.

They are defined as boolean | '+' | '-' | undefined, but we use true | '+' | '-' | null.

@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 14, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-ast Area - AST C-bug Category - Bug labels Apr 14, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 14, 2025

CodSpeed Instrumentation Performance Report

Merging #10392 will not alter performance

Comparing fix/mapped-type (307f87d) with main (50fd839)

Summary

✅ 36 untouched benchmarks

@overlookmotel
Copy link
Member

This PR is marked as draft, so I've not reviewed yet. Please let me know when it's ready for review.

@leaysgur
Copy link
Member Author

Thank you for your concern! 🙏🏻
There are a couple of points I would like to confirm..., but I had no time to put them together. I will let you know soon!

@leaysgur leaysgur marked this pull request as ready for review April 14, 2025 13:05
@leaysgur
Copy link
Member Author

@overlookmotel Thank you for your patience each time~, please take a look?

Copy link
Member

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

Looks good! All my comments are just nits.

@overlookmotel
Copy link
Member

@overlookmotel Thank you for your patience each time~, please take a look?

No no no! Thank you for doggedly pursuing this effort. Really appreciate it.

@overlookmotel
Copy link
Member

overlookmotel commented Apr 14, 2025

I realized we're in completely different time zones, and I didn't want for this PR to end up with merge conflicts by the time you'd applied changes, and then waited for me to wake up in the morning and merge it. As my change suggestions were all minor nits, I've taken the liberty of making the changes myself, and will merge this as soon as CI passes.

Details in the comments above.

I hope you don't mind. If anything you don't like in the changes I've made, please feel free to say so and revert them!

@overlookmotel overlookmotel merged commit 2520b25 into main Apr 14, 2025
28 checks passed
@overlookmotel overlookmotel deleted the fix/mapped-type branch April 14, 2025 21:31
@overlookmotel
Copy link
Member

Now over 80% passing 🎉

@leaysgur
Copy link
Member Author

I realized we're in completely different time zones,

Ah~, indeed! I live in JST(GMT+9) and it is time to start working now. 🫖

I hope you don't mind. If anything you don't like in the changes I've made, please feel free to say so and revert them!

I don't mind at all and would rather thank you for doing it instead.

Now over 80% passing 🎉

🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ast Area - AST C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants