* First draft
Solves the initial problem but breaks commentCommentParsing. I also
found a couple more interesting cases.
* Add more tests and fix their bugs
* Another test case
* Some cleanup
I may try do a little more; `margin += tag.end - tag.pos` bothers me a
bit.
* More cleanup
Even if (1) @extends is provided and (2) we're not producing
diagnostics. That's because we need to know whether the extends clause
references an imported alias.
* Added error for class properties used within their own declaration
Fixes#5987.
Usages of a class property in a preceding property already gave an error, but the following doesn't yet:
```ts
class Test {
x: number = this.x;
}
```
As with other use-before-declare checking, IIFEs are not treated as invalid uses.
* Accepted 'witness' baselines; removed unnecessary !==
* Addressed quick feedback items
* Accepted odd new baseline
* Fixed post-merge introduced lint errors
* Updated baselines again
* Change the default type parameter constraint and default to unknown from {}
* Relax unknown checking outside of strictNullChecks a bit
* Increase strictness on index signatures with type `unknown` so inference doesnt change surprisingly
* Remove redundant switch
* Use const contexts and tuple mapped types to simplify some explicitly elucidated types
* Fix lint
* Further cleanup - refactor mapped type into its own alias for readability
* Slightly more cleanup - PragmaPsuedoMap neednt be partial, thus removing tons of nonull assertions
* Remove GH#18217 comments
* add test for imported function
* start to implement import references check
* fix imported function test
* skip alias when looking for symbol target
* recognize ES6 imports
* recognize some export syntax
* add tests for imports/exports
* add test for imported function
* start to implement import references check
* fix imported function test
* skip alias when looking for symbol target
* recognize ES6 imports
* recognize some export syntax
* add tests for imports/exports
* add test for imported function
* start to implement import references check
* fix imported function test
* recognize ES6 imports
* recognize some export syntax
* add mode import/export syntax cases
* fix entryToFunctionCall to deal with new calls through property/element access expressions
* add more tests for imports/exports
* allow function and class declarations that have no name but have a default modifier
* rename tests
* fix conflict
* fix tests
* add test for nameless class
* rename function
* minor refactor
* remove old tests
* delete old test
* refactor as suggested
* use getContainingFunctionDeclaration
* Unify substitution type `any` handling into costruction and instantiation
* Strengthen supertype reduction check to reduce breakage
* Rename conditional type fields per convention
* Explicitly handle anyish signatures in compareSignaturesRelated so strict variance doesnt kill subtyping
* Allow tuple expansions to an `any` rest to be considered an `any` signature as well