Commit Graph

89 Commits

Author SHA1 Message Date
Andy
c3199c7772 extractMethod: Support renameLocation (#18050)
* extractMethod: Support renameLocation

* Add tslint disable

* Properly analyze list of changes to always get a correct rename location

* Update test

* Ensure name is really unique

* Improvements to test code

* Respond to PR comments
2017-09-13 09:02:10 -07:00
Andy
193f4be355 Enable interface-over-type-literal lint rule (#17733) 2017-09-07 09:14:59 -07:00
Andy
e2141ad469 Mark some arrays as readonly (#17725)
* Mark some arrays as readonly

* Avoid unnecessary allocations and style changes

* Fix lint
2017-08-24 09:55:01 -07:00
Arthur Ozga
19e2fa6fc5 Merge branch 'master' into isInMultiLineComment 2017-08-16 17:57:04 -07:00
Ryan Cavanaugh
c7f665faa1 Extract Method (squash) 2017-08-04 16:10:33 -07:00
Arthur Ozga
efdbebaebb Merge branch 'master' into isInMultiLineComment 2017-08-04 14:26:24 -07:00
Andy
30d973bdcb Rename symbol.name to escapedName and make name unescaped (#17412) 2017-07-25 14:22:26 -07:00
Andy
eadd084c82 Add 'name' property to Identifier (#17329)
* Add 'name' property to Identifier

* Rename to unescapedText

* Rename 'id.text' to 'id.escapedText'

* Rename 'id.unescapedText' to 'id.text'

* Make escapeIdentifier and unescapeIdentifier do nothing
2017-07-25 13:16:34 -07:00
Andy Hanson
96d537bc54 readFile may return undefined 2017-07-14 15:57:23 -07:00
Andy
08030c7d02 Convert most of core.ts to accept ReadonlyArray (#17092)
* Convert most of core.ts to accept ReadonlyArray

* Fix lint

* Fix isArray
2017-07-11 17:39:33 -07:00
Wesley Wigham
4e6b2f3c93 Created a branded type for identifier-escaped strings (#16915)
* Created a branded type for escaped strings

Then flowed it throughout the compiler, finding and fixing a handful of
bugs relating to underscore-prefixed identifiers in the process.
Includes a test for two cases noticed - diagnostics from conflicting
symbols from export *'s, and enum with underscore prefixed member emit.

* Correctly double underscores WRT mapped types

* Add fourslash tests for other fixed issues

* use function call over cast

* Update forEachEntry type accuracy

* Just use escaped names for ActiveLabel

* Remove casts from getPropertyNameForPropertyNameNode

* This pattern has occurred a few times, could use a helper function.

* Remove duplicated helper

* Remove unneeded check, use helper

* Identifiers list is no longer escaped strings

* Extract repeated string-getting code into helper

* Rename type and associated functions

* Make getName() return UnderscoreEscapedString, add getUnescapedName()

* Add list of internal symbol names to escaped string type to cut back on casting

* Remove outdated comments

* Reassign interned values to nodes, just in case

* Swap to string enum

* Add deprecated aliases to escapeIdentifier and unescapeIdentifier

* Add temp var

* Remove unsafe casts

* Rename escaped string type as per @sandersn's suggestion, fix string enum usages

* Reorganize double underscore tests

* Remove jfreeman from TODO

* Remove unneeded parenthesis
2017-07-06 14:45:50 -07:00
Andy
179a3e10b5 Handle depth in all readDirectory implementations (#16646) 2017-06-29 11:04:33 -07:00
Arthur Ozga
8fc3fd9a20 request returns span 2017-06-09 18:02:42 -07:00
Arthur Ozga
b02963b238 make indent work with trailing comments 2017-06-09 14:43:28 -07:00
Arthur Ozga
8f28a0264f indent block comments according to first line 2017-06-08 17:15:47 -07:00
Arthur Ozga
6b4cd0bd03 Merge branch 'isInMultiLineComment' of https://github.com/aozgaa/TypeScript into isInMultiLineComment 2017-06-07 14:35:45 -07:00
Arthur Ozga
35b16ab7a8 temp 2017-06-07 14:01:42 -07:00
Ryan Cavanaugh
6007eb7dfb Merge pull request #16307 from RyanCavanaugh/refactor_refactor
Refactor refactor
2017-06-06 22:28:52 -07:00
Chuck Jazdzewski
ce1d1c81ef Add support for external file references in source maps 2017-06-06 17:45:08 -07:00
Ryan Cavanaugh
1f3ef7df7a Refactor refactor 2017-06-06 14:58:18 -07:00
Klaus Meinhardt
f8aae89157 Update more return types to include undefined (#15903)
* Update more return types

* Update types of forEachChild callbacks

* fix line endings
2017-05-23 09:54:02 -07:00
Andy Hanson
f94818da36 Also convert ClassificationTypeNames and CommandTypes/CommandNames 2017-05-22 10:40:59 -07:00
andy-ms
b162097c3c Make ScriptElementKind and HighlightSpanKind string enums 2017-05-20 07:56:24 -07:00
Ryan Cavanaugh
f6fbe61718 Refactoring support (squash) 2017-05-19 10:45:49 -07:00
Andy Hanson
c7d51a3053 Merge branch 'master' into refactor_findallrefs 2017-04-12 11:27:58 -07:00
Andy Hanson
73cab09608 Enable jsdoc-format lint rule 2017-04-03 14:39:19 -07:00
Mine Starks
af0b2d9768 Merge pull request #12856 from minestarks/includejsdoctags
Expose JSDoc tags through the language service
2017-03-31 17:58:41 -07:00
Andy Hanson
2dd23fa0a8 Lint 2017-03-27 11:51:13 -07:00
Andy Hanson
aa1c860f08 Merge branch 'master' into refactor_findallrefs 2017-03-27 11:31:07 -07:00
Andy
18f0d85bff Merge pull request #14581 from Microsoft/foreachchild
Expose `forEachChild` as a method of Node
2017-03-20 14:56:21 -07:00
Andy Hanson
94f6839aec Factor out FindAllReferences.Core and use Definition/Entry to allow findReferencedSymbols and getImplementationsAtPosition to return different results 2017-03-17 11:47:31 -07:00
Vladimir Matveev
595342615b abstract code in FindReferences from concrete way of creating result reference entry to seamlessly reuse the same code for gotoImplementation (#14637) 2017-03-16 15:53:05 -07:00
Zhengbo Li
5040e1d279 Mark occurence item in string with a special property (#14677)
* mark occurence item in string with a special property

* Adding trailing commas
2017-03-16 11:01:48 -07:00
Vladimir Matveev
2b10611fbf initial revision of infrastructure to produce text changes that uses existing node factory, formatter and printer (#14441)
initial revision of infrastructure to produce text changes that uses existing node factory, formatter and printer
2017-03-15 11:44:36 -07:00
Andy Hanson
746b7e4798 Expose forEachChild as a method of Node 2017-03-10 10:42:26 -08:00
Andy Hanson
556e8c3845 Merge branch 'master' into enum_member 2017-03-03 07:04:40 -08:00
andy-ms
c2f4b202a4 Add more specific return type for getTypeParameters() 2017-02-26 17:48:27 -08:00
Ron Buckton
0f495fb694 Merge branch 'strictNullFactories' into publicTransformers 2017-02-16 12:41:58 -08:00
Andy Hanson
1c080d11e6 Set ScriptElementKind for enum members to "enum member" instead of "const" 2017-02-14 06:35:49 -08:00
Ron Buckton
2f624f5df3 Expose transformations as public API 2017-02-07 14:36:15 -08:00
Kanchalai Tanglertsampan
3e07398aee Merge branch 'master' into wip-master-statelessOverload 2017-01-24 14:18:39 -08:00
Anders Hejlsberg
5b9004e1bc Merge pull request #13604 from Microsoft/intersectionBaseTypes
Allow deriving from object and intersection types
2017-01-21 11:38:24 -10:00
Anders Hejlsberg
a6c5306479 Allow object intersection types as class/interface base types 2017-01-19 13:58:09 -08:00
Kanchalai Tanglertsampan
16d1b5dc50 Add language service support for JSXAttributes
Add language service support for JSXAttributes

Add completion support

Add find-all-references support

Add goto-definition support
2017-01-18 15:15:26 -08:00
Andy Hanson
2d232c21a2 Support find-all-references for type keywords 2017-01-18 12:27:33 -08:00
Andrew Ochsner
3b3d71542c Add InsertSpaceAfterConstructor option & additonal test cases
Fixes #12234
2016-12-20 10:05:10 -06:00
Andrew Ochsner
7bf73be7fe space-before-function-paren
Adding option InsertSpaceBeforeFunctionParenthesis
Should be optional
Typically used to support http://eslint.org/docs/rules/space-before-function-paren

Fixes #12234
2016-12-19 23:05:30 -06:00
Vladimir Matveev
7da3383504 do not use ScriptVersionCache for closed files (#12777) 2016-12-08 16:17:42 -08:00
Paul van Brenk
52ec508e27 Code fix for missing imports (#11768)
* Add codefix for missing imports + tests

* Re-order and cleanup

* refactor

* make tests pass

* Make import specifier for new imports more comprehensive

* Fix existing import cases

* refactor

* Fix multiple import statement case

* add multiple code fixes and code action filtering and polishing

* not using the generic verify method for import fixes.

* Correct insert position for new imports

* improve the code action filtering logic

* Fix line ending issue

* cache where we can
2016-11-16 16:01:16 -08:00
Andy Hanson
12f6dcefa1 Revert "Merge pull request #11354 from Microsoft/map4"
This reverts commit adfdae0dc4, reversing
changes made to aad663cebf.
2016-10-27 15:50:21 -07:00