Now, in an assignment to an indexed access of a readonly property, the
resulting type is still the property's type. Previously it was
unknownType. This improves error reporting slightly by reporting some
errors that were previously missed.
* Make exportSymbol public
* Add a `getExportSymbolOfSymbol` method
* Use own implementation instead of delegating to `getExportSymbolOfValueSymbolIfExported`
* wip-try get symbol of bindingelement in objectBindingPattern first
* Add fourslash tests
* Update .types baselines
* Update .symbols baselines
* Revert checker changes
* Actually lookup type for binding property name definition
* More succinct check, clarify yui's comment
* Fix many no-object-literal-type-assertion lint errors
* Simple fixes
* Use a union for FlowNode
* PR feedback and remove remaining `id()` uses
* Use a union for CodeBlock
* Discriminate CodeBlock by CodeBlockKind
Unfortunately, the checking code isn't reusable in a large chunk, so I copied it
from `getPropertyTypeForIndexType`. It still might be better to extract
the four lines to report the error into its own function.
Previously type predicate error checking didn't take the `this`
parameter into account when checking for errors. This led to spurious
errors. Note that it's not feasible to change the initial value of
`parameterIndex` because several checks refer to the original
declaration, for example to make sure that a type predicate doesn't
refer to a rest parameter.
* For duplicate source files of the same package, make one redirect to the other
* Add reuseProgramStructure tests
* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure
* Use fallthrough instead of early exit from loop
* Use a set to efficiently detect duplicate package names
* Move map setting outside of createRedirectSourceFile
* Correctly handle seenPackageNames set
* sourceFileToPackageId -> sourceFileToPackageName
* Renames
* Respond to PR comments
* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect
* Clean up redirectInfo
* Respond to PR comments