* Add support for Call Hierarchies in language server
* Use baselines for callHierarchy tests
* Clean up commented code
* Support multiple hierarchy items when an implementation can't be found
* Use optional chaining in a few places
* Use getFileAndProject
* init export start as decl
* fix some broken
* fix more case
* fix more and more case
* make it work
* make lint happy and accept baseline
* add more tests
* fix system module
* add more case
* delete useless assert
* accept baseline
* make lint happy
* fix missing utils
* update api
* make lint happy
* add missing semi
* fix minor issue
* fix locally bound
* avoid useless check
* update public api
* add more case
* fix some case
* Use multi-module selection in test runner to cut down on duplication.
* Accepted baselines.
* remove superfluous tests.
* Remove baseline.
* Downlevel `export * as ns` in es2015.
* Accepted baselines.
* Update names of things.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Increase selectivity of subtype relationship for signatures
* Add regression test
* Accept new baselines
* Use strictSubtypeRelation for union subtype reduction
* (x: number | undefined) -> void is subtype of (x?: number | undefined) => void
* Accept new baselines
* Add tests
* Accept new baselines
* Address CR feedback
* Fix parameter list length check
* Accept API baseline changes
* Add @readonly
The rule for @readonly on this-assignments in the constructor is wrong.
See failing tests.
* In-progress
Add ctor function test
Add some notes and rename variable
* Done except for cleanup and fix 1 bug
* Fix last test and clean up
* Ignore @private on constructor functions
This was incorrect in the best of circumstances and caused a crash when
the parent of the function had no symbol, because the accessibility
check assumed it was operating on a constructor and that the parent was
always the containing class.
* Non-constructors are always accessible
Previously, all function-like kinds were accessible, which includes
constructors. This was wrong.
It was previously not populated correctly if preserveSymlinks with useSourceOfProjectReference was true,
in that case if module was resolved to symlink and we deduced it refers to source of project reference we want to set "resolvedFileName" correctly
otherwise it results in incorrect module not found errors.
Shell scripts must use LFs. Also make it executable.
(Both failures probably don't happen on some windows environment where
git is told to translate EOLs, and all files are assumed executable.)
* Add @private/@protected/@public test
* Fix @declaration
* draft abstraction + one usage
* Fill in necessary parsing etc
* make general getEffectiveModifierFlags
move to utilities, make the right things call it
* reorder public/private/protected
* JS declaration emit works with @public/@private/@protected
* revert unneeded/incorrect changes
* Update baselines and skip @public/etc when parsing
1. Update the API baselines with the new functions.
2. Do not check for @public/etc during parsing, because parent pointers
aren't set, so non-local tags will be missed; this wrong answer will
then be cached.
* Parser: don't call hasModifier(s) anymore.
Then move jsdoc modifier tag checks into getModifierFlagsNoCache where
they should be. The jsdoc checks are skipped when the parent is
undefined. There are 3 cases when this can happen:
1. The code is in the parser (or a few places in the binder, notably
declareSymbol of module.exports assignments).
2. The node is a source file.
3. The node is synthetic, which I assume to be from the transforms.
It is fine to call getModifierFlags in cases (2) and (3). It is not fine
for (1), so I removed these calls and replaced them with simple
iteration over the modifiers. Worth noting: Ron's uniform node construction
PR removes these calls anyway; this PR just does it early.
* Fix constructor emit
1. Emit protected for protected, which I missed earlier.
2. Emit a constructor, not a property named "constructor".
3. Split declaration emit tests out so that errors are properly reported
there.
* Add ignoreInterpolations util to fourslash for fuzzy diagnostic matching
* Simplify
* It’s not Swift
* Fix regexp
* Remove unnecessary type assertion
* Add tests for noEmitOnError
* Do not write files directly from builder when noEmitOnError is true
Fixes#34823
* make linter happy
* Instead of generating output in memory, check errors before doing the emit in case of noEmitOnError
Top-level this-assignments do not support computed properties. But the
binder forgets to check for computed properties and tries to bind them
normally. This hits a helpful assert.
This change stop binding this-properties with computed properties at the
top-level. There's nothing sensible we could do with them; we're unable
to late-bind entries to the global scope or to modules.
* Test
* Handle import type node when handling the namespace import and reexport
Fixes#33017
* Handle qualifier of the importTypeNode
* Handle export specifier
* Fix rename prefix when search for rename starts at qualifier in import type ndoe
* Fix rename of qualifier with importType node when invoked without provideSuffixAndPrefix option
* Create different watch options in compiler options
* Thread through the new watch options
* Actually use the options passed through for watch strategy
* Support delay on updating child directory watches
* Make watchOptions separate from compilerOptions
* Support passing watch options from command line
* Handle displaying of watchOptions
* Add isInferredProject, isConfiguredProject and isExternalProject
* Skip refreshing configured project on change of config file if its not loaded
* Open a tree of projects when doing findAllRefs or rename operations
* Fix addToSeen project key
* Refactor combineProjectsOutputWorker
* if the definition is local, no need to load and look in other projects
* Add disableSearchSolution as option to disable looking for solution
* Rename the option to disableSolutionSearching