Commit Graph

8024 Commits

Author SHA1 Message Date
Anders Hejlsberg
eb7ff43f95 Merge pull request #25408 from Microsoft/contextualTupleTypes
Infer tuple types for contextually typed rest parameters
2018-07-03 14:02:48 -10:00
Andy
064ecd449e Support code-fix-all for importFixes (#25137)
* Support code-fix-all for importFixes

* Change description

* Update API (#25283)
2018-07-03 15:19:15 -07:00
Mohamed Hegazy
17b10e8293 Merge pull request #25397 from a-tarasyuk/bug/25356-instance-property-is-not-a-block-scoped-variable
25356 - Instance property is not a block scoped variable
2018-07-03 14:11:28 -07:00
Andy
e1a7f8497e Restore NewFileContent type (#25406) 2018-07-03 13:36:45 -07:00
Sheetal Nandi
75369cd887 Merge pull request #25414 from Microsoft/classMembersInSuperClassFromUnknownNamespace
Fix the completion when base type is class from unknown namespace
2018-07-03 13:21:11 -07:00
Andy
76a4694bd4 parser: Fix testing for missing list (#25411)
* parser: Fix testing for missing list

* Fix return type
2018-07-03 12:37:20 -07:00
Sheetal Nandi
95ad71864b Fix the completion when base type is unknown type from unknown namespace
Fixes #25387
2018-07-03 12:35:25 -07:00
Wesley Wigham
cb4cb7a75f Check if module reference requires type reference before path reference (#25385) 2018-07-03 11:41:07 -07:00
Andy
304d45d833 Canonicalize path before calling startsWith (#25364)
* Canonicalize path before calling `startsWith`

* More specific type for sourceDirectory, and add fourslash test

* Update API (#24966)
2018-07-03 11:23:19 -07:00
Anders Hejlsberg
e8d64a9c7c Merge pull request #25336 from Microsoft/fixResolveTypeMembers
Fix runaway recursion in object type member resolution
2018-07-03 07:53:02 -10:00
Alexander T
689793209f Update tests baseline. Change tests 2018-07-03 14:41:09 +03:00
Daniel Rosenwasser
e13fd0c568 Merge pull request #24915 from Microsoft/triggerSignatureHelpIArdlyKnowSignatureHelp
Trigger characters in signature help
2018-07-02 23:36:57 -07:00
Anders Hejlsberg
17e959407c Fix fourslash tests 2018-07-02 18:14:32 -10:00
Anders Hejlsberg
e5d520e463 Add tests 2018-07-02 17:50:42 -10:00
Andy
efc1b7df08 More thoroughly test navigateTo (#25239)
* More thoroughly test navigateTo

* Fix #25233 and #25237

* Update API (#24966)
2018-07-02 19:25:27 -07:00
Wesley Wigham
65655f2c6b Change import type determination to not use a RE on the symbol name (#25381) 2018-07-02 17:43:39 -07:00
Andy
5c57e14000 goToDefinition: Don't go to jsx constructor signature (#25382) 2018-07-02 17:18:07 -07:00
Andy Hanson
271bbb027c Merge branch 'master' into fixAddMissingMember_all_dedup 2018-07-02 16:06:57 -07:00
Daniel Rosenwasser
159b3dcec0 Accepted baselines and updated fourslash test. 2018-07-02 16:05:07 -07:00
Daniel Rosenwasser
9651c4231e Account for trigger reasons, as implemented by Roslyn. 2018-07-02 16:04:48 -07:00
Daniel Rosenwasser
c046958752 Merge remote-tracking branch 'origin/master' into triggerSignatureHelpIArdlyKnowSignatureHelp 2018-07-02 15:36:41 -07:00
Mohamed Hegazy
837df49a66 Merge pull request #25374 from Microsoft/SetMapConstructor
Consolidate overloads in constructors for Map, Set, WeakMap, and WeakSet
2018-07-02 15:32:42 -07:00
Mohamed Hegazy
956f9d0be2 Merge pull request #25335 from Microsoft/codeFixAddMissingEnumMember_all
Combine code-fix-all for missing class member and missing enum member
2018-07-02 15:14:19 -07:00
Mohamed Hegazy
4dd1f9fc7c Consolidate overloads in constructors for Map, Set, WeakMap, and WeakSet
Fixes https://github.com/Microsoft/TypeScript/issues/23551
Fixes https://github.com/Microsoft/TypeScript/issues/25362
2018-07-02 11:58:48 -07:00
Andy Hanson
f3bc891ae9 fixAddMissingMember: Improve deduplication in code-fix-all 2018-07-02 11:26:50 -07:00
Andy
7dc66e916a moduleSpecifiers: specifier from "rootDirs" should be treated as relative (#25369) 2018-07-02 11:14:49 -07:00
Wesley Wigham
7084e6cf47 Adds related spans and error grouping for duplicate identifier errors (#25328)
* Adds related spans and error grouping for duplicate identifier errors

* Trim trailing whitespace

* Record related info in error baselines

* Make error more whimsical
2018-07-02 10:47:52 -07:00
Anders Hejlsberg
92f5f1dd9d Add regression test 2018-06-29 17:16:23 -10:00
Andy
ded446573a ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList (#25276)
* ChangeTracker: Combine deleteDeclaration, deleteNode, and deleteNodeInList

* Change name

* Update API (#24966)
2018-06-29 19:53:32 -07:00
Andy Hanson
2fa27ffdf7 Combine code-fix-all for missing class member and missing enum member 2018-06-29 19:39:19 -07:00
Wesley Wigham
18e3f487a4 Support LibraryManagedAttributes<TComponent, TAttributes> JSX namespace type (#24422)
* WIP

* Allow type alias for managed type

* Add a large test

* Accept updatedbaselines

* Fix typo in test, add one more example
2018-06-29 18:45:29 -07:00
Benjamin Lichtman
f0e5056063 Add test 2018-06-29 11:34:58 -07:00
Wesley Wigham
30db30055f Fix module specifier case handling for declaration emit (#25110) 2018-06-29 11:02:43 -07:00
Mohamed Hegazy
c27dace3df Merge pull request #25182 from Kingwl/fix-missing-enum-member
add quick fix for add missing enum member
2018-06-29 10:19:23 -07:00
Daniel Rosenwasser
d46b54b639 Actually make the test file use '--strict'. 2018-06-28 22:36:59 -07:00
Daniel Rosenwasser
f23c180a38 Merge pull request #25287 from Microsoft/skipToNonNullTargets
Skip to non null targets in error messages
2018-06-28 22:26:36 -07:00
Daniel Rosenwasser
12a201c29e Added test case. 2018-06-28 15:30:10 -07:00
Wesley Wigham
297f12e92c Add bailout case to sourcemap searching code (#25212)
* Add bailout case to sourcemap searching code

* Also skip sourcemappy comments like sourceURL
2018-06-28 11:40:31 -07:00
Nathan Shively-Sanders
5c2eeb20b1 Destructuring declaration prefers type annotation type (#25282)
* Destructuring declaration prefers type annotation type

Previously, getTypeForBindingElement would always union the declarations type and
the type of the default initializer. Now, if the declaration has a type
annotation, it does not union with the initializer type. The type
annotation's type is the one used.

* Small cleanup in parentDeclarationHasTypeAnnotation

* Refactoring based on PR comments

* Combine getCombined*Flags into a single helper function

Retain the individual functions since they are used a lot.

* Remove unneeded temp
2018-06-28 10:41:38 -07:00
王文璐
d8cdd7552e do not handle enum type member 2018-06-28 09:36:26 +08:00
Andy
c35cb86192 When renaming at a tsx opening/closing tag, just rename the current element (#25273) 2018-06-27 11:01:38 -07:00
Andy
d957b1c8c2 fixUnusedIdentifier: Remove arguments corresponding to unused parameters (#25011)
* fixUnusedIdentifier: Remove arguments corresponding to unused parameters

* Update API (#24966)

* Fix handling of deletions: Make a list of things to delete and don't delete until the end

* Remove dummy test

* Bug fixes

* Update API (#24966)

* Move code to textChanges
2018-06-27 09:26:47 -07:00
王文璐
d6f5fc6518 add Initializer if enum value is another enum 2018-06-27 21:03:50 +08:00
Andy
c8c547a706 Only add completion for a symbol if it is accessible (#25096) 2018-06-26 18:03:07 -07:00
Andy
ab9e913af3 getEditsForFileRename: Test both before and after the rename (#25074) 2018-06-26 16:55:51 -07:00
Mohamed Hegazy
b59824ad9f Merge pull request #25190 from mprobst/fix-generic-type-emit
Fix decorator design:types emit for type variables.
2018-06-26 14:04:37 -07:00
Nathan Shively-Sanders
9025bc7c69 Fix control flow loop in yield expression (#25228)
* Fix control flow loop in yield expression

Yet again, the fix is to stop using checkExpressionCached.

* Update lib in test to reduce number of errors
2018-06-26 12:50:29 -07:00
Nathan Shively-Sanders
9044589377 Fix duplicate errors in js special assignments (#24508)
* Fix duplicate errors in js special assignments

* Simplify checkExpressionCached call to checkExpression

* Accept baselines after merge

* Use Map for deferredNodes and improve NoDeferredCheck comment

I added an assert when a duplicate was added, but it caused 18 failures
in our test suite.

* Remove NoDeferredCheck
2018-06-26 12:40:58 -07:00
Wesley Wigham
38dab7417a Fix lint race when not running tests in parallel (#25235) 2018-06-26 12:27:49 -07:00
王文璐
a62a54df57 Merge branch 'master' into fix-missing-enum-member 2018-06-26 10:30:09 +08:00