Commit graph

32489 commits

Author SHA1 Message Date
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
csigs d514a69409
LEGO: Merge pull request 45709
LEGO: Merge pull request 45709
2021-09-03 04:15:22 -07:00
csigs 66441e2f12
LEGO: Merge pull request 45706
LEGO: Merge pull request 45706
2021-09-02 22:13:54 -07:00
Chris Manghane a53ab0935d
Don't suppress comments when adding or removing braces to/from arrow function. (#45597)
Fixes microsoft/typescript#44228, microsoft/typescript#44229.
2021-09-02 18:05:16 -07:00
csigs b1df3fec16
LEGO: Merge pull request 45699
LEGO: Merge pull request 45699
2021-09-02 16:13:45 -07:00
Oleksandr T ba3a068614
fix(45687): allow selection to next token (#45695) 2021-09-02 11:57:37 -07:00
csigs 35ada354a3
LEGO: Merge pull request 45694
LEGO: Merge pull request 45694
2021-09-02 10:13:45 -07:00
Andrew Branch 5daa6f45a3
Revert "fix(45501): don't remove spaces between empty object literals with enabled insertSpaceAfterOpeningAndBeforeClosingEmptyBraces (#45514)" (#45682)
This reverts commit 076f22b2c9.
2021-09-01 17:47:27 -07:00
Andrew Branch 1a981d1df1
Remove unused code coverage command (#45684) 2021-09-01 15:39:10 -07:00
Ron Buckton 6f7f3b1775
Minor fixes to "Convert To Async" refactor (#45536)
* Minor fixes to convertToAsync

* Back out on nested return in inner continuation

* Baseline update

* Verify type argument for call can be used, add a few more early exit shortcuts
2021-09-01 13:13:12 -07:00
Orta Therox f9a3d85b00
Fix the default text for --useDefineForClassFields (#45513)
* Fix the default text for --useDefineForClassFields

* Update with feedback
2021-09-01 15:10:47 +01:00
TypeScript Bot 6b086689f2 Update package-lock.json 2021-09-01 06:06:07 +00:00
TypeScript Bot 80a1b5ef92 Update package-lock.json 2021-08-31 06:09:32 +00:00
Wesley Wigham f598076e68
Close package json watches in watch mode on close (#45642) 2021-08-30 12:53:26 -07:00
Kenta Moriuchi d699bcdaae
Update lib types to mark Annex B as deprecated (#43710)
* Mark properties defined in Annex B as deprecated

* Tweak

* Update baselines

* Update fourslash tests

* Add completionsStringMethods.ts test

* Fix sortText value in fourslash test for deprecated tags

* Update package-lock.json

* Update package-lock.json

* Mark Non-standard RegExp Constructor properties as deprecated

* Update baselines

Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com>
2021-08-30 10:38:07 -07:00
TypeScript Bot 7849342c7c Update package-lock.json 2021-08-30 06:08:39 +00:00
Kenta Moriuchi 9d815361fe
Fix verify.baselineCompletions (#45615) 2021-08-29 21:53:42 -07:00
TypeScript Bot fd067e9e81 Update package-lock.json 2021-08-29 06:05:49 +00:00
TypeScript Bot c7a00c2440 Update package-lock.json 2021-08-28 06:06:01 +00:00
Ron Buckton 107c556fe4
Fix 'as const'-like behavior in JSDoc type cast (#45464) 2021-08-27 18:22:02 -07:00
Tim 1dc1efbc4f
Update es5.d.ts (#45454)
* Update es5.d.ts

Fix grammar error.

* Update src/lib/es5.d.ts

* Update src/lib/es5.d.ts

Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
2021-08-26 23:10:25 -07:00
Gabriela Araujo Britto 9f025b90a4
Don't include literals from enum members in completions (#45588)
* don't include literals from enum members in completions

* add enum symbol to completions test

* use symbol flags for detecting enum member

* use type flags to check for enum member

* fix test
2021-08-26 16:33:06 -07:00
Andrew Casey 7fc1cb4b36
Use realpathSync.native on case-insensitive file systems (#44966)
* Make getSourceOfProjectReferenceRedirect take a Path

* Add useCaseSensitiveFileNames to ModuleResolutionHost

...so that path comparisons can use it during module resolution.

* Re-enable realpathSync.native for case-insensitive file systems
2021-08-26 15:35:04 -07:00
Andrew Branch 983ddf5bb5
Update packages (#45587) 2021-08-26 12:06:12 -07:00
TypeScript Bot 6cdc7d1ae3 Update package-lock.json 2021-08-26 06:06:17 +00:00
Stef Busking 2a2962a916
Properties on intersections should be readonly only if all declarations are (#45263)
Fixes #45122
2021-08-25 16:55:14 -07:00
Andrew Branch 30103de1dd
Let AutoImportProviderProject resolve JS when allowJs and maxNodeModulesJsDepth allows (#45524)
* Let AutoImportProviderProject resolve JS when allowJs and maxNodeModulesJsDepth allows

* Simplify function
2021-08-25 15:06:14 -07:00
csigs db0576c251
LEGO: Merge pull request 45568
LEGO: Merge pull request 45568
2021-08-24 17:00:47 -07:00
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