* Bind alias ThisProperty assignment declarations
This is a quick prototype that does the wrong thing at the wrong time
with the wrong technique.
* Preliminary checker handling for aliases
Duplicative and untested, but I think I updated all the places that need
updating.
* new is error; old one should not have been removed
* I don't even know what's happening with this test
* cleanup and testing in the checker
* binder: use lookupSymbolForNameWorker instead of mutable
This should have about the same behaviour and is much easier to
understand.
Also refactor common code a bit.
* Shorter name of lookupSymbolForName
Once upon a time there was a parent/worker function, but now it's just a
single function again. No need for the -Worker suffix.
* remove oodate comment
* fix switch-case-break lint
* Refactor and move functions
* Rename and improve type of getContextualTypeForAssignmentDeclaration
* Preserve the variable name when exporting an arrow or anonymous function
This allows the browser or node to properly name the (arrow) function
* Updated tests to reflect previous change
* Remove duplicated comment
* Transforms variable.initializer using moduleExpressionElementVisitor
* PR feedback: rbuckton
- Use isArrowFunction and isFunctionExpression
* PR feedback: rbuckton
- Consider ClassExpresion, they can also be named based on the
variable.
* Use isUncalledFunctionReference for aliases too
Fixes bogus deprecated notices on imports of functions with deprecated
overloads, but with some non-deprecated overloads.
Fixesmicrosoft/vscode#104238
* Just check all declarations, don't call isUncalledFunction
* Limit auto import provider project size
* Add test
* Make option configurable
* Fix test
* Only bail when setting is auto
* Fix other test
* Update API baseline
* added Error 5084 to diagnosticMessages.json
* added test case errorForBareSpecifierWithImplicitModuleResolution1 to tests/cases/compiler
* modified checker.ts to report error 5084 when classic resolution and incorrect path are used
* added baseline changes
* passes all test cases including src/testRunner/unittests/ tests
* Update with feedback
* Make it check whether it is the right module resolution kind
* Use the right diagnostic message in tsserver tests
Co-authored-by: Meera Shivakumar <mshivaku@umich.edu>
Co-authored-by: Orta <git@orta.io>
* Fix this parameter emit for JSDocFunction types
Previously, parameters with names that were not `new` were treated like
rest parameters. This is incorrect: parameters with the name `this`
should emit a `this` parameter.
Fixes#38550
* ❤️ quote style
Use only the relevant declarations (by collecting them in the for loop),
and use `declaration` if `getNameOfDeclaration` didn't work (useful for
`export default` with anonymous functions).
Fixes#39804.
Also, use `nodeIsPresent` once, and a random `?.`.
* Hack everything together
* Add test
* Remove realpath from program
* Ensure symlinked directories are directories
* Revert unnecessary change
* Update baselines
* Use host program realpath on AutoImportProviderProject files before program creation
* Which fixes hasRoots() too
* Apply suggestions from code review
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Lint
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Fix#37948
* Fix formatter skipping tab/space fixup on comments, handle trailing commas in list closing line count.
Fixes#37944
* Add newline between imports and main body of new file in moveToNewFile
Fixes#37941
* Update baseline (probably broken before?)
* Use disableReferencedProjectLoad to stop loading child projects to allow users to disable loading large solutions
Fixes#39144
* Handle indirect references
* PR feedback
* Add tests corresponding to repro from #37928
* Triple slash references must resolve against the resolved file name (.d.ts and not original source file) since they are rewritten in the .d.ts emit
* Remove the scenario not fixed in this PR
* Resolve only relative references in open files on syntax server
* Support resolving tripleslash references only in the open file
* Apply suggestions from code review
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>