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
Previously these accesses did not use control flow to narrow property
accesses of undefined properties that are resolved from a string index
signature. Now the use control flow to narrow these just like normal
properties.
1. getDefaultLibraryFile should use ts to normalise the file and find
the filename.
2. lib should be turned off at the same time that noLib is turned on to
avoid a pointless error.
* import fix: suggest import..require where supported if synthetic defaults are unavailable
* Add tests for import..require fix when targeting CommonJS, AMD, and UMD modules
* fix failing tests
* improve import code fixes for UMD modules
- use default import under --allowSyntheticDefaultImports
- import..require support
- make make quick fix info match resulting import
- make diagnostics
* Address PR feedback:
- extract test for synethetic default imports into getAllowSyntheticDefaultImports in core.ts
- use getAllowSyntheticDefaultImports in checker.ts and importFixes.ts
- move compilerOptions to top level destructuring
* add tests
* remove `import =` quick fix and supporting code.
* update feature tests
* remove errant whitespace
* Consistently use "JSX Attribute" completion kind
* Update tests and fix bug
* Fix bug: In a JsxOpeningElement, if at an Identifier we are not at an attribute but at the tag itself.
If at a GreaterThanToken, we are about to fill in an attribute.
* 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