https://github.com/Microsoft/TypeScript

sort by:
Revision Author Date Message Commit Date
e5d7d70 LEGO: Merge pull request 47661 LEGO: Merge pull request 47661 30 January 2022, 06:14:39 UTC
3d2ac9d LEGO: Merge pull request 47659 LEGO: Merge pull request 47659 29 January 2022, 18:15:39 UTC
17aec75 Update terminal.integrated.shell.linux config in devcontainer.json (#47192) The previous `"terminal.integrated.shell.linux"` configuration is deprecated. This is the new way of setting this configuration 29 January 2022, 08:42:56 UTC
3e19cc8 remove unused errors in checkGrammarModifiers (#47198) 29 January 2022, 01:23:13 UTC
38ed8eb LEGO: Merge pull request 47655 LEGO: Merge pull request 47655 29 January 2022, 00:14:38 UTC
0b9f8b4 Fix confusing file name in generated diagnostics file (#46821) * Fix confusing file name in generated diagnostics file * Change "by" to "in" 28 January 2022, 23:08:19 UTC
2d501b1 fix(47582): skip extraction if the type node is in the range of the type parameter declaration (#47596) 28 January 2022, 20:19:48 UTC
eb3e7bd LEGO: Merge pull request 47649 LEGO: Merge pull request 47649 28 January 2022, 12:14:33 UTC
09b84d5 LEGO: Merge pull request 47647 LEGO: Merge pull request 47647 28 January 2022, 06:18:31 UTC
deb36b9 Update package-lock.json 28 January 2022, 06:08:10 UTC
3de032f Allow usage of local value symbol merged with type-only import (#47642) 28 January 2022, 00:18:14 UTC
9028051 Add `assert` keyword in completions (#47644) * add contextual keyword assert in completions * clean up 28 January 2022, 00:17:43 UTC
f2c51c1 LEGO: Merge pull request 47645 LEGO: Merge pull request 47645 28 January 2022, 00:15:37 UTC
4d29859 Fix duplicate completions from two different copies of a node_modules package (#47584) * Fix duplicate completions from two different copies of a node_modules package * Fix logic for scoped packages * Fix errors from merge * Less gross way to reconcile these two conflicting PRs 27 January 2022, 22:35:36 UTC
61b7bbb Revert to temporary AbortSignal fix (#47643) I forgot to keep the temporary fix when I updated the DOM yesterday. 27 January 2022, 21:28:17 UTC
e9092f3 Proposal: simplify auto import descriptions (#47631) * Simplify import fix descriptions * Update tests * Fix new test 27 January 2022, 18:21:08 UTC
208cb2d LEGO: Merge pull request 47641 LEGO: Merge pull request 47641 27 January 2022, 18:14:34 UTC
b7b6483 LEGO: Merge pull request 47640 LEGO: Merge pull request 47640 27 January 2022, 12:15:07 UTC
52e785f LEGO: Merge pull request 47635 LEGO: Merge pull request 47635 27 January 2022, 06:15:11 UTC
b6075d8 Update package-lock.json 27 January 2022, 06:07:47 UTC
5813a35 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 27 January 2022, 00:12:40 UTC
0d3ff0c 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 26 January 2022, 23:07:41 UTC
3718182 Don't block completion after end of type parameters in JSX elements (#47501) 26 January 2022, 22:45:21 UTC
0f3809e 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` 26 January 2022, 22:13:34 UTC
53b96d9 Update DOM 2022-01-26 (#47623) Improves types for FileSystemHandle.kind in subtypes, plus other bcd updates. 26 January 2022, 20:29:25 UTC
c191e7c Fix diagnostic serialization crash (#47604) * Add crashing test * Fix unsafe cast to DiagnosticMessageChain 26 January 2022, 18:41:47 UTC
3206df8 fix(47561): use parameter name from enclosing declaration (#47609) 26 January 2022, 12:00:14 UTC
d56d621 Update package-lock.json 26 January 2022, 06:06:54 UTC
20b5523 feat(42684): allow deprecated JSDoc tag to be used on aliased nodes (#47293) 25 January 2022, 23:49:33 UTC
0673f02 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 25 January 2022, 23:43:12 UTC
f84a67f Don't trace bindSourceFile cache hits (#47602) Writing the trace entry takes longer than returning the cached value. Fixes #47565 25 January 2022, 22:57:17 UTC
ba402e6 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 25 January 2022, 19:04:53 UTC
a9efe2b Update package-lock.json 25 January 2022, 06:06:20 UTC
6927730 Fix detecting an existing `Map`/`Set` This didn't affect compilation to CJS since that sets `exports.Map` instead of creating a global. 24 January 2022, 20:47:10 UTC
b9efc3b Update package-lock.json 23 January 2022, 06:06:24 UTC
0019c01 Update package-lock.json 22 January 2022, 06:06:15 UTC
3cbc8d2 Fix narrowing of intersection with function type (#47483) * add and and or mask to typefacts * add comment 21 January 2022, 20:05:34 UTC
9b6c179 Fix parser test cases missing 'it' calls (#47545) 21 January 2022, 19:32:23 UTC
5e38082 fix(47165): ignore spaces in goToDefinition imports (#47541) 21 January 2022, 18:09:10 UTC
5e09e86 return early from fixUnreachableCode if syntactic errors exists (#47463) 20 January 2022, 23:45:42 UTC
e9453f4 fix(47524): skip assertion on checking this in fixImplicitThis QF (#47527) 20 January 2022, 22:58:28 UTC
ab4d319 Fixed Go To Definition using jsconfig (#47434) * Fixed Go To Definition using jsconfig * Fixed formatting 20 January 2022, 22:45:29 UTC
7e3ecce 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). 20 January 2022, 22:38:36 UTC
bae0f50 Fix import assertion occurrences crash and make import assertion parsing more generous (#47535) 20 January 2022, 22:08:47 UTC
04d77fe 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. 20 January 2022, 19:33:30 UTC
6c8c829 Update package-lock.json 20 January 2022, 06:07:54 UTC
c240380 Add a comment to `maybeSetLocalizedDiagnosticMessages` (Should have included it in the previous PR but missed it...) 20 January 2022, 03:04:45 UTC
8d9fa68 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. 20 January 2022, 01:01:19 UTC
9e2b7ad 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> 19 January 2022, 23:32:47 UTC
ad5ca67 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. 19 January 2022, 23:05:01 UTC
049d4e0 Modify debug assertion to avoid crashing on SyntaxList (#47500) 19 January 2022, 21:37:55 UTC
8189620 Update dom.generated.d.ts (#47507) 19 January 2022, 12:45:43 UTC
113a681 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 19 January 2022, 11:56:27 UTC
9f64839 Update package-lock.json 19 January 2022, 06:06:17 UTC
c44fd46 fix(47451): Implicit 'any' quick fix text grabs text from wrong file (#47493) 19 January 2022, 04:59:26 UTC
97017ee Delay "File change detected" reporting until createProgram (#47427) 19 January 2022, 02:13:18 UTC
4e689bc 🤖 Update TypeScript DOM Libs (#47445) Co-authored-by: orta <orta@users.noreply.github.com> 19 January 2022, 01:43:20 UTC
0822116 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> 18 January 2022, 21:54:25 UTC
2635102 Deprecate ScriptElementKind.jsxAttribute (#47414) 18 January 2022, 21:53:51 UTC
d0b3ac3 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 18 January 2022, 21:23:13 UTC
8153475 fix(47438): show auto-complete for this inside class static blocks (#47460) 18 January 2022, 20:40:00 UTC
e2c0033 Bind RHS of comma expressions too (#47049) 18 January 2022, 19:46:09 UTC
16e96f6 feat(47439): omit optional key from jsx output (#47467) 18 January 2022, 19:38:52 UTC
cecd8c5 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> 18 January 2022, 13:39:05 UTC
7490b32 Update package-lock.json 18 January 2022, 06:06:28 UTC
febfd44 fix(47417): allow undefined type to be added to JSDoc types (#47449) 16 January 2022, 21:44:07 UTC
c71ff4d Update package-lock.json 15 January 2022, 06:06:32 UTC
28c2084 Deprioritize import paths made up of only dots and slashes (#47432) * Deprioritize import paths made up of only dots and slashes * Fix test * Hoist regex * Yaaaay RegExp state 14 January 2022, 18:33:05 UTC
16bbddb Rewrite logic for JSX attribute completion detection (#47412) 14 January 2022, 17:56:57 UTC
b7fee7f Allowed non-this, non-super code before super call in derived classes with property initializers (#29374) * Allowed non-this, non-super code before super call in derived classes Fixes #8277. It feels wrong to put a new `forEachChild` loop in the checker, though in the vast majority of user files this will be a very quick one. Is there a better way to check for a reference to `super` or `this`? * Used new isNewThisScope utility and dummy prop in baselines * Accounted for parameters and get/set accessor bodies * Accounted for class extensions * (node|statement)RefersToSuperOrThis wasn't checking root level scope boundaries ```ts function () { return this; } ``` It was immediately going to `ts.forEachChild` so the statement itself wasn't being counted as a new `this` scope. * Better 'references' name and comments; accounted for more method edge case * Limited super calls to root-level statements in constructor bodies As per discussion in the issue, it would be ideal to consider any block that always ends up calling to super() the equivalent of a root-level super() statement. This would be valid: ```ts foo = 1; constructor() { condition() ? super(1) : super(0); this.foo; } ``` ...as it would compile to the equivalent of: ```ts function () { condition() ? super(1) : super(0); this.foo = 1; this.foo; } That change would a bit more intense and I'm very timid, so leaving it out of this PR. In the meantime the requirement is that the super() statement must itself be root-level. * Fixed error number following 'master' merge * Added decorator test cases * Again allowed arrow functions * Accepted new baselines * Added allowance for (super()) * Reworked emitter transforms for ES this binding semantics In trying to adjust to rbuckton's PR feedback, this orders derived class constructor bodies into five sections: 1. Pre-`super()` code 2. The `super()` call itself 3. Class properties with initializers 4. Parameter properties 5. The rest of the constructor I've looked through the updated baselines and it looks like they're generally better than before. Within the existing test cases that result in semantic errors for `this` access before `super`, several previously resulted in a global `_this` being created; now, they correctly defer referring to `_this` until it's assigned to `_super.call(this) || this`. * Used skipOuterExpressions when diving for super()s; fix prop ordering * Allow direct var _this = super() when no pre-super() statements; lint fixes * Always with the TSLint * One last touchup: skipOuterExpressions in es2015 transformer * Fixed new lint complaint in utilities.ts * Again added a falls-through; it'd be swell if I could run linting locally * This time I think I got it * Well at least the error is a different one * Undid irrelevant whitespace changes * Mostly addressed private/field issues * Accepted derivedClassSuperProperties baseline * Lint fix, lovely * Remove now-unnecesary comment * First round of feedback * Moved prologue statements to start of statements * Added consideration for super statements in loops and the like * Ordering and a _this_1 test * Missed the one change I needed... * First round of feedback corrections * Feedback round two: statements * Feedback: used more direct statements * Fixed classFields emit to not duplicate temp variables * Refactored es2015 helper to be less overloaded * Accounted for parentheses * Simpler feedback: -1, and emptyArray * Next feedback: superStatementIndex * Feedback: simplified to no longer create slice arrays * Adjusted for default and rest parameters * Added test case for commas * Corrected comment ranges * Handled comments after super, with tests * Fixed Bad/Late super baselines * Remove unused param and unnecessary baseline comments Co-authored-by: Orta Therox <orta.therox@gmail.com> Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> 14 January 2022, 04:29:37 UTC
70097c4 Fix type error in fourslash.ts (#47430) 14 January 2022, 00:51:02 UTC
a158b7e Fix implicit glob detection when ancestor directory contains `.` (#47418) 13 January 2022, 23:33:38 UTC
ce18254 optimize `__createBinding` When the binding is itself one that was created by `__createBinding`, re-use its descriptor, which avoids piling multiple levels of getters in the case of multiple levels of exports. In addition, reuse a descriptor if the bindings is marked as non-writable and non-configurable, which makes a getter not necessary. (This can be done manually if needed, even though tsc doesn't do it now.) Also related to #46744 and to microsoft/tslib#165. 13 January 2022, 20:57:51 UTC
42ea5ec fix(47415): don't show addConvertToUnknownForNonOverlappingTypes QF in JS (#47424) 13 January 2022, 19:17:36 UTC
8237782 fix(46406): add Template Literal types to decorator metadata serialization (#46913) 13 January 2022, 05:34:00 UTC
461fb65 Fix for crash for auto import completions with a rooted rootDirs entry (#47411) * Add failing test case. * Guard against undefined relative path. 12 January 2022, 21:45:06 UTC
14f33d5 Fix for crash in navbar with double ambient modules (#47395) * Add failing test. * Guard against undefined module bodies in navbar/navtree. 12 January 2022, 02:14:22 UTC
ed014db Add names for refactoring functions. (#47375) * Add names for refactoring functions. * Consistency in function names. 11 January 2022, 20:20:17 UTC
faee7b3 Avoid printing comments on static fields twice. (#47363) * Avoid printing comments on static fields twice. In TS4.4, when a transformer adds a static field with a synthetic comment to a decorated class, TS prints the synthetic comment twice: @Decorator class MyClass { /* comment */ staticField = 'x'; // field and comment added by transformer } Becomes: var MyClass = class MyClass {} /*comment*/ /*comment*/ MyClass.newField = "x"; __decorate(MyClass, Decorator, ...) This is because the classFields transformer calls `setOriginalNode(n, propertyDeclaration)` on both the expression statement , and the assignment expression contained in it, leading to the synthetic comment appearing twice. This change avoids the problem by explicitly deleting any synthetic comments from the assignment expression created for static fields when creating the expression statement containing the assignment. This allows us to retain the information of the original node without printing the synthetic comment twice. * Update src/testRunner/unittests/transform.ts Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> 11 January 2022, 20:19:36 UTC
0f1496f Process package.json exports with auto-import provider (#47092) * Have auto-import provider pull in `exports` * Revert filtering of node_modules relative paths, to do in separate PR * Do @types and JS prioritization correctly * Cache entrypoints on PackageJsonInfo * Add one more test * Delete unused function * Fix other tests - dependencies need package.json files * Do two passes of exports resolution * Fix missed refactor * Apply suggestions from code review Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Uncomment rest of test * Handle array targets Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 11 January 2022, 19:10:35 UTC
935c05c Fix the related repos CI (#47386) 11 January 2022, 15:27:51 UTC
4d6dd11 Add missing mapped type indexed access constraint (#47370) * Type { [P in K]: E }[X] has constraint E with X substutited for P * Add regression test * Fix PragmaMap and ReadonlyPragmaMap declarations * Explore additional constraint * Revert previous change * Add tests 11 January 2022, 15:23:18 UTC
852b1c2 Fix checker initialization crash with esModuleInterop and global merges resolving to ImportEquals aliases (#47348) * Add minimal failing test * Fix checker initialization crash with esModuleInterop global merges resolving to ImportEquals aliases 11 January 2022, 00:04:12 UTC
337bbcc Update package-lock.json 10 January 2022, 06:07:07 UTC
b53073b Update package-lock.json 08 January 2022, 06:07:09 UTC
7f189b9 fix ATA toplevel dep detection (#47164) ATA tried to use the `_requiredBy` field to determine toplevel deps, but this is not portable. Not only is it unavailable in npm@>=7, but neither Yarn nor pnpm write this metadata to node_modules pkgjsons. This also adds support for ATA acquiring types for scoped packages. Fixes: https://github.com/microsoft/TypeScript/issues/44130 07 January 2022, 21:48:31 UTC
8a8c71c Use relative paths for the end of compile report (#47344) 07 January 2022, 19:55:55 UTC
6fc0584 fix(46402): create valid property keys/jsx attribute names (#46716) 07 January 2022, 19:46:26 UTC
484f141 Prevent merged class/namespace from overlapping with `Record<string, unknown>` (#47088) 07 January 2022, 19:02:48 UTC
a3d23d3 Fix conditional type constraint exploration + signature relations (#47341) 07 January 2022, 17:44:57 UTC
363e3a7 Add `Error.prototype.cause` (#47020) * Add `Error.prototype.cause` Fixes #47019 * Update test baselines 07 January 2022, 14:58:58 UTC
e46f3ba Adds a github actions workflow which pings related repos with a blank commit once a month to ensure their automation stays running (#46747) 07 January 2022, 13:37:16 UTC
0fcd861 docs(common): url link format updated (#47336) fix the url link format from http to https 06 January 2022, 22:08:19 UTC
95d8921 Update package-lock.json 06 January 2022, 06:07:15 UTC
6966209 Use node ipc for TS Server (#46418) * Use node ipc for TS Server For #46417 This lets us use Node's built-in ipc for passing messages to/from the typescript server instead of using stdio * Remove extra parse * Add extra logging when using node IPC * Split out to subclass * Extract common writeMessage method * Baseline accept 06 January 2022, 00:39:45 UTC
e10c912 Update package-lock.json 05 January 2022, 06:06:57 UTC
404a7d6 Gabritto/semicolons (#46832) * call formatter in completions * fixes * add test * update api baselines * fix createModifiersFromModifierFlag to not return empty array 04 January 2022, 19:50:49 UTC
f4e1efb Control flow analysis for dependent parameters (#47190) * Support control flow analysis for dependent parameters * Add tests 04 January 2022, 19:22:11 UTC
2f058b7 Update package-lock.json 04 January 2022, 06:06:11 UTC
9a75d2a fix(46845): Add missing "locale" field to Intl.DisplayNamesOptions (#46849) Closes https://github.com/microsoft/TypeScript/issues/46845 03 January 2022, 20:10:20 UTC
back to top