197 Commits

Author SHA1 Message Date
Andrew Branch
4d1a1b850a
Expose importModuleSpecifierEnding to protocol (#36725)
* Expose importModuleSpecifierEnding to protocol

* Update API baselines

* Add explicit auto setting
2020-02-20 13:59:56 -08:00
Andrew Casey
2e97918d43
Make Response.performanceData public (#36595) 2020-02-04 15:07:48 -08:00
Ben Lichtman
e87b2e3506
Merge pull request #36063 from uniqueiniquity/addWeakCompletionProperty
Add completion property to identify completions from unchecked files
2020-01-28 13:53:47 -08:00
Ben Lichtman
fdf29891e2
Merge pull request #36383 from uniqueiniquity/redirectInfo
Redirect info
2020-01-28 11:51:06 -08:00
Sheetal Nandi
a87512d21b
Add # to completion trigger character, (#36462)
Handle private identifiers little better by creating token for private identifier when its just #
Report same error as invalid character but from language service we can now provide completions for this.#

Fixes #36367, #36250
2020-01-27 14:25:20 -08:00
Ben Lichtman
f047111c64 Track changes to redirect info 2020-01-24 15:15:05 -08:00
Ben Lichtman
703685318c Merge branch 'master' into redirectInfo 2020-01-23 14:12:01 -08:00
Ben Lichtman
c9c3792747 Produce redirect info about files when requested 2020-01-23 12:32:36 -08:00
Andrew Casey
f99072593d
Move individual duration properties into a performanceData object (#36210) 2020-01-15 16:48:00 -08:00
Andrew Casey
071819bb37
Report time spent in updateGraph (#35675)
Add a response property indicating how much of the elapsed time (from
`onMessage` to `doOutput`) was spent in `updateGraph` calls.  If there's
no `updateGraph` call, the property is undefined, to save space (with
the downside that it's harder to tell whether a given telemetry event
could have had the property).

Fixes #34774
2020-01-08 14:41:34 -08:00
Ben Lichtman
49f7f2532c Rename new property 2020-01-07 13:02:21 -08:00
Ben Lichtman
1bc387938a Add property for unchecked completions 2020-01-07 10:59:19 -08:00
Ron Buckton
6c413e0bbb
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
2019-12-22 13:25:09 -08:00
Sheetal Nandi
236012e47b
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
2019-12-11 13:26:44 -08:00
Wesley Wigham
27616dd523
Move codefix types into services/types.ts (#35506)
* Move codefix types into services/types.ts

* Also split apart refactorProvider

* Move all meanings of DocumentHighlights into one file

* Use setter for object allocator

* Remove unneeded namespace reference

* Remove some shorthand references to nonlocal namespace variables

* Convert WatchType string enum to a structure that can be merged across modules

* Rename harness to harnessIO

* Move accidental globals into namespace

* Remove unused globals

* Suppress lints - these qualifiers are needed for the migration to go smoothly

* Hide global declaration
2019-12-05 10:51:31 -08:00
Andrew Branch
4cbace7110
Add "auto" to importModuleSpecifierPreference (#34981)
* Add "auto" to importModuleSpecifierPreference

* Update APIs
2019-11-07 14:55:13 -08:00
Daniel Rosenwasser
85e09134be Update comment. 2019-10-17 17:45:13 -07:00
Daniel Rosenwasser
15445e156a Add user preference to the protocol. 2019-10-17 17:41:49 -07:00
Oskar Grunning
2f48ff37fd
refactor(spelling): correct misspelled response 2019-10-16 08:44:14 +02:00
Nathan Shively-Sanders
500a0df6f3
Add useDefineForClassFields flag for Set -> Define property declaration (#33509)
* Disallow property/accessor overrides

Unless the base property or accessor is abstract

* Disallow uninitialised property overrides

This causes quite a few test breaks. We'll probably want to revert many
of them by switching to the upcoming `declare x: number` syntax.

* Updates from design review + fix ancient bug

1. Don't error when overriding properties from interfaces.
2. Fix error when overriding methods with other things. This had no
tests so I assume that the code was always dead and never worked.

* Need to add a couple of errors and squash one

Will update after checking out other branch for a minute

* Everything works so far

Need to test properties initialised in constructor

* Check for constructor initialisation

* change error wording

* Improve error wording

* Add codefix to add missing 'declare'

* Always emit accessors in .d.ts files

* Allow 'declare' on any uninitialised property decl

* Undo code moves

* Let sleeping dogs lie

* Correctly set NodeFlags.Ambient

And simplify redundant parts of check.

* Remove more unneeded code

* Update baselines

* Update baselines

* Update baselines

* Ignore this-property assignments

* Fix base-in-interface check

* Do not error when base parent is interface

* Fix base interface check

* Add missed baselines

* Fix check

* Fix new errors in services

* Fix new errors in services

* Fix errors in testRunner

* Add flag and turn off errors when on

* Structure of new emit is correct, fake content

It is 'hi'.

* Basically right emit

* Fix one last unitialised property declaration

* Haha no I missed another one

* Fix whitespace back to CRLF

* Minor fix and code cleanup

* New test case

* Fix bug in isInitializedProperty

* Updates from design meeting.

1. Change flag name to useDefineForClassFields (and flip polarity).
2. Forbid ES3 + useDefineForClassFields (since there is no
defineProperty).
3. Forbid overriding an abstract property-with-initializer with an
accessor.

* Update baselines

* Object.defineProperty for methods too

Using code from Ron from his upcoming refactor of the factory functions.

* Update slow baselines

* Improve error message

* Update src/compiler/transformers/utilities.ts

Co-Authored-By: Andrew Branch <andrewbranch@users.noreply.github.com>

* Add test of computed properties

* Remove done TODO
2019-09-26 13:25:05 -07:00
Andrew Branch
7d9b22eea0
Add semicolon preference to formatter options (#33402)
* Add UserPreferences for semicolons

* Prototype formatter semicolon removal

* Implement semicolon insertion

* Fix existing tests

* Start adding tests

* Fix some edge cases of semicolon deletion

* Fix semicolon removal before comments

* Fix indentation

* Test on checker

* Replace semicolon-omitting writer with formatter preference

* Fix writing new nodes, update protocol

* Rename option

* Really fix formatting synthetic nodes

* Fix refactoring misses

* Un-update submodules gahhhh

* Update APIs

* Update for ESLint

* Revert accidental test change

* De-kludge deduplication of EOF processing

* Omit last element semicolon from single-line object-like types

* Revert "Omit last element semicolon from single-line object-like types"

This reverts commit 5625cb023743215d4721bf07b2d41f831399977d.

* Fix straggler test

* Add test for leading semicolon class members

* Rename a lot of stuff for clarity

* Invert some boolean logic
2019-09-26 13:23:29 -07:00
Alexander
ceccfd8867 array-type: [ default: array, generic: array ] 2019-08-08 21:30:18 +03:00
Alexander T
f19a9e352b fix formatting. revert type assertion 2019-07-30 14:09:31 +03:00
Alexander T
9f474150c6 Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-07-02 17:57:44 +03:00
Alexander T
f6a50067d3 @typescript-eslint/indent 2019-06-27 11:30:03 +03:00
Andrew Casey
2d785c8c91 Make args types internal 2019-06-26 15:09:30 -07:00
Andrew Casey
6e50853143 Trivially expose getEncodedSyntacticClassifications 2019-06-19 15:48:23 -07:00
Alexander T
33eeceec9e Merge branch 'master' of https://github.com/Microsoft/TypeScript into feature/eslint 2019-06-19 18:48:52 +03:00
Alexander T
a18aeee1eb @typescript-eslint/no-unnecessary-qualifier 2019-06-14 12:34:28 +03:00
Sheetal Nandi
73bf2684ac Rename to use contextSpan 2019-06-13 12:41:21 -07:00
Sheetal Nandi
fd86f40d05 Include declarationSpan as relevant declaration span when defintion or other places are declaration name
Fixes #30849
2019-05-24 15:44:32 -07:00
Andrew Branch
15daf42b2c
Merge pull request #31028 from andrewbranch/feature/smart-select
Smart Select language service API
2019-05-16 09:45:05 -07:00
Kagami Sascha Rosylight
1a75d525fa add ES2020 matchAll APIs (#30936) 2019-04-25 14:11:50 -07:00
Andrew Branch
0f7bc02892
Move to language service 2019-04-18 16:05:06 -07:00
Andrew Branch
af3d0f0248
Start smart select API 2019-04-18 16:05:05 -07:00
Benjamin Lichtman
78b0956474
VS IntelliCode-related changes (#30731)
* ensure configurePlugin gives a response

* Update tests

* Update baseline

* Enable global plugin loading for external projects

* Fix lint errors
2019-04-03 10:36:04 -07:00
Sheetal Nandi
e55fbffed6 Rename the request as updateOpen 2019-03-05 14:34:08 -08:00
Sheetal Nandi
2258bb2fb7 Add request applyChangesToOpenFiles 2019-02-26 10:21:01 -08:00
Jesse Trinity
f0a6154e9b Added auto setting to quotePreference 2019-02-06 14:37:26 -08:00
Benjamin Lichtman
5fc8f1dd80
Add opt-in user preference for prefix and suffix text on renames (#29314)
* Add user preference to control renaming through exports

* Only impact renaming

* Update baselines

* Use flag to control all prefix and suffix text and imports

* [WIP] add tests

* Only skip export import specifier with flag

* [WIP] Update tests

* Update test

* Pick up preference from host and update test

* Shorten flag name

* Add missing utility function

* Update comment

* [WIP] rename flag and respond to cr

* [WIP] Add flag for forRelatedSymbol

* Use larger search symbol set for old-style rename

* Respond to CR

* Fix small error

* Fix type mismatch

* Update comment and remove unnecessary exprot

* Respond to CR
2019-01-16 10:58:07 -08:00
Benjamin Lichtman
d029fae35c Add user preference to opt-in to renaming import paths 2019-01-11 14:45:08 -08:00
Sheetal Nandi
f0f02754f3 Change type of metadata to unknown 2018-11-06 18:45:08 -08:00
Sheetal Nandi
4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Sheetal Nandi
a373029f54 Public API 2018-10-31 15:11:54 -07:00
Sheetal Nandi
f7189e17f4 Some reorg in creating sessions for testing 2018-10-31 13:05:12 -07:00
Mine Starks
1fbabd5534 Merge pull request #28106 from minestarks/configure-plugins
configurePlugins command for tsserver
2018-10-29 14:06:40 -07:00
Andy
672b0e3e16
Have flatMap return a ReadonlyArray by default (#28205) 2018-10-29 11:12:51 -07:00
Sheetal Nandi
37e25c8873 Send even for ProjectLoadStart and ProjectLoadFinish
Fixes #27206
2018-10-05 15:09:33 -07:00
Andy
5f2741b2ba
Make RenameInfo a union (#27382) 2018-09-27 08:56:40 -07:00
Andy
0a97663843
Add 'prefixText' and 'suffixText' when renaming shorthand properties (#27356)
* Add 'prefixText' and 'suffixText' when renaming shorthand properties

* Make prefixText and suffixText missing instead of undefined

* Fix test
2018-09-26 16:58:01 -07:00