https://github.com/Microsoft/TypeScript

sort by:
Revision Author Date Message Commit Date
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
db9e007 Update package-lock.json 02 January 2022, 06:06:34 UTC
ef9fd97 Update package-lock.json 27 December 2021, 06:06:35 UTC
fdbe371 Update package-lock.json 24 December 2021, 06:06:15 UTC
5cab951 Discourage typo fixes in PR template (#46908) * Discourage typo fixes in PR template Wording taken from [this comment](https://github.com/microsoft/TypeScript/pull/45834#issuecomment-919606286). There have been a number of rejected typo fix PRs lately; hopefully this can reduce the amount of typo-fix-rejecting work for the team. * Tweak typo fix discouragement in PR template Removed "the same generally applies to other projects" per orta * Update typo fix discouragement 23 December 2021, 14:58:23 UTC
afce88e Update package-lock.json 23 December 2021, 06:06:14 UTC
25fc025 Update package-lock.json 21 December 2021, 06:06:27 UTC
d7b4923 Update package-lock.json 20 December 2021, 06:06:43 UTC
7433b0c Update package-lock.json 19 December 2021, 06:06:07 UTC
8a5d476 Fix baselines from bad merge (#47177) Conflict between #47018 and #46824, both of which changed the behaviour of private fields. 17 December 2021, 20:15:08 UTC
a423791 fix merging of function and derived class (#47170) 17 December 2021, 01:29:07 UTC
20e86da Emit class fields as-is with `target: es2022` (#47018) * Emit class fields as-is with `target: es2022` Closes #47017 * wave 2 16 December 2021, 23:15:33 UTC
c282771 fix(47004): ignore arguments name in PropertyAssignment (#47054) 16 December 2021, 21:05:48 UTC
93bdfd2 fix(47056): report errors for all properties with errors (#47057) 16 December 2021, 20:58:15 UTC
270b0d1 fix(46824): remove duplicate private identifier errors (#47116) 16 December 2021, 20:07:12 UTC
34e8974 Update package-lock.json 16 December 2021, 06:06:21 UTC
2bbdb31 update es2020.intl DisplayNames#of (#47157) fix return type of Intl.DisplayNames.prototype.of was typed to return always string but can actually return undefined too see spec https://tc39.es/ecma402/#sec-Intl.DisplayNames.prototype.of 15 December 2021, 17:51:35 UTC
f21e1a6 Update package-lock.json 15 December 2021, 06:06:11 UTC
3d3825e Fix multiple issues with indexed access types applied to mapped types (#47109) * Fix multiple issues with indexed access types applied to mapped types * Add tests 14 December 2021, 19:51:03 UTC
7e0e867 fix(47134): show all meanings for type-only imports and exports (#47138) 14 December 2021, 18:58:21 UTC
8974fea fix(47062): support generic arrow function with default type parameter in tsx (#47112) * fix(47062): support generic arrow function with default type parameter in tsx * test: update test "completionListIsGlobalCompletion" 14 December 2021, 17:02:36 UTC
67872a5 Fix enums and namespace merge (#47059) * Fix enums and namespace merge * Remove unused comment 13 December 2021, 22:03:19 UTC
4305997 Fix extract type crash (#47136) 13 December 2021, 18:39:34 UTC
06746ef Revert change to getFalsyFlags (#47125) * Revert change to getFalsyFlags * Add regression test 13 December 2021, 17:05:55 UTC
d417058 Update package-lock.json 11 December 2021, 06:06:53 UTC
df87a8c fix(44693): emit declaration of JSDoc overridden properties with different types (#46797) 10 December 2021, 19:06:59 UTC
4e39023 Enable customDescriptionGenerator in launch template, update eslint setting (#47089) 09 December 2021, 19:47:12 UTC
0ed9247 Explicitly Omit unspreadable properties from rest type in the generic case (#47078) 09 December 2021, 19:45:52 UTC
9b5abac chore: add packageManager field to support corepack (#46756) 09 December 2021, 14:46:27 UTC
e2c89af use default type parameter rather than `unknown` when show quick help (#46792) * use default type parameter rather than `unknown` when show quick help * prefer default type parameter than constraint for quick info 09 December 2021, 01:02:22 UTC
9218255 fix: do not use ts.NodeArray in factory inputs (#46843) 09 December 2021, 00:57:52 UTC
a2c7fa2 Add 12 more grammar errors (#47075) These are the last ones that I know of. They come from calls to `grammarErrorOnFirstToken`. Fixes part of #45349 Follow-up to #47067 09 December 2021, 00:54:58 UTC
c8f1a87 Exempt tslib from indirect call transform (#47070) 08 December 2021, 23:42:37 UTC
a72bf54 Plain JS grammar errors (#47067) * Plain JS grammar errors From the list in https://github.com/microsoft/TypeScript/issues/45349#issuecomment-974561208, excluding the JSX errors, decorator errors and unresolved #private error. The latter re-uses "Cannot resolve name X" which naturally shows up a *lot* in plain JS. * Add grammarErrorAtPos errors Also remove checkGrammarArguments; it's blocked entirely by the same parser error. 08 December 2021, 23:16:23 UTC
0225425 fix(47043): as const cast wrong colour when using typescript 4.5.2 (#47066) 08 December 2021, 18:15:58 UTC
48228b8 Update package-lock.json 08 December 2021, 06:06:15 UTC
5f372d9 fix(46606): show completion in jsdoc property tag (#46657) 07 December 2021, 23:28:41 UTC
6722ef1 Add a test for a destructured union with tuple members (#46656) 07 December 2021, 23:22:46 UTC
67f84ef Fix Awaited<T> for onfulfilled callbacks with more than one argument (#46951) 07 December 2021, 23:21:11 UTC
7a12909 fix(45713) Improve error report summaries (#45742) * Improve error report summaries (#45713) * fixup! Improve error report summaries (#45713) * fixup! fixup! Improve error report summaries (#45713) * Adds support for handling localization renaming the 'files' header due to localization * fixup! Adds support for handling localization renaming the 'files' header due to localization - Fixed baseline error - Fixed linter error Co-authored-by: Orta <git@orta.io> Co-authored-by: Orta Therox <ortam@microsoft.com> 07 December 2021, 10:50:44 UTC
back to top