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

implement code fix for override of js files #45780

Merged
merged 8 commits into from
Nov 16, 2021

Conversation

stkevintan
Copy link
Contributor

@stkevintan stkevintan commented Sep 8, 2021

Based on Kingwl#8
Fixes #39669

cc @sandersn @Kingwl

@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 the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Sep 8, 2021
@sandersn
Copy link
Member

@stkevintan If you're going to take this over from @Kingwl, can you

  1. Address the comments I made on Override codefix in js Kingwl/TypeScript#8
  2. Amend the commit to add Kingwl as a co-author. (Probably requires a force push, not a literal amend)

Co-Authored-By: Wenlu Wang <kingwenlu@gmail.com>
Co-Authored-By: Wenlu Wang <kingwenlu@gmail.com>
@stkevintan
Copy link
Contributor Author

Hi, @sandersn Sorry for the delay, I was on-call last weeks.
basically, I almost did what you've comment, but I am not sure your question on the emitter.ts, as I understand, if we don't emit the override/public tags, tsc will report errors when noImplicitOverride : true on the override methods according to #45656

@sandersn
Copy link
Member

sandersn commented Oct 1, 2021

I think it's fine to emit the comments, I just wondered why they changed from no-ops to emits.
However, I don't think tsc will report errors on emitted code because it shouldn't be checking emitted code at all.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Just waiting on an emit test now.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Noticed a couple more minor things. Otherwise looking good.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Tests still fail -- a couple of failures from the new tests and 5 more from existing tests.

@stkevintan
Copy link
Contributor Author

stkevintan commented Nov 10, 2021

Tests still fail -- a couple of failures from the new tests and 5 more from existing tests.

Hi, @sandersn sorry for the delay. Just figure out the diagnostic messages have been improved for JS files in my previous #45656. so just wondering: is it necessary to specify a different descriptions of code fix action for js files as well ?

PS: could you please help rerun the browser integration test ? it seems it failed with a transient error.

@stkevintan stkevintan requested a review from sandersn November 11, 2021 09:51
@sandersn sandersn merged commit fcdbc93 into microsoft:main Nov 16, 2021
@Kingwl
Copy link
Contributor

Kingwl commented Nov 17, 2021

Congrats @stkevintan !

Photograph looks handsome! @sandersn 😉

mprobst pushed a commit to mprobst/TypeScript that referenced this pull request Jan 10, 2022
* feat: code fix for override in js files

Co-Authored-By: Wenlu Wang <kingwenlu@gmail.com>

* fix comments

Co-Authored-By: Wenlu Wang <kingwenlu@gmail.com>

* remove tryMergeJsdocTags

* fix: bring the two methods back as functions

* revert emitter changes

* fix comments

* fix: test failures

Co-authored-by: Wenlu Wang <kingwenlu@gmail.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants