* Stopped removing unused imports in files with syntactic errors
* Added allowDestructiveCodeActions arg
* Updated .d.ts baselines
* Stop factoring syntax errors. Weird that no tests break...
* Have args extend scope so it is not a breaking change
* Update src/harness/harnessLanguageService.ts
Co-authored-by: Jesse Trinity <jetrinit@microsoft.com>
* Fixed API breaking change, and renamed to skip
* Always with the baselines
* One more .d.ts baseline to fix
* Remove blank line in src/harness/harnessLanguageService.ts
Co-authored-by: Jesse Trinity <jetrinit@microsoft.com>
* Instantiate getter when infering setter parameter value
* Use esnext on tests
* Instantiate for JsDoc and getter from body
* PR comments
* Updated baseline
* Use faster, stricter prop type comparison when merging props in union prop creation
* Be better at determining this usage in methods, accept baselines
* Small style change
* Fix organize imports overlap
* Refactored multiline end position
* Added tests for single line trailing trivia
* Fix rearranging imports
* Fix lint error
* PR coments
* Skip up-to-date checks during force build
Save work by not checking timestamps or parsing the buildinfo file.
Retain correctness checks (like input file existence).
Suppress project status, which was confusing anyway.
* Print a message to indicate that --force is causing the rebuild
* Don't bother updating buildInfoChecked
* Add missing force check
* Serialize compiler options that are needed from old state when creating new state
* Dont write affectsGlobalScope if not true
* Encode FileInfo for better serialization size
* Update src/compiler/builder.ts
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
JSDoc typedefs don't actually have hosts, because they're not
semantically attached to a declaration. However, the parser still
attaches them to some declaration (or statement), but that declaration
is not related to the typedef.
Previously, delayedBindJSDocTypedefTag used getJSDocHost to walk past
the unrelated declaration, but #41858 correctly started categorising
typedefs as unattached, with no host, so the binder began falling
back to file scope.
The path to skip the unrelated declaration is always the same, though, so this
PR uses `typeAlias.parent.parent` instead of `getJSDocHost(typeAlias)`.
* Consider identical instances of the same symbol equivalent when creating union and intersection properties
* Also copy over mapper and type (if available) on cloned symbols
* Editorial feedback
* Add jsdoc to if statements
This should only happen in JS files, however, and there needs to be some
conditional handling of jsdoc on statements that can't have jsdoc in TS
files.
* Finish change
* Add test
* Test + Initial scribbles
The test is pretty good, the scribbles are actually cleanup from last
PR, although they break some tests.
* undo scribbles, add nonworking class-hack
* Ad-hoc name resolution for @link and @see
Turns out that you can't reuse check* functions if you want to retrieve
all meanings of a reference.
* fix failing test
* inline hapax function
* Fix find-all-refs baseline print
* Try to resolve C.m as static first
* Add interface tests
Co-authored-by: Andrew Branch <andrew@wheream.io>
`fs.statSync` throws `ENOENT` if there is a symlink to a nonexistent
target. This can be avoided by checking that the entry exists before
using it.
(This is annoying when editing tests in Emacs, since it keeps lock files
for modified-but-unsaved files, which are `.#foo` symlinks to a
nonexistent target.)
* Specified diagnostic for CLI flags missing a required --build
* Switched to an alternateMode member
* Added --build-incompatible flags too
* Small fixups to remove a hardcoding
* Switched to ||= factories
* Not a function
* I think I get it now
* Ignore object types in intersections with primitive types
* Add regression test
* Also handle instantiable types constrained to object types
* Add another test
* Add ignoreObjects optional parameter to getTypeFacts
* Corrected parsing for decorators on 'this' parameters
* Moved checking to parser and added a specific test
* Remove unrelated checker.ts blank line
* Missed some baseeline updates...
* If target:esnext,then useDefineForClassFields: true will now be the default.
* Added error if a private identifier is used in a static a initializer if target:ESNext and useDefineForClassFields:false.
* Added test for new useDefineForClassFields default and error message.
* Fixed tests after changing the default of useDefineForClassFields to true for target esnext
* Fixed code review suggestions.
* Updated error message.
* Added missing static check for the containing property. Fixed other code review issues.
* Allow redeclaring CommonJS alias with initial undefined
This allows us to read our own output, plus the times when people
manually write exactly the same pattern.
Fixes#40555
* Use control flow to type commonjs exports
1. Could probably use a *lot* more tests.
2. getTypeOfAlias redoes some work from resolveAlias because it needs to
not resolve the alias completely, just to its export.
* fix lint, improve jsdoc
* Add tests, improve+fix control flow
1. Update the module.exports test to match the exports ones.
2. Add a test of evolving commonjs type.
3. Add a test of assignment as last statement.
(1) exposed a bug that required a better synthetic reference. (3)
exposed a bug that was most easily fixed by giving source files a
`endFlowNode` like functions and setting it in the binder.
* fix lint