33865 Commits

Author SHA1 Message Date
Andrew Branch
64ee1e88e0
Strip literal freshness of contextually typed literals (#49884)
* Strip literal freshness of contextually typed literals

* Add more tests
2022-08-15 17:04:09 -07:00
Sheetal Nandi
9c1baeede6
On windows handle the long paths in realpathSync.native (#50306)
Fixes #49470
2022-08-15 16:57:47 -07:00
Wesley Wigham
e989d840f1
Forward intersectionState flag when comparing indexed access constraints (#50261) 2022-08-15 16:10:32 -07:00
Nicolas Rodriguez
8a873de5cf
fix(49149): remove unneeded array overload to Object.freeze (#50029)
* fix(49149): remove unneeded array overload to Object.freeze

* chore: commit baseline changes

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
2022-08-15 16:10:02 -07:00
Oleksandr T
61d8a8d7f3
fix(49629): fix crash in find-all-refs when using module.exports/export= with arrays/primitives (#50291) 2022-08-15 15:14:26 -07:00
Andrew Branch
bc52ff6f4b
Make React import fix not block component import fix (#50307)
* Stop React import fix from blocking component import fixes

* Add additional promote-type-only test
2022-08-15 13:13:41 -07:00
Jake Bailey
fd3c46b2f0
Fix export = error message to not have redundant language (#50308) 2022-08-15 13:13:33 -07:00
Jake Bailey
9f7c0cbad7
Run ESLint over our JS files, fix all lints (#50172) 2022-08-15 08:42:26 -07:00
Alex Hsu
03b12a6a45
LEGO: Merge pull request 50298
LEGO: Merge pull request 50298
2022-08-14 03:10:53 -07:00
TypeScript Bot
656d6a57d2 Update package-lock.json 2022-08-14 06:06:50 +00:00
Alex Hsu
7f5600eec5
LEGO: Merge pull request 50295
LEGO: Merge pull request 50295
2022-08-13 05:07:02 -07:00
Ryan Cavanaugh
adf26ffa4b
Revert "Fixed an issue with contextual type for intersection properties (#48668)" (#50279)
This reverts commit 9236e39374c0ec9a1e3f9894af4fb9eb34ba0021.
2022-08-12 10:24:50 -07:00
TypeScript Bot
8783da8726 Update package-lock.json 2022-08-12 06:06:46 +00:00
Sheetal Nandi
b19741c65d
Report aggregate statistics for solution as well as some solution perf numbers (#50267)
* Report aggregate statistics for solution as well as some solution perf numbers
This change under --extendedDiagnostics aggregates the diagnostics from all projects built and reports it at the end. Apart from that it also outputs some measurements for work that happens in tsc --build like finding if projects are uptodate etc.
Also removes unnecessary node count per suggestion

* Apply suggestions from code review

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>

* Fix condition

* Remove extra time

Co-authored-by: Ron Buckton <ron.buckton@microsoft.com>
2022-08-11 13:20:48 -07:00
Jack Works
075ee3d4b6
refactor: follow gh-50257 JSX.IntrinsicClassAttributes logic (#50271) 2022-08-11 09:32:31 -07:00
TypeScript Bot
9189e42b1c Update package-lock.json 2022-08-11 06:06:47 +00:00
Jack Works
e2fbe19adf
fix: produceLKG does not work on Windows (#50140) 2022-08-10 20:12:17 -07:00
Sheetal Nandi
924c68ca95
use cache for program creation on watch mode. (#49958) 2022-08-10 16:56:54 -07:00
Sheetal Nandi
90cfbaee37
Make build info tolerant to json errors (#50265)
* Make build info tolerant to json errors
Fixes #49754

* Fix incorrect code
2022-08-10 16:44:35 -07:00
Jake Bailey
8a24fe75c9
Fix up code so we don't crash when TS itself is emitted with let/const (#50151) 2022-08-10 13:38:38 -07:00
Jake Bailey
b56483feb8
Remove shims project (#50049) 2022-08-10 11:49:59 -07:00
Jake Bailey
7f1dc78f54
Simplify normalizeSlashes (#50154) 2022-08-10 11:20:00 -07:00
Jake Bailey
5fbf3b04dc
Don't treat object properties as potential JS contructors without JSDoc class tag (#49735) 2022-08-10 11:19:19 -07:00
Jack Works
382f0c3af3
fix: crashes when JSX.IntrinsicClassAttributes is an alias type close GH-50254 (#50257) 2022-08-10 10:41:12 -07:00
Oleksandr T
3c3909b8d0
update baseline (#50252) 2022-08-10 01:52:59 -07:00
TypeScript Bot
5f64ae878e Update package-lock.json 2022-08-10 06:07:48 +00:00
Jack Bates
35c6fbfee0
JSDoc @type tag optional parameters (#48132)
* JSDoc @type tag optional parameters

* Don't repeat isInJSFile() condition

* Exclude variable initializers

* Add tests for class methods

* Don't contextually type JS function declarations

* Update Baselines and/or Applied Lint Fixes

* Reword comment

Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2022-08-09 17:03:30 -07:00
Andrew Casey
2513a2d98c
Use binary search in file system cache (#50163)
* Use binary search in file system cache

Previously, we were linear searching a linear number of times, resulting in too many `toLowerCaseFileName` calls on Windows.

* Use SortedArray types for clarity

* Use insertSorted after making it return a flat

* Drop redundant undefined

* Correct copy-paste error
2022-08-09 16:47:07 -07:00
Oleksandr T
af90e703ab
feat(49903): omit declare on type declarations (#49925) 2022-08-09 16:38:42 -07:00
Zzzen
b94b299a11
fix CFA for BindingElement. #49759 (#49836)
* fix CFA for BindingElement. #49759

* fix Parameter

* fix controlFlowBindingPatternOrder

* fix bindParameterFlow

* add tests

* refactor

* refactor

* refactor
2022-08-09 16:37:39 -07:00
Nathan Shively-Sanders
dd98c17b10
Merge multiple symbols even when re-exported (#49987)
* Merge multiple symbols even when re-exported

As far as I remember, the target of `mergeSymbol` needs to be a merged
symbol, not a symbol with a mergeId that points to mergedSymbol.
However, mergeSymbolTable didn't check for this.

I can't remember if symbol tables may contain
symbols-with-mergeId. If they can, then mergeSymbolTable needs to call
getMergedSymbol on the individual targets of the merge. That's what I
did in this PR.

* Call getMergeSymbol eagerly

On the source, not target, of mergeSymbolTable's contents
2022-08-09 16:36:53 -07:00
magic-akari
abc2a350e6
Fix System module export import = (#49788)
* Add more SystemJS test case

* Fix System module `export import =`

* Update test case
2022-08-09 16:31:02 -07:00
Jack Morrison
e5b400c162
Fix misleading Date constructor documentation (addresses #49350) (#49649)
* Update month parameter to monthIndex and add docs for Date constructor

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Add baseline changes

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Fix misleading Date constructor documentation (addresses #49350) (#73)

* Update month parameter to monthIndex and add docs for Date constructor

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Add baseline changes

Signed-off-by: jmorrison152 <jmorrison152@bloomberg.net>

* Update baselines
2022-08-09 16:21:56 -07:00
Oleksandr T
f70cb769ef
feat(49928): Provide quick fix for a missing callback function (#49930)
* feat(49928): provide quick fix for a missing callback function

* remove addFunctionDeclarationFromSignature. fix formatting

* add tests
2022-08-09 15:28:03 -07:00
ExE Boss
a123fc5ce4
feat(lib/es2015): Add typed overloads to Reflect (#35608)
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-08-09 15:05:33 -07:00
Oleksandr T
19e2a310c0
feat(49834): Suggestion: filter enum member ids from their own jsdocs (#49843)
* feat(49834): omit self-referenced enum declaration in JsDoc

* change code style
2022-08-09 15:02:45 -07:00
Daniel Rosenwasser
6aa9b87f54
Bump version to 4.9. (#50239) 2022-08-09 13:33:52 -07:00
TypeScript Bot
6d163dc736 Update package-lock.json 2022-08-09 06:06:46 +00:00
Mateusz Burzyński
0e17dc7769
Fixed a false positive related to binding patterns and spread expressions (#49684)
* Fixed a false positive related to binding patterns and spread expressions

* Improve ancestor lookup when checking if an expression is spread into an object

* Fixed ancestor lookup for more node types

* Remove equality check for contextual types

* Reformat code

* Use `isWithinSpreadAssignment` flag + `objectsWithinSpread` cache instead of ancestor traversal

* Revert "Use `isWithinSpreadAssignment` flag + `objectsWithinSpread` cache instead of ancestor traversal"

This reverts commit be387e3bbf8a5cce2bc4c31fd77b061ea6cf8e0b.

* Expand on the existing comment
2022-08-08 17:01:50 -07:00
Alex Hsu
71e8529228
LEGO: Merge pull request 50219
LEGO: Merge pull request 50219
2022-08-08 03:00:51 -07:00
TypeScript Bot
4a98087e25 Update package-lock.json 2022-08-08 06:06:51 +00:00
Alex Hsu
363099482a
LEGO: Merge pull request 50212
LEGO: Merge pull request 50212
2022-08-07 04:59:36 -07:00
TypeScript Bot
7e4259121b Update package-lock.json 2022-08-07 06:06:32 +00:00
TypeScript Bot
96fe0396a4 Update package-lock.json 2022-08-06 06:08:54 +00:00
Gabriela Araujo Britto
bdb8514b82
Fix contextual typing on yield and return expressions in generator function (#49736)
* add tests and initial fix

* fix contextual return type in generator funcs

* fix return statement contextual typing

* filter using getiterationtypeofgeneratorfunctionreturntype

* update baselines
2022-08-05 11:24:43 -07:00
TypeScript Bot
5c1abd300d Update package-lock.json 2022-08-05 06:06:36 +00:00
Oleksandr T
a44354af7c
fix(50188): omit QF on function arguments (#50189) 2022-08-04 17:52:09 -07:00
Andrew Branch
7afd14f263
Update error messages for CJS imports resolving to ES modules (#50088)
* Update error messages for CJS imports resolving to ES modules

* Update error message

* Use package scope from source file

* Update baselines

* Issue error for JSX/TSX files

* Switch from related info to message chain
2022-08-04 16:58:13 -07:00
Alex Hsu
b1176ce5e8
LEGO: Merge pull request 50179
LEGO: Merge pull request 50179
2022-08-04 03:16:11 -07:00
TypeScript Bot
9499b6eb8e Update package-lock.json 2022-08-04 06:06:34 +00:00