618b518 | TypeScript Bot | 31 March 2021, 23:20:25 UTC | Update LKG | 31 March 2021, 23:20:25 UTC |
7234457 | Daniel Rosenwasser | 31 March 2021, 23:04:47 UTC | Merge remote-tracking branch 'origin/master' into release-4.3 | 31 March 2021, 23:04:47 UTC |
62f3ccd | Wenlu Wang | 31 March 2021, 22:57:25 UTC | Error if assignment after block (#41115) * Error if assignment after block * Update src/compiler/diagnosticMessages.json Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * Fix diags * Error after block Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 31 March 2021, 22:57:25 UTC |
76a2ae3 | Nathan Shively-Sanders | 31 March 2021, 20:54:53 UTC | Only issue matching token errors on non-dupe locations (#43460) * Only issue matching token errors on non-dupe locations Intead of unconditionally retrieving the last error and attaching a related span, `parseErrorAt` and friends now return the last error and return `false` when there is none. Also make one more place use parseExpectedMatchingBrackets that I missed last time. * Inline parseTokenForError, return undefined not false * skip redundant undefined assignment * address PR comments | 31 March 2021, 20:54:53 UTC |
5b7838e | TypeScript Bot | 31 March 2021, 06:08:04 UTC | Update package-lock.json | 31 March 2021, 06:08:04 UTC |
d51b8cf | Sheetal Nandi | 30 March 2021, 23:04:25 UTC | Do not delete output file names that are same as input file name (#43448) * Add failing test case * Do not delete output file names that are same as input file name Fixes #43116 | 30 March 2021, 23:04:25 UTC |
3dd68b8 | Anders Hejlsberg | 30 March 2021, 22:53:15 UTC | Fix template literal type relations (#43440) * Fix template literal relationships * Accept new baselines * Add regression test | 30 March 2021, 22:53:15 UTC |
819651e | Oleksandr T | 30 March 2021, 22:29:02 UTC | fix(43313): add parentheses to a type assertions (#43315) | 30 March 2021, 22:29:02 UTC |
a8ee22f | Sang | 30 March 2021, 22:24:31 UTC | "fix(services): convert to es6 module generate invalid code with .default" (#43309) | 30 March 2021, 22:24:31 UTC |
1625bfb | TypeScript Bot | 30 March 2021, 20:19:17 UTC | Cherry-pick PR #43435 into release-4.3 (#43438) Component commits: 684b039835 Types that extend Array or ReadonlyArray are automatically array-like 63c6346737 Add React repro to test Co-authored-by: Andrew Branch <andrew@wheream.io> | 30 March 2021, 20:19:17 UTC |
b549467 | Andrew Branch | 30 March 2021, 20:18:38 UTC | Consider base types in isArrayLikeType (#43435) * Types that extend Array or ReadonlyArray are automatically array-like * Add React repro to test | 30 March 2021, 20:18:38 UTC |
555ef73 | keerthana1212 | 30 March 2021, 20:13:57 UTC | Adding Diagnostic message for missing ']' and ')' in Array literal and conditional statements (#40884) * Adding Diagnostic message for missing ']' in Array literal * revert change on parseArrayBindingPattern * Adding diagnostic message for if, while, do and with statements * Extract parseExpectMatchingBrackets Co-authored-by: Keerthana Kanakaraju <kekanaka@microsoft.com> Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 30 March 2021, 20:13:57 UTC |
294a5a7 | Ryan Cavanaugh | 30 March 2021, 04:30:45 UTC | Remote duplicated assignment (#43399) | 30 March 2021, 04:30:45 UTC |
6fd676b | Oleksandr T | 30 March 2021, 00:22:41 UTC | fix(43215): disallow using never as an interface name (#43217) | 30 March 2021, 00:22:41 UTC |
57775ed | Josh Goldberg | 30 March 2021, 00:20:25 UTC | Consider class field properties to redeclare parent definitions (#43194) | 30 March 2021, 00:20:25 UTC |
c34b252 | Eli Barzilay | 27 March 2021, 00:25:11 UTC | Fix length of `JSDocTypedefTag` (Accidentally broken in dcc27eb.) Fixes #43394 and microsoft/tsserverfuzzer#309. | 29 March 2021, 20:06:53 UTC |
a3d207a | Daniel Rosenwasser | 29 March 2021, 19:44:05 UTC | Improve (and actually use) "always truthy promise" error (#43023) * Modify error message and actually use the error message. * Accepted baselines. | 29 March 2021, 19:44:05 UTC |
11097c6 | Greg Finley | 29 March 2021, 11:14:44 UTC | Fix typo (#43404) * Fix typo * Fix off baseline Co-authored-by: Orta <git@orta.io> | 29 March 2021, 11:14:44 UTC |
b1571fc | TypeScript Bot | 29 March 2021, 06:12:40 UTC | Update package-lock.json | 29 March 2021, 06:12:40 UTC |
563592d | TypeScript Bot | 28 March 2021, 20:28:07 UTC | Bump version to 4.3.0-beta and LKG | 28 March 2021, 20:28:07 UTC |
4774666 | Anders Hejlsberg | 28 March 2021, 20:11:56 UTC | Support relations and inference between template literal types (#43361) * Support assignment and inference between template literal types * Add tests * Accept new baselines * Add comments | 28 March 2021, 20:11:56 UTC |
451089e | Ryan Cavanaugh | 28 March 2021, 04:56:50 UTC | Rename isWrite -> writing (#43405) | 28 March 2021, 04:56:50 UTC |
2ac888b | TypeScript Bot | 27 March 2021, 06:10:02 UTC | Update package-lock.json | 27 March 2021, 06:10:02 UTC |
ff233a9 | Ryan Cavanaugh | 27 March 2021, 03:11:02 UTC | Variant accessors (#42425) Allows accessors to have different access modifiers and types Fixes #2845, #2521 | 27 March 2021, 03:11:02 UTC |
2f0c8b2 | Wenlu Wang | 26 March 2021, 23:29:22 UTC | --noImplicitOverride (#39669) * wip: add types * wip * Add cases * Add some case * Add more check * accept baseline * add abstract abd declare method * add override in declaration * accept baseline * add property override * Fix decalre modifier * update baseline * Add more cases * make lint happy * make lint happy * Update description * Add codefix * simplify code * accept baseline * Update desc * Accept baseline * Add override completions * filter out implements field in override context * fix tests * Add parameter property check * Accept baseline * acept baseline * Add parameter property to declaration code action * Add quickfix for override parameter property * fix code style * Add override with interface tests * Add more cases about modifier position * rename flag * rename flags * Added tests. * Accepted baselines. * Always issue errors for unnecessary 'override' modifiers. * Accepted baselines. * Override perf (#4) * try cache check result * pre check for override * Do not issue error if implement abstract * Add abstract-spec check * Avoid override dead lock * Add more case * Add codefix for new error * Fix error message * Add jsdoc override tag (#6) * Override jsdoc tag (#7) * accept baseline * Disallow codefix in js * update baseline * Omit override in d.ts * Add more case in js * Accept baseline * fix override js test * fix crlf * Revert merge conflict changes * Accept baseline * Avoid space * Fix CR issues * Accept baseline * Fix typo and add more check * Fix error name Co-authored-by: Daniel Rosenwasser <Daniel.Rosenwasser@microsoft.com> | 26 March 2021, 23:29:22 UTC |
41dc625 | Wenlu Wang | 26 March 2021, 22:30:09 UTC | Add static index signature (#37797) * Add static index * fix lint * make lint happy * adjust test cases * add more cases * fix changes * Add more case * accept baseline * fix error if extends others * Update vfsUtil.ts * use equal to empty array * static signature of interface is an error * Accept baseline * Check index constraints for static signature * Accpet baseline * Fix crash * fix crash * Accept baseline * Fix regression * Fix crash * always return new array | 26 March 2021, 22:30:09 UTC |
2d6a490 | Andrew Branch | 26 March 2021, 21:47:07 UTC | Import statement completions (#43149) * WIP * WIP * Get completion details working * Start unifying eager and lazy auto imports * Fix export= * Fix completion details for totally misspelled names * Almost fixed duplication... * Fix remaining completion tests * Refactor to support multiple origins for same symbol * Make import fixes make slightly more sense * Add cache back in * Set insertText based on import kind * Update API baselines * Add semicolons, snippet support, and sourceDisplay * Add some tests * Update baselines * Fix pattern ambient modules appearing in auto imports * Fix tests * Remove commented code * Switch to valueDeclaration for getting module source file * Small optimizations * Cache module specifiers / importableness and export map separately * Fix and test cache invalidation logic * Update API baselines * Add separate user preference for snippet-formatted completions * Require first character to match when resolving module specifiers * Fix AutoImportProvider export map cache invalidation * Really fix auto import provider export map invalidation * Update test added in master * Use logical or assignment Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * Simply conditional by reversing Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> * When file is deleted need to marked correctly in the project as removed file * Simplify hasAddedOrRemovedSymlinks with cherry-picked fix * Ensure replacement range is on one line * Update baselines Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> Co-authored-by: Sheetal Nandi <shkamat@microsoft.com> | 26 March 2021, 21:47:07 UTC |
a545ab1 | Sheetal Nandi | 26 March 2021, 20:23:03 UTC | Cache resolved project references and watch wild card directories from them to update them (#42929) * Test for not watchiong referenced projects fileNames and invalidating it * Add watching wild card directories and caching parsed command line for projects so that its shared * Handle config file watching and commandline cache together * Watch extended files for commndline cache instead of project * Use extended config cache now that we are watching extended config files * Structure for getParsedCommandLine from the LS * Adding some more skeleton with todos * getParsedCommandLine on WatchCompilerHost * Tests for Watch, LS scenarios * Handle getParsedCommandLine so we are looking at all things for referenced * Cleanup and commenting * Test for transitive references with tsc-watch * Cache parsed command line even if host implements getParsedCommandLine * Cleanup * Cleanup * Some tests to verify exclude from referenced project doesnt trigger the update * Baseline when program is same * Test for incremental scenario * Tests for output from referenced project * Comments | 26 March 2021, 20:23:03 UTC |
a26acf4 | Anders Hejlsberg | 26 March 2021, 17:32:05 UTC | Template literal types for contextually typed template literal expressions (#43376) * Template literal types for contextually typed template literal expressions * Accept new baselines * Add regression test * Add a few more tests | 26 March 2021, 17:32:05 UTC |
b34e705 | TypeScript Bot | 26 March 2021, 06:08:00 UTC | Update package-lock.json | 26 March 2021, 06:08:00 UTC |
6066eae | Andrew Casey | 26 March 2021, 00:12:13 UTC | Port realpath workaround from release-4.2 (#43384) * Don't use _fs.realpathSync.native on windows, a semi-revert of #41292 (#43348) We're planning a real fix for TS 4.3, but port the workaround from 4.2 so the beta doesn't have this bug. (cherry picked from commit e462dfa34786859b6380ac73d77113c031dc2ef5) * Un-reverse condition Co-authored-by: Orta Therox <ortam@microsoft.com> | 26 March 2021, 00:12:13 UTC |
3db6d80 | Andrew Casey | 25 March 2021, 22:52:04 UTC | Don't build type catalog during server tracing (#43354) Bonus: this also drops the redundant type catalog from the non-diagnostics-producing checker. | 25 March 2021, 22:52:04 UTC |
e10a325 | Ron Buckton | 25 March 2021, 22:27:06 UTC | Use 'abstract new' in InstanceType and ConstructorParameters (#43380) | 25 March 2021, 22:27:06 UTC |
fbd7f7d | Ron Buckton | 25 March 2021, 21:46:16 UTC | Update typescript-eslint to latest (#43381) | 25 March 2021, 21:46:16 UTC |
eb804a9 | Eli Barzilay | 25 March 2021, 07:27:24 UTC | `getSemanticDocumentHighlights`: don't fail... ...when missing `program.redirectTargetsMap` info. This assertion fails in the added test case -- looks like there is no entry in `program.redirectTargetsMap` when it comes from a file that is no in the project. So in this case don't follow the (missing) info, and instead drop the highlight. Fixes #33722. | 25 March 2021, 19:48:34 UTC |
42b0e3c | TypeScript Bot | 25 March 2021, 06:11:10 UTC | Update package-lock.json | 25 March 2021, 06:11:10 UTC |
e638af7 | Titian Cernicova-Dragomir | 25 March 2021, 01:15:50 UTC | ES private class elements (#42458) * Added support for private identifier methods. * Added tests for private methods. * Added check to only not allow private name method signatures in anything except classes. Changes objects literal checking to not bail on first private name found in object literal. * Added private accessors tests * Transform private methods Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Rename shouldTransformPrivateFields Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Accept baseline Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Use a single WeakSet for brand-check Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Accept baseline Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Add a test for using private methods in static field initializers Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Add breaking checker test Private methods inside class expressions should not error. Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Add to instances once per-instance Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Accept baseline Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: evaluate receiver and rhs expressions before throwing on readonly assignment Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Add a test for evaluating rhs before readonly assignment Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Transpile private accessors Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Accept baseline Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: handle readonly/writeonly accessors Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * accept baseline Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add a test for private setter without a getter Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: getAllUnscopedEmitHelpers Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: better handling of duplicate names Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Fixed wrong error message for private methods in class expressions. * change error message Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add a test for async private methods with a higher target Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: setter assignment returns rhs value Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add a test for setter assignment return value Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: handle duplicate accessors Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add tests for duplicate accessors Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * docs: add missing parameter docs Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Fixed failing test. * baseline-accept: ordering changes Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * fix: attach weakSetName to property declaration Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add a test for nested private methods Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * add a test with any Signed-off-by: Kubilay Kahveci <kahvecikubilay@gmail.com> * Added support for static private fields accessors and methods. * Added error message for private identifiers used with static decorators. There is no spec to go with this behavior as of yet. * Fixed emit static bug that used private names outside of classes for initialization in esnext. Fixed issue where nested privates produce incorrect brand check. * Added tests for private static fields methods and accessors. * Fixed error messages and tests after merge. * Accept new baseline. * Improved duplicate identifier checks for static private class elements. * Added error when using initializers with private static fields when useDefineForClassFields is not specified and target is esnext. * Fixed code review issues. * Removed semantically wrong emit on `useDefineForClassFields:true` with `target:esnext` * Changed emit for uninitialized private static fields. * Added runtime error in helper if a static private field is accessed before it was declared. * Fixed code review comments for private identifier static class elements. * add debug.assertNever for unknown node type (#53) * Fixed code review issues. * Fixed code review issues for private class elements. * Fixes class shadowing when checking access to a private static class element. * fix private methods/accessors in class expr inside a loop * collapse switch case * fix class name * simplify getPrivateMethodsAndAccessors * remove findPreviousAccessorInfo * lazily create weakSetName identifier * do not allocate a node if not needed in visitMehodDeclaration (#55) * Removed all the emit helpers for private identifier methods accessors and modified the existing helpers for get and set fields to do the same job. * Simplified emit for private identifier class elements. * do not clone the receiver (#57) * leave bad code in for #constructor and duplicate private names (#58) * Added check for WeakSet collision. * Added error for using a set only accessor. * update keyof tests and ?? (#62) * replace ?? with || * update keyof tests * fix emit helpers comments * produce an error if private field helpers are not up to date * add tests * fix setter-only compound assignment * fix tests * fix duplicated trailing comments (#64) * clear receiver pos and setTextRange on helper calls Co-authored-by: Kubilay Kahveci <kahvecikubilay@gmail.com> | 25 March 2021, 01:15:50 UTC |
6ce82ab | Eli Barzilay | 25 February 2021, 21:57:48 UTC | `deleteDeclaration`: don't crash on the top node. A misbehaved client can sometimes cause the server to reach `deleteDeclaration` with the SourceFile, and it will crash due to no `node.parent`. I couldn't find a good way to create a test for it, but I could trigger it manually by having a file with just a `,`, and sending an explicit `getCodeFixes` command to the server with `errorCodes: [6133]`. Do three things to improve this: 1. `textChanges.ts`: if we get here with the root node, delete it instead of failing. 2. `fixUnusedIdentifier.ts`: check that we don't `delete` a node that is the whole source file, so the error is more focused (should have more similar failure stacks). 3. `session.ts`: when there was any failure in `getCodeFixes`, check if the input had a diag code that does not appear in the requested text range, and throw an error saying that the failure is probably a result of a bad request. Closes #33726 (probably not fixing it, but making it easier to find the cause) | 24 March 2021, 23:25:06 UTC |
fb60c9f | Wesley Wigham | 24 March 2021, 01:02:37 UTC | Use last detected JSX import source pragma as canonical source, rather than first (#43351) | 24 March 2021, 01:02:37 UTC |
04205ca | Sheetal Nandi | 23 March 2021, 20:43:43 UTC | Do not calculate signatures if old state is not used (#43314) * Extra tests in preparation for lazy signature making sure the original intent of test is maintained * Whenver we cant use state delay signature calculation and use source file version as signature * Incremental correctness checks * Retain old behavior in compile on save by disabling use of file version as signature in when state is not reused | 23 March 2021, 20:43:43 UTC |
dcc27eb | Nathan Shively-Sanders | 22 March 2021, 23:39:35 UTC | @link support, second try (#43312) * Revert "Revert "Editor support for link tag (#41877)" (#43302)" This reverts commit 451d4354b94e533907ef3b6362a89435f67577a3. * Fix parsing @link at end of comment * Parse comments as string when no @link occurs * fix lint | 22 March 2021, 23:39:35 UTC |
4622718 | Simar Bassi | 22 March 2021, 21:10:41 UTC | Fix Issue #39155 (importModuleSpecifierEnding does not apply for module specifier completions) (#42467) * Pass preferences down to getCompletionEntriesForRelativeModules * Add preferences to getExtensionsOptions call * Add test case * Fix test case typos | 22 March 2021, 21:10:41 UTC |
b7c0e5d | Afonso Jorge Ramos | 22 March 2021, 17:39:37 UTC | Delete issue_template.md (#43320) | 22 March 2021, 17:39:37 UTC |
9a256a1 | Wesley Wigham | 22 March 2021, 17:28:43 UTC | Adjust scanning of keywordy jsx namespace names, add grammar error for jsx dotted names containing namespace names (#43104) | 22 March 2021, 17:28:43 UTC |
865cec3 | TypeScript Bot | 22 March 2021, 06:30:23 UTC | Update package-lock.json | 22 March 2021, 06:30:23 UTC |
03bf732 | Ron Buckton | 21 March 2021, 20:42:20 UTC | Accepts baseline change caused by #43035 (#43322) | 21 March 2021, 20:42:20 UTC |
fd494c1 | TypeScript Bot | 20 March 2021, 06:24:32 UTC | Update package-lock.json | 20 March 2021, 06:24:32 UTC |
9af313d | Ron Buckton | 20 March 2021, 01:54:51 UTC | Use shared binary trampoline in checker (#43035) | 20 March 2021, 01:54:51 UTC |
15fae38 | Anders Hejlsberg | 20 March 2021, 00:12:57 UTC | Improve narrowing of generic types in control flow analysis (#43183) * Narrow type variables with union constraints when merited by contextual type * Narrow generics with union type constraints as indicated by contextual type * Accept new baselines * Add tests * Fix circularity for JSX elements * Remove unnecessary isConstraintPosition information from flow cache key * Update comment * Add additional tests * Rename to getNarrowableTypeForReference, remove getConstraintForLocation * Add comment * Fix removal of undefined in destructurings with initializers * Use getContextFreeTypeOfExpression in discriminateContextualTypeByObjectMembers * In obj[x], use constraint of obj's type only when x's type is non-generic * Add comment | 20 March 2021, 00:12:57 UTC |
8a5939f | Tobias Koppers | 19 March 2021, 23:24:17 UTC | fix CommonJs modules no longer affecting the global scope (#43090) | 19 March 2021, 23:24:17 UTC |
5813907 | Josh Goldberg | 19 March 2021, 22:52:04 UTC | Made TS6059 rootDir validation consistent for programmatic usage (#43145) * Made TS6059 rootDir validation consistent for programmatic usage * Corrected other baselines | 19 March 2021, 22:52:04 UTC |
6a83ae1 | Hossein | 19 March 2021, 21:14:32 UTC | [GH-43213] Fix duplicate comments printed in quick info section (#43240) * Concat on unique values * more changes * only push values to array if unique * address review comments * Fix lint * removw foeachunique | 19 March 2021, 21:14:32 UTC |
b925c16 | Andrew Casey | 19 March 2021, 16:59:04 UTC | Only catalog types when tracing (#43304) | 19 March 2021, 16:59:04 UTC |
fbc9c94 | Anders Hejlsberg | 19 March 2021, 16:19:25 UTC | Normalize target type after null-stripping unions in relationship checks (#43202) * Normalize target type after null-stripping * Add regression tests | 19 March 2021, 16:19:25 UTC |
451d435 | Nathan Shively-Sanders | 18 March 2021, 21:42:25 UTC | Revert "Editor support for link tag (#41877)" (#43302) This reverts commit ec77bff33226fb01f4e38b20e481f8c1fcd9e6c0. | 18 March 2021, 21:42:25 UTC |
a21f61f | Anders Hejlsberg | 18 March 2021, 15:55:50 UTC | Fix narrowing of intersections of type variables and primitive types (#43131) * Fix narrowing of intersections of type variables and primitive types * Add tests | 18 March 2021, 15:55:50 UTC |
ec77bff | Nathan Shively-Sanders | 16 March 2021, 23:26:01 UTC | Editor support for link tag (#41877) * Initial scribbles * Compiles but provides spans instead of location pairs Probably need to fork the services/server types and provide a conversion with Session.toFileSpan. Not sure where to put the conversion. * Switch to DocumentSpan In theory this is already better supported, but not sure practise bears that out. * Builds w/protocol types + conversions * cleanup:better names and scrub TODOs * fix test harness too * Misc 1. Simplify protocol after talking to @mjbvz. 2. Add more tests. 3. Initial notes about where to add parsing. * Parse and store links in the compiler The text of the link is still stored in the comment text, but that's now kept in an object instead of just a string. Each link has the parse for the entity reference, if there is one. Needs lots more tests -- this just makes all the existing jsdoc tests pass. * more tests and some fixes * Fix other failing tests * fix bad merge * polish parser * improve names and array types * slight tweaks * remove some done TODOs * more tests + resulting fixes * add+fix cross-module tests * Support `@see {@link` Plus find-all-refs support equivalent to @see's. * add server test * Make comments actually part of the AST * Add span for link.name in language service/protocol * Make checker optional in getJSDocTags Also change to JSDocCommentText from JSDocCommentComment * Use getTokenValue instead of getTokenText Measure twice, slice once * Add missing support for top-level links The language service and protocol were missing support for top-level links. This commit adds that plumbing. * add string back to comment type in node constructors * Full parse of link tags and jsdoc comment text - Doesn't pass fourslash yet, I'm going to switch to baselines for failures there. - Still needs some work on the protocol to convert file+offset to file+line+offset. * fix lint * Fix missing newlines in inferFromUsage codefix * Parse jsdoc comments as text node/link array And switch to line+character offsets in the protocol * Fix fourslash tests Mostly ones that can't be baselined, but I switched a couple more over to baselines * Improve types and documentation * Test+fix @link emit, scrub other TODOs * update API baselines * test that goto-def works with @link * Split link displaypart into 3 One for link prefix and suffix, one for link name, and one for link text. * update baselines * Provide JSDocTagInfo.text: string to full clients by default Instead of upgrading them to displayparts. * Real server tests * Disambiguate {@link} and @param x {type} They are ambiguous; previously the parser preferred the type interpretation, but will now look ahead and parse links instead when the prefix is `{@link`. * Add explanatory comment in test * fix location in richResponse in protocol * update API baseline * Address PR comments 1. Add a cross-file goto-def test. 2. Switch from per-message args to UserPreference. * use arraysEqual from core | 16 March 2021, 23:26:01 UTC |
3da5982 | Oleksandr T | 16 March 2021, 19:56:12 UTC | fix(43254): show named tuple member type (#43273) | 16 March 2021, 19:56:12 UTC |
ae884b1 | Andrew Casey | 16 March 2021, 17:57:10 UTC | Fix dump of tracing legend (#43263) | 16 March 2021, 17:57:10 UTC |
ea92e3f | TypeScript Bot | 16 March 2021, 06:24:30 UTC | Update package-lock.json | 16 March 2021, 06:24:30 UTC |
53cbc04 | Sheetal Nandi | 16 March 2021, 01:04:30 UTC | Refactor the test for easy maintainability (#43262) | 16 March 2021, 01:04:30 UTC |
322c70f | Armando Aguirre | 13 March 2021, 09:01:04 UTC | Fixed reporting error for type arity (#43111) | 13 March 2021, 09:01:04 UTC |
36f7623 | Armando Aguirre | 13 March 2021, 09:00:42 UTC | Fix jsx formatting (#42671) * Refactored scanJsxToken when is formatting * Added bug regression test * Simplify JsxText formatting * Renamed isFormatting to allowMultilineJsxText * Updated baselines | 13 March 2021, 09:00:42 UTC |
1e9b21f | TypeScript Bot | 13 March 2021, 06:24:50 UTC | Update package-lock.json | 13 March 2021, 06:24:50 UTC |
d2cb05a | Sheetal Nandi | 12 March 2021, 22:32:50 UTC | Emit readable BuilderFileEmit kind (#43221) | 12 March 2021, 22:32:50 UTC |
82bfe5a | Sheetal Nandi | 12 March 2021, 20:28:20 UTC | Fix issue with some baselines for tsbuildinfo not getting generated (#43218) | 12 March 2021, 20:28:20 UTC |
496a1d3 | Sheetal Nandi | 12 March 2021, 17:44:22 UTC | Improvements to dts emit for tsbuildinfo (#43205) * Test update * Use source file version as default signature for the file whenever there is no dts emit for the file * json source files from project reference should be able to calculate the signature * Dont emit declaration map when emitting dts files for force emit for signature | 12 March 2021, 17:44:22 UTC |
9c73e04 | TypeScript Bot | 12 March 2021, 06:25:10 UTC | Update package-lock.json | 12 March 2021, 06:25:10 UTC |
2ea2f4f | Nathan Shively-Sanders | 12 March 2021, 00:51:03 UTC | Bigint constructor forbids object null undefined (#43204) * Update es2020.bigint.d.ts * Update es2020.bigint.d.ts * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * Update package-lock.json * add a test Co-authored-by: 龙腾道 <LongTengDao@LongTengDao.com> Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com> | 12 March 2021, 00:51:03 UTC |
e44d39d | Hai Lin Zhang | 11 March 2021, 23:51:15 UTC | Updated error message for TS2539 (#39827) * Updated error message for TS2539 * Switch to multiple error messages * inline variable Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 11 March 2021, 23:51:15 UTC |
9933c8a | Sheetal Nandi | 11 March 2021, 21:30:06 UTC | Build info baseline improvements (#43200) * Use ids as 1 based so we can specialize `0` to be some special meaning * Baseline tsbuildinfo size in the readable baseline * Baseline fileName and fileNames list as well in readable tsbuildinfo so that new additions are easy to recognize | 11 March 2021, 21:30:06 UTC |
2643e65 | Wesley Wigham | 11 March 2021, 19:56:55 UTC | Add missing relationship allowing a type to be assignable to a conditional when assignable to both branches (#30639) * Finally add that missing relationship allowing a type to be assignable to both branches of a conditional * Explicitly write out Ternary.Maybe * Add slightly modified example from #25413 * fix sick sentence * Loosen check to skip false branch constraint check to consider `infer` parameters as always satisfied in the extends clause * Simplify things a bit, only instantiate once Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 11 March 2021, 19:56:55 UTC |
b2d1f53 | Nathan Shively-Sanders | 11 March 2021, 18:32:42 UTC | Bloomberg computed property name fix (#43197) * Fix property name bindings for class expr in loops * Fix block-scope capturing with prop initializers Co-authored-by: Joey Watts <joey.watts.96@gmail.com> | 11 March 2021, 18:32:42 UTC |
998ecd9 | Mateusz Burzyński | 11 March 2021, 17:07:33 UTC | Add a test for JSX namespace lookup with `jsx: preserve, jsxImportSource` (#41676) * Add a test for JSX namespace lookup with `jsx: preserve, jsxImportSource` * updated baselines Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 11 March 2021, 17:07:33 UTC |
dcaefe7 | Matthew Pietz | 11 March 2021, 15:57:42 UTC | Accept generics for defineProperty (#42424) * Accept generics for defineProperty Both `Object.defineProperty()` and `Object.defineProperties()` return their first argument. Use a generic so that typings can be passed through. * Update baselines * update missed baseline Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 11 March 2021, 15:57:42 UTC |
71661b9 | Titian Cernicova-Dragomir | 11 March 2021, 15:33:33 UTC | Fixed issue where non null assertion caused getFlowTypeOfReference to return the declared type if the type was already narrowed to never. (#35863) This was caused by the fact that getTypeWithFacts(resultType, TypeFacts.NEUndefinedOrNull) will return never both if resultType was already never and if resultType does not contain undefined or null. In the latter case returning the declaring type is correct, in the former case this causes something narrowed to never to still be typed as the original declared type. | 11 March 2021, 15:33:33 UTC |
3d6650e | Jack Williams | 11 March 2021, 15:32:49 UTC | Fix #38608 (#38610) * Fix #38608 * Work for narrowed non-unions * Add comment | 11 March 2021, 15:32:49 UTC |
79d3058 | Ryan Cavanaugh | 11 March 2021, 15:23:19 UTC | Don't crash when renaming a JS property declared via module.exports (#40297) Fixes #38070 When the originating definition was of the form ```js module.exports.foo = expr ``` we were incorrectly trying to call `resolveName` on just the `foo` portion to get the "local" symbol, which simply failed to resolve (or would have resolved to the wrong thing), but for this form, the local symbol is just the containing property access expression | 11 March 2021, 15:23:19 UTC |
3c576f1 | Oleksandr T | 11 March 2021, 14:39:20 UTC | fix(41027): handle unused static members (#41103) | 11 March 2021, 14:39:20 UTC |
5053b0b | TypeScript Bot | 11 March 2021, 06:24:57 UTC | Update package-lock.json | 11 March 2021, 06:24:57 UTC |
f4d0ea6 | Kagami Sascha Rosylight | 10 March 2021, 21:31:25 UTC | Add target: ES2021 (#41239) * Support `target: es2020` * use CRLF * update symbols Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> | 10 March 2021, 21:31:25 UTC |
b20331a | Wenlu Wang | 10 March 2021, 17:34:31 UTC | Fix missing func modifier (#40379) * Fix missing function modifier * Update src/services/refactors/convertArrowFunctionOrFunctionExpression.ts Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> Co-authored-by: Ron Buckton <ron.buckton@microsoft.com> | 10 March 2021, 17:34:31 UTC |
b1f86ec | Oleksandr T | 10 March 2021, 15:26:50 UTC | fix(42265): Error accessing abstract property in constructor via destructuring (#42276) | 10 March 2021, 15:26:50 UTC |
2e49e28 | TypeScript Bot | 10 March 2021, 06:24:41 UTC | Update package-lock.json | 10 March 2021, 06:24:41 UTC |
acc8f2f | Sheetal Nandi | 10 March 2021, 01:40:02 UTC | Ensure that when new file affecting global scope is added, the signatures are updated (#43084) * Ensure that when new file affecting global scope is added, the signatures are updated * Update src/compiler/builder.ts * Better comment | 10 March 2021, 01:40:02 UTC |
6e4456b | Sheetal Nandi | 10 March 2021, 00:15:26 UTC | Optimize the size for tsbuildinfo (#43155) * Baseline readable buildinfo * Use file names as index in file name list This is extension of the idea given by @sokra to optimize size of tsbuildinfo * Deduplicate reference map lists and use file name index to sort them Different implementation of #43079 based on idea suggested by @sokra * Minimal json.stringify for the tsbuildinfo Again implementaion of suggestion by @sokra * Update src/testRunner/unittests/tsbuild/helpers.ts Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com> * Readable version of buildinfo all the time * Some renames for readability as per feedback Co-authored-by: Tobias Koppers <tobias.koppers@googlemail.com> | 10 March 2021, 00:15:26 UTC |
626e78c | Tarik Eshaq | 09 March 2021, 23:58:31 UTC | Clearifies protected error message (#42599) | 09 March 2021, 23:58:31 UTC |
3d53661 | Nathan Shively-Sanders | 09 March 2021, 20:28:36 UTC | Don't inherit jsdoc tags from overloaded signatures (#43165) Previously, when getting jsdoc for signatures, the services layer would get the jsdoc tags for the base symbol of a signature if it was present. This is fine except when the base was overloaded. In that case, the multiple signatures of the overload would all contribute jsdoc, which is not correct. A more correct fix would be to resolve overloads to the base, but the compiler doesn't have this capability and adding it or jury-rigging it seems like it would be complex, inappropriate for a fix to ship in a patch version. Co-authored-by: Orta Therox <git@orta.io> Co-authored-by: Orta Therox <git@orta.io> | 09 March 2021, 20:28:36 UTC |
ec4863c | Ron Buckton | 09 March 2021, 19:43:19 UTC | Fix37991 (#43166) * Add failing test * Fix tslib check errors for commonjs imports | 09 March 2021, 19:43:19 UTC |
9610c16 | Oleksandr T | 09 March 2021, 19:37:40 UTC | fix(42380): include JSDoc comments in declarations for static/prototype methods (#42454) | 09 March 2021, 19:37:40 UTC |
d9f5a85 | TypeScript Bot | 09 March 2021, 06:24:45 UTC | Update package-lock.json | 09 March 2021, 06:24:45 UTC |
4d50624 | TypeScript Bot | 08 March 2021, 06:24:47 UTC | Update package-lock.json | 08 March 2021, 06:24:47 UTC |
f7cd702 | TypeScript Bot | 07 March 2021, 06:24:13 UTC | Update package-lock.json | 07 March 2021, 06:24:13 UTC |
f918bd9 | Anders Hejlsberg | 06 March 2021, 14:52:00 UTC | Exclude enum/number compatibility rule from comparable relation (#42472) * Exclude old number/enum literal compatibility rule from comparable relation * Add tests * Accept new baselines | 06 March 2021, 14:52:00 UTC |
ba56fca | Anders Hejlsberg | 06 March 2021, 14:51:02 UTC | Remove undefined from optional properties when inferring to index signatures (#43086) * Remove undefined from optional properties when inferring to index signatures * Add tests | 06 March 2021, 14:51:02 UTC |
7394efc | TypeScript Bot | 06 March 2021, 06:24:11 UTC | Update package-lock.json | 06 March 2021, 06:24:11 UTC |
612a96e | Sang | 05 March 2021, 19:23:08 UTC | Update parseInt parameter name and jsdoc (#42756) * feat(lib): improve parseInt type definition and docstring * Accepted baselines * update tests | 05 March 2021, 19:23:08 UTC |
25375a2 | Jonas Hübotter | 05 March 2021, 19:15:05 UTC | Unnecessary elaboration about not being assignable to type parameters (#42952) | 05 March 2021, 19:15:05 UTC |
408c804 | Anders Hejlsberg | 05 March 2021, 15:26:27 UTC | Properly instantiate inferred constraints in conditional types (#42747) * fix combined type mapper in getConditionalType * Add regression tests | 05 March 2021, 15:26:27 UTC |
f0a72e2 | TypeScript Bot | 05 March 2021, 06:24:30 UTC | Update package-lock.json | 05 March 2021, 06:24:30 UTC |