* add tests but not baselines or fixes
* Update original change
Still probably wrong; probably doesn't even compile beacuse I'm just
typing on my laptop.
* fix error code ok
* notes to self
* Error: property is specified more than once via spread
* make jsx tests stricter
* update semicolon error message
* use ?. because it is great
* use maybeTypeOfKind in new code
* restore jsx error
* add tests
* Refactor fix-all-missing-imports to be reusable by other codefixes
* Migrate infer-from-usage to use ImportAdder
* Add infer from usage test importing more than one thing in a single fix
* Migrate implement interface / abstract members fixes to use ImportAdder
* Update old tests
* Use type-only imports when it would be an error not to
* Add another test
* Rename stuff
* Fix jsdoc comment parsing initial state
Jsdoc comment parsing can be invoked in two modes:
1. top-level parsing, for comments not inside a tag.
2. tag parsing, for comment that occur after the semantic parts of a
tag.
Top-level parsing skips an initial * because it assumes that it is starting
at the very beginning of a JSDoc comment. Tag parsing does not.
The two modes are distinguished by an optional second parameter named
`margin`. When `margin` is provided, it provides an initial indent used
for comment alignment.
Previously, the check for `margin` was a truthy check `if (margin)`.
This check incorrectly treats `margin=""` the same as
`margin=undefined`.
This PR changes the check to `if (margin !== undefined)`, which
correctly treats `margin=""` the same as `margin=" "`.
* Fixes for broken tests
1. Use SawAsterisk start state.
2. @template needs to skip asterisk in addition to whitespace while
parsing type parameter names.
* undo code move
* Improve reasoning about when to create deferred type references
* Accept new baselines
* Fix minor issues
* Handle default type arguments case in isDeferredTypeReferenceNode
Exposes `hasOnlyExpressionInitializer` as a public function so users of
TypeScript compiler APIs do not have to roll their own
`HasExpressionInitializer` type guards.
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* WIP on making the JSX text node not include whitespace
* Scans to the last newline for JSX correctly
* Handle JSX closing element wrapping
* Offload all jsx text indentation handling to indentMultilineCommentOrJsxText
* Switch from find node -> find inde in formatting
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Conditionally elide a parameter from contextual type signature calculation
* Slightly different approach to forbid inference to specific expressions
* Handle nested literals and mapped types correctly
* Delete unused cache
* Rename ContextFlags.BaseConstraint and related usage
* Add tests from my PR
* Update ContextFlags comment
Co-Authored-By: Wesley Wigham <wwigham@gmail.com>
* Update comments and fourslash triple slash refs
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Allow 'find references' to work on most declaration keywords
* Add support for rename
* Add more keywords, move logic out of checker and into services
* Add additional type and expression keywords
* Add test case to verify directory casing preservation when watching
* Fix unicode file name handling when watching failed lookup locations
* Add special file name lower conversion routine and use that instead of toLowerCase
Fixes#31819 and #35559
* Remove unicode from code
* Replace toLocaleLowerCase on filenames with ts.toFileNameLowerCase
* Make the intent of using toFileNameLowerCase more clear and why we make the restriction on turkish I with dot on top of it
* Update baselines for newly added tests in master
* Refactor the test
* Add tests for syntax errors in tsconfig not being reported
* Report config file parsing diagnostics correctly
Fixes#36515
* Fix errors in existing tests for unintended tsconfig parse errors
* Fix lint
* Handle when files get checked in different orders
* Fix interface extends clause
* Fix import= something type only from a module
* Revert apparently unnecessary addition
* Revert "Revert apparently unnecessary addition"
This reverts commit 7444b0b72e.
* Disallow `import = a.b.c` on anything with type-only imports
* Safety first
* Add test for TS Server single-file open
* Add big comment
* Extract error reporting function for import aliases
* Delete blank line
* Un-export, comment, and colocate some utils
* Combine 3 type-only marking function calls into one
* Add more export default tests