* Fix renaming an ExportSpecifier name when propertyName is present (#36790)
* Fix renaming exportSpecifier name when propertyName is present
* Add baseline test for name without propertyName too
* Set correct pos for NamespaceExport (#36794)
* Set correct pos for NamespaceExport
* Update tests
* Cherry-pick PR #37064 into release-3.8
* Adds floating block comments to the outlining spans response
* Only use one route for grabbing outline nodes, which now includes special casing the EOF token
Component commits:
4605c3498f fix(36989): omit 'async' modifier for methods in declaration files.
c144e5e94e Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/36989
fb7fd4260c remove useless condition
c2b709a047 Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/36989
Co-authored-by: Alexander T. <alexander.tarasyuk@outlook.com>
* Add tests for specifying composite as command line option
* Allow passing --composite false on commandline
* Add test to verify tsc --composite false from command line
* Handle "undefined" as option value to be set to undefined for that option
* Support "null" as option to be converted to undefined which is normally end result from our config file as well
* Support null as option for any tsconfig only option as well, and dont support undefined
* Fix public api test case
* Validates objects instead of stringify result
* Add composite true to base source
Component commits:
724c7555d0 Remove unnecessary assert (since we allow already open file to be opened again even through openFile command - partially) from updateOpen command Fixes#35034
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Component commits:
888ebf4b2d Fix crash on aliased,exported @enum tag in jsdoc
THe code to bind `@enum` and `@typedef` didn't handle the case that the
`@enum` was on a property assignment to an alias of module.exports.
Specifically, `x` needs to be correctly aliased to the file's symbol in
the example below:
```
var x = module.exports = {};
/** @enum {string} */
x.E = {
A: "A"
};
```
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* Fix renaming an ExportSpecifier name when propertyName is present (#36790)
* Fix renaming exportSpecifier name when propertyName is present
* Add baseline test for name without propertyName too
* Set correct pos for NamespaceExport (#36794)
* Set correct pos for NamespaceExport
* Update tests
Component commits:
206d39e9b5 Add/convert to failing tests.
11e827ba84 Stop offering to convert single string literals to template expressions.
7d3ad0c8f6 Ensure we're actually testing for single quotes.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@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 7444b0b72ea2e628ff414b675ef42723a6a7695d.
* 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
* Class fields w/esnext+[[Define]]:no shadow error
With useDefineForClassFields: true and ESNext target, initializer
expressions for property declarations are evaluated in the scope of
the class body and are permitted to reference parameters or local
variables of the constructor. This is different from classic
Typescript behaviour, with useDefineForClassFields: false. There,
initialisers of property declarations are evaluated in the scope of
the constructor body.
Note that when class fields are accepted in the ECMAScript
standard, the target will become that year's ES20xx
* add negative test case
* Add explanatory comment
Previously subtypes of Error extended Error, but the matching subtypes
of ErrorConstructor did not extend ErrorConstructor. The members in
es5.d.ts are identical, so there's no need except for allowing interface
merging into ErrorConstructor to affect subtypes as well.
Previously the jsdoc index signature syntax was incorrectly treated the
same as Object:
```js
/** @typedef {Object} AllowsNesting
* @property ... */
/** @typedef {Object.<string,string>} IncorrectlyAllowsNesting */
```
Fixes#34911