33073 Commits

Author SHA1 Message Date
csigs
208cb2d57c
LEGO: Merge pull request 47641
LEGO: Merge pull request 47641
2022-01-27 10:14:34 -08:00
csigs
b7b648306f
LEGO: Merge pull request 47640
LEGO: Merge pull request 47640
2022-01-27 04:15:07 -08:00
csigs
52e785ff6c
LEGO: Merge pull request 47635
LEGO: Merge pull request 47635
2022-01-26 22:15:11 -08:00
TypeScript Bot
b6075d8ced Update package-lock.json 2022-01-27 06:07:47 +00:00
Andrew Branch
5813a3541c
Allow moduleSymbolToValidIdentifier to be uppercase for JSX tags (#47625)
* Allow moduleSymbolToValidIdentifier to be uppercase for JSX tags

* Cleaner way of getting the uppercase name when needed

* Fix build errors, get rid of basically unnecessary ScriptTarget

* More accurate name for parameter

* Rename other parameter too

* Fix failing test
2022-01-26 16:12:40 -08:00
Andrew Branch
0d3ff0cce8
Add codefix and completions for promoting existing type-only imports to non-type-only (#47552)
* Import fix

* Wire up completions, add sorting to fix

* Fix overlapping changes when there’s only one import specifier

* Update API baseline

* Add sorting and filtering back to UMD fix
2022-01-26 15:07:41 -08:00
Jake Bailey
3718182a13
Don't block completion after end of type parameters in JSX elements (#47501) 2022-01-26 14:45:21 -08:00
magic-akari
0f3809eff1
fix: enum self reference (#47287)
* fix: enum self reference

* fix: add test case

* chore: clean code

* fix: check `errorType` directly

* chore: revert refactor of `isConstantMemberAccess`
2022-01-26 14:13:34 -08:00
Nathan Shively-Sanders
53b96d9ddf
Update DOM 2022-01-26 (#47623)
Improves types for FileSystemHandle.kind in subtypes, plus other bcd
updates.
2022-01-26 12:29:25 -08:00
Andrew Branch
c191e7c942
Fix diagnostic serialization crash (#47604)
* Add crashing test

* Fix unsafe cast to DiagnosticMessageChain
2022-01-26 10:41:47 -08:00
Oleksandr T
3206df8e6d
fix(47561): use parameter name from enclosing declaration (#47609) 2022-01-26 04:00:14 -08:00
TypeScript Bot
d56d62185f Update package-lock.json 2022-01-26 06:06:54 +00:00
Oleksandr T
20b5523830
feat(42684): allow deprecated JSDoc tag to be used on aliased nodes (#47293) 2022-01-25 15:49:33 -08:00
Song Gao
0673f0288c
Fix JsDocTags inheritage and setter/getter quickInfo (#46801)
* tmp

* fix jsdoc inheritage for property and setter/getter

* fix test

* fix test

* fix mirrors

* add more tests

* add tests of jsdoc for intance of class
2022-01-25 15:43:12 -08:00
Andrew Casey
f84a67f29c
Don't trace bindSourceFile cache hits (#47602)
Writing the trace entry takes longer than returning the cached value.

Fixes #47565
2022-01-25 14:57:17 -08:00
Joost Koehoorn
ba402e6b86
Allow structure reuse if a declaration file within a package is updated (#47472)
* Allow structure reuse if a declaration file within a package is updated

Closes #47471

* Use correct program to obtain source file in structure reuse test
2022-01-25 11:04:53 -08:00
TypeScript Bot
a9efe2be60 Update package-lock.json 2022-01-25 06:06:20 +00:00
Eli Barzilay
69277306c9 Fix detecting an existing Map/Set
This didn't affect compilation to CJS since that sets `exports.Map`
instead of creating a global.
2022-01-24 15:47:10 -05:00
TypeScript Bot
b9efc3b614 Update package-lock.json 2022-01-23 06:06:24 +00:00
TypeScript Bot
0019c0190d Update package-lock.json 2022-01-22 06:06:15 +00:00
Gabriela Araujo Britto
3cbc8d2231
Fix narrowing of intersection with function type (#47483)
* add and and or mask to typefacts

* add comment
2022-01-21 12:05:34 -08:00
Jake Bailey
9b6c179089
Fix parser test cases missing 'it' calls (#47545) 2022-01-21 11:32:23 -08:00
Oleksandr T
5e38082a9e
fix(47165): ignore spaces in goToDefinition imports (#47541) 2022-01-21 10:09:10 -08:00
Or Ouziel
5e09e86612
return early from fixUnreachableCode if syntactic errors exists (#47463) 2022-01-20 15:45:42 -08:00
Oleksandr T
e9453f411a
fix(47524): skip assertion on checking this in fixImplicitThis QF (#47527) 2022-01-20 14:58:28 -08:00
Armando Aguirre
ab4d3198ed
Fixed Go To Definition using jsconfig (#47434)
* Fixed Go To Definition using jsconfig

* Fixed formatting
2022-01-20 14:45:29 -08:00
Andrew Casey
7e3eccedd7
Associate paths with nodes when tracing (#47530)
Walking up the tree to find the enclosing SourceFile would distort the
timing too much so, instead, we attach a Path in the binder.

At present, the path is determined retroactively by walking up the call
stack in the trace visualizer, but this is both inconvenient and
routinely inaccurate (checking an expression in one file may require
checking an expression in another file and there's no way to determine
from the trace where this transition occurred).
2022-01-20 14:38:36 -08:00
Wesley Wigham
bae0f50818
Fix import assertion occurrences crash and make import assertion parsing more generous (#47535) 2022-01-20 14:08:47 -08:00
Daniel Rosenwasser
04d77fe900
Update to TypeScript 4.5.5, fix semantic lints. (#47529)
* Update to TypeScript 4.5.5, fix semantic lints.

* Remove extra parens.

* Remove now-outdated non-null comment around #18217.
2022-01-20 11:33:30 -08:00
TypeScript Bot
6c8c829148 Update package-lock.json 2022-01-20 06:07:54 +00:00
Eli Barzilay
c240380519 Add a comment to maybeSetLocalizedDiagnosticMessages
(Should have included it in the previous PR but missed it...)
2022-01-19 22:04:45 -05:00
Eli Barzilay
8d9fa685b5 Avoid global mutations
This removes a few places where global compiler bindings are mutated:

1. Make `sysLog` call an internal binding which is changed via
   `setSysLog`.

2. Use `Object.assign` to change values *in* `objectAllocator` instead
   of mutating the binding itself.  (The type should verify that any
   future uses of this will properly override all bindings.)

3. `localizedDiagnosticMessages` is not really needed as an exported
   value, there's only one place that uses it to test whether it is set
   or not.  So drop the export and replace it with a new
   `maybeSetLocalizedDiagnosticMessages` (internal) function.
2022-01-19 20:01:19 -05:00
mickey-stringer
9e2b7ad0d8
fix(47492): more detailed parseTryStatement error message (#47504)
* more detailed parseTryStatement error message

* move custom error to diagnosticMessages.json

* update error code

Co-authored-by: mickey-stringer <fcstring31@yahoo.com>
2022-01-19 15:32:47 -08:00
Daniel Rosenwasser
ad5ca673e6
Avoid crash for import code fixes with dotted require (#47433)
* Add failing test.

* Update failing test.

* Finalized failing test case.

* Separate our usages of utilities that expect variables initialized to require(...) and require(...).foo.

* Renamed types and utilities, removed accidental indentation.

* Renamed both utilitiy functions uniformly.
2022-01-19 15:05:01 -08:00
Jake Bailey
049d4e049f
Modify debug assertion to avoid crashing on SyntaxList (#47500) 2022-01-19 13:37:55 -08:00
Orta Therox
818962087c
Update dom.generated.d.ts (#47507) 2022-01-19 12:45:43 +00:00
Orta Therox
113a681aee
Do not show the additional file/errors table when there's 1 file with many errors (#47345)
* Use relative paths for the end of compile report

* Have a tighter suffix for multiple errors in one file

* Review feedback

* Refactors, and adds color

* Update baselinies
2022-01-19 11:56:27 +00:00
TypeScript Bot
9f6483929b Update package-lock.json 2022-01-19 06:06:17 +00:00
Oleksandr T
c44fd466a7
fix(47451): Implicit 'any' quick fix text grabs text from wrong file (#47493) 2022-01-18 20:59:26 -08:00
Jake Bailey
97017ee5f3
Delay "File change detected" reporting until createProgram (#47427) 2022-01-18 18:13:18 -08:00
TypeScript Bot
4e689bc075
🤖 Update TypeScript DOM Libs (#47445)
Co-authored-by: orta <orta@users.noreply.github.com>
2022-01-18 17:43:20 -08:00
Robert Snow
08221166d9
Add missing currencyDisplay to resolved number format options (#44006)
* Add missing currencyDisplay to resolved number format options

* Move declaration to es2020

* Update es2020.intl.d.ts

* Fix bad merge

Co-authored-by: Orta Therox <ortam@microsoft.com>
Co-authored-by: Orta Therox <git@orta.io>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-01-18 13:54:25 -08:00
Jake Bailey
2635102f7b
Deprecate ScriptElementKind.jsxAttribute (#47414) 2022-01-18 13:53:51 -08:00
Andrew Branch
d0b3ac376d
Better reuse of package.json cache, module resolution cache, and package.json auto import filter (#47388)
* Use package.json cache in module specifier generation

* Let AutoImportProviderProject reuse module resolution cache of host project

* Add missing module resolution cache access, add logging to getRootFileNames

* Reuse packageJsonImportFilter

* Only log when the project will be created, update API baseline

* Remove override that could mess up watches
2022-01-18 13:23:13 -08:00
Oleksandr T
8153475ca5
fix(47438): show auto-complete for this inside class static blocks (#47460) 2022-01-18 12:40:00 -08:00
Jake Bailey
e2c00331d6
Bind RHS of comma expressions too (#47049) 2022-01-18 11:46:09 -08:00
Oleksandr T
16e96f62d7
feat(47439): omit optional key from jsx output (#47467) 2022-01-18 11:38:52 -08:00
Pimm "de Chinchilla" Hogeling
cecd8c50a0
Make Map constructor argument optional and nullable (#43396)
* Make Iterable Map constructor argument optional

Fixes #37779

* Change Map constructor in iterable to accept both null and undefined.

According to the spec (https://tc39.es/ecma262/#sec-map-iterable), the sole argument passed to Map is allowed to be null or undefined.

* Changed Map constructor to ensure new Map() still types as Map<any, any>.

* Add map constructor test.

This proves that the previous commit fixes #37779, as well as that new Map() still types as Map<any, any>.

* Update baseline.

Co-authored-by: Jared Neil <jaredneil@lucidchart.com>
2022-01-18 13:39:05 +00:00
TypeScript Bot
7490b329a7 Update package-lock.json 2022-01-18 06:06:28 +00:00
Oleksandr T
febfd442cd
fix(47417): allow undefined type to be added to JSDoc types (#47449) 2022-01-16 13:44:07 -08:00