26289 Commits

Author SHA1 Message Date
TypeScript Bot 3c936358b2 Cherry-pick PR #47411 into release (#47420)
Component commits:
394c8422c2 Add failing test case.

9906b43ffa Guard against undefined relative path.

Co-authored-by: Daniel Rosenwasser <drosen@microsoft.com>
2022-01-13 12:17:50 -08:00
TypeScript Bot a9c5a0472f Update user baselines (#29444) 2019-01-16 12:05:41 -08:00
Benjamin Lichtman 5fc8f1dd80 Add opt-in user preference for prefix and suffix text on renames (#29314)
* Add user preference to control renaming through exports

* Only impact renaming

* Update baselines

* Use flag to control all prefix and suffix text and imports

* [WIP] add tests

* Only skip export import specifier with flag

* [WIP] Update tests

* Update test

* Pick up preference from host and update test

* Shorten flag name

* Add missing utility function

* Update comment

* [WIP] rename flag and respond to cr

* [WIP] Add flag for forRelatedSymbol

* Use larger search symbol set for old-style rename

* Respond to CR

* Fix small error

* Fix type mismatch

* Update comment and remove unnecessary exprot

* Respond to CR
2019-01-16 10:58:07 -08:00
Wesley Wigham 41a7bf4b73 Fake up value declaration for synthetic jsx children symbol so they get excess property checked (#29359) 2019-01-15 22:31:57 -08:00
Daniel Rosenwasser 9cd5f2dd3c Add regression test. (#29433) 2019-01-15 17:39:02 -08:00
Daniel Rosenwasser adb4738cff Merge pull request #28132 from a-tarasyuk/feature/28086
28086 - "--downlevelIteration errors should mention using later targets"
2019-01-15 14:06:57 -08:00
Wesley Wigham 49689894d7 Elaborate jsx children elementwise (#29264)
* Heavy WIP, but has good contextual typing fix

* Add arity error, refine messages and spans

* Small error message change

* Better error messages, text-specific message
2019-01-15 11:32:36 -08:00
Andrew Casey 35f64fa894 Merge pull request #29421 from amcasey/DisabledLSHardening
Harden telemetryOnOpenFile against disabled projects
2019-01-15 11:23:05 -08:00
Andrew Casey 3fb09630a8 Add regression test 2019-01-15 10:55:15 -08:00
Benjamin Lichtman c5948bf068 Merge pull request #29385 from uniqueiniquity/renameImportPref
Add user preference to opt-in to renaming import paths
2019-01-15 10:29:57 -08:00
Ron Buckton 760b02b259 Merge pull request #29420 from Microsoft/fix29108
Remove overzealous simple relationship check for unique symbols
2019-01-15 09:47:13 -08:00
Andrew Casey b86cb27d0b Fix trailing whitespace 2019-01-14 18:13:13 -08:00
Andrew Casey 104434182b Harden telemetryOnOpenFile against disabled projects
As for syntax-only servers, we can't meaningfully report open-file
telemetry for projects with disabled language services.

Hopefully, a deeper fix will follow, but this solves the immediate
problem that VS disables the LS for all projects when it sees a failure
in applyChangedToOpenFiles (because it assumes the server state is
corrupt).
2019-01-14 17:43:06 -08:00
Ron Buckton 5763e2c3d4 Remove overzealous simple relationship check for unique symbols 2019-01-14 17:08:04 -08:00
Benjamin Lichtman 2c50ed3089 Respond to CR 2019-01-14 17:05:25 -08:00
Sheetal Nandi d53619a30d Merge pull request #29418 from Microsoft/exportEquals
Handle generating action for export equals with anonymous symbol
2019-01-14 16:12:32 -08:00
Sheetal Nandi 6e54cbdaff Handle generating action for export equals with anonymous symbol
Fixes #28845
2019-01-14 15:32:13 -08:00
Sheetal Nandi d69b2ea448 Merge pull request #29380 from Microsoft/sourceMap
Use the SourceMapSource to get line and column instead of current source file
2019-01-14 14:30:27 -08:00
Wesley Wigham 3d2bf6a75f Fix implement interface quickfix import types (#29410)
* Pass module specifier resolution host thru types constructed by implements quickfixes

* Add regression test

* Fix scope node for generated methods, fix lints
2019-01-14 13:56:27 -08:00
Wesley Wigham dc0f4afe5e Save & recalculate declare flag modifier on late printed statements (#29412)
* Save & recalculate declre flag modifier on late printed statements

* Accept related baseline updates
2019-01-14 13:53:04 -08:00
Sheetal Nandi d4055a3234 Merge pull request #26017 from ajafff/rest-param-destructuring
allow BindingPattern in FunctionRestParameter
2019-01-14 10:58:19 -08:00
Gabriela Britto e5708e1903 Merge pull request #29352 from Microsoft/qualified-name-param-tag-error
Qualified name param tag error
2019-01-14 10:28:08 -08:00
Alexander ba94fd9e05 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28086 2019-01-12 08:39:06 +02:00
Benjamin Lichtman c88016d397 Fix comment 2019-01-11 14:52:47 -08:00
Sheetal Nandi d1061579d3 Merge branch 'master' into sourceMap 2019-01-11 14:47:24 -08:00
Benjamin Lichtman d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Wesley Wigham fadd95f72b Fix unneeded cast lints (#29383) 2019-01-11 14:24:49 -08:00
Sheetal Nandi 9f19c06dbf Merge pull request #29372 from JoshuaKGoldberg/codefix-enable-decorators
Added codefix to enable experimentalDecorators in the user's config file
2019-01-11 12:45:28 -08:00
Sheetal Nandi 021c63f1c3 Use the SourceMapSource to get line and column instead of current source file
Fixes #29300
2019-01-11 12:24:33 -08:00
Sheetal Nandi b23664adf7 Test to verify external source map range addition 2019-01-11 12:23:24 -08:00
Alexander d5f5d7347e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/28086 2019-01-11 22:21:02 +02:00
Alexander a076417837 remove unused error message 2568 2019-01-11 22:13:29 +02:00
Josh Goldberg 7b6adae6dd Extracted compilerOptions setting to helper function 2019-01-11 15:05:24 -05:00
Sheetal Nandi fb99d552ea Merge pull request #29022 from mprobst/no-resolve-libref
Do not process library reference directives with noLib set.
2019-01-11 09:03:46 -08:00
Josh Goldberg 8d28f9230c Added codefix to enable experimentalDecorators in the user's config file
Starts on #29035 by creating a codefix to enable the `experimentalDecorators` setting in a user's config file, if one exists. The issue's discussion also mentions giving a more precise error message if the user has a jsconfig or tsconfig or creating one if not; I'd rather tackle those in separate PRs to keep this one small.

Doesn't create the code action if no config file is present. Otherwise keeps to the precedent of returning without action when the config file contents aren't the expected JSON structure (looking at `fixCannotFindModule.ts`).  Moves a couple JSON helpers from that file into the sibling `helpers.ts` so both codefixes can use them.
2019-01-11 09:20:12 -05:00
Daniel Rosenwasser c146d1f8af Merge pull request #29363 from Kingwl/type_arguments_for_jsx
Emit jsx type arguments
2019-01-11 00:50:58 -08:00
Martin Probst f3f5877c5f Add tests for noLib with <reference lib> and bundling. 2019-01-11 09:02:49 +01:00
Martin Probst cc7ddaed28 Add tests for noLib with <reference lib>. 2019-01-11 09:02:49 +01:00
Martin Probst 11b150129a Do not process library reference directives with noLib set.
When a user sets `noLib`, this indicates that they will supply their own
list of `lib*.d.ts` files as part of input sources. In this situation,
TypeScript should not try to resolve library reference directives.

This avoids a problem where TypeScript loads a file that e.g. contains
`/// <reference lib="es2015.symbol"/>`. Previously, TypeScript would use
its builtin ts.libMap and attempt to load builtin libraries from the
TypeScript installation, instead of respecting the user-supplied set of
libraries.
2019-01-11 09:02:49 +01:00
王文璐 9d16225bc2 emit jsx type arguments 2019-01-11 13:34:18 +08:00
Gabriela Britto ed5775865a Add missing baseline references 2019-01-10 15:45:00 -08:00
Gabriela Britto b3633fab52 Add more tests for qualified name param without top level object error 2019-01-10 15:04:16 -08:00
Wesley Wigham aba0b700b6 Allow circular umd-merged-with-augmentation refs to resolve to the module as intended (#29335) 2019-01-10 14:48:15 -08:00
Wesley Wigham 76f444e338 Allow nonnull assertions in references (#29351) 2019-01-10 14:45:19 -08:00
Gabriela Britto ebe193c6d7 Minor refactor in paramTagNestedWithoutTopLevelObject.ts 2019-01-10 14:05:10 -08:00
Gabriela Britto e2524e3750 Add test for qualified name param without top level object error 2019-01-10 09:55:06 -08:00
Gabriela Britto a9ed42f541 Merge branch 'master' into qualified-name-param-tag-error 2019-01-10 09:49:26 -08:00
Anders Hejlsberg 52b82560e8 Merge pull request #29338 from Microsoft/fixConditionalTypeResolution
Fix conditional type resolution
2019-01-09 17:18:12 -08:00
Anders Hejlsberg 0c1c97e501 Accept new baselines 2019-01-09 16:16:31 -08:00
Anders Hejlsberg 9fda7014ca Add regression tests 2019-01-09 16:16:24 -08:00