* Allow emitter to write multiple newlines in node lists
* Progress
* Progress
* Fix recomputeIndentation
* Add tests, fix leading line terminator count
* Do a bit less work when `preserveNewlines` is off
* Fix accidental find/replace rename
* Restore some monomorphism
* Fix single line writer
* Fix other writers
* Revert "Fix other writers"
This reverts commit 21b0cb8f3b.
* Revert "Fix single line writer"
This reverts commit e535e279f9.
* Revert "Restore some monomorphism"
This reverts commit e3ef42743a.
* Add equal position optimization to getLinesBetweenRangeEndAndRangeStart
* Add one more test
* Actually save the test file
* Rename preserveNewlines to preserveSourceNewlines
* Make ignoreSourceNewlines internal
* Optimize lines-between functions
* Add comment;
* Fix trailing line terminator count bug for function parameters
* Preserve newlines around parenthesized expressions
* Back to speculative microoptimizations, yay
* Don’t call getEffectiveLines during tsc emit at all
* Convert symlink scenarios to virtual FS where its symlinks are correctly maintained
Adds test for #36866
* Fix the casing issue when redirects differ in casing of the file
* Make ModuleSpecifierResolutionHost internal
* Refactoring for ModuleSpecifierResolutionHost
* If any of the file path option is from node_modules folder, consider only paths in node_modules folder
* Update src/services/utilities.ts
Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Add codefix for --noImplicitThis
* Code review
* Back to building post-merge
* Remove redundant functions + update tests
Infer-from-usage also inserts `this: any` parameters when needed, so I
removed that from fixImplicitThis.
Otherwise, fixImplicitThis has better suggestions than inferFromUsage,
so I moved inferFromUsage later in the suggestion order.
* More redundancy removal
Don't need to add `@this` anymore either since inferFromUsage will do
that.
* More baseline updates
From moving inferFromUsage down in priority I think?
* remove now-redundant ad-hoc jsdoc emit
* fix more bad merge
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Flatten immediately nested conditional types in the false position
* Add test
* Accept new baselines
* Handle nested distributive types with different checkType
* Allow deeply nested immediately resolving conditionals without any syntactic requirements or implementation contortions
Extract logic into function
Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
* Add tests that fail because of symlink to non common directory node_modules
* When the imported module is through node_modules and symlink to folder that isnt node_modules
Most of the monorepo like scenarios are like this so looking at symlink to decide if file can be imported is essential
Fixes#28689
* Treat intersections of only objects as a single object in relations
* Exclude intersections containing non-inferrable types
* Accept new baselines
* Update test
* Accept new baselines
* Add tests
* getPropertiesOfUnionOrIntersectionType: handle types with index signature
Fixes: #31565
* fix test
* more testing
* fix typo in checker.ts
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* add trim trailing whitespace option
* set default trimTrailingWhiteSpace to true
* add fourslash tests
* accept new baselines
* only preserce whitespace when setting is explicitly false
* format whitespace
* Make substitution types even if the substitution base isnt a type variable
* Broaden usage of getConditionalFlowTypeOfType to _all_ type lookups
* Align comments
* Add test where file from referenced project of solution belongs to inferred project instead of referenced project
* Try to find project from project references if the default config project is solution
Fixes#36708
* Add test to verify the correct collection of projects
* Handle when default config project is indirectly referenced in the solution
* Include public API tests in unittests
* Make sure default project for script info is calculated correctly
* Handle reload projects
* Ensure to load solution project tree when project is referenced by solution
* Find all refs when the file is referenced via d.ts
* Some comments per feedback
* Fix typo
* Adds some docs to the LSP dts
* Ensure that getProgramDiagnostic is included everywhere that getCompilerOptionsDiagnostic is
* Update baselines
* Apply suggestions from code review
Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>
* Remove the getCompilerOptionsDiagnostics -> getProgramDiagnostics change
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
* Treat write-only-access to a class member with setter as a reference.
* Add test case for unused private members, special-casing the member with a setter.
Signed-off-by: Andrew Deniszczyc <adeniszczyc@bloomberg.net>
Cleanup of implementation
Move check node container check
Add test cases for fixExpectedCommaError
Renaming and add test case
Co-authored-by: Andrew Deniszczyc <adeniszczyc@bloomberg.net>