* Unuse Identifier codefix understands constructors
Previously, it did not look for `super()` and `new this()` calls when
determining whether a constructor parameter could be deleted.
* better names, fix off-by-1 bug
* Codefix understands super methods now too
This unifies the code, changing it considerably.
* Add actual baselines for a problem with global namespace being preferred over config & pragma implicit ones
* Fixed an issue with global React namespace being preferred over config & pragma implicit ones
* Do not try to mark JSX classic runtime symbols as used when automatic runtime is used
Fixes resolution of export aliases in the postfix-property-access case
of commonjs require:
```js
const { x } = require('./foo').nested
x
```
This program would previously fail if `x` was an export alias.
Fixes#41422
* add basicly support for rename string literal type
* fix merge conflict
* fix some behavior
* Update package-lock.json
* Update package-lock.json
* do not break old behavior if not type checked
* fix cr issue
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
* Add tests
* Dont look at object or function type when looking for members of `export=` type to be resolved by named imports
Fixes#37165
* Create separate cache when skipping function and object property augmentation
* Lookup in both cache if not skipObjectFunctionPropertyAugment
* Support xml namespace prefix for JSX elements and attributes
Just as with the `-` character, `:` is now also treated specially in JSX
element and attribute names, but is only allowed a single time, and not
at the beginning or end of the name, as is specified in the JSX spec.
All tests in jsxInvalidEsprimaTestSuite still fail, but for slightly
different reasons now. Two lines in jsxEsprimaFbTestSuite were
uncommented as they included elements with namespaces, and they now pass
without error.
* Add case for colons at ends of identifier
* Add case for jsx namepsace intrinsics
* Add cases with upcase idents for jsx namespaces
* Add case for jsx namespaces with react option
* Always consider jsx names with colon to be intrinsics
* Adjust comment about chars valid in jsx names but not js idents
* Fix minor typo in namespace prefix test case variable name
* Remove misleading comments on isUnhyphenatedJsxName
* Use ts.map for stylistic consistency
* Show error only if noImplicitAny is set
* Accept baseline for noImplicitAnyIndexing
* Fix lint error
* Add test cases for indexedAccessWithFreshObjectLiteral
* Modify test case to reproduce error
* Fix TypeOnlyExport codefix to work with 3 or more type exports in the same declaration
The check to ensure that a fixed export declaration wasn't fixed again
was reversed. This only surfaced when 3 or more type exports existed in
the same declaration.
* Add failing test cases for comments being duplicated
* Fix convertToTypeOnlyExport codefix from duplicating leading comments
* Simplify convertToTypeOnlyExport when change is just inserting `type` keyword
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Don't record Ternary.Maybe results in cache during recursive variance measurement
* Add regression test
* Accept new baselines
* Use Ternary.Unknown to signal variance recursion
* Add comments
* Fix comment