Component commits:
cfd472f7aa Make 'calendar' and 'numberingSystem' open strings in es2020.intl.
Co-authored-by: Daniel Rosenwasser <Daniel.Rosenwasser@microsoft.com>
Component commits:
21eb38bd7f Fix for crash when using ca call expression on private identifier coming from an any typed variable. (GH #42860)
Co-authored-by: Titian Cernicova-Dragomir <tcernicovad1@bloomberg.net>
Component commits:
0edae127ae Reduce void | undefined only in conjunction with subtype reduction
6b487a6db5 Accept new baselines
e7b6601de7 Add regression test
Co-authored-by: Anders Hejlsberg <andersh@microsoft.com>
Component commits:
214ef0c750 No did-you-mean-to-call error on casts
I chose to do the ad-hoc check rather than yet another tree walk.
1. It's faster to run and easier to read.
2. This error came from looking at real code. It happened twice, so I
think the best estimate for other uses that happened zero times is in
fact zero.
3. I couldn't think of other places to put the cast, given the
restrictions on `testedNode` just before the new code.
1d347785de Merge branch 'master' into no-did-you-mean-to-call-error-on-casts
b3be79ad0f Skip parentheses
2a288127e9 Merge branch 'master' into no-did-you-mean-to-call-error-on-casts
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
Component commits:
214ef0c750 No did-you-mean-to-call error on casts
I chose to do the ad-hoc check rather than yet another tree walk.
1. It's faster to run and easier to read.
2. This error came from looking at real code. It happened twice, so I
think the best estimate for other uses that happened zero times is in
fact zero.
3. I couldn't think of other places to put the cast, given the
restrictions on `testedNode` just before the new code.
1d347785de Merge branch 'master' into no-did-you-mean-to-call-error-on-casts
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
* Allow only package names as plugin names
* Remove extra argument following merge from master branch.
* kipped -> Skipped
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Make `tracing` either `undefined` or the same namespace as before.
Switching all calls to `tracing?.___` means that there is no cost for
a call or the arguments when tracing is not used. Comparing two runs
without tracing (27 runs, drop 5+5, avg rest) I get:
master:
42.59s user 1.00s system 165% cpu 26.372 total
changed:
42.01s user 0.982 system 165% cpu 26.039 total
(Makes it all private, so no api changes.)
* Commonjs module:create synthetic exports symbol
Previously, the `module` identifier in commonjs modules got a synthetic
type with a single property `exports`. The exports property reused the
file's symbol, which, for a module file, gives the correct exported
properties.
However, the name of this symbol was still the filename of the file, not
`exports`. This PR creates a synthetic symbol for `exports` by copying
in a similar way to esModuleInterop's `default` symbol in
`resolveESModuleSymbol` (although the intent there is to strip off
signatures from the symbol).
* correct parent of synthetic symbol
* Signature help: support non-trailing rest parameters
In signature help, the first rest parameter will always be the *last*
'current' parameter (disregarding types). Previously, the signature help
current-parameter highlight was only correct for trailing rest
parameters. However, with tuple types, you can now create non-trailing
rest parameters. This PR now correctly highlights non-trailing rest
parameters as the last 'current' parameter.
For example, `names` should be the current parameter in all the calls
below:
```ts
declare function loading(...args: [...names: string[], allCaps: boolean, extra: boolean]): void;
leading(/**/
leading('one', /**/
leading('one', 'two', /**/
```
And, because signature help doesn't do real overload resolution, `names`
is also the current parameter for other calls:
```ts
leading(1, 2, 3, 'ill-typed', /**/
leading('fine', true, /**/
```
* Change 'variadic' to 'rest'
* fix missed rename
* use single, original tuple instead
* Revert "use single, original tuple instead"
This reverts commit f0896f32ea.
* Improve sig help of trailing rest too
1. Trailing rest keeps highlight at end instead of going off the end.
2. Non-trailing rest disable highlight entirely (by putting the index
one past the end).
* update API baselines
* Exclude primitive types from union subtype reduction in most cases
* Accept new baselines
* Minor fixes
* Less aggressive checking of assertion function calls that don't affect control flow
* Accept new baselines
* Test when config file extends is incorrectly computed
Test for #40720
* Keep extended config's raw file, include, exclude relative to itself and correct it when setting extending options
Fixes#40720
* Make object literal properties new identifier locations when not contextually typed
* Fix completions after comma in object literal
* Update other test