33297 Commits

Author SHA1 Message Date
Oleksandr T
d8ebeebc59 move tests to conformance/salsa from compiler 2022-05-13 09:24:33 +03:00
Oleksandr T
9607a5310f add messages to plainJSErrors 2022-05-13 09:24:08 +03:00
Oleksandr T
538d6ce828 fix(48948): disallow constructor name in class accessors and generators 2022-05-04 21:04:23 +03:00
Gabriela Araujo Britto
8f56f6b49d
Don't go past import in cross-project renaming (#48758)
* WIP

* fix cross-project renaming logic

* only use configure if prefix opt is defined

* refactor skipAlias into stopAtAlias

* fix stopAtAlias

* update another stopAtAlias location
2022-05-03 07:32:44 -07:00
Daniel Rosenwasser
3b8b2078a3
Temporarily revert unconstrained type parameter strictness in TS 4.7 (#48923)
* Revert a change around allowing unconstrained type parameters to '{}'.

* Accepted baselines.
2022-05-02 15:49:16 -07:00
那里好脏不可以
bb887ea1f2
fix(48557): Add missing JSDoc parameters (#48560)
* Fix jsdoc of some `DataView` method.

* Add author by 'Fix jsdoc of some `DataView` method'.

* Fix jsdoc of some `DataView` method.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.

* Fix jsdoc of some `DataView` method in `es2020.bigint.d.ts`.

change 'written' to 'read' by `getXXX` methods, and remove 'otherwise' by every method which has `littleEndian` param.
2022-05-02 13:21:37 -07:00
Nathan Shively-Sanders
e73d755668
Fix formatter's processChildNodes (#48921)
processChildNodes needs to skip processing when the node array is
outside the target range, just like processChildNode already does for a
single node.

Fixes #48006
2022-05-02 12:50:24 -07:00
Mateusz Burzyński
63a941dc2a
Add a regression test for completion list in object literal involving inferred obj with optional members (#48910) 2022-05-02 12:27:49 -07:00
csigs
6834969f8f
LEGO: Merge pull request 48913
LEGO: Merge pull request 48913
2022-05-02 06:37:43 -07:00
TypeScript Bot
7cb88464de Update package-lock.json 2022-05-02 06:06:36 +00:00
csigs
eca1b4586c
LEGO: Merge pull request 48909
LEGO: Merge pull request 48909
2022-05-01 05:48:19 -07:00
TypeScript Bot
7ae09880f8 Update package-lock.json 2022-05-01 06:06:20 +00:00
Oleksandr T
99ffa394a8
fix(48759): throw an error on using import expression with type arguments (#48787) 2022-04-29 14:19:20 -07:00
Felipe Armoni
fd06132ce9
Fix #47753 - Organize imports removes type imports that are only referenced in @link (jsdoc) (#47824)
* Added unit test

* Added baseline test

* Dirty solution

* Code refactoring and improvements

* Added more test cases

* Refactor to use flatMap

* Added utility function to get all Nodes with JSDocs

* Minor improvements

* Use recursion to check all tree levels

* Removed unit test

* Removed previous changes

* Updated resolveEntityName call

* Updated dontResolveAlias clause

* Updated symbol flags

* Updated baseline

* Fix dont resolve alias problem

* Updated tests
2022-04-29 13:45:00 -07:00
Daniel Rosenwasser
18b08fc7c9
Use same error for iteration in <=ES5 (#48881)
* Use the same error for iterating over an Iterable in ES5 or lower.

* Accepted baselines.
2022-04-29 10:45:20 -07:00
TypeScript Bot
189c2b9e4a Update package-lock.json 2022-04-29 06:06:45 +00:00
Sheetal Nandi
61c3bfe484
Dont reload config file when package.json change is detected (#48866)
Fixes #48315
2022-04-27 18:07:54 -07:00
Oleksandr T
9b3853d49e
fix(48851): exclude in from document highlights (#48853) 2022-04-27 17:51:05 -07:00
ZHAO Jinxiang
0885482eeb
Fix export default expression comment (#48323) 2022-04-27 16:33:46 -07:00
Andrew Branch
476fc625df
Eagerly resolve module specifiers for auto-import completions in --moduleResolution node12+ (#48752)
* Add failing test

* Block auto-import module specifiers including node_modules path

* Eagerly resolve module specifiers in completions in nodenext so failures can be filtered

* Add completion info flags for telemetry

* Update API baseline

* Update completions baselines

* Fix missed boolean flip

* Fix remaining tests
2022-04-27 16:07:15 -07:00
Oleksandr T
717a1be3c9
feat(48743): allow autocompletion in parameter object destructuring in JavaScript (#48757) 2022-04-27 14:00:01 -07:00
Nicola Dardanis
d45012c5e2
Add JS-specific diagnostic message for resolve() in Promise where type argument can't be inferred (#48533)
* change error message on Promise

* fix(46570): Unhelpful Promise type argument hint in JS file

* refactor: Reword void Promise message for JSDoc type hint to provide better feedback

Co-authored-by: Osa <osaimola@gmail.com>
2022-04-27 11:55:35 -07:00
Nathan Shively-Sanders
2a78b225d0
Stop tag after @callback from crashing (#48860)
By copying the kludge in @typedef. @callback's order is simpler, so the
kludge is simpler. However, it's wrong here, and in @typedef. Parsing
tag comments is normally supposed to happen at the end of a tag, but in
@callback and @typedef happens *before* parsing the nested
@param/@property tags.

I still need to figure out what a real fix is -- but for the beta,
copying the existing crash-avoidance kludge from @typedef is best
anyway. I added a test case for typedefs for future use as well.
2022-04-27 11:21:10 -07:00
Darius D
bab02d24be
Add Node v18 to CI (#48824)
* Add Node v18 to CI

* Address comments
2022-04-27 08:50:22 -07:00
TypeScript Bot
3d3fa0c0c8 Update package-lock.json 2022-04-27 06:09:04 +00:00
Andrew Branch
7b6b4dc258
Fix getExportSymbolOfValueSymbolIfExported (#48769) 2022-04-26 13:39:20 -07:00
TypeScript Bot
c5f493e840 Update package-lock.json 2022-04-26 06:06:24 +00:00
Anders Hejlsberg
787bb9ddb6
Improve support for numeric string types (#48837)
* Improve support for numeric string types

* Update test

* Add tests
2022-04-25 15:36:06 -07:00
Andrew Branch
7920783876
Fix workflow syntax error (#48842) 2022-04-25 13:03:02 -07:00
Marek Dědič
42fc05b087
Don't run scheduled GitHub actions on forks (#48693)
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2022-04-25 11:37:54 -07:00
TypeScript Bot
06fb30725d Update package-lock.json 2022-04-25 06:06:45 +00:00
Andrew Branch
c99380f87b
Fix auto-import completions sometimes not updating existing imports (#48815) 2022-04-22 15:32:52 -07:00
Jake Bailey
07660c8307
Fix emit for undefined SourceFile (#48774)
Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2022-04-22 11:18:53 -07:00
Sheetal Nandi
94cb657b1c
Fix: verification of incremental correctness that was not working because of using wrote writeFile (#48751)
* Use fixed time for vfs so baselining is consistent

* Baseline buildinfos

* Write new file text in baseline even if the file wasnt read on the shadow

* Remove unnecessary debugger statement

* Make sure that incremental correctness is checked with correct writeFile so we know buildInfo was written
Also baseline these so its easy to verify the changes

* More baselines for the tsbuildinfo

* Renames and test fixes after dts Signature change merge

* COmment
2022-04-22 09:30:58 -07:00
Mateusz Burzyński
af30c79093
Fixed string literal completions for partially-typed strings when overload could get matched (#48811) 2022-04-22 08:36:14 -07:00
TypeScript Bot
71f94c5bdb Update package-lock.json 2022-04-22 06:06:24 +00:00
Oleksandr T
d71dd1d912
fix(48556): throw an error on jsx spread attributes with an invalid type (#48570) 2022-04-21 16:31:16 -07:00
Andrew Branch
7abdb9e7ef
Format completion snippet text before escaping (#48793)
* Format snippet text before escaping

* Reset `escapes` before printing so printer can be reused
2022-04-21 13:40:14 -07:00
Sheetal Nandi
ab2523bbe0
Handles time on vfs and write non empty shadowed files in baseline even if they were not read (#48703)
* Use fixed time for vfs so baselining is consistent

* Baseline buildinfos

* Write new file text in baseline even if the file wasnt read on the shadow

* Remove unnecessary debugger statement
2022-04-21 11:50:28 -07:00
Sheetal Nandi
7a59e45f48
During emit, if shape signature for the file is same as version, then update it with emitted d.ts file (#48616)
* If we are writing dts file and have used file text as version, we can update the signature when doing actual emit

* Make WriteFileCallback Api ready for future

* Assert that there is only single source file when emitting d.ts file
2022-04-21 11:00:34 -07:00
Sheetal Nandi
45faac7e70
If we are updating dts of any of the file and it affects global scope, everything needs update in signature and dts emit (#48600)
* Add test

* Renames

* More refactoring

* If we are updating dts of any of the file and it affects global scope, everything needs update in signature and dts emit
Fixes #42769
2022-04-20 21:05:10 -07:00
John Lusty
273a567617
Fix handling of prologue statements when there are parameter property declarations (#48775) 2022-04-20 08:49:22 -07:00
Wesley Wigham
ce487e4fd3
Fix meta property symbol lookup (#48773) 2022-04-19 17:57:06 -07:00
Andrew Branch
d81a976c14
Ensure enum aliases referenced in other enum members do not get marked as referenced (#48770)
* Add test

* Ensure enum aliases referenced in other enum members do not get marked as referenced
2022-04-19 15:23:25 -07:00
Patrick Szmucer
2e619fdc80
Fix transformed constructor code when there is code between prologue statements and super call (#48765) 2022-04-19 09:19:25 -07:00
TypeScript Bot
6894f913ec Update package-lock.json 2022-04-19 06:06:46 +00:00
Jake Bailey
d3943fc86f
Disallow line break between entity name and type arguments in typeof expression (#48755) 2022-04-18 16:18:31 -07:00
Anders Hejlsberg
65f6cb23d3
Constraints for mapped types with filtering 'as' clauses (#48699)
* Constraints for mapped types with filtering 'as' clauses

* Add regression test
2022-04-18 14:24:22 -07:00
Sheetal Nandi
56a4a93718
Instead of maintaining cache id etc, reset the "working" exports map cache. (#48579)
* Revert "Avoid no-op export map updates (#45238)"

This reverts commit 0f6e6efde08385916602e254f406f1703907b2a5.

* Need to reset currentAffectedFilesExportedModulesMap after commiting to final exports map
2022-04-15 15:11:30 -07:00
Andrew Branch
0976658418
Allow triggering twoslash bisection manually (#48721) 2022-04-15 12:44:37 -07:00