* Only issue @param suggestions with codefixes in TS
Previously, there were 2 JS errors that were issued as suggestions in TS
files. But there was no codefix for these errors, and the errors were
incorrect in TS.
This PR only issues the JS-specific errors on JS files.
* Minimise test
* fix issue where duplicate default exports aren't detected when there's an interface
* accept baseline change
* add `exportDefaultInterfaceClassAndValue` test
* add more tests for multiple default exports
* add two interfaces test
Co-authored-by: DetachHead <detachhead@users.noreply.github.com>
* Uncalled function checks only works with single conditional
* fix type errors in compiler
* remove uncalled function checks with negations
* review
* fix test
* Cleanup after merge, accept baselines
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
`ThisParameterType<(...args: X) => void>` expands to
`(...args: X) => void extends (this: infer U, ...args: any[]) => any`.
When `X` is an unresolved type parameter it is not possible to determine
that `any[]` is assignable to `X`. However `never` is always assignable
to `X`, so we use that instead.
* Permit type arguments in references to generic functions
* Accept new baselines
* Delete pointless fourslash test
* Fix lint issue
* Finalize implementation
* Add tests
* Accept new baselines
* Properly handle instantiation of instantiation expression types
* Accept new API baselines
* Fix lint error
* Add more tests
* Properly handle unions/intersections of generic types
* Add more tests
* More permissive parsing of type arguments in member expressions
* Update tests
* Accept new baselines
* Triple-slash reference type directives can override the import mode used for their resolution
They now use the file's default mode by default, rather than always using commonjs. The new arguments to the
reference directive look like:
```ts
///<reference types="pkg" resolution-mode="require" />
```
or
```ts
///<reference types="pkg" resolution-mode="import" />
```
* Omit redundant import modes in emitter
* Add test for #47806
* Add server test for triple-slash reference mode overrides
* Move FileReference mode into helper
* Update tests/cases/conformance/node/nodeModulesTripleSlashReferenceModeOverride3.ts
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Eliminate redundant or meaningless elaborations in type relations
* Accept new baselines
* Add resetErrorInfo (though, oddly, shouldn't be necessary)
* Less aggressive reduction in second pass union/intersection checks
* Accept new baselines
* Restructure and back off a little bit more
* Only cache union/intersection relations once
* Accept new baselines
* Properly cache identity relations, clean up error reporting
* Move more logic to cached side of relation checks
* Optimize and remove more redundant elaborations
* Accept new baselines
* Remove unnecessary error state capture
* More optimizing
* Cache isWeakType computation
* Revert "Cache isWeakType computation"
This reverts commit 25a71c4de61f6366ffac080d19685dcb200f42b9.
* Address CR feedback
* Accept new baselines