* Remove superCallShouldBeFirst error
It seems redundant since TS gives an error on any use of `this` before
super, and non-`this` uses before `super` should be fine.
Fixes#37371
* Revert "Remove superCallShouldBeFirst error"
This reverts commit 3c09153c8a.
* error except for target:"esnext" && useDefineForClassFields
* Fix use-before-def with methods on esnext+useDefineForClassFields
It was incorrectly flagging methods as used before their definition, but
this is allowed under any emit.
* Add instance function test case
* Propagate nonInferrableType in &&, || and ?? operators
* Add regression test
* Simpler solution: getTypeFacts(neverType) should return TypeFacts.None
* Fix prepending unused TypeScript variables with underscore doesn't rename JSDoc @param.
Fix test for quick fix "Prefix all unused declarations with '_' where possible".
Fixes#33021.
* Replace FindAllReferences.Core.eachSymbolReferenceInFile function call to more ligher call of getJSDocParameterTags when searching for a parameter in jsdoc.
* Remove redundant constant declaration.
* Add test for prefix single unused parameter in jsdoc.
* add two tests: Refactor: Remove braces from arrow function
* refactor: simplify test and add another test
* fix: copyTrailingAsLeadingComments in addOrRemoveBracesToArrowFunction
* test: add additional test
* fix: clean up changes
* fix: add check for newEdit
* fix: add function for semi colon modifier
* feat: grab all comments during refactor
* refactor: update addOrRemoveBraces logic
* fix: remove duplicate function call
* Update src/services/refactors/addOrRemoveBracesToArrowFunction.ts
* remove blank line
remove blank line
Co-authored-by: Jesse Trinity <42591254+jessetrinity@users.noreply.github.com>
* Add fastpath to isRelatedTo for type references
* Do not check intersections or unions to ignore propegating reference flags, properly set comparing jsx flag
* Re-remove unneeded check
* Just check for TypeFlags.Object
* Remove else clause
* Error on missing BigInt in ES2020 too.
Previously it was only on ESNext, but bigint ships in ES 2020.
There are no tests for this; passing `false` doesn't cause any tests to
fail at least.
* add tests
* Avoid circular reference in this-property assignments
To do this, don't check this-property assigments that have the
this-property of the lhs appearing somewhere on the rhs:
```js
class C {
m() {
this.x = 12
this.x = this.x + this.y
}
}
```
I tried suppressing the circularity error, but because we cache the
first type discovered for a property, this still results in an implicit
any for `x` in the previous example. It just doesn't have an error.
Fixes#35099
* Add test case + rename function
* Use isMatchingReference