33721 Commits

Author SHA1 Message Date
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
Oleksandr T
8d7ad8c3ae
fix(50375): Errors for missing enum-named properties should attempt to preserve names (#50382)
* fix(50375): preserve enum-named properties

* add AllowComputedPropertyEnums option

* use bit shifting

* rename AllowComputedPropertyEnum -> WriteComputedProps

* mark WriteComputedProps as internal

* mark symbolToNode as internal
2022-08-24 11:54:44 -07:00
Daniel Rosenwasser
fb717df6bf
Discard union types before considering weak type checks on unit-like types (#50423)
* Only check isUnitType when dealing with non-unions.

* Add test case.

* Accepted baselines.
2022-08-24 11:39:00 -07:00
Sheetal Nandi
b9a5bbc9af
Syntax operations also need to ensure project is present for the open script infos since update could be pending to make sure open script info has project (#50418)
Also convert one relevant test case to baseline
Fixes #50131
2022-08-24 10:28:23 -07:00
TypeScript Bot
1d4fbbb529 Update package-lock.json 2022-08-24 06:08:31 +00:00
Oleksandr T
44ce3cff70
fix(50224): Intellisense for strings within a type's Union doesn't work properly for JSX (#50231)
* fix(50224): show string literal completions in JsxAttributeInitializer

* add feedback changes
2022-08-23 14:59:10 -07:00
Jake Bailey
6ee5db95c2
Use package.json files array instead of .npmignore (#50408) 2022-08-23 14:14:20 -07:00
TypeScript Bot
f88117dd24 Update package-lock.json 2022-08-23 06:14:21 +00:00
Jake Bailey
12c32553e4
Split CI linting/playwright out into separate jobs (#50406) 2022-08-22 17:42:29 -07:00
Daniel Rosenwasser
4605d89064
Use a mapped type to enforce type-safety on forEachChild. (#50409) 2022-08-22 17:30:44 -07:00
Jake Bailey
6362fb2dce
Replace eslint rulesdir with eslint-plugin-local, convert eslint rules to JS (#50380) 2022-08-22 13:46:03 -07:00
Ron Buckton
aaa4f9d9ff
Make canHaveModifiers/Decorators public (#50399) 2022-08-22 15:01:17 -04:00
TypeScript Bot
3f7ff15b5f Update package-lock.json 2022-08-22 06:08:09 +00:00
Daniel Rosenwasser
76357ba802
Swap forEachChild to use a table of functions instead of a switch statement. (#50225)
* Swap `forEachChild` to use an array of functions instead of a `switch` statement.

* Let's see if 'new' changes anything.

* Co-locate each assignment into `forEachChildTable`.

* Try `push`ing undefined to create a packed Array.

* Try using an unconditional no-op function.

* `forEach` -> `forEachChildIn`

* Remove the optional chain if we are pre-filling with no-ops.

* Grab function directly to avoid possible `.call` overhead from downlevel emit.

* Swap to object literal.

* Lints and formatting.
2022-08-21 17:48:45 -07:00
Alex Hsu
38e91fb120
LEGO: Merge pull request 50389
LEGO: Merge pull request 50389
2022-08-21 03:07:27 -07:00
TypeScript Bot
7cab3459d2 Update package-lock.json 2022-08-21 06:07:14 +00:00
TypeScript Bot
50041bdc7d Update package-lock.json 2022-08-20 06:06:43 +00:00
Jake Bailey
6cbb39ba8b
Re-caret dependencies so deps like eslint continue to be bumped (#50368) 2022-08-19 12:58:54 -07:00
Ron Buckton
284837d66b
Fixes for decorators property deprecations (#50343)
* Change type of deprecated 'decorators' property

* fix 'Invalid Arguments' error for create/update constructor in factory

* Update deprecation comments

* Make 'decorators' optional and 'undefined'

* Rename '_decorators' to 'illegalDecorators'

* Update baselines
2022-08-19 14:27:26 -04:00
Jake Bailey
ef88fbb8ab
Remove some unused deps and dead code (#50367) 2022-08-19 09:42:14 -07:00
Oleksandr T
5969ae9ef7
fix(50075): do not strip undefined from the function class properties (#50169) 2022-08-19 09:34:42 -07:00
Wesley Wigham
05d7d6bb12
Unify default import resolution across specifier target codepaths (#49814)
* Unify default import resolution across specifier target codepaths

* Use differing type aliases, per request
2022-08-19 02:25:41 -07:00
TypeScript Bot
cb63d461dd Update package-lock.json 2022-08-19 06:07:20 +00:00
Sheetal Nandi
1f0f7c8246
If resolvedFileName differs with realPath only in casing use the resolvedFileName before realpath so that errors can be reported with forceConsistentCasingInFileNames (#50364)
* Add tests when realpath supresses the casing error

* Fix when real path results in value that differs only in case
Fixes #49470

* Comment
2022-08-18 14:51:46 -07:00
Kyℓe Hensel
ea36fb3d5f
mark Intl.LocalesArgument as readonly (#50135) 2022-08-18 14:38:41 -07:00
Ron Buckton
1592210673
Add a jump-table for visitEachChild (#50266)
* Add a jump-table for visitEachChild

* Name each visitor function for better stack traces

* Fix node tests and some minor cleanup
2022-08-18 15:03:17 -04:00