Support `@abstract` JSDoc tag
See original GitHub issueTypeScript Version: nightly (2.5.0-dev.20170712)
Code
/** @abstract */
class C {}
new C();
Expected behavior:
Error.
Actual behavior:
No error.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:27
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Use JSDoc: @abstract
The @abstract tag identifies members that must be implemented (or overridden) by objects that inherit the member. Example. Parent class with abstract method, ......
Read more >javascript - @abstract class - jsDoc
Here only a method is tagged as an abstract entity. But can we add @abstract tag to Implementator class (function constructor) itself like ......
Read more >JSDoc Reference - TypeScript: Documentation
The list below outlines which constructs are currently supported when using JSDoc annotations to provide type information in JavaScript files. Note any tags...
Read more >Improve support for JSDoc @abstract/@interface with ES6 ...
Improve support for JSDoc @abstract/@interface with ES6 classes ... to copying the base JSDoc, but prohibits other tags - so we need to...
Read more >All Tags
Documentation tags are similar to JSDoc tags. e.g. /** * this is MyClass description. ... @todo support multi byte character. ... syntax: @abstract...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding a bit more to this, it would be nice if
@abstract
on methods were supported.For example, with this code:
tsc --pretty
(at 3.1.0-dev.20180901) results in this error:When trying to migrate the type checker of a large JS codebase from Closure Compiler to Typescript, we found that lacking @abstract support is the major blocker. It would be great if the PR can be merged, and we are willing to test it for our codebase if needed 😃