This is the line number side of ecddf8468f (from #21924, fixing #21818).
But the code is slightly improved for both cases: instead of testing
that `leaf` is defined, check whether `lineCount` is zero, and if it is,
return `〈1,0〉` for the one-based line and zero-based column numbers.
(The requirement of `lineCount > 0` is also seen in the fact
that `lineNumberToInfo` expects a "*One*BasedLine" argument.)
I've stared at this code way too much, since I think that there is
something more fundamentally wrong here. E.g., `EditWalker` only
`push`es to `startPath` but never pops even a `children`-less node that
is left after deleting the whole contents. But I can't figure out the
overall structure, which is also why the test that I added is not
great (see the comment there; also, #21924 is dealing with the same
problem and didn't add a test).
Fixes#44518.
* Check entire access path is constant when narrowing by inlining
* Add tests
* Accept new baselines
* Added test cases for parameter properties.
* Accepted baselines.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Issue unawaited promise error on symbol-less expressions
* Use same behavior for call expressions
* Revert "Use same behavior for call expressions"
This reverts commit 60d58132e4.
* Enable module specifiers for all auto imports
* Use isIncomplete
* isIncomplete continuation
* Lots of fixes
* Merged/transient symbol fixes, resolve all ambient module specifiers up front, pull as many as we want from cache
* Fix existing tests
* Start testing
* Add more tests
* Set cache attempt limit, update API baseline
* Fix a few tests
* Fix contextToken
* Split getModuleSpecifiers
* Unexport function
* Clean up importFixes
* Clean up completions
* Delete transient symbol assertion - fixing later
* CFA inlining of conditional expressions referenced by const variables
* Accept new baselines
* Add tests
* Accept new baselines
* Increase inlining limit to 5 levels per design meeting discussion
* Class static block (#9)
* Add types factory and parser
* Add some case
* Make class static block as a container
* Update cases
* Add visitor
* Add emitter and more compile target
* Check boundary of break and continue
* Add basic transformer
* Fix emit behavior
* Add more tests
* Add friend tests
* Update baseline
* Fix cr issues
* Accept baseline
* Add decorator and modifier check
* Add functional boundary check
* Fix conflict
* Fix computed prop name within context
* Add more tests
* Update baseline
* Avoid invalid test baseline
* Support use before initialize check
* wip
* Fix class static block context
* Fix checks
* Fix missing case
* Improve assert message
* Accept baseline
* Avoid new context
* Update diagnostic message
* Fix name collision
* Fix targets
* Avoid unnecessary files
* Add more case
* Add more test cases
* Fix strict mode function declaration
* Avoid private fields initializer if no private identifier references
* Avoid private fields and add more test case
* Add more case
* Add tests and support for related services functionality
* Fix this reference in static block
* Split parser diagnostic and binder diagnostic
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
* Add signature arguments label support
* Support rest parameters and destruction
* make lint
* Fix tuple rest parameters
* Adjust name styles
* Rename to inline hints
* Partition inline hints
* Adjust range pred
* Add function expression like hints
* Support configure inline hints
* Display hints in single line
* Add test suits and tests
* Add range tests
* Support more hints
* Add more options
* Fix logical
* Add more cases
* Support call chains
* Rename options
* Match lastest protocol
* Update protocol changes
* Support context value and hover message
* Revert "Support context value and hover message"
This reverts commit 37a7089633.
* Revert "Update protocol changes"
This reverts commit e5ca31bc30.
* Add hover message
* Accept baseline
* Update src/services/inlineHints.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Update src/services/inlineHints.ts
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Cache across the program
* Fix possible undefined
* Update protocol changes
* Fix missing property
* Make lint happy
* Avoid call chain hints
* I'm bad
* Add whitespace before type
* Add more tests
* Should care about jsdoc
* Support complex rest parameter
* Avoid module symbol hints
* Care about leading comments
* Fix CR issues
* Avoid changes
* Simplify comments contains
* Fix CR issues
* Accept baseline
* Check parameter name before create regex
* Rename option
* Avoid makers
* Skip parens for argument
* Fix CR issues
* Fix enums
* Accept baseline
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Symbols in services skip @typedef/@callback in jsdoc
Fixes#43534
* comment text skips jsdocs that are typedef-only
* Skip comment text from typedef-only jsdocs
* Skip whole comments instead of individual tags
* add semicolons
* retain comments from @callback + better comments
* add shape updates to baselines
* avoid computing a full shape for indirectly invalidated files
using file version as shape is enough to keep build info valid
and it's much cheaper