Commit graph

32500 commits

Author SHA1 Message Date
Armando Aguirre ead9dfbdbd
Fixed JS completions type spread (#45484)
* Fix and updated tests

* Added test

* Revert "Fix and updated tests"

This reverts commit 33829fa4a4.

* Filter out empty access expression

* PR feedback
2021-08-24 14:54:19 -07:00
Dirk Bäumer b45e129f4a
Add rich navigation indexing action (#45431)
* Add rich navigation indexing action

* Remove dbaeumer/richNav from indexed branches

* Move lsifrc file to .github folder

* Remove dbaeumer/richNav
2021-08-24 13:38:11 -07:00
Oleksandr T 076f22b2c9
fix(45501): don't remove spaces between empty object literals with enabled insertSpaceAfterOpeningAndBeforeClosingEmptyBraces (#45514) 2021-08-24 11:28:58 -07:00
Orta Therox 41dcad056a
Adds a script for removing unused diagnostics (#44324)
* Adds a script for removing unused diagnostics

* Accidentally deleted the wrong one
2021-08-24 13:03:18 +01:00
Daniel Rosenwasser 7117f03ed6
Update CONTRIBUTING.md (#45552) 2021-08-24 08:15:15 +01:00
Daniel Rosenwasser 59b8bef3e7
Only provide hints for simple literals when 'literals' is specified. (#45557)
* Only provide hints for simple literals when 'literals' is specified.

* Update fourslash tests.
2021-08-23 16:38:26 -07:00
Daniel Rosenwasser af54990055
Some cleanup around inlay hints types to get more-precise checking. (#45391)
* Some cleanup around inlay hints types to get more-precise checking.

* Update Baselines and/or Applied Lint Fixes

Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2021-08-23 16:15:54 -07:00
Nathan Shively-Sanders b8ace9d312
Restore HTMLDocument constructable value in DOM (#45554)
Don't touch anything else in the DOM.
2021-08-23 15:56:11 -07:00
TypeScript Bot 8362a0f929 Update package-lock.json 2021-08-21 06:06:20 +00:00
David Rogers d18e82b380
fix for 45006 (#45020)
* fix for 45006

* treat setters like getters in preceding commit; move test accordingly

* fix test baselines

* changes per code review

in `getContainerFlags`, move cases for get/set accessors
to fallthrough into the block that currently handles MethodDeclaration;
so get/set accessors and method declarations all get the same container flags,
such that during `bindContainer`, `startFlow.node` is assigned to
getters/accessors
(this changes a public api in tsserverlibrary.d.ts and typescript.d.ts
by adding `GetAccessorDeclaration` and `SetAccessorDeclaration` to the type
of `FlowStart.node`)

consolidate predicates checking whether a node is either a get or set
accessor, into `isObjectLiteralOrClassExpressionMethodOrAccessor`
(formerly `isObjectLiteralOrClassExpressionMethod`)

annotate updated test with `@target: es2020`

* fix `isObjectLiteralOrClassExpressionMethodOrAccessor`

require that Getter/Setters are parented by an ObjectLiteralExpression or ClassExpression
2021-08-20 17:05:19 -07:00
Oleksandr T 65ed4124ee
feat(44888): omit completions in an object expression with an instantiated class type (#45044) 2021-08-20 13:51:37 -07:00
Oleksandr T 69b5b2b2f3
feat(16755): show QF to declare missing properties in a call expression with an object literal argument (#44781) 2021-08-20 13:49:46 -07:00
Gabriela Araujo Britto 84b057828e
Fix incorrect suggestion for package that bundles types (#45507)
* Fix incorrect suggestion for package that bundles types

* determine if a package ships types from its files

* update new error message
2021-08-20 11:12:34 -07:00
Oleksandr T e00722f262
feat(44720): allow renaming string literal in switch/case (#45084) 2021-08-19 17:09:35 -07:00
Zzzen 693c2d08c1
support contextual return type of iife (#45007) 2021-08-19 16:37:50 -07:00
Gabriela Araujo Britto 945179fb64
Reuse checker's property accessibility check for completions (#45388)
* add test for completions crash

* WIP: experiment

* remove comments

* add call to getParseTreeNode

* Revert "add call to getParseTreeNode"

This reverts commit 8dd1cf67cf.

* Fix comments

* minor fixes

* fix formatting

* rename type to containingType
2021-08-19 13:02:20 -07:00
TypeScript Bot 5da2762702 Update package-lock.json 2021-08-19 06:06:01 +00:00
Eli Barzilay 7a19c22063 getReferencesAtLocation: fix handling of destructoring imports
Fixes #45423.
2021-08-18 14:39:54 -04:00
TypeScript Bot fc07d9dcc6 Update package-lock.json 2021-08-18 06:06:26 +00:00
Anders Hejlsberg 79474fdfd2
Increase type instantiation depth limit (#45025)
* Bump instantiation depth limit to 500

* Accept new baselines

* Update tests

* Accept new baselines
2021-08-17 07:00:19 -07:00
Oleksandr T dc80e6a28b
feat(18147): skip uncessary parenthesis (#44769) 2021-08-16 17:20:40 -07:00
Oleksandr T 424464d46b
feat(43963): change var to a parameter in destructured function parameters (#44767) 2021-08-16 17:19:44 -07:00
Gerrit Birkeland e263fcebf8
Expose getTypePredicateOfSignature (#44863) 2021-08-16 17:17:42 -07:00
Oleksandr T 55ed742574
fix(45294): show parameter inlay hints for template strings (#45305) 2021-08-16 14:11:02 -07:00
Ryan Cavanaugh ab043f99db
Create SECURITY.md (#45474)
Fixes #45452
2021-08-16 13:54:30 -07:00
Ryan Cavanaugh e00b5ecd40
Enable max-statements-per-line lint rule (#45475)
* Enable the rule

* Fix all the violations
2021-08-16 13:53:51 -07:00
TypeScript Bot 339ad92b98 Update package-lock.json 2021-08-16 06:06:08 +00:00
csigs d50c91da17
LEGO: Merge pull request 45456
LEGO: Merge pull request 45456
2021-08-14 10:13:55 -07:00
csigs 3c957efd4a
LEGO: Merge pull request 45453
LEGO: Merge pull request 45453
2021-08-14 04:24:59 -07:00
Oleksandr T 5b3072f687
fix(45233): allow type assertion in ExportAssignment with JSDoc type definition (#45342) 2021-08-13 16:32:23 -07:00
Oleksandr T dfd84ec0b2
fix(45417): show inlay hints for null and literal-like identifiers (#45426) 2021-08-13 11:31:47 -07:00
csigs fe7962af3d
LEGO: Merge pull request 45444
LEGO: Merge pull request 45444
2021-08-13 10:13:50 -07:00
csigs 6cdbf98a6f
LEGO: Merge pull request 45442
LEGO: Merge pull request 45442
2021-08-13 04:13:56 -07:00
TypeScript Bot 0cd447da54 Update package-lock.json 2021-08-13 06:07:28 +00:00
Jm 7139f37201
fix: nodeWillIndentChild judge for BinaryExpression with JsxElement child (#44695) 2021-08-12 14:01:52 -07:00
TypeScript Bot 88d8d1ccee Update package-lock.json 2021-08-12 06:06:28 +00:00
TypeScript Bot 08358f3380 Update package-lock.json 2021-08-11 06:06:12 +00:00
Nathan Shively-Sanders 8d4fe5a0fb
Fix unassignable properties by adding undefined with exactOptionalPropertyTypes (#45032)
* Simple first version

Doesn't cover or test any complicated variations.

* Lots of cases work

Destructuring does not. But

- skipping node_modules and lib.* does.
- call expressions does
- property access, including with private identifiers, does

* Support variable declarations, property assignments, destructuring

As long as it's not nested

* More cleanup

* skip all d.ts, not just node_modules/lib

* Offer a codefix for a lot more cases

* remove incorrect tuple check

* Use getSymbolId instead of converting to string

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>

* add test + switch to tracking number symbol ids

* Address PR comments

* Exclude tuples from suggestion

* Better way to get error node

Plus add a check that errorNode is an argument to the call, not the
call's expression.

* fix semicolon lint

* fix another crash

* Simplify: add undefined to all optional propertie

whether or not somebody tried to assign undefined to them in the
erroneous assignment

* remove fix-all

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2021-08-10 16:57:38 -07:00
Nathan Shively-Sanders 92e7fb521f
Update tsc-instrumented for project build (#45383)
* Update tsc-instrumented for project build

loggedIO has a weird build that never got updated for the project build
system. This PR just adds a project for it in a straightforward way. It
might be less efficient than the old way, but that's not a big concern
for recording RWC test cases.

However, I may have done things wrong. If anybody knows
tsc-instrumented, please comment.

* Create a second loggedIO tsconfig for tsc-instrumented

The normal tsconfig should not have `prepend`; the standalone one for
tsc-instrumented should.

* fix semicolon lint
2021-08-10 14:53:17 -07:00
Oleksandr T 6c42d7949b
fix(45393): show parameter name hints for unary literal expressions (#45399) 2021-08-10 11:51:00 -07:00
Oleksandr T ad894f74b3
fix(45345): throw an error on overridden member that is defined in multiple interfaces (#45352) 2021-08-10 11:50:22 -07:00
Wesley Wigham 68eb1a551f
Use getFileAndProject in session provideInlayHints to ensure language service updates are applied (#45394) 2021-08-10 11:48:35 -07:00
Ron Buckton d8e830d132
Fix __spreadArray for non-concat-spreadables (#45386) 2021-08-09 17:08:07 -07:00
Ikko Ashimine 5e496d52e1
Fix typo in helpers.ts (#45365)
funtions
2021-08-09 08:40:54 -07:00
csigs 75cb8b2393
LEGO: Merge pull request 45375
LEGO: Merge pull request 45375
2021-08-08 22:13:50 -07:00
csigs 5c66c12124
LEGO: Merge pull request 45374
LEGO: Merge pull request 45374
2021-08-08 16:13:45 -07:00
csigs cf74363397
LEGO: Merge pull request 45368
LEGO: Merge pull request 45368
2021-08-08 10:13:44 -07:00
csigs 99622fc2ef
LEGO: Merge pull request 45362
LEGO: Merge pull request 45362
2021-08-08 04:14:17 -07:00
TypeScript Bot e527db6e62 Update package-lock.json 2021-08-08 06:06:08 +00:00
csigs c9788712a7
LEGO: Merge pull request 45359
LEGO: Merge pull request 45359
2021-08-07 22:13:31 -07:00