-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
[Experiment] feat(17227): Support @abstract
JSDoc tag
#42186
Conversation
960d619
to
be19784
Compare
1f3599d
to
9dfbcfd
Compare
@abstract
JSDoc tag@abstract
JSDoc tag
We also need to determine whether legacy class syntax should be recognized: /**
* @class
* @abstract
*/
function Legacy() {
/**
* @type {string}
* @abstract
*/
this.prop;
}
/** @abstract */
Legacy.prototype.doStuff = function() {} |
9dfbcfd
to
1421fe1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I think is needed to finish this feature:
- Survey existing code to see whether requiring
@abstract
methods only to occur in@abstract
classes would result in lots of errors. - Figure out how serialisation code results in issuing errors, then move the error earlier.
- Add test cases.
- Restrict what's allowed in the body of abstract methods.
Here are a couple of observations based on my survey of existing usage:
To accept this I think we'd need buyin from an existing user who wants this feature and agrees to test that it meets their needs. Looking at usage rates, only webpack or discord.js make sense to me. |
4c3cc7d
to
aa4e38e
Compare
@typescript-bot pack this |
@typescript-bot pack this |
Hey @sandersn, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
@typescript-bot pack this |
Heya @andrewbranch, I've started to run the tarball bundle task on this PR at dfeab9e. You can monitor the build here. |
Hey @andrewbranch, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
@a-tarasyuk Can you please restore the content of the PR (it seems to have been cleared with your last force push) so that someone else can give this a shot on top of the work you made? |
Is there some way to clone/pull the deleted commit, dfeab9e? It appears to be visible on GitHub, but there's a note saying it does not exist in the repo. Same with a-tarasyuk@dfeab9e. I suppose I can see the changes, and manually apply them to the files. |
@trusktr idk you're still wondering, but it can be fetched by |
Fixes #17227