Commit graph

32527 commits

Author SHA1 Message Date
Orta Therox d6ebaa7e52
Update pr_owners.txt 2021-09-16 16:32:32 +01:00
TypeScript Bot 4dde5cc4f1 Update package-lock.json 2021-09-16 06:06:02 +00:00
csigs d16ece0a44
LEGO: Merge pull request 45904
LEGO: Merge pull request 45904
2021-09-15 22:13:36 -07:00
csigs a42fcf23f0
LEGO: Merge pull request 45895
LEGO: Merge pull request 45895
2021-09-15 16:13:23 -07:00
Kevin Tan add85e1828
fix: add corresponding message for override error in js files (#45656)
* fix: add override errors for js class members

* fix: test failures of js override error message

* update diagnostic messages

* fix: test errors

* fix: lint errors
2021-09-15 15:19:58 -07:00
Orta Therox b2f9432c40
Support resolving @typescript/[lib] in node modules (#45771)
* Support resolving @typescript/x for libs

* Baselines

* Tightens up the PR

* Fix the build

* Add cache

* Better naming

* Fixes the lookup path
2021-09-15 21:25:08 +01:00
Orta Therox 7cba51947a
Go back to the old spelling of NumberFormatPartTypes to not break DT (#45889) 2021-09-15 18:21:39 +01:00
csigs 61ddc518ef
LEGO: Merge pull request 45892
LEGO: Merge pull request 45892
2021-09-15 10:14:24 -07:00
TypeScript Bot c620266c87 Update package-lock.json 2021-09-15 06:05:55 +00:00
Oleksandr T 40fa0c9f11
fix(44880): allow narrowing aliased conditions for catch variables (#45797) 2021-09-14 10:05:36 -07:00
Hiroshi Ogawa 4f8aa5239e
feat(45679): support 'did you mean' diagnostics for string literal union (#45723)
* feat(45679): support 'did you mean' diagnostics for string literal union

* Format suggested type with `typeToString`

* Address feedback
2021-09-14 08:53:36 -07:00
TypeScript Bot 8523ac8bc9 Update package-lock.json 2021-09-14 06:10:48 +00:00
Orta Therox 2eecb3d954
Adds back NumberFormatPartType to the global types from intl (#45843) 2021-09-13 20:02:38 +01:00
Anders Hejlsberg 5b84512ccc
Fix infinite recursion in control flow analyzer inlining logic (#45845)
* Move inlineLevel counter to main type checker scope

* Add regression test
2021-09-13 11:02:55 -07:00
Hiroshi Ogawa e03600f257
fix(45840): remove duplicate entries in diagnosticMessages.json (#45841) 2021-09-13 10:50:13 -07:00
TypeScript Bot 768291f941 Update package-lock.json 2021-09-13 06:06:55 +00:00
csigs 4ae607208b
LEGO: Merge pull request 45842
LEGO: Merge pull request 45842
2021-09-12 04:15:08 -07:00
csigs db2573c209
LEGO: Merge pull request 45837
LEGO: Merge pull request 45837
2021-09-11 22:13:58 -07:00
csigs 7b9506d1a2
LEGO: Merge pull request 45833
LEGO: Merge pull request 45833
2021-09-11 16:13:44 -07:00
csigs b36511ae60
LEGO: Merge pull request 45832
LEGO: Merge pull request 45832
2021-09-11 10:14:00 -07:00
csigs f96b4f9439
LEGO: Merge pull request 45831
LEGO: Merge pull request 45831
2021-09-11 04:15:14 -07:00
csigs 8dc2c14d81
LEGO: Merge pull request 45829
LEGO: Merge pull request 45829
2021-09-10 22:15:39 -07:00
csigs 9e0ddfdf40
LEGO: Merge pull request 45827
LEGO: Merge pull request 45827
2021-09-10 16:14:24 -07:00
Orta Therox 13bdc03ab5
Intl fix for nightly (#45820)
* Fix #45804

* Update src/lib/es2020.intl.d.ts

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

* More fixes

* Adds a test

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2021-09-10 19:46:46 +01:00
csigs 5820f8222f
LEGO: Merge pull request 45822
LEGO: Merge pull request 45822
2021-09-10 10:13:46 -07:00
csigs 0af2497fec
LEGO: Merge pull request 45816
LEGO: Merge pull request 45816
2021-09-10 04:15:30 -07:00
TypeScript Bot 7e400b4fe7 Update package-lock.json 2021-09-10 06:06:12 +00:00
csigs 02dac16948
LEGO: Merge pull request 45812
LEGO: Merge pull request 45812
2021-09-09 22:14:22 -07:00
Ron Buckton ea521d45e9
Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any (#45350)
* Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any

* Use Awaited<T> with 'await'

* Clean up overloads

* Further restrict 'Awaited<T>' auto-wrapping for 'await'
2021-09-09 18:23:17 -07:00
csigs cdd93149f3
LEGO: Merge pull request 45808
LEGO: Merge pull request 45808
2021-09-09 16:14:12 -07:00
csigs 594f61e24b
LEGO: Merge pull request 45803
LEGO: Merge pull request 45803
2021-09-09 10:13:55 -07:00
Anders Hejlsberg 5186ee3d1b
Track non-null unknown types in control flow analysis (#45575)
* Track non-null unknown types in CFA

* Add tests
2021-09-09 09:20:44 -07:00
TypeScript Bot 630012a6a7 Update package-lock.json 2021-09-09 06:07:05 +00:00
Ron Buckton cf787e9bcf
Fix name resolution in typedef and allow defaults for template tags (#45483)
* Fix name resolution in typedef and allow defaults for template tags

* Inline parseBracketNameInTemplateTag

* Update baselines

* Add js declaration emit tests
2021-09-08 17:05:07 -07:00
Andrew Branch 8610ff5ebe
Add --preserveValueImports (#44619)
* Add compiler option

* Require es2015+

* Do not elide any imports or exports in preserve-exact

* Add errors for writing imports/exports that reference elided names

* Improve diagnostics wording

* Update API baselines

* Redo as noEraslingImportedNames

* Update option category

* Update baselines

* Lint

* Fix up transformer comments

* Fix errors from merge

* Update other error code baseline

* Rename to "preserveValueImports"

* Clean up, reword diagnostics

* Update API baselines

* Update other baseline affected by error message reword

* Update tsconfig baselines

* Add debug assertion instead of !
2021-09-08 16:30:22 -07:00
Anders Hejlsberg b9eeb74f37
Tail recursive evaluation of conditional types (#45711)
* Implement tail-recursion for conditional types and lower general instantiation depth limit to 100

* Add tests

* Skip caching for tail recursive temporary conditional types
2021-09-08 15:42:09 -07:00
Gabriela Araujo Britto 4f5bbd00e6
Allow type comparison when target is generic mapped type with key remapping (#45700)
* Add case for type related to for generic mapped type with as clause target

* Clean up code and add baselines

* cleanup
2021-09-08 10:58:52 -07:00
Hiroshi Ogawa 617251f2e0
feat(45010): handle unclosed fragment in getJsxClosingTagAtPosition (#45532)
* feat(45010): handle unclosed fragment in `getJsxClosingTagAtPosition`

* Update tests

* Fix types of `JsxText.parent` and `JsxExpression.parent`
2021-09-08 09:22:38 -07:00
Orta Therox 07fd7bce64
Intl 2021 Updates (#45647)
* Import of Intl.Locale from #39664

* Handle updating es2020.intl and add es2021 for new DateTimeFormatOptions options - re: #39664

* Extends DateTimeFormatOptions for new Intl APIs - re: #45420

* Handle migrating Intl.NumberFormat.formatToParts to es2018 (keeping esnext.intl around)

* Adds Intl.DisplayNames to es2020 - re: #44022

* Remove attributes added in es2021 from es2020 - re: #42944

* Add a reference to es2021 in the command line parser

* Adds some docs about the lib files

* Baselines

* Allow undefined in Intl inputs to allow for ergonomic usage of exactOptionalPropertyTypes - see #45652

* Adds some tests covering the APIs

* Apply suggestions from code review

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Handle PR feedback

* More review improvements

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2021-09-08 10:43:01 +01:00
Orta Therox 32168ed653
Add support for raising if you set a tsconfig entry of target/module with the right setting in the root (#44964)
* Add support for raising if you set a tsconfig entry of target/module with the right setting in the root

* Switch to check for any compiler option in the root which doesn't include compilerOptions

* Get green

* Apply suggestions from code review

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

* Update src/compiler/commandLineParser.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-09-08 10:17:43 +01:00
TypeScript Bot c8ada74862 Update package-lock.json 2021-09-08 06:06:12 +00:00
Andrew Branch be618b1446
Stop looking at binding patterns for type argument inference (#45719)
* Ignore empty binding patterns for contextual typing

* Stop looking at binding patterns for type argument inference entirely
2021-09-07 17:14:06 -07:00
Sang bac841ef18
Fix missing abstract keyword in completion (#45710)
* first commit

* tests
2021-09-07 13:20:58 -07:00
Anders Hejlsberg 7032f6bcee
Include index signatures for tagged primitives in keyof (#45773)
* Properly include tagged primitive types in keyof

* Add regression test
2021-09-07 10:46:13 -07:00
TypeScript Bot 3c8e45b304 Update package-lock.json 2021-09-07 06:06:12 +00:00
TypeScript Bot 3488e6e300 Update package-lock.json 2021-09-06 06:06:23 +00:00
csigs 8894262bac
LEGO: Merge pull request 45725
LEGO: Merge pull request 45725
2021-09-04 10:13:34 -07:00
TypeScript Bot dbf3cd3821 Update package-lock.json 2021-09-04 06:06:36 +00:00
csigs 0246f2611a
LEGO: Merge pull request 45720
LEGO: Merge pull request 45720
2021-09-03 16:13:40 -07:00
Zzzen 1d51dfa550
improve error message for using property of type as type (#45354)
* improve error message for using property of type as type

* suggest typeof when possible

* fix naming and error location
2021-09-03 12:17:50 -07:00