Commit Graph

33746 Commits

Author SHA1 Message Date
Nathan Shively-Sanders 795c53a786 JSDoc comment parsing supports multiline backticks
Previously, backticks in JSDoc ended at the end of a line. This PR
changes that so that backticks continue parsing until another backtick.

Note that triple backticks and single backticks are treated the same
way. The change is already very clunky, and I haven't thought about how
much clunkier it would be to track backtick history in the parser.
2022-09-07 11:45:40 -07:00
TypeScript Bot b58721fe15 Update package-lock.json 2022-09-07 06:31:57 +00:00
Jake Bailey 3c3820b1a4 Simplify CI detection (#50661) 2022-09-06 16:36:37 -07:00
Jake Bailey 9ac1fce117 Fix eslint not looking at certain scripts, fix lints (#50660) 2022-09-06 16:05:47 -07:00
Sheetal Nandi fd05c0cc6d Make useFsEvents as default strategy for the watching (#50366)
* Remove unnecessary parameter

* Dont store name unnecessarily in the watchers

* Polled watches and not files

* Use fs events as default watching

* Some refactoring

* Make single per directory native watchers now that we are using it as default

* Rename

* Comment
2022-09-06 13:14:50 -07:00
Jake Bailey 5c2f770d97 Remove unused cancellation from build (#50658) 2022-09-06 12:43:06 -07:00
TypeScript Bot 66fbf058ec Update package-lock.json 2022-09-06 06:30:40 +00:00
TypeScript Bot 7910c509c4 Update package-lock.json 2022-09-03 06:07:00 +00:00
Will Nayes fd3a84c3f0 Report every instance of TS1208 (#50101)
* Report every instance of TS1208

* Test case for multiple cases of TS1208

* Add test case for isolatedModules with moduleDetection forced
2022-09-02 13:44:47 -07:00
Sheetal Nandi 62f980aff8 Check if its same buildinfo only for directly referenced projects and not recursively (#50617)
Fixes #50545
2022-09-02 13:38:00 -07:00
Andrew Branch 856c7c5fdd Allow {} to narrow in same special cases as unknown (#50601) 2022-09-02 09:47:27 -07:00
Anders Hejlsberg 854d448e5c in operator shouldn't narrow {} originating in unknown (#50610)
* 'in' operator shouldn't narrow {} originating in unknown

* Add regression test
2022-09-02 09:30:17 -07:00
TypeScript Bot 549e61d0af Update package-lock.json 2022-09-02 06:22:41 +00:00
Oleksandr T bcf994996e fix(50079): show deprecated on JSX attributes (#50084) 2022-09-01 16:59:29 -07:00
Andrew Branch 5df09a514c Use bidirectional comparability in narrowing (#50592)
* Use bidirectional comparability (aka comparability) in narrowing

* Rename test, check other CFA branch, test without strictNullChecks
2022-09-01 14:26:48 -07:00
Jake Bailey 891cdc58aa Remove unused baselines (#50593) 2022-09-01 12:48:28 -07:00
Anders Hejlsberg 6db2c882f3 {} & null and {} & undefined should always be never (#50553)
* {} & null and {} & undefined should be never in non-strictNullChecks mode

* Add tests

* Address code review feedback

* Accept new baselines
2022-09-01 12:37:13 -07:00
Mateusz Burzyński 238c341701 Defer distributing index over generic object types (#50540)
* Defer distributing index over generic object types

* Only check if the index type should be deferred for intersection types

* Add an additional test case
2022-09-01 07:28:13 -07:00
Sheetal Nandi 298309271b Do not canonicalize the file names when getting absolute paths during nodenext resolution (#50557)
* Add test to show how scope messes with casing

* Do not canonicalize the file names when getting absolute paths
Fixes #50544

* Unnecessary exports

* Add test for self referencing package

* Fix self reference package with casing
2022-09-01 06:48:41 -07:00
TypeScript Bot dcade7732c Update package-lock.json 2022-09-01 06:13:05 +00:00
Oleksandr T a9797d218d fix(50340): typeof ... === "undefined" check on discriminated union of undefined and object type doesn't narrow correctly (#50344)
* fix(50340): narrow type by discriminant in typeof

* add additional test cases
2022-08-31 15:00:50 -07:00
Anders Hejlsberg 43f8ae6df4 Only normalize intersections that include {} (#50535)
* Only normalize intersections that include {}

* Accept new baselines
2022-08-31 14:36:03 -07:00
Sheetal Nandi d293e723a2 Rename API to importPlugin (#50554)
* Rename API to importPlugin

* Make it internal too
2022-08-31 14:21:56 -07:00
TypeScript Bot 19defbfe57 Update package-lock.json 2022-08-31 06:33:19 +00:00
Jake Bailey f071d303c1 Move contributing related info out of README to CONTRIBUTING (#50543) 2022-08-30 12:13:11 -07:00
Wesley Wigham 488d0eebd0 Retain name and propertyName in declaration emit copies of binding patterns if property name is a keyword (#50537)
* Retain name and propertyName in declaration emit copies of binding patterns if property name is a keyword

* Accept baselines

* Remove out of date file
2022-08-30 09:03:02 -07:00
TypeScript Bot 8b482b513d Update package-lock.json 2022-08-30 06:29:59 +00:00
Jake Bailey c89f355a41 Remove redundant pretest script (#50518) 2022-08-29 12:12:32 -07:00
Anders Hejlsberg 6d170b490d Handle intersections in isGenericTypeWithoutNullableConstraint (#50497)
* Handle intersections in isGenericTypeWithoutNullableConstraint

* Add regression test
2022-08-29 09:24:13 -07:00
Alex Hsu ed6889cd5b LEGO: Merge pull request 50506
LEGO: Merge pull request 50506
2022-08-29 03:47:42 -07:00
Alex Hsu 29cbfe9a25 LEGO: Merge pull request 50493
LEGO: Merge pull request 50493
2022-08-28 03:32:25 -07:00
Alex Hsu 6faa291b45 LEGO: Merge pull request 50484
LEGO: Merge pull request 50484
2022-08-27 03:51:23 -07:00
Joost Koehoorn 71b2ba6111 Reuse computed type of condition expressions (#49881) 2022-08-27 01:40:13 -07:00
TypeScript Bot 8778c1ded3 Update package-lock.json 2022-08-27 06:06:30 +00:00
Oleksandr T 4579245f36 fix(50427): allow convert function expressions (#50430) 2022-08-26 15:43:19 -07:00
Jake Bailey cbc0b17eac Push package-lock.json updates via typescript-bot token (#50476) 2022-08-26 14:36:25 -07:00
Oleksandr T bb3a7aec11 fix(50415): Language server debug failure - Did not expect GetAccessor to have an Identifier in its trivia (#50470)
* fix(50415): clone props for get/set accessors

* add additional tests

* create helpers to create name, body, modifiers, typeName

* cleanup
2022-08-26 14:33:23 -07:00
Ryan Cavanaugh 3557092b14 Rephrase error message to be 100% technically correct (#50471) 2022-08-26 14:22:49 -07:00
Long Ho 71d1911503 add unknown to DateTimeFormatTypes (#50402)
* add unknown to DateTimeFormatTypes

* move unknown to es2019.intl instead

* Accepted baselines.

Co-authored-by: long.ho <long.ho@cloudkitchens.com>
2022-08-26 13:02:44 -07:00
Jake Bailey 8f895997d2 Don't include .gitattributes in package (#50475) 2022-08-26 12:15:30 -07:00
Anders Hejlsberg 6e8337ef70 Optimize substitution types (#50397)
* Optimize substitution type infrastructure

* Accept new baselines

* Preserve instantiated substitution types for type variables

* Restrictive type parameters should have no constraint

* Fix issues from top100 test run

* Accept new baselines
2022-08-26 12:06:06 -07:00
Jake Bailey 226dd0b7bf Fix typechecking related lints that changed post 4.8, update LKG to 4.8.2 (#50472) 2022-08-26 11:41:45 -07:00
Oleksandr T 164dddc48e feat(7481): Operator to ensure an expression is contextually typed by, and satisfies, some type (#46827)
* feat(7481): add explicit type compatibility check with 'satisfies' expression

* Add failing test for lack of intersectioned contextual type

* Implement the behavior

* Add test corresponding to the 'if'

* Add test based on defined scenarios

* remove isExpression in favor of using type casting

* move tests from compiler to conformance folder

* update baseline

* add missing contextFlags argument

* use asserted type

* accept baseline

Co-authored-by: Ryan Cavanaugh <ryanca@microsoft.com>
2022-08-26 10:05:52 -07:00
TypeScript Bot 07157914eb Update package-lock.json 2022-08-26 06:20:06 +00:00
Jake Bailey e675ea8dd8 Remove AUTHORS.md, .mailmap, authors.ts script (#50410) 2022-08-25 15:38:09 -07:00
Andrew Branch 38076df346 Fix auto import crash due to difference in paths handling (#50419) 2022-08-25 13:02:48 -07:00
Oleksandr T 12eb519b3f fix(50435): Duplicate seeming Code Actions for convert const to let (#50442)
* fix(50435): omit fix all in constToLet QF

* add FixAll action
2022-08-25 13:01:46 -07:00
Danay a08b045d2b Jsdoc property description (#50269)
* jsdocPropertyDescription

* jsdocPropertyDescription

* jsdocPropertyDescription

* Fixes #47933

* added additional test

* added additional example

* fixed bug

* changed function to only grab the literal type

* added additional condition for literals and symbols

* added additional test cases

* Update src/services/symbolDisplay.ts

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

* addressed PR review

* addressed new PR review

Co-authored-by: Danay Fernandez Alfonso <t-danayf@microsoft.com>
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2022-08-25 11:57:32 -07:00
Jake Bailey 5ba22e05a9 Remove top level loc folder (#50421) 2022-08-25 11:44:24 -07:00
TypeScript Bot c4eb37c8a0 Update package-lock.json 2022-08-25 06:14:30 +00:00