a5123a5 | Anders Hejlsberg | 07 January 2020, 00:18:30 UTC | Merge branch 'master' into fix35414-2 | 07 January 2020, 00:18:30 UTC |
f807b57 | Daniel Rosenwasser | 06 January 2020, 21:23:47 UTC | Add `s` to `importsNotUsedAsValue` (#36037) * Pluralize end of 'importsNotUsedAsValue'. * Updated baselines. | 06 January 2020, 21:23:47 UTC |
f8bfc6f | Anders Hejlsberg | 06 January 2020, 20:53:23 UTC | Contextually typed binding element initializers (#35855) * Binding element initializers contextually typed by parent initializers * Accept new baselines * Literal type widening should be last step in inference * Accept new baselines * Add tests | 06 January 2020, 20:53:23 UTC |
df3b5bb | Anders Hejlsberg | 06 January 2020, 18:55:34 UTC | Fix ThisParameterType<T> type (#36013) * Simplify ThisParameterType<T> type * Add tests | 06 January 2020, 18:55:34 UTC |
28319a5 | Nathan Shively-Sanders | 06 January 2020, 18:09:03 UTC | CustomElementConstructor: should be construct signature (#36030) Was previously incorrectly a call signature. Had to override it manually. | 06 January 2020, 18:09:03 UTC |
d6c05a1 | Eli Barzilay | 03 January 2020, 20:30:41 UTC | Fix `getEffectiveTypeAnnotationNode` Prevent it from using the (return) type of a function. Could also check the condition before calling the function, but there are two places that need the check, and OTOH, all calls check the result so returning `undefined` should work. (This problem was introduced in PR#32553.) Fixes #33741. | 04 January 2020, 03:47:17 UTC |
5cc58de | Sheetal Nandi | 04 January 2020, 00:37:04 UTC | Shorten test baseline names (#35993) | 04 January 2020, 00:37:04 UTC |
3b396e6 | Andrew Branch | 03 January 2020, 22:39:32 UTC | Type-only imports and exports (#35200) * Add type-only support for export declarations * Use a synthetic type alias instead of binding type-only exports as a type alias * Works for re-exports! * isolatedModules works fine * Diagnostic for type-only exporting a value * Start isolated modules codefix * Update for LKG control flow changes * Type-only import clause parsing * Type-only default import checking * Type-only named imports * Fix isolated modules error * Filter namespaces down to type-only * Fix class references * Test nested namespaces * Test circular type-only imports/exports * Fix getTypeAtLocation for type-only import/export specifiers * Fix type-only generic imports * Update public APIs * Remove unused WIP comment * Type-only namespace imports * Fix factory update calls * Add grammar errors for JS usage and mixing default and named bindings * Update updateExportDeclaration API baseline * Fix grammar checking import clauses * Enums, sort of * Dedicated error for type-only enum * Skip past type-only alias symbols in quick info * Update error code in baseline * WIP: convertToTypeOnlyExport * isolatedModules codefix (single export declaration) * isolatedModules code fix (all) * Stop eliding non-type-only imports by default, add compiler flag * Update to match updated diagnostic messages * Update more baselines * Update more tests * Auto-import as type-only * Add codefix for splitting type-only import with default and named bindings * Add more services tests * Add targeted error message for "export type T;" when T exists * Add targeted error for "import type T = require(...)" * Flip emit flag * Add test for preserveUnusedImports option * Fix flag flip on import = * Make compiler option string-valued * Fix merge conflicts * Add --importsNotUsedAsValue=error * Phrasing of messages. Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> | 03 January 2020, 22:39:32 UTC |
18269c0 | Sheetal Nandi | 03 January 2020, 21:02:45 UTC | Add assumeChangesOnlyAffectDirectDependencies as a option to skip checking and generating .d.ts files for files indirectly importing affected file (#35711) * Baselining tsc --watch output * Add noIndirectImports as a option to skip checking and generating .d.ts files for files indirectly importing affected file Fixes #33329 * Rename option to assumeChangesOnlyAffectDirectDependencies * Description change as per feedback | 03 January 2020, 21:02:45 UTC |
5a34274 | ExE Boss | 03 January 2020, 20:58:02 UTC | feat(lib/es2020): Add `Promise.allSettled(…)` (#34065) * feat(lib/es2020): Add `Promise.allSettled(…)` * test(lib): Update tests to account for `es2020.promise` * fix(lib/es2020): `Promise.allSettled(…)` takes `Iterable` argument * refactor(lib/es2020): Rename `Promise.allSettled(…)` return type * feat(lib/es2020): Simplify `Promise.allSettled(…)` type declaration * refactor(lib/es2020): Improve naming of `Promise.allSettled(…)` types | 03 January 2020, 20:58:02 UTC |
8939b25 | Eli Barzilay | 02 January 2020, 21:28:44 UTC | Fix cmdline aliases specs | 03 January 2020, 20:43:30 UTC |
4585f44 | Alexander T | 03 January 2020, 18:09:56 UTC | fix(35179): formatter incorrectly remove spaces (#35979) | 03 January 2020, 18:09:56 UTC |
a8944e6 | Anders Hejlsberg | 03 January 2020, 17:54:38 UTC | Fix type parameter leak (#35949) * Fix cloneSignature to include unionSignatures property * Add regression test | 03 January 2020, 17:54:38 UTC |
024b8c1 | Daniel Rosenwasser | 03 January 2020, 01:08:29 UTC | Merge pull request #30565 from D0nGiovanni/m-template-literal-2 add refactoring: string concatenation to template literals | 03 January 2020, 01:08:29 UTC |
ded072e | Titian Cernicova-Dragomir | 03 January 2020, 01:06:25 UTC | Fixed find all references for private identifiers. (#35887) | 03 January 2020, 01:06:25 UTC |
ff4fa1f | Daniel Rosenwasser | 03 January 2020, 00:32:06 UTC | Cleaned up refactoring names, descriptions. | 03 January 2020, 00:32:06 UTC |
75ca641 | Daniel Rosenwasser | 03 January 2020, 00:30:46 UTC | Fix error on `interface`s in `.js` files (#35969) * Use the correct error message. * Accepted baselines. | 03 January 2020, 00:30:46 UTC |
ad0f006 | Daniel Rosenwasser | 03 January 2020, 00:12:44 UTC | Remove refactoring from template expression to string concatenation. | 03 January 2020, 00:12:44 UTC |
82b0547 | Titian Cernicova-Dragomir | 02 January 2020, 23:44:22 UTC | Fixed outlining spans for chained method calls. (#35860) | 02 January 2020, 23:44:22 UTC |
4942fd2 | Eli Barzilay | 19 December 2019, 23:51:55 UTC | Make `checkPropertyNotUsedBeforeDeclaration` ignore properties of properties Use `isAccessExpression` to cover both `PropertyAccess` and `ElementAccess`. Also use it in a few other places that used both explicitly. (And also fix a random weird formatting.) Fixes #32721. | 02 January 2020, 21:38:54 UTC |
291ab63 | Wesley Wigham | 02 January 2020, 21:14:08 UTC | Reuse "getBestMatchingType" logic during elaboration to allow for more specific elaborations (#35278) * Filter target union during elaboration to allow for more specific elaborations * Reuse best match logic instead * Update user baselines (#48) Co-authored-by: TypeScript Bot <ts_bot@rcavanaugh.com> | 02 January 2020, 21:14:08 UTC |
bb306a7 | Nathan Shively-Sanders | 31 December 2019, 22:12:18 UTC | Update DOM from TSJS-lib-generator (#35938) | 31 December 2019, 22:12:18 UTC |
dadb64b | Eli Barzilay | 20 December 2019, 22:21:06 UTC | Disable timeout when debugging Use `-t 0` since somewhere a default timeout is set otherwise. | 30 December 2019, 19:42:35 UTC |
36c87ac | Max Heiber | 27 December 2019, 21:07:35 UTC | Private named instance fields (#30829) * Fix display of private names in language server Signed-off-by: Joseph Watts <jwatts43@bloomberg.net> Signed-off-by: Max Heiber <max.heiber@gmail.com> * Parse private names Signed-off-by: Max Heiber <max.heiber@gmail.com> * update parser error recovery tests to use ¬ not # The intent of the tests seemed to be to regiment the behavior of the parser when a weird symbol is encountered. The `#` is now taken by private identifiers, so `¬` seems like a good new choice for keeping the diff small, since it also fits in 16 bits (wide emojis would be treated as multiple characters, since the scanner uses ++). Signed-off-by: Max Heiber <max.heiber@gmail.com> * Private Name Support in the Checker (#5) - [x] treat private names as unique: - case 1: cannot say that a variable is of a class type unless the variable points to an instance of the class - see [test](https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNamesUnique.ts) - case 2: private names in class hierarchies do not conflict - see [test](https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNamesNoConflictWhenInheriting.ts) - [x] `#constructor` is reserved - see [test](https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNameConstructorReserved.ts) - check in `bindWorker`, where every node is visited - [x] Accessibility modifiers can't be used with private names - see [test](https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNamesNoAccessibilityModifiers.ts) - implemented in `checkAccessibilityModifiers`, using `ModifierFlags.AccessibilityModifier` - [x] `delete #foo` not allowed - [x] Private name accesses not allowed outside of the defining class - see test: https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNameNotAccessibleOutsideDefiningClass.ts - see [test](https://github.com/mheiber/TypeScript/tree/checker/tests/cases/conformance/classes/members/privateNames/privateNamesNoDelete.ts) - implemented in `checkDeleteExpression` - [x] Do [the right thing](https://gist.github.com/mheiber/b6fc7adb426c2e1cdaceb5d7786fc630) for nested classes mv private name tests together more checker tests for private names update naming and cleanup for check private names for private name support in the checker: - make names more consistent - remove unnecessary checks - add utility function to public API - other small cleanup Move getPropertyNameForUniqueESSymbol to utility for consistency with other calculation of special property names (starting with __), move the calculation of property names for unique es symbols to `utilities.ts`. private name tests strict+es6 Update private name tests to use 'strict' type checking and to target es6 instead of default. Makes the js output easier to read and tests more surface area with other checker features. error message for private names in obj literals Disallow decorating private-named properties because the spec is still in flux. Signed-off-by: Max Heiber <max.heiber@gmail.com> * Add private instance field transformation, pr feedback Implements private instance fields on top of the class properties refactor. This commit also includes incorporation of PR feedback on the checker, parser, and transformer in order to make the rebase manageable. Co-Authored-By: Max Heiber <max.heiber@gmail.com> Co-Authored-By: Ron Buckton <ron.buckton@microsoft.com> Signed-off-by: Joey Watts <jwatts43@bloomberg.net> Signed-off-by: Max Heiber <max.heiber@gmail.com> Incorporate PR feedback Fix checker crash with new block scoped bindings Add classExpressionInLoop test Update baselines for private name errors Apply suggestions from code review Fix privateNameFieldCallExpression test Remove unnecessary comment Fix PropertyAccessEntityNameExpression type Remove PrivateName from PropertyNameLiteral Add createPrivateName Remove PrivateName type from textSourceNode Add Debug asserts for invalid syntax kinds Don't output private name syntax when undeclared Make PrivateName extend Node Update baselines for public API Fix completions in language server Fix fourslash test crash intern private name descriptions undo expensive node.name.parent assignment Back the way things were on `master`: only assign node.name.parent when we need to Add tests for private names and JSDoc Patch hoverOverPrivateName fourslash test Fix goToDefinition for private-named fields remove Debug.fail for private name outside class Remove Debug.fail in binder.ts::`getDeclarationName`. It turns out this code path *does* get hit (intentionally). For best error messages, return `undefined` and rely on the parser generating a good error message "Private names are not allowed outside class bodies" Add rbuckton test cases for private names These test cases specifically exercise where we needed to use name-mangling. They are cases where private names have the same description. - private names no conflict when inheriting - private names distinct even when the two classes have the same name check dup instance+static private identifiers class A { #foo; static #foo; } not allowed because static and private names share the same lexical scope https://tc39.es/proposal-class-fields/#prod-ClassBody refactor getPropertyForPrivateName, rel spans refactor getPropertyForPrivateName so it is easier to read (use findAncestor instead of loop). Fix bugs in getPropertyForPrivateName: - make it work with deeply-nested classes with and without shadowing - make it catch shadowing when the conflict is between static and instance private name descriptions (these can actually clash) And add related spans to diagnostics for getPropertyForPrivateName catch conflicts between static and instance private identifiers: - cannot have an instance and static private identifier with the same spelling, as there is only one namespace for private names rename 'PrivateName' to 'PrivateIdentifier' to match the change of wording in the spec prposal: https://tc39.es/proposal-class-fields/#sec-syntax The rename in the spec was to avoid confusion between the AST Node PrivateIdentifier and the internal spec type PrivateName. So one uses the [[Description]] of a PrivateIdentifier to look up the PrivateName for a given scope. This corresponds closely to our implementation in the binder and checker: - we mangle PrivateIdentifier.escapedText to get a `key` which we use to get the symbol for a property f getLiteralTypeFromProperty-check privateIdentifier rename and simplify privateNameAndAny test case make it clearer that all this test is showing is that we allow accessing arbitrary private identifiers on `any`. Note: we could have something more sound here by checking that there is a private-named field declaration in a class scope above the property access. Discussion: https://github.com/microsoft/TypeScript/pull/30829/files#r302760015 Fix typo in checker s/identifer/identifier remove accidental change patch fourslash test broken by isPrivateIdentifier just needed to add a check to see if the symbol .name is defined extract reportUnmatchedProperty per @nsandersn feedback propertiesRelatedTo was getting to long pull out the unmatchedProperty reporting into a seprate function fix typo in private names test Fix type soundness with private names Remove PrivateIdentifier from emit with Expr hint Fixup helpers and set function name for privates remove accidentally-committed baselines These baselines somehow ended up in this pr, though they have nothing to do with the changes Revert "getLiteralTypeFromProperty-check privateIdentifier" This reverts commit bd1155c300bc3517a0543580f4790268f86e473f. reason: the check for isIdentifier in getLiteralTypeFromProperty is superfluous because we do this check in getLiteralTypeFromPropertyName Update comment in private name uniqueness test 3 I think the comments were not accurate and that we export the error on `this.#x = child.#x` because: - private names are lexically scoped: the code in question is not in a lexical scope under the definition of Child's #x. - private names are private to their containing class: never inherited This expected behavior matches that of Chrome Canary and my understanding of the spec test private names use before def, circular ref test private names use before def, circular ref update diagnosticMessages s/delete/'delete' per @DanielRosenwasser and @sandersn guidance, use this style in diagnostic messages: "operand of a 'delete' operator" (single quotes) rather than old style: "operand of a delete operator" (single quotes) This is for consistency, as we use the new style in the privateIdentifiers error messages and it is consistent with our messages about other operators incorporate private names early exit feedback and code style change to use a ternary instead of if so we can 'const' require private-named fields to be declared in JS All fields must be declared in TS files. In JS files, we typically do not have this requirement. So special-case private fields, which must always be declared (even in JS files, per spec) update debug failure for es2015 private identifier Co-Authored-By: Ron Buckton <ron.buckton@microsoft.com> fix checker handling of private name in subclasse update checker and tests to account for the following ts features: - private names do not participate in the prototype chain, but *are* assigned in the parent class' constructor. So parent can access its *own* private fields on instances of the subclass Add more tests for private-named fields in JS add test to hit symbolToExpression w private names symbolToExpression knows about private names add a test to exercise this code path ban private-named static methods (not supported yet) ban private-named methods (not supported yet) ban private-named accessors (not supported yet) fix privateIdentifier fourslash test change assertion throw to return Co-Authored-By: Ron Buckton <ron.buckton@microsoft.com> Update comment in checker.ts re reserved members Remove case for privateIdentifier in EntityNameExpr Remove case for privateIdentifier in EntityNameExpr. That code path is never hit, and privateIdnetifiers cannot be entity names. remove unnecessary parentheses Ban private identifier in enum As the new test, 'privateNameEnumNoEmit', shows, the checker now correctly makes a diagnostic for private identifiers in enums. However, when noEmit is false we hit this assertion in the transformer. This assertion will have to be removed so that we have a diagnostic here instead of an assertion error. When the assertion is removed, the 'privateNameEnum' baseline will have to be updated Fix destructuring assignment, use createCallBinding, remove unneeded helper Add class private field helpers to external helpers Remove private identifier enum assertion, use missing identifiers Fix hash map inefficiency by only using get Update baselines with empty identifier change Add privateNameEnum test baselines Fix private identifier destructuring (array assignment defaults, unique names) Use createPrivateIdentifierAssignment in destructuring transform Fix lint error Separate destructuring target visitor from regular visitor Fix destructuring assignment with this bindings Fix destructuring assignment with this bindings Fix syntax error with destructuring assignment output Disallow private identifiers in property signatures remove duplicate test baselines Add tests for undeclarated private identifiers remove unnecessary cast Nicer error message for mis-placed hashbang Workaround v8 bug with destructured assignments Optimize private identifier stack lookup Avoid the cost of performing an array lookup to look at the top of the private identifier environment stack. Change function name to be more specific Changes "getOperatorForCompoundAssignment" to "getNonAssignmentOperatorForCompoundAssignment" now that this function is accessible to the entire compiler. Improve test case for private name assignment Adds a compound assignment test case for a class with private names being declared on the left-hand-side of the assignment expression. Remove extra non-private-field test Remove isPrivateIdentifierAssignmentExpression helper Don't transform private names in ESNext target Preserve private fields initialized to functions Move function expressions to outer scope for efficiency Add WeakMap collision check Modify potential WeakMap collision condition Fix this property assignment binding with private names Add correct error message for WeakMap collision Add error for statements before super with private identifiers Refactor getPropertyForPrivateIdentifier Add test for private identifier fields initialized to class exprs Fix shebang errors Fix private errors on index signatures Add codefix for missing private property Update error messages for unsupported private features Fix inheritance-related errors Fixes inheritance-related errors with private identifiers by resolving properties from base classes. Private identifiers do not show up as properties on a union type, so those do not type-check. Add test for interface extending class with private access Remove debugging log Remove name assignment from private named functions Rename to getPrivateIdentifierPropertyOfType Fix index signature test comment Fix test target syntax error Change error messages patch private identifiers outside class bodies Add test for private identifier with ooo super Add test for a class with a private identifier with a non-preambly (for example, not a comment) statement before 'super': should error, saying 'super' must come first Fix nits incorporate PR feedback Incorporate checker feedback - reorganize if statements in checkFunctionOrConstructorSymbol - remove overload for getPrivateIdentifierPropertyOfType reorganize if statements in checkFunctionOrConstructorSymbol test for private names with JSX use getPropertyOftype in getPropertyForPrivateIdentifier getPrivateIdentifierPropertyOfType error on synthetic make getPrivateIdentifierPropertyOfType error if given a node that is not from the parse tree Simplify checkPrivateIdentifierPropertyAccess use getPropertiesOfType instead of rehashing that logic test for private identifiers w decl merging fix test target for privateNameDeclarationMerging update baselines Fix private identifier ++/-- numeric coercion Remove 'downleveled' from super error Fix bad comments in helper call emit Error on private identifiers in JSX tag names Add more private identifier tests Add es2015 target for private name destructured binding test Add privateNameConstructorSignature test Add test for navigation bar w private identifier Remove spurious line from test // in js file class A { exports.#foo = 3; // should error } The above line failed to produce an error when run using the test harness. When using tsc or the language server, we got the expected error message. Removing the troublesome line, as it seems to say more about the test runner than about the code it is testing. Fix inefficient constructor generation dts: don't emit type for private-identified field Do not emit types for private-identified fields when generating declaration files. // example.ts export class A { #foo: number; } // example.d.ts export declare class A { #foo; } **This is not ideal!** The following would be better: // example.d.ts export declare unique class A { #foo; } See discussion: https://github.com/microsoft/TypeScript/pull/33038#issuecomment-530321165 notice when private-identified field unused Notice when private-identified fields are unused, and implement the same behavior as for unused private-modified fields. This is used in the language server to make things grayed out. This case generates an error when --noUnusedLocals flag is passed to tsc: - "<name> is declared but never used" accept baselines Revert "dts: don't emit type for private-identified field" This reverts commit e50305df5fb88121486291abad14478f5339a455. Instead of just excluding the type from private identifier emit, only emit a single private identifier per class. This accomplishes nominality while hiding implementation detail that is irrelevant to .d.ts consumers only emit a single private identifier in dts In dts emit, emit at most one private identifier, and rename it to `#private`. refactor getPrivateIdentifierPropertyOfType - safer check for wehther is parse tree node - return undefined when not found (instead of a Debug.fail) Incorporate PR feedback Don't rely on parent pointers in transform Passes context about whether the postfix unary expression value is discarded down the tree into the visitPostfixUnaryExpression function. Remove orphaned test baseline files remove unreachable if Check `any`-typed private identified fields Update private identifier incompatible modifier checks - disallow 'abstract' with private identifiers - s/private-named-property/private identifier Add additional call expression test cases Fix disallow 'abstract' with private identifier Static private identifiers not inherited Including this in the PR for private instance fields even though static private identifiers are banned. Reason: this change improves quality of error messages, see test case. Thanks Ron! Simplifiy private identifier 'any' type handling Error on private identifier declarations for ES5/ES3 Bind `this` for private identifier property tagged template literals Fix target for jsdocPrivateName1 test Update getPrivateIdentifierPropertyOfType API Make it easier to use by accepting a string and location, rather than a PrivateIdentifier. Thanks Ron! remove orphaned tests rename test remove duplicate tests Remove unrelated error from test update diagnostic message 'private identifier' The nodes for hash private fields are now called 'private identifier'. Update one last diagnostic message to use the new terminology. refine solution for static private identifier fields - use `continue` instead of `filter` for perf - better naming - make it clear the current solution will need to be altered when we lift the ban on static private identifier fields, including a test case that should change in the future Fix display of private identifiers in lang server Fix bug where private identifiers in completion tooltips in the playground were showing up as the symbol table entries (with underscores and such). https://github.com/microsoft/TypeScript/pull/30829#issuecomment-534157560 Signed-off-by: Max Heiber <max.heiber@gmail.com> * fix privateIdentifier w !useDefineForClassFields Signed-off-by: Max Heiber <max.heiber@gmail.com> * Disallow PrivateIdentifier in Optional Chains Signed-off-by: Max Heiber <max.heiber@gmail.com> * restrict privateIdentifier completions correctly Don't autocomplete privateIdentifiers in places where they are not allowed. Signed-off-by: Max Heiber <max.heiber@gmail.com> * make PrivateIdentifier not a PropertyNameLiteral Signed-off-by: Max Heiber <max.heiber@gmail.com> * Added test. * Accepted baselines. * Update symbol serializer to understand private fields in JS `.d.ts` emit. * Accepted baselines. * fix for private field no initializer esnext Signed-off-by: Max Heiber <max.heiber@gmail.com> * fix private fields .d.ts emit for JS w expando fix bug where the following in a JS file would lead to a `#private` in the .d.ts: ```js class C { constructor () { this.a = 3 } } ``` Co-authored-by: Joey Watts <joey.watts.96@gmail.com> Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> | 27 December 2019, 21:07:35 UTC |
0f5ddd2 | Kagami Sascha Rosylight | 24 December 2019, 00:45:17 UTC | Add es2020 transformation (#35518) * Add es2020 transformation * Add missing comma Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> | 24 December 2019, 00:45:17 UTC |
320adf5 | Alexander T | 23 December 2019, 20:30:21 UTC | show an error if --showConfig is enabled and tsconfig.json does not exist (#35723) | 23 December 2019, 20:30:21 UTC |
a39a675 | Alexander T | 23 December 2019, 20:27:54 UTC | fix(35474): formatter incorrectly adds space after increment (#35550) | 23 December 2019, 20:27:54 UTC |
05a2f1b | Kagami Sascha Rosylight | 23 December 2019, 20:18:52 UTC | Support bigints in ES2020 (#33874) | 23 December 2019, 20:18:52 UTC |
bed7c89 | Andrew Branch | 23 December 2019, 20:06:46 UTC | Add base constraint completions for JSX attributes (#35803) * Add base constraint completions for JSX attributes * Add test for class components | 23 December 2019, 20:06:46 UTC |
d66e959 | Kagami Sascha Rosylight | 23 December 2019, 19:40:41 UTC | Add ES2020 to diagnostic messages (#35814) | 23 December 2019, 19:40:41 UTC |
a4e794d | Alexander T | 23 December 2019, 19:39:50 UTC | fix file extension (#35825) | 23 December 2019, 19:39:50 UTC |
6c413e0 | Ron Buckton | 22 December 2019, 21:25:09 UTC | Add support for Call Hierarchies in language server (#35176) * Add support for Call Hierarchies in language server * Use baselines for callHierarchy tests * Clean up commented code * Support multiple hierarchy items when an implementation can't be found * Use optional chaining in a few places * Use getFileAndProject | 22 December 2019, 21:25:09 UTC |
114dad7 | Ron Buckton | 22 December 2019, 21:24:31 UTC | Add top-level await for esnext and system modules (#35813) | 22 December 2019, 21:24:31 UTC |
88795e2 | Daniel Rosenwasser | 21 December 2019, 01:04:47 UTC | Fixed lints. | 21 December 2019, 01:04:47 UTC |
35a3a5f | Daniel Rosenwasser | 21 December 2019, 00:46:37 UTC | Merge remote-tracking branch 'origin' into convert-to-template | 21 December 2019, 00:46:37 UTC |
deb5288 | Kagami Sascha Rosylight | 21 December 2019, 00:29:49 UTC | Add module: es2020 (#33893) | 21 December 2019, 00:29:49 UTC |
4c7844b | Wenlu Wang | 21 December 2019, 00:00:20 UTC | Implement export as namespace from (#34903) * init export start as decl * fix some broken * fix more case * fix more and more case * make it work * make lint happy and accept baseline * add more tests * fix system module * add more case * delete useless assert * accept baseline * make lint happy * fix missing utils * update api * make lint happy * add missing semi * fix minor issue * fix locally bound * avoid useless check * update public api * add more case * fix some case * Use multi-module selection in test runner to cut down on duplication. * Accepted baselines. * remove superfluous tests. * Remove baseline. * Downlevel `export * as ns` in es2015. * Accepted baselines. * Update names of things. Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com> | 21 December 2019, 00:00:20 UTC |
2f0d07c | Anders Hejlsberg | 20 December 2019, 22:52:22 UTC | Increase selectivity of subtype relationship for signatures (#35659) * Increase selectivity of subtype relationship for signatures * Add regression test * Accept new baselines * Use strictSubtypeRelation for union subtype reduction * (x: number | undefined) -> void is subtype of (x?: number | undefined) => void * Accept new baselines * Add tests * Accept new baselines * Address CR feedback * Fix parameter list length check * Accept API baseline changes | 20 December 2019, 22:52:22 UTC |
4154dcb | Anders Hejlsberg | 20 December 2019, 22:33:07 UTC | Accept API baseline changes | 20 December 2019, 22:33:07 UTC |
273bb3e | Anders Hejlsberg | 20 December 2019, 22:30:34 UTC | Fix parameter list length check | 20 December 2019, 22:30:34 UTC |
3d2b92c | Nathan Shively-Sanders | 20 December 2019, 21:47:20 UTC | Readonly support for jsdoc (#35790) * Add @readonly The rule for @readonly on this-assignments in the constructor is wrong. See failing tests. * In-progress Add ctor function test Add some notes and rename variable * Done except for cleanup and fix 1 bug * Fix last test and clean up | 20 December 2019, 21:47:20 UTC |
8228888 | Anders Hejlsberg | 20 December 2019, 21:25:59 UTC | Address CR feedback | 20 December 2019, 21:25:59 UTC |
d96be35 | Andrew Branch | 20 December 2019, 21:23:53 UTC | Fix JSDoc param type completions when name hasn’t been written yet (#35787) | 20 December 2019, 21:23:53 UTC |
a0d47d6 | TypeScript Bot | 20 December 2019, 21:22:01 UTC | Update user baselines (#35791) | 20 December 2019, 21:22:01 UTC |
3b7de1a | Nathan Shively-Sanders | 20 December 2019, 17:23:15 UTC | remove JSDOC object->any rewrite for noImplicitAny (#35661) * remove JSDOC object->any rewrite * reinstate object->any rewrite when noImplicitAny: false * flip boolean right way round | 20 December 2019, 17:23:15 UTC |
2cc1340 | Nathan Shively-Sanders | 20 December 2019, 16:41:52 UTC | Ignore @private/@protected on constructor functions (#35782) * Ignore @private on constructor functions This was incorrect in the best of circumstances and caused a crash when the parent of the function had no symbol, because the accessibility check assumed it was operating on a constructor and that the parent was always the containing class. * Non-constructors are always accessible Previously, all function-like kinds were accessible, which includes constructors. This was wrong. | 20 December 2019, 16:41:52 UTC |
9445657 | Sheetal Nandi | 20 December 2019, 15:44:35 UTC | Correctly set filesByName map when reusing program to ensure it is same as old (#35784) It was previously not populated correctly if preserveSymlinks with useSourceOfProjectReference was true, in that case if module was resolved to symlink and we deduced it refers to source of project reference we want to set "resolvedFileName" correctly otherwise it results in incorrect module not found errors. | 20 December 2019, 15:44:35 UTC |
8c9e96b | Wesley Wigham | 19 December 2019, 23:55:42 UTC | Move executeCommandLine ambient code into tsc (#35788) | 19 December 2019, 23:55:42 UTC |
1fd5bd2 | Andrew Branch | 19 December 2019, 22:05:23 UTC | Filter out self-fulfilling completions (#35709) | 19 December 2019, 22:05:23 UTC |
ec84392 | Sheetal Nandi | 19 December 2019, 18:10:17 UTC | Use resolvedPath consistently in the builder (#35757) * Add baseline for #35468 * Use resolvedPath consistently in the builder Fixes #35468 | 19 December 2019, 18:10:17 UTC |
5d32840 | Eli Barzilay | 18 December 2019, 21:56:58 UTC | Fix `scripts/hooks/post-checkout` Shell scripts must use LFs. Also make it executable. (Both failures probably don't happen on some windows environment where git is told to translate EOLs, and all files are assumed executable.) | 18 December 2019, 22:25:07 UTC |
3c153d8 | Ben Lichtman | 18 December 2019, 22:19:29 UTC | Merge pull request #35742 from uniqueiniquity/addPositionAssert Add asserts to narrow down position issue | 18 December 2019, 22:19:29 UTC |
1952ccc | TypeScript Bot | 18 December 2019, 21:04:10 UTC | Update user baselines (#35756) | 18 December 2019, 21:04:10 UTC |
3c5ecc2 | Nathan Shively-Sanders | 18 December 2019, 20:58:12 UTC | Add jsdoc support for @public/@private/@protected (#35731) * Add @private/@protected/@public test * Fix @declaration * draft abstraction + one usage * Fill in necessary parsing etc * make general getEffectiveModifierFlags move to utilities, make the right things call it * reorder public/private/protected * JS declaration emit works with @public/@private/@protected * revert unneeded/incorrect changes * Update baselines and skip @public/etc when parsing 1. Update the API baselines with the new functions. 2. Do not check for @public/etc during parsing, because parent pointers aren't set, so non-local tags will be missed; this wrong answer will then be cached. * Parser: don't call hasModifier(s) anymore. Then move jsdoc modifier tag checks into getModifierFlagsNoCache where they should be. The jsdoc checks are skipped when the parent is undefined. There are 3 cases when this can happen: 1. The code is in the parser (or a few places in the binder, notably declareSymbol of module.exports assignments). 2. The node is a source file. 3. The node is synthetic, which I assume to be from the transforms. It is fine to call getModifierFlags in cases (2) and (3). It is not fine for (1), so I removed these calls and replaced them with simple iteration over the modifiers. Worth noting: Ron's uniform node construction PR removes these calls anyway; this PR just does it early. * Fix constructor emit 1. Emit protected for protected, which I missed earlier. 2. Emit a constructor, not a property named "constructor". 3. Split declaration emit tests out so that errors are properly reported there. | 18 December 2019, 20:58:12 UTC |
f7860b0 | TypeScript Bot | 18 December 2019, 19:16:25 UTC | Update user baselines (#35755) | 18 December 2019, 19:16:25 UTC |
9f1e389 | Ben Lichtman | 18 December 2019, 18:44:40 UTC | Remove unnecessary internal tags, handle bad input | 18 December 2019, 18:44:40 UTC |
8535076 | Sheetal Nandi | 18 December 2019, 18:24:59 UTC | Do not list output files that just change their modified time when using --listEmittedFiles (#35714) * Baseline incremental scenarios for listEmittedFiles * Do not list output file that just changes modified time stamp as emitted file Fixes #35605 | 18 December 2019, 18:24:59 UTC |
8c1900c | Sheetal Nandi | 18 December 2019, 18:23:58 UTC | Baselining tsc `--watch` output just like `tsc` baselines for easier updates (#35710) * Baselining tsc --watch output * Fix lint errors | 18 December 2019, 18:23:58 UTC |
aef2e0a | Andrew Branch | 18 December 2019, 15:20:01 UTC | Fix implement interface codefix for synthetic member symbols (#35718) | 18 December 2019, 15:20:01 UTC |
42dc415 | Ben Lichtman | 18 December 2019, 01:41:38 UTC | Refactor to make failure messages more consistent | 18 December 2019, 01:41:38 UTC |
2eb60c2 | Ron Buckton | 18 December 2019, 01:32:48 UTC | Fix decoding of HTML entities in TSX/JSX (#35739) | 18 December 2019, 01:32:48 UTC |
925582d | Ben Lichtman | 18 December 2019, 01:04:54 UTC | Add asserts to narrow down position issue | 18 December 2019, 01:04:54 UTC |
cafa175 | Anders Hejlsberg | 18 December 2019, 00:46:34 UTC | Properly reflect CFA effects of return in try or catch blocks (#35730) * Properly reflect CFA effects of return in try or catch blocks * Add tests * Accept new baselines | 18 December 2019, 00:46:34 UTC |
f90cde4 | Sheetal Nandi | 17 December 2019, 22:19:52 UTC | Fix completions when the ts installation and project are on two different windows drive (#35733) * Fix completions when the ts installation and project are on two different windows drive Fixes #35512 * Fix typo | 17 December 2019, 22:19:52 UTC |
e0e45ec | Anders Hejlsberg | 17 December 2019, 21:10:06 UTC | Accept new baselines | 17 December 2019, 21:10:06 UTC |
baac083 | Anders Hejlsberg | 17 December 2019, 21:09:58 UTC | Add tests | 17 December 2019, 21:09:58 UTC |
c73af61 | Andrew Branch | 17 December 2019, 01:21:21 UTC | Add `ignoreInterpolations` util to fourslash for fuzzy diagnostic matching (#35652) * Add ignoreInterpolations util to fourslash for fuzzy diagnostic matching * Simplify * It’s not Swift * Fix regexp * Remove unnecessary type assertion | 17 December 2019, 01:21:21 UTC |
53c8b95 | Andrew Branch | 16 December 2019, 20:36:40 UTC | Fix formatting scanner on multiline JSX attribute strings (#35705) * Fix formatting scanner on multiline JSX attribute strings * Update API | 16 December 2019, 20:36:40 UTC |
7df76b6 | Anders Hejlsberg | 16 December 2019, 18:39:11 UTC | Merge branch 'master' into fix35414-2 | 16 December 2019, 18:39:11 UTC |
16aae96 | TypeScript Bot | 16 December 2019, 17:06:46 UTC | Update user baselines (#35687) | 16 December 2019, 17:06:46 UTC |
8feff60 | TypeScript Bot | 15 December 2019, 10:35:18 UTC | Update user baselines (#35685) | 15 December 2019, 10:35:18 UTC |
e60d7ff | Anders Hejlsberg | 14 December 2019, 22:55:27 UTC | Accept new baselines | 14 December 2019, 22:55:27 UTC |
42c0451 | Anders Hejlsberg | 14 December 2019, 22:55:04 UTC | (x: number | undefined) -> void is subtype of (x?: number | undefined) => void | 14 December 2019, 22:55:04 UTC |
47f26e6 | Anders Hejlsberg | 14 December 2019, 16:36:39 UTC | Use strictSubtypeRelation for union subtype reduction | 14 December 2019, 16:36:39 UTC |
8a88c1c | Andrew Branch | 13 December 2019, 22:20:54 UTC | Don’t offer import fix for members of arrays or classes (#35635) * Write failing test * Don’t offer import fix for members of arrays or classes | 13 December 2019, 22:20:54 UTC |
543ec23 | TypeScript Bot | 13 December 2019, 21:04:47 UTC | Update user baselines (#35671) | 13 December 2019, 21:04:47 UTC |
af95cb3 | TypeScript Bot | 13 December 2019, 19:28:27 UTC | Update user baselines (#35665) | 13 December 2019, 19:28:27 UTC |
c3b2aea | Sheetal Nandi | 13 December 2019, 03:51:18 UTC | Do not write files directly from builder when noEmitOnError is true (#34832) * Add tests for noEmitOnError * Do not write files directly from builder when noEmitOnError is true Fixes #34823 * make linter happy * Instead of generating output in memory, check errors before doing the emit in case of noEmitOnError | 13 December 2019, 03:51:18 UTC |
ac5e10b | TypeScript Bot | 13 December 2019, 01:04:09 UTC | Update user baselines (#35662) | 13 December 2019, 01:04:09 UTC |
738e222 | TypeScript Bot | 13 December 2019, 00:20:43 UTC | Update user baselines (#35643) | 13 December 2019, 00:20:43 UTC |
6d67054 | Anders Hejlsberg | 13 December 2019, 00:03:32 UTC | Accept new baselines | 13 December 2019, 00:03:32 UTC |
5524a61 | Anders Hejlsberg | 13 December 2019, 00:03:21 UTC | Add regression test | 13 December 2019, 00:03:21 UTC |
b457de4 | Anders Hejlsberg | 12 December 2019, 23:58:50 UTC | Increase selectivity of subtype relationship for signatures | 12 December 2019, 23:58:50 UTC |
71a9176 | Anders Hejlsberg | 12 December 2019, 14:45:46 UTC | Fix33448 (#35513) * Filter out discriminants of type 'never'. * Add tests * Accept new baselines * Remove unnecessary '!' assertion | 12 December 2019, 14:45:46 UTC |
b98cb06 | Nathan Shively-Sanders | 11 December 2019, 23:55:08 UTC | Fix binding of this-assignments w/computed properties (#35639) Top-level this-assignments do not support computed properties. But the binder forgets to check for computed properties and tries to bind them normally. This hits a helpful assert. This change stop binding this-properties with computed properties at the top-level. There's nothing sensible we could do with them; we're unable to late-bind entries to the global scope or to modules. | 11 December 2019, 23:55:08 UTC |
1fd1b42 | Sheetal Nandi | 11 December 2019, 23:11:27 UTC | Handles different references and renames involved with import export and import type node (#34813) * Test * Handle import type node when handling the namespace import and reexport Fixes #33017 * Handle qualifier of the importTypeNode * Handle export specifier * Fix rename prefix when search for rename starts at qualifier in import type ndoe * Fix rename of qualifier with importType node when invoked without provideSuffixAndPrefix option | 11 December 2019, 23:11:27 UTC |
fc0f67d | Wesley Wigham | 11 December 2019, 22:28:59 UTC | Dedent external runner message text | 11 December 2019, 22:28:59 UTC |
236012e | Sheetal Nandi | 11 December 2019, 21:26:44 UTC | Add watchOptions to tsconfig and allow supplying them on command line as well (#35615) * Create different watch options in compiler options * Thread through the new watch options * Actually use the options passed through for watch strategy * Support delay on updating child directory watches * Make watchOptions separate from compilerOptions * Support passing watch options from command line * Handle displaying of watchOptions | 11 December 2019, 21:26:44 UTC |
4212484 | Sheetal Nandi | 11 December 2019, 20:28:18 UTC | Open bigger set of configured projects when opening composite project for operations that operate over multiple projects like rename (#33287) * Add isInferredProject, isConfiguredProject and isExternalProject * Skip refreshing configured project on change of config file if its not loaded * Open a tree of projects when doing findAllRefs or rename operations * Fix addToSeen project key * Refactor combineProjectsOutputWorker * if the definition is local, no need to load and look in other projects * Add disableSearchSolution as option to disable looking for solution * Rename the option to disableSolutionSearching | 11 December 2019, 20:28:18 UTC |
f1f8746 | Andrew Branch | 11 December 2019, 19:21:28 UTC | Improve some completions on generic object literals (#34855) * Weird fix * Slightly better I guess * Update APIs * Make `hasTypeArguments` do what it says on the tin * Fix merge mistake | 11 December 2019, 19:21:28 UTC |
7fd6e0d | TypeScript Bot | 11 December 2019, 18:01:46 UTC | Update user baselines (#35618) | 11 December 2019, 18:01:46 UTC |
0736459 | Sheetal Nandi | 11 December 2019, 02:25:10 UTC | Handle consistent file name during editor and tsc --watch scenarios (#34622) * Add isInferredProject, isConfiguredProject and isExternalProject * Add test for rename on file with case change that fails Test for #25460 * Dont store fileName on text storage * Store root file names in the root file map to reflect their name * Delay open file triggering watches * Correct the name of source file as we query it (eg. it could be same source file returned in old program with different casing on case insensitive file name) * More tests * Refactoring * Cache bind And check diagnostics and always get program diagnostics from the program * Another test * Try to report conflicting file error on file instead of global diagnostics * Create better tests for module resolution diagnostics check * Fix lint errors | 11 December 2019, 02:25:10 UTC |
50603ed | Wesley Wigham | 10 December 2019, 00:48:00 UTC | Add ts namespace reference to tsc, since it now doesnt have one | 10 December 2019, 00:48:00 UTC |
a83b928 | Wesley Wigham | 10 December 2019, 00:35:01 UTC | Rename debug.ts so its name differs from its namespace (#35596) | 10 December 2019, 00:35:01 UTC |
6936ac2 | Wesley Wigham | 10 December 2019, 00:33:24 UTC | Move executeCommandLine.ts into its own project (#35595) * Move executeCommandLine.ts into its own project * Remove incorrect prepend | 10 December 2019, 00:33:24 UTC |
f8cacf9 | Toxyxer | 10 December 2019, 00:31:23 UTC | Issue/34870 (#35586) * Add new error message when missing brace * Add test for missing close brace * Update other tests which were affected | 10 December 2019, 00:31:23 UTC |
64a8867 | Andrew Branch | 09 December 2019, 19:31:47 UTC | Fix spelling codefix for optional chain property access (#35583) | 09 December 2019, 19:31:47 UTC |
9a9baeb | Andrew Branch | 09 December 2019, 18:33:28 UTC | Sort extract constant above extract function (#35580) | 09 December 2019, 18:33:28 UTC |
a78342a | Wesley Wigham | 06 December 2019, 23:20:49 UTC | Move most harness globals into namespaces (#35530) * Move most harness globals into namespaces * Remove forward declaration from `createMapShim` and move all `Map` declarations into one file * A small pile of more changes to get the harness transforming | 06 December 2019, 23:20:49 UTC |
2b567b2 | TypeScript Bot | 06 December 2019, 16:27:22 UTC | Update user baselines (#35535) | 06 December 2019, 16:27:22 UTC |