Andrew Casey and GitHub
e2f47a2db1
Duplicate GDPR fragment from VS Code repo ( #46625 )
...
* Duplicate GDPR fragment from VS Code repo
...because the tool doesn't handle cross-repro references.
* Explain functionality in more detail
2021-11-03 10:37:31 -07:00
Anders Hejlsberg and GitHub
831b770b95
Control flow analysis for destructured discriminated unions ( #46266 )
...
* CFA for dependent variables destructured from discriminated union
* Accept new baselines
* Add tests
* Limit calls to isSymbolAssigned
* Fix wrong operator
2021-11-02 15:48:13 -07:00
de23842e45
Allow import assertions on esm imports under module: nodenext ( #46630 )
...
* Allow import assertions on esm imports under module: nodenext
* Changes to copy
Co-authored-by: Andrew Branch <andrew@wheream.io >
2021-11-02 15:34:37 -07:00
Oleksandr T and GitHub
b8f8fd7a3e
fix(46512): allow to use tag names containing keywords with - ( #46546 )
2021-11-02 15:12:10 -07:00
Anders Hejlsberg and GitHub
33fe1b6ffc
Fix contextual typing for symbol-named properties ( #46558 )
...
* Properly handle symbol-named properties in contextual types
* Update index signature in PropertyDescriptorMap
* Add regression tests
2021-11-02 14:05:41 -07:00
Anders Hejlsberg and GitHub
373accf28f
Improve recursion depth checks ( #46599 )
...
* Decrease recursion depth limit to 3 + smarter check for recursion
* Accept new baselines
* Always set last type id
* Keep indexed access recursion depth check
* Less expensive and corrected check for broadest equivalent keys
2021-11-02 14:05:17 -07:00
Anders Hejlsberg and GitHub
56f81075f9
Properly check whether union type contains only primitive types ( #46645 )
...
* Properly check whether union type contains only primitive types
* Add regression test
* Remove 'export' modifier from test
2021-11-02 12:46:26 -07:00
Andrew Branch and GitHub
7f8bf0b9c4
Fix git remote in cherry pick script ( #46647 )
2021-11-02 12:39:42 -07:00
Anders Hejlsberg and GitHub
7cbcfeea99
Exclude identity relation from mapped type relation check ( #46632 )
...
* Exclude identity relation from mapped type relation check
* Add regression test
2021-11-02 06:54:35 -07:00
TypeScript Bot
2424d0e575
Update package-lock.json
2021-11-02 06:06:22 +00:00
Oleksandr T and GitHub
5142e37f2d
fix(43292): forbid highlighting multiline template strings ( #46531 )
2021-11-01 14:21:38 -07:00
Eli Barzilay
fa2ad1a35a
Fix findUpDir.ts and uses
...
Missed a bunch of stuff in #46414 (556098e ).
2021-11-01 16:45:49 -04:00
Daniel Rosenwasser and GitHub
d89076381e
Bump version to 4.6 and accept baselines. ( #46612 )
2021-11-01 11:45:22 -07:00
Daniel Rosenwasser and GitHub
6d33d8797b
Check for type parameters on original type when getting type argument completions ( #46614 )
...
* Add failing test.
* Check for type parameters on the original type when asking for the type argument constraint.
* Update tests/cases/fourslash/stringLiteralTypeCompletionsInTypeArgForNonGeneric1.ts
2021-11-01 11:41:43 -07:00
csigs and GitHub
bf6d164bd5
LEGO: Merge pull request 46601
...
LEGO: Merge pull request 46601
2021-10-29 22:17:49 -07:00
Gabriela Araujo Britto and GitHub
6b1e8f7baf
remove placeholders in class member snippets ( #46598 )
2021-10-29 16:55:59 -07:00
csigs and GitHub
e3fab9fc20
LEGO: Merge pull request 46597
...
LEGO: Merge pull request 46597
2021-10-29 16:13:23 -07:00
Andrew Branch and GitHub
7742cf2180
Set hasAddedOrRemovedSymlinks when discovering an existing file by its link ( #46569 )
...
* Set hasAddedOrRemovedSymlinks when discovering an existing file by its link
* Make it optional
2021-10-29 15:47:48 -07:00
Andrew Branch and GitHub
eeaa595196
Enable auto imports in member snippet completions ( #46592 )
2021-10-29 14:43:32 -07:00
Anders Hejlsberg and GitHub
b0ab2a54bb
Fix mapped type instantiation circularity ( #46586 )
...
* Don't obtain constraint if doing so would cause circularity
* Add regression test
* Address CR feedback
2021-10-29 14:01:27 -07:00
Wesley Wigham and GitHub
28e3cd3a80
Add error on new module/moduleResolution modes when used in non-nightly TS ( #46557 )
...
* Add error on new module/moduleResolution modes when used in non-nightly TS
* Update diagnostic
2021-10-29 11:46:19 -07:00
9b1ba8f1e3
Fix react-jsx spread children invalid emit ( #46565 )
...
* Fix react-jsx spread children invalid emit
* Update Baselines and/or Applied Lint Fixes
* Change childrenLength parameter -> isStaticChildren
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com >
2021-10-29 10:54:46 -07:00
Andrew Casey and GitHub
325435891a
Update GDPR comment formatting ( #46585 )
...
...so that they are picked up properly by the tooling.
2021-10-29 10:48:28 -07:00
Gabriela Araujo Britto and GitHub
9cdbb7248b
Improve errors on module: node12 and extensionless relative imports ( #46486 )
...
* add new error + suggestions
* push down assert defined
* remove comment
* fix esm module import detection, update baselines
* add and update new tests
* fix review comments
* remove renamed baseline references
* update node modules test baselines
* fix error message, add new tests
* update old tests with new error message
2021-10-29 10:25:03 -07:00
csigs and GitHub
f1a69ec93e
LEGO: Merge pull request 46584
...
LEGO: Merge pull request 46584
2021-10-29 10:14:21 -07:00
fd620c93f6
Add method signature completions ( #46370 )
...
* prototype creation for method override completion snippet
* WIP: start using codefix `addNewNodeForMemberSymbol` to create method decl node
* update type of addNewNodeForMemberSymbol
* add more tests and support more cases
* add more tests and fix some details
* wip: more fixes and tests
* expose check override modifier in checker
* fix test
* WIP: add snippet support
* WIP: snippet support on emitter, adding snippets in completions
* make add snippets work with overloads (not synced)
* fix snippet adding
* rebase
* WIP: try to add snippet escaping in emitter
* support escaping in snippets
* small fixes; fixed tests
* more tests and fixes
* fix new tests
* fix modifier inheritance for overloads
* merge conflict fixes; remove comments
* throw error if setOptions is called but not implemented
* fix newline handling
* fix weird stuff
* fix tests
* fix more tests
* Fix unbound host.getNewLine
* fix isParameterDeclaration changes
* rename diagnostic to status and remove snippets from public api
* rename emitter functions + fix indentation
* check completion kind before calling isclasslikemembercompletion
* fix missing type parameters
* Revert "fix missing type parameters"
This reverts commit 7bdeaa86da .
* add isAmbient flag to addNewNodeForMemberSymbol
* add test for abstract overloads
* refactor snippet escaping support
* add user preference flag for enabling class member snippets
* update API baseline
* update tabstop order
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com >
2021-10-28 16:05:36 -07:00
csigs and GitHub
566758d6cb
LEGO: Merge pull request 46566
...
LEGO: Merge pull request 46566
2021-10-28 10:13:44 -07:00
4e237ed66f
🤖 Update TypeScript DOM Libs ( #46222 )
...
Co-authored-by: orta <orta@users.noreply.github.com >
2021-10-28 09:14:26 -07:00
TypeScript Bot
8173afbb8a
Update package-lock.json
2021-10-28 06:06:31 +00:00
Daniel Rosenwasser and GitHub
f494742ce9
Check for array types when instantiating mapped type constraints with any ( #46218 )
...
* Added/updated tests.
* Accepted baselines.
* Update test.
* Update instantiateMappedType to work specially when 'any' replaced an array.
* Accepted baselines.
* Ensure check works when constraint is a union of arrayish types, just like in `Promise.all`.
* Accepted baselines.
* Update test for indirect instantiation of a mapped type.
* Accepted baselines.
* Update test comment.
* Accepted baselines.
* Added tuple test case.
* Accepted baselines.
* Don't add special behavior for tuples.
* Accepted baselines.
* Revert "Don't add special behavior for tuples."
This reverts commit f01ae16e65 .
* Accepted baselines.
2021-10-27 15:03:01 -07:00
Wesley Wigham and GitHub
abfd537503
Support resolveJsonModule in new module modes ( #46434 )
...
* Support resolveJsonModule in new module modes
* Formatting feedback
2021-10-27 12:30:06 -07:00
Zzzen and GitHub
8a68c8616d
allow typeof this after for-loops ( #46181 )
2021-10-27 10:26:05 -07:00
Anders Hejlsberg and GitHub
f424dfc18a
Slightly less conservative check in isConstraintPosition ( #46526 )
...
* Slight adjustment to check in isConstraintPosition
* Add regression test
2021-10-26 11:54:46 -07:00
Anders Hejlsberg and GitHub
44c63a757e
Always cache relations involving intersection types ( #46523 )
...
* Always cache relations involving intersection types
* Accept new baselines
* Add regression test
2021-10-26 09:36:19 -07:00
Anders Hejlsberg and GitHub
658764e499
Bypass caching in removeStringLiteralsMatchedByTemplateLiterals ( #46525 )
...
* Bypass caching in removeStringLiteralsMatchedByTemplateLiterals
* Add regression test
2021-10-26 09:34:15 -07:00
TypeScript Bot
e1a2c2c5a9
Update package-lock.json
2021-10-26 06:07:59 +00:00
Andrew Branch and GitHub
3519af0bab
Fix crash pulling on global types before they're initialized ( #46471 )
...
* Add failing test
* Dumb fix
* Compute error message info more lazily
* One more laziness
2021-10-25 10:53:41 -07:00
csigs and GitHub
6b6665e6ae
LEGO: Merge pull request 46520
...
LEGO: Merge pull request 46520
2021-10-25 10:13:29 -07:00
Adam Burgess and GitHub
61f5ceb832
Fix isNewIdentifierLocation after generator ( #46491 )
2021-10-24 23:49:31 -07:00
csigs and GitHub
7799113e9a
LEGO: Merge pull request 46510
...
LEGO: Merge pull request 46510
2021-10-24 22:14:38 -07:00
csigs and GitHub
e88e596126
LEGO: Merge pull request 46504
...
LEGO: Merge pull request 46504
2021-10-24 10:14:16 -07:00
csigs and GitHub
dd89e06520
LEGO: Merge pull request 46502
...
LEGO: Merge pull request 46502
2021-10-24 04:13:27 -07:00
csigs and GitHub
c2a4bda133
LEGO: Merge pull request 46501
...
LEGO: Merge pull request 46501
2021-10-23 22:14:29 -07:00
csigs and GitHub
1055119164
LEGO: Merge pull request 46496
...
LEGO: Merge pull request 46496
2021-10-23 10:14:28 -07:00
TypeScript Bot
cb07891d19
Update package-lock.json
2021-10-23 06:06:04 +00:00
Andrew Branch and GitHub
907fc72db4
Fix auto import crash on weird JS aliasing ( #46490 )
...
* Fix auto import crash on weird JS aliasing
* Comment up the weird test
* Fix setting members on union/intersection type, happens later
2021-10-22 16:09:32 -07:00
Daniel Rosenwasser and GitHub
334b8eaa57
Bind assignments to 'this' within static blocks in JS files ( #46472 )
...
* Add failing test case.
* Handle 'this' assignments on class static blocks in JavaScript.
* Accepted baselines.
2021-10-22 15:44:35 -07:00
Andrew Branch and GitHub
de1ac8191e
Fix isNewIdentifierLocation after async ( #46485 )
2021-10-22 12:28:04 -07:00
Oleksandr T and GitHub
ce676d0963
fix(46433): forbid using keywords as parameter names ( #46459 )
2021-10-22 09:58:01 -07:00
Anders Hejlsberg and GitHub
449aaa118f
Defer computation of isDistributionDependent to avoid circularities ( #46474 )
...
* Defer computation of isDistributionDependent to avoid circularities
* Accept new API baselines
2021-10-22 09:13:54 -07:00