https://github.com/Microsoft/TypeScript

sort by:
Revision Author Date Message Commit Date
e213b2a Update LKG. 23 February 2021, 02:36:09 UTC
31aa1cf Fix version for 4.2.2. 23 February 2021, 02:35:56 UTC
486f0c1 Bump version to 4.2.2 and LKG 20 February 2021, 00:22:10 UTC
2b34f0a Cherry-pick PR #42886 into release-4.2 (#42888) Component commits: cfd472f7aa Make 'calendar' and 'numberingSystem' open strings in es2020.intl. Co-authored-by: Daniel Rosenwasser <Daniel.Rosenwasser@microsoft.com> 20 February 2021, 00:06:02 UTC
30368d0 Cherry-pick PR #42861 into release-4.2 (#42867) Component commits: 21eb38bd7f Fix for crash when using ca call expression on private identifier coming from an any typed variable. (GH #42860) Co-authored-by: Titian Cernicova-Dragomir <tcernicovad1@bloomberg.net> 18 February 2021, 22:46:52 UTC
57ba6dd Cherry-pick PR #42846 into release-4.2 (#42852) Component commits: 0edae127ae Reduce void | undefined only in conjunction with subtype reduction 6b487a6db5 Accept new baselines e7b6601de7 Add regression test Co-authored-by: Anders Hejlsberg <andersh@microsoft.com> 18 February 2021, 01:48:43 UTC
16f2556 Cherry-pick PR #42779 into release-4.2 (#42820) Component commits: 214ef0c750 No did-you-mean-to-call error on casts I chose to do the ad-hoc check rather than yet another tree walk. 1. It's faster to run and easier to read. 2. This error came from looking at real code. It happened twice, so I think the best estimate for other uses that happened zero times is in fact zero. 3. I couldn't think of other places to put the cast, given the restrictions on `testedNode` just before the new code. 1d347785de Merge branch 'master' into no-did-you-mean-to-call-error-on-casts b3be79ad0f Skip parentheses 2a288127e9 Merge branch 'master' into no-did-you-mean-to-call-error-on-casts Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com> 16 February 2021, 21:19:19 UTC
7f64b3a Cherry-pick PR #42626 into release-4.2 (#42780) Component commits: 214ef0c750 No did-you-mean-to-call error on casts I chose to do the ad-hoc check rather than yet another tree walk. 1. It's faster to run and easier to read. 2. This error came from looking at real code. It happened twice, so I think the best estimate for other uses that happened zero times is in fact zero. 3. I couldn't think of other places to put the cast, given the restrictions on `testedNode` just before the new code. 1d347785de Merge branch 'master' into no-did-you-mean-to-call-error-on-casts Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com> 16 February 2021, 19:25:58 UTC
980b273 Bump version to 4.2.1-rc and LKG 10 February 2021, 00:52:29 UTC
12e7691 Merge remote-tracking branch 'origin/master' into release-4.2 10 February 2021, 00:13:56 UTC
5280ba4 Handle if plugin doesnt specify name (#42717) Fixes microsoft/vscode#116219 09 February 2021, 23:23:29 UTC
8c5fa5c Revert assignability cases in getNarrowedType (#42231) * Revert subtype narrowing changes from readonly array PRs * Adds a test for the change * More baselines 09 February 2021, 23:03:11 UTC
1b19af0 Refactor params for interface (#42652) * apply refactor to interface methods * handle calls * no available refactors for union type * add tests * Update src/services/refactors/convertParamsToDestructuredObject.ts Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * address comments * Update src/services/refactors/convertParamsToDestructuredObject.ts Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * Update src/services/refactors/convertParamsToDestructuredObject.ts Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 09 February 2021, 21:30:31 UTC
664ed17 Allow only package names as plugin names (#42713) * Allow only package names as plugin names * Remove extra argument following merge from master branch. * kipped -> Skipped Co-authored-by: Sheetal Nandi <shkamat@microsoft.com> 09 February 2021, 19:30:09 UTC
fe2899c Use a 10ms sampling frequency to filter tracing dumps Currently hard-wired to 10ms, can be made configurable if needed later. 08 February 2021, 22:01:45 UTC
f462576 Re-do tracing initialization and tests around calls Make `tracing` either `undefined` or the same namespace as before. Switching all calls to `tracing?.___` means that there is no cost for a call or the arguments when tracing is not used. Comparing two runs without tracing (27 runs, drop 5+5, avg rest) I get: master: 42.59s user 1.00s system 165% cpu 26.372 total changed: 42.01s user 0.982 system 165% cpu 26.039 total (Makes it all private, so no api changes.) 08 February 2021, 20:41:35 UTC
7de5d0b Update package-lock.json 07 February 2021, 06:22:44 UTC
60a6240 feat(42637): add generateReturn option to UserPreferences (#42642) 05 February 2021, 23:24:48 UTC
4c43e09 Add fallback error locations for nameless declarations, better class error locations (#42585) 05 February 2021, 20:07:14 UTC
aba932a Create synthetic `exports` symbol for commonjs `module` (#42655) * Commonjs module:create synthetic exports symbol Previously, the `module` identifier in commonjs modules got a synthetic type with a single property `exports`. The exports property reused the file's symbol, which, for a module file, gives the correct exported properties. However, the name of this symbol was still the filename of the file, not `exports`. This PR creates a synthetic symbol for `exports` by copying in a similar way to esModuleInterop's `default` symbol in `resolveESModuleSymbol` (although the intent there is to strip off signatures from the symbol). * correct parent of synthetic symbol 05 February 2021, 18:56:03 UTC
79ed041 Fix Format Selection on JSDoc comments (#42411) 05 February 2021, 18:37:47 UTC
f1583f0 Signature help turns off current-parameter display for non-trailing rest parameters (#42592) * Signature help: support non-trailing rest parameters In signature help, the first rest parameter will always be the *last* 'current' parameter (disregarding types). Previously, the signature help current-parameter highlight was only correct for trailing rest parameters. However, with tuple types, you can now create non-trailing rest parameters. This PR now correctly highlights non-trailing rest parameters as the last 'current' parameter. For example, `names` should be the current parameter in all the calls below: ```ts declare function loading(...args: [...names: string[], allCaps: boolean, extra: boolean]): void; leading(/**/ leading('one', /**/ leading('one', 'two', /**/ ``` And, because signature help doesn't do real overload resolution, `names` is also the current parameter for other calls: ```ts leading(1, 2, 3, 'ill-typed', /**/ leading('fine', true, /**/ ``` * Change 'variadic' to 'rest' * fix missed rename * use single, original tuple instead * Revert "use single, original tuple instead" This reverts commit f0896f32ea3d523f1186e9bea2446f75f3a182de. * Improve sig help of trailing rest too 1. Trailing rest keeps highlight at end instead of going off the end. 2. Non-trailing rest disable highlight entirely (by putting the index one past the end). * update API baselines 05 February 2021, 17:37:28 UTC
215ee40 Update package-lock.json 05 February 2021, 06:23:09 UTC
19db9ad Swapping the quote style of a string for completions should swap _all_ quotes in the string (#42650) 04 February 2021, 21:56:34 UTC
f569aa3 Use a (hopefully) more efficient regex for matching jquery in the safelist (#42653) 04 February 2021, 21:53:05 UTC
62bc8be Replace _all_ tabs in pretty output, not just the first on each line (#42649) 04 February 2021, 21:25:53 UTC
be18057 Add check for no match into fs watch rename event handler (#42651) 04 February 2021, 21:20:38 UTC
ab2729a Smarter subtype reduction in union types (#42353) * Exclude primitive types from union subtype reduction in most cases * Accept new baselines * Minor fixes * Less aggressive checking of assertion function calls that don't affect control flow * Accept new baselines 04 February 2021, 21:18:30 UTC
258be21 Fix completions crash on transient exported property named 'default' (#42583) * Fix completions crash on transient exported property named default * Revert simplification, both conditions were needed 04 February 2021, 18:22:15 UTC
05e2f74 Update package-lock.json 04 February 2021, 06:22:59 UTC
4c118ae fix(39022): wrap export references UnaryExpression to ParenthesizedExpression (#41156) 04 February 2021, 02:26:33 UTC
e231821 Strip nullable types from 'this' type in inference with optional chain calls (#42536) * Properly strip nullable types from this type in optional chain calls * Add regression test 03 February 2021, 23:50:23 UTC
cce4bfb Revert changes for template literal types, keeping tests. (#42588) * Revert changes for template literal types, keeping tests. * Update Baselines and/or Applied Lint Fixes Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com> 03 February 2021, 22:49:03 UTC
6549754 Use spaces instead of non-breaking spaces, narrow non-breaking spaces. (#42500) 03 February 2021, 22:29:42 UTC
c3e132d Keep extended config's raw file, include, exclude relative to itself and correct it when setting extending options (#42544) * Test when config file extends is incorrectly computed Test for #40720 * Keep extended config's raw file, include, exclude relative to itself and correct it when setting extending options Fixes #40720 03 February 2021, 19:09:06 UTC
1c25b00 Sort import fixes by number of directory separators (#42614) * Add failing test * Sort all import fixes by number of directory separators 03 February 2021, 18:42:13 UTC
bfc55b5 Update package-lock.json 03 February 2021, 06:25:50 UTC
96cc9b9 Make object literal properties new identifier locations when not contextually typed (#42612) * Make object literal properties new identifier locations when not contextually typed * Fix completions after comma in object literal * Update other test 03 February 2021, 00:17:55 UTC
71de94a Limit tuple size resulting from spread (#42448) * Limit tuple size resulting from spread * Update limit to 10k * Update baseline after merge conflict 02 February 2021, 22:02:35 UTC
fd6178b Update user baselines +cc @sandersn (#42420) Co-authored-by: typescript-bot <typescript@microsoft.com> 02 February 2021, 16:39:34 UTC
60bde2d Update package-lock.json 02 February 2021, 06:28:14 UTC
3e28e29 fix 38503. (#39716) * fix 38503. * trigger test. * trigger test. * Move isCallChain Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> 02 February 2021, 02:34:46 UTC
c953969 Switched 'ts.performance' to a mixed mode only uses native performance APIs when necessary (#42586) * Partially revert native performance * Fix bug in measure * Conditionally enable native perf events 01 February 2021, 23:33:34 UTC
66ecfcb Update package-lock.json 01 February 2021, 06:28:00 UTC
8523ca4 Don’t create missing nodes for identifiers that would be valid in a newer script target (#42520) * Add test * Don’t create missing nodes for identifiers that would be valid in a newer script target * Add to test * Remove unnecessary assignment 29 January 2021, 22:10:29 UTC
d7d7b88 Remove Travis CI (#42507) * Remove Travis CI * Revert deletion of cron stuff * Fix formatting 29 January 2021, 20:38:26 UTC
9d21a5b Fix indentation of multiline conditional expressions (#42484) * Fix indentation of multiline conditional expressions * Add more comment * Fix comment typo Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> * Fix suggestion formatting Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 29 January 2021, 20:07:57 UTC
c15f40a Fix discriminant property narrowing through optional chain with null (#42503) * Fix discriminant property narrowing through optional chain with null * Accept baselines * Add tests from Anders 29 January 2021, 20:03:42 UTC
65e4d60 Fix formatter determination of initial indentation of list items after the first (#42352) * Add failing test * Fix determination of initial indentation of list items after the first 29 January 2021, 17:49:47 UTC
2730cb2 Only skip any checks for unwrapped tuples in conditionals, rather than all nondistributive conditionals for backcompat (#42447) 29 January 2021, 07:36:43 UTC
9dbfaee Narrow QualifiedName inside typeof (#42540) Previously this wasn't narrowed at all. Now there is control flow and code in isMatchingReference. 28 January 2021, 23:19:01 UTC
5a21291 Propegate contextual types through nonnull assertion operators (#42526) 28 January 2021, 17:24:54 UTC
d2443a5 @typedef: Improve error spans from declaration emit (#42501) * @typedef: Improve error spans from declaration emit This is a proof-of-concept fix. I think it could be expanded for all of jsdoc, but I only set it up for jsdoc type aliases. It could use a lot of polish too. * track error node in isSymbolAccessible instead * Switch to using enclosingDeclaration Remove trueErrorNode * add test of @callback and @enum * Better error + fix @enum error Since enums don't have a name property, you *have* to call `getNameOfDeclaration` to go looking through the AST for one. 28 January 2021, 16:35:05 UTC
517f329 Add regression test for #37314 (#42525) 27 January 2021, 23:30:59 UTC
203a5ce Include all properties from the mapped modifier type when calculating index types for mapped types with name types (#41976) 27 January 2021, 21:32:46 UTC
cdd11e9 Update package-lock.json 27 January 2021, 06:27:40 UTC
b8faaea Only look for file exists and read file on supported locale directories that we build (#42505) Fixes #42263 27 January 2021, 01:43:37 UTC
6ed344f Update package-lock.json 26 January 2021, 06:27:09 UTC
871096b Merge pull request #42356 from armanio123/FixJSDocFormatting Fix double asterisk formatting in JSDoc 25 January 2021, 23:05:44 UTC
701493f Support top level "for await of" (#37424) * Support Top Level "for await of". * Add test cases for top level "for await of". * Apply suggestions from code review * add test cases * remove redundant variables * fix test baselines * Update diagnostic message and tests Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> 25 January 2021, 21:40:45 UTC
f529115 fixes microsoft/TypeScript#41286 (#41294) * fixes microsoft/TypeScript#41286 * Added period to end of deprecation message * Search Symbol.declarations for deprecated tag instead of Symbol.valueDeclaration * renamed arg0 to deprecatedEntity, narrowed param type * Added different deprecation message if signature is available * address PR comments Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> 25 January 2021, 21:33:28 UTC
d7d8f33 In bundle declaration emit, refuse to rewrite nonrelative references to files outside the common source directory (#42306) 25 January 2021, 19:16:59 UTC
1b57a03 Fix incorrectly logging ts files instead of .js files as top files (#42463) Fixes #41071 25 January 2021, 18:04:39 UTC
ca380af At starts jsdoc tag only after whitespace (#42364) * Update tests * @ begins JSDoc tag only after whitespace Previously, inside a JSDoc tag's comment, @ would start a tag unless it was surrounded by backticks. However, looking at real code showed that only whitespace-preceded uses of @ were intended to start tags. 25 January 2021, 17:42:24 UTC
89c173f Narrow via discriminant property through optional chain (#42450) * Naive attempt at narrowing via discriminant property through optional chain * Clean up test 25 January 2021, 17:29:51 UTC
290af69 Filter out global keywords of UMD module export declarations in completion providing auto import suggestions (#42141) * Add AutoImportSuggestions for UMD module export declarations instead of global keywords * Add test for scripts * Add more comments * Provide auto import suggestion only for modules and not scripts * PR review #1 * PR review #1 25 January 2021, 17:29:13 UTC
154f209 WIP-semantic in session based TS (#42438) 23 January 2021, 13:13:56 UTC
63003eb Update package-lock.json 23 January 2021, 06:50:09 UTC
786a7e8 Update user baselines (#42451) * Update user baselines +cc @sandersn * Update user baselines Co-authored-by: typescript-bot <typescript@microsoft.com> 23 January 2021, 02:44:25 UTC
ee3fe47 Fix broken user and docker tests (#42431) * Add --force to npm install script for user tests * Migrate prettier to docker * Fix vscode Dockerfile * Fix stack space issue in isJSLiteralType * Use --legacy-peer-deps based on npm version * Fix xterm.js Dockerfile 22 January 2021, 21:23:41 UTC
80dfc6a Only when typings file change for the project, schedule the update for the project (#42428) * Update and add test when typings dont change because of import name * Update project scheduling only when typings are set * Schedule update graph only if typings change Fixes #39326 22 January 2021, 19:16:07 UTC
4c62f6e Update package-lock.json 22 January 2021, 06:51:52 UTC
71d4ee5 Preserve alias information where possible when looking up union and intersection base constraints (#42430) 21 January 2021, 21:06:56 UTC
2f47527 Update package-lock.json 21 January 2021, 06:51:56 UTC
424b805 Fix "Cannot find name 'global'. Did you mean 'global'?" (#42262) * Add tests for "Cannot find name 'global'. Did you mean 'global'?" * Fix "Cannot find name 'global'. Did you mean 'global'?" * Add an additional test case for spelling suggestions of "global". * Name the boolean for suggestions being global scope augmentations. 20 January 2021, 23:23:34 UTC
0383b5c Optimize import fixes for projects with many symlinks (#42150) * Create symlink cache when a pnpm module is found * Keep pnpm-internal symlinks out of the symlink cache * Filter out pnpm path from realpath module specifier too * Optimize symlink module specifier generation * Add trailing directory separators * Remove unneeded change * Fix paths losing case in cache * Fix missing absolutification 20 January 2021, 20:15:36 UTC
9d286a2 Update user baselines +cc @sandersn (#42366) Co-authored-by: typescript-bot <typescript@microsoft.com> 20 January 2021, 16:51:28 UTC
028f14c Filter origin types when filtering union types (#42378) * When filtering a union type, also filter its origin type, if any * Accept new baselines 20 January 2021, 16:37:02 UTC
a231b23 Fix start position on JSDoc parsin 20 January 2021, 07:02:56 UTC
1cef53f Update package-lock.json 20 January 2021, 06:52:39 UTC
0d494ab Add missing unwrap call for the inferredExtendsType (#42409) 20 January 2021, 02:02:35 UTC
98e9e77 Fixed JSDoc with only one asterisk in comment 19 January 2021, 23:55:01 UTC
147384c Fix typos in comments (#42396) 19 January 2021, 17:13:26 UTC
b34e680 Update package-lock.json 19 January 2021, 06:51:13 UTC
621e0af Accept merge-conflicted baseline (#42398) 18 January 2021, 15:05:11 UTC
852c702 Update package-lock.json 18 January 2021, 06:50:43 UTC
b5bab16 Update package-lock.json 16 January 2021, 06:49:45 UTC
70c82ca Include alias type arguments in keys for aliased types (#42365) 16 January 2021, 02:00:55 UTC
ab32fca Fix type parameter lookup for TypeAlias LibraryManagedAttributes (#42245) 16 January 2021, 01:23:01 UTC
d1e1e9d Feat/exclude completions of variable initializers (#42087) * feat: exclude declared variable when Object literal completions * feat: check undeclareVariable when completion * feat: add completion test case * feat: code optimization * feat: support shorthand property assignment * feat: add shorthand property assignment test case * feat: update completionPropertyShorthandForObjectLiteral test cases * feat: exclude completions of variable initializers * feat: update test cases * feat: add completionListWithoutVariableinitializer test case * feat: perfect the completionListWithoutVariableinitializer test case * feat: remove isIdentifier limit * feat: update test cases * feat: code optimization and filter out some binding cases * feat: update test case * feat: handle arrow function expressions without braces * feat: add arrow function expressions without braces test case * feat: check node.parent exist first * feat: optimization name * feat: optimize test cases * chore: code formatting * feat: perfect type 15 January 2021, 23:57:18 UTC
0aa77fc Update user baselines +cc @sandersn (#41496) Co-authored-by: typescript-bot <typescript@microsoft.com> 15 January 2021, 23:42:23 UTC
8324dec feat(33715): include methods of class defined in a property (#42164) 15 January 2021, 17:52:46 UTC
22f8fa4 Update package-lock.json 15 January 2021, 06:49:09 UTC
995023c Fix double asterisk formatting in JSDoc 15 January 2021, 05:50:22 UTC
c83f769 fix(41405): allow using property access as reference to function (#41429) 15 January 2021, 01:02:48 UTC
33ea6c5 Fix indentation for closing > of ExpressionWithTypeArguments (#42341) 14 January 2021, 22:48:40 UTC
368cdfd fix: const enums + isolatedModules emit invalid code (#41933) * chore: failing test for const enums and isolatedModules * fix: const enums + isolatedModules emit invalid code In `isolatedModules` mode, the compiler does not inline const enums, but also decides not to `import` them, leaving invalid code that throws a `ReferenceError` at runtime. This code: ``` import { SomeEnum } from './bar'; sink(SomeEnum.VALUE); ``` ..should compile to either: ``` var { SomeEnum } = require('./bar'); sink(SomeEnum.VALUE); ``` ..or (with const enum inlining): ``` sink(1 /* VALUE */); ``` ..but actually compiles to: ``` sink(SomeEnum.VALUE); ``` ..with no imports, which throws a ReferenceError at runtime. --- The compiler has already realised that the symbol is a referenced const enum, it just doesn't use this information when it comes to deciding whether to emit an import. This commit additionally checks that information, if we are compiling in isolatedModules mode. --- In my opinion, this is not the correct fix, but it is the simplest. In `isolatedModules` mode, `const enum` should probably be a compile error (because there are no benefits and the complexity is high, and, apparently, buggy). If not, the compiler should not be checking whether something is a const enum, and should just be treating it as a regular enum, and checking as if it was? Fixes #40499. * chore: extra test for type-only * feat: explicitly ban --isolatedModules --preserveConstEnums false * feat: isolatedModules implies preserveConstEnum * Update src/compiler/diagnosticMessages.json Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com> * chore: compiler test for argument incompatibility * Add and fix test for namespace import of const enum * Fix additional bug with reexport of const-enum-only module Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com> Co-authored-by: Andrew Branch <andrew@wheream.io> 13 January 2021, 23:51:08 UTC
9171aa5 fix forEachChildRecursively (#42300) 13 January 2021, 11:20:46 UTC
33046e3 Do not suggest paths inside node_modules/.pnpm as module specifiers (#42095) * Create symlink cache when a pnpm module is found * Keep pnpm-internal symlinks out of the symlink cache * Filter out pnpm path from realpath module specifier too * Use ignoredPaths instead of pnpm-specific path 12 January 2021, 22:04:03 UTC
2f58637 Improve naming of hasNonBindableDynamicName (#42297) hasNonBindableDynamicName 1. Has 'non' in the name, and is only ever used negated. 2. Is true for a case that's not reflected correctly in the name -- it's true for non-dynamic names as well. I considered hasEarlyOrLateBindableName, but decided to use hasBindableName for now. 12 January 2021, 21:15:54 UTC
back to top