* Consider the commonjs module indicator as an indicator that something is effectively an external module
* Only use commonjs module indicator when targeting commonjs
so that error message refers to prop name instead of param name.
Changed getter errors for similar case so they also refer to prop name.
Fixed bug where static getters wouldn't output their specific error.
Fixes#1976
* Use documentation comments from inherited properties when @inheritDoc is present
The JSDoc `@ineheritDoc` [tag](http://usejsdoc.org/tags-inheritdoc.html)
"indicates that a symbol should inherit its documentation from its
parent class". In the case of a TypeScript file, this also includes
implemented interfaces and parent interfaces.
With this change, a class method or property (or an interface property)
with the `@inheritDoc` tag in its JSDoc comment will automatically use
the comments from its nearest ancestor that has no `@inheritDoc` tag.
To prevent breaking backwards compatibility,
`Symbol.getDocumentationComment` now accepts an optional `TypeChecker`
instance to support this feature.
fixes#8912
* Use ts.getJSDocTags as per @andy-ms 's recommendation
* Convert @inheritDoc tests to verify.quickInfoAt
* Concatenate inherited and local docs when @inheritDoc is present
* Make typeChecker param explicitly `TypeChecker | undefined`
* Re-accept baseline after switch to explicit `| undefined`
* Update APISample_jsodc.ts to match new getDocumentationComment signature
* Re-accept baselines after rebasing
* Instantiate contextual types while in an inferrential context
* Limit scope of instantiation to only when likely needed
* Still get aparent type
* Expand test
* Fix nit
* Handle JSX and array
* Tests for the JSX and Array cases
* After much deliberation and inspection, much simpler fix
After much deliberation and inspection, much simpler fix
Undo
Redo
* Revised emit for computed property names
* Fix downlevel name generation scopes
* Accept slightly more conservative baseline
* First feedback pass
* Reduce number of nonrequired variable declarations and assignments
* Remove side-effect-free identifier references
* skip partially emitted expressions
* Comments, move starsOnNewLine to emitNode
* Put expressions on newlines when inlined in class expressions for consistency
* Update new ref
* Fix typo in comment
* Make it a noImplicitAny error to fail to provide type arguments to a superclass via @augments
* Don't recommend to add an @augments tag if it already exists
* Suggestions from code review
* Shorten error message
* Support 'package.json' not in package root
* Test "foo/@bar"
* More tests, and don't use "types" from the root package.json if not loading the root module
* Emulate pre 2.4 metadata behavior of eliding null and undefined from unions without strictNullChecks
* Accept baseline
* Update comment
* Update for second old baseline
* Respect strict
* Fix nested dynamic imports when targeting es6
* Fixup nested dynamic imports when targeting downlevel
* Remove duplicated expressions in UMD emit
* Code review feedback, clone arg if need be
* More CR feedback, apply user quotemark styles
* Remove blank lines
* Use behavior of visitEachChild instead of enw codepath, add new test, use createLiteral to retain quotemarks
* Set lib flag for test