Gabriela Araujo Britto
99ea99b386
Properly check singleton labeled tuple before unwrapping ( #48554 )
...
* properly check if singleton labeled tuple has optional element
* also check if labeled element is rest
2022-04-04 15:53:41 -07:00
Oleksandr T
aa3c5a787c
fix(48418): allow using empty tuple ( #48420 )
2022-04-04 14:56:35 -07:00
Oleksandr T
e5ca3e4386
fix(48406): resolve JSDoc host of property signature ( #48407 )
2022-04-04 14:42:50 -07:00
Pablo Sabater Jiménez
3b12284fc4
fixed code duplication ( #48425 )
...
* fixed code duplication
* updated baselines
2022-04-04 14:16:21 -07:00
Wesley Wigham
9d2f72b285
Remove nightly-only flagging for nodenext features ( #48555 )
2022-04-04 14:07:32 -07:00
Oleksandr T
7465f04666
fix(48542): omit parameter info of contextual union type ( #48549 )
2022-04-04 14:05:20 -07:00
Oleksandr T
e02998f70d
fix(48541): forbid function extraction to arrow function with expression body ( #48548 )
2022-04-04 12:27:49 -07:00
Andrew Casey
d5f5c6d61e
Convert many tests from verify.singleReferenceGroup to verify.baselineFindAllReferences ( #48518 )
...
* Convert referenceToClass to baselining
* Delete stray marker from findAllRefsInsideWithBlock
* Bulk convert tests that just call verify.singleReferenceGroup
* Update tests with duplicate names
* Bulk update verify.singleReferenceGroup tests with BOMs
* Semi-automatically convert FAR tests with explicit range code
* Convert findAllReferencesDynamicImport2 to baselines
2022-04-04 09:23:58 -07:00
magic-akari
99620117be
Fix crash when circular reference in variance annotations ( #48539 )
...
* Fix crash when circular reference in variance annotations
* chore: clean code
2022-04-04 08:33:47 -07:00
Oleksandr T
2db17fdda2
fix(48520): fix getting parameter type by index ( #48521 )
2022-04-03 21:42:37 -07:00
csigs
b1a25fd8b1
LEGO: Merge pull request 48534
...
LEGO: Merge pull request 48534
2022-04-03 03:46:54 -07:00
csigs
fd4943bd9c
LEGO: Merge pull request 48526
...
LEGO: Merge pull request 48526
2022-04-02 05:36:37 -07:00
Andrew Casey
337d1326fb
Sync fourslash shims and shims-pp ( #48507 )
...
It appears that they were intended to be identical so, in each case, I updated the side that looked less correct.
2022-04-01 11:14:14 -07:00
Andrew Casey
8020072281
Respect @BaselineFile in fourslash tests and tidy up quickInfoDisplayPartsVarShims ( #48506 )
2022-04-01 09:24:14 -07:00
csigs
acb927e8a5
LEGO: Merge pull request 48512
...
LEGO: Merge pull request 48512
2022-04-01 05:41:47 -07:00
Wesley Wigham
54fa69cb47
Fix API under exactOptionalPropertyTypes ( #48505 )
2022-03-31 21:45:34 -07:00
Ryan Cavanaugh
9153eaaee0
Reserve a core in runtests-parallel on non-CI machines ( #48502 )
2022-03-31 21:27:58 -07:00
Andrew Casey
70585aa0c0
Correct node used for isDefinition calculation ( #48499 )
...
It should be adjusted as in `getReferencedSymbolsForNode`. The baseline changes show that it was incorrectly returning false at keywords preceding definitions.
2022-03-31 12:18:12 -07:00
Oleksandr T
9cfa6e25af
fix(48405): emit dummy members from a mapped type ( #48481 )
2022-03-31 10:15:12 -07:00
Anders Hejlsberg
fd601ddf20
CFA for dependent parameters typed by generic constraints ( #48411 )
...
* Obtain apparent type in parameter destructuring check
* Add regression test
2022-03-30 16:33:01 -07:00
Anders Hejlsberg
3f483d87b4
No contextual typing from return types for boolean literals ( #48380 )
...
* No contextual typing from return types for boolean literals
* Accept new baselines
* Add regression tests
2022-03-30 16:32:24 -07:00
Oleksandr T
e62f960648
fix(47733): omit JSDoc comment template suggestion on node with existing JSDoc ( #47748 )
2022-03-30 15:36:47 -07:00
Jake Bailey
3c6c2799b6
Ensure that we copy empty NodeArrays during transform ( #48490 )
2022-03-30 15:33:51 -07:00
Adam Foxman
41aca7c337
Add a new compiler option moduleSuffixes to expand the node module resolver's search algorithm ( #48189 )
...
* Add moduleSuffixes compiler option and related tests. Update baselines for compiler options tests.
* Add a flag to the command-line parser which allows "list" params to preserve "falsy" values such as empty strings. Falsy values are normally stripped out.
* Add tests. Rework resolver logic to only run module-suffix code when needed.
* PR feedback
* Add test
* Remove unnecessary conditional.
2022-03-30 15:23:26 -07:00
Oleksandr T
c639d3afb9
feat(27615): Add missing member fix should work for type literals ( #47212 )
2022-03-30 12:55:18 -07:00
Gabriela Araujo Britto
f57bdaa097
Add label details to completion entry ( #48429 )
...
* add label details to completion entry
* Use label details for obj literal method completions
* add label details support flag
* add label details support to fourslash
* support both label details and non-label details in object literal method snippets
* CR fixes
* fixes after rebasing
* fix tsserver tests
2022-03-30 12:45:56 -07:00
Gabriela Araujo Britto
e25f04a30f
Enable method signature completion for object literals ( #48168 )
...
* skeleton of new feature
* working prototype
* refactor print and format code into its own function
* minor changes; don't support overloads
* have two completion entries
* get rid of accessor support
* add snippet support
* add formatting
* add trailing comma
* add sourcedisplay
* support auto-imports via completion details
* add user preference option and fix ordering of entries
* cleanup
* don't return code actions for no import fixes
* make sortText lower priority for snippets
* get rid of flag
* use optional member sort text
* update baselines
* don't collect method symbols if insert text is not supported
* remove comment
* return undefined if type is not function type
* only slice if needed
* use union reduction; more test cases
* WIP: modify sort text system
* Improve new sort text system
* add signature and union type check
* re-add flag
* fix tests
* rename sort text helper
* fix test and code for union case
* add new flag to protocol type
* fix spaces
* CR: minor fixes
* CR: more fixes
* CR: restructure main flow
* minor fix
2022-03-29 17:19:02 -07:00
Andrew Branch
7ec7d6d8e0
Fix string literal completions when a partially-typed string fixes inference to a type parameter ( #48410 )
...
* Add failing test
* Fix string literal completions when a partially-typed string fixes inference to a type parameter
2022-03-29 09:07:38 -07:00
Oleksandr T
bf7bfa1b3f
fix(48445): show errors on type-only import/export specifiers in JavaScript files ( #48449 )
2022-03-29 08:38:58 -07:00
Andrew Branch
d962091d94
Fix newline inserted in empty block at end of formatting range ( #48463 )
...
* Fix newline inserted in empty block at end of formatting range
* Clean up
* Fix refactoring mistake
2022-03-28 13:50:17 -07:00
Wesley Wigham
a5dae37943
Prevent looking up symbol for as const from triggering an error ( #48464 )
2022-03-28 12:53:36 -07:00
Anders Hejlsberg
df7ed82dd5
Revise accessor resolution logic and error reporting ( #48459 )
...
* Revise accessor resolution logic and error reporting
* Accept new baselines
* Update isTypeElement
* Add tests
2022-03-28 10:44:11 -07:00
Oleksandr T
c720ad6ffb
fix(48166): skip checking module.exports in a truthiness call expression ( #48337 )
2022-03-28 08:23:20 -07:00
csigs
eb95b32dfb
LEGO: Merge pull request 48450
...
LEGO: Merge pull request 48450
2022-03-27 02:49:35 -07:00
csigs
1ed1a2394e
LEGO: Merge pull request 48436
...
LEGO: Merge pull request 48436
2022-03-26 02:55:15 -07:00
Oleksandr T
f4d76e5b93
fix(48031): show circularity error for self referential get accessor annotations ( #48050 )
2022-03-25 15:36:22 -07:00
Andrew Casey
e7426251b0
Revert "Fix contextual discrimination for omitted members ( #43937 )" ( #48426 )
...
This reverts commit 751c114126 , which caused check time for our MUI benchmark to increase by ~25%.
2022-03-25 13:09:19 -07:00
Oleksandr T
0cc3535cae
revert #44956 - remove hyphen separator ( #48416 )
2022-03-25 08:21:57 -07:00
Mateusz Burzyński
3ec1b04808
Add explicit tests for unconstrained type param not being assignable to {} and Record<string, any> ( #48421 )
2022-03-25 05:36:02 -07:00
csigs
a7608e1d31
LEGO: Merge pull request 48422
...
LEGO: Merge pull request 48422
2022-03-25 02:48:57 -07:00
Oleksandr T
49a12dcbbb
fix(47081): show completion list in parenthesized object literal arguments ( #47104 )
2022-03-24 15:30:26 -07:00
Wesley Wigham
8907d7a675
Fix test build post-LKG ( #48403 )
2022-03-24 12:55:27 -07:00
csigs
4fdc4fd6b6
LEGO: Merge pull request 48400
...
LEGO: Merge pull request 48400
2022-03-24 02:52:05 -07:00
TypeScript Bot
2b7bd85935
Update package-lock.json
2022-03-24 06:06:26 +00:00
Wesley Wigham
8cd4b7a5da
Make the unconstrained type parameter and {} assignability rule not apply under strictNullChecks ( #48366 )
...
* Make the unconstrained type parameter and {} assignability rule not apply under strictNullChecks
* Fix lint, PR feedback
2022-03-23 16:22:40 -07:00
Wesley Wigham
b5a3a058f5
Merge diagnosticsProducing and nonDiagnosticsProducing checkers into a single checker supporting lazy diagnostics ( #36747 )
...
* Merge diagnosticsProducing and nonDiagnosticsProducing checkers into a single checker supporting lazy diagnostics
* Fix lint
2022-03-23 16:21:06 -07:00
Wesley Wigham
26c701c351
Fix document registry cache key calculation for paths compiler option ( #48389 )
...
* Fix document registry cache key calculation for `paths` compiler option
* PR feedback
2022-03-23 15:57:39 -07:00
Zzzen
20c01cdd3f
align ClassStaticBlockDeclaration with IIFE in CFA ( #44969 )
...
* align ClassStaticBlockDeclaration with IIFE in CFA
* isIIFELike => isImmediatelyInvoked
* fix unexpected used-before-assignment errors
* update baseline
2022-03-23 15:47:29 -07:00
Minh Quy
4ec16b2a6b
Fix#48281 - Indentation not respected when executing various refactorings (TypeScript/JavaScript) ( #48340 )
...
* fix(48281) - Preserve indentation when adding missing properties
* fix(48281) - Fix object literal indentation like block
* fix(48281) - Indentation for object literal started with curly brace similar to block
2022-03-23 10:40:50 -07:00
gfyoung
ba3645e034
fix(48218): Split Intl.DisplayNames options ( #48262 )
...
Closes https://github.com/microsoft/TypeScript/issues/48218
2022-03-22 17:22:30 -07:00