2017 Commits

Author SHA1 Message Date
Sheetal Nandi
0e4b10d726 Use resolution options of project reference if the file is from the project reference 2018-10-04 15:04:10 -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
Sheetal Nandi
865b3e7862
Merge pull request #27172 from Microsoft/moduleResolutionWithOutDir
Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
2018-09-18 14:33:33 -07:00
Sheetal Nandi
4c047254e6 Ensure all the usages of compilerOptions.declaration take into account compilerOptions.composite if needed. 2018-09-18 13:53:16 -07:00
Andy
c57ff087d6
Add codefix to generate types for untyped module (#26588) 2018-09-18 11:47:29 -07:00
Sheetal Nandi
d51b8d940c Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
This also ensures that originalFileName, resolvedPath are set correctly even when we are reusing program structure
Fixes #26036
2018-09-17 19:00:30 -07:00
Ryan Cavanaugh
8ca01dfc9f
Merge pull request #26851 from ajafff/assert-compilerhost-readdirectory
Assert CompilerHost.readDiretory for projectReferences with include
2018-09-17 16:13:08 -07:00
Sheetal Nandi
ea67e3ac56 Fix watch of project with project references 2018-09-13 15:41:07 -07:00
Nathan Shively-Sanders
6bd1da20c9
Rename JS-specific concepts (#26795)
* Rename JS concepts

1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.

Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.

* Remove TODO

* Rename Javascript->JS

Note that this introduces a variable name collision in a couple of
places, which I resolved like this:

```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Klaus Meinhardt
d519e3f21e hand over to LanguageServiceHost.readDirectory 2018-09-03 09:51:02 +02:00
Andy
08f5edbd03
Treat NoSubstitutionTemplateLiteral like StringLiteral in more places (#26330)
* Treat NoSubstitutionTemplateLiteral like StringLiteral in more places

* Move isStringOrNumericLiteral closer to its only use
2018-08-10 16:00:08 -07:00
Andy
673ae746da
Simplify and inline getPropertySymbolsFromType (#25940)
* Simplify and inline getPropertySymbolsFromType

* Combine lambdas
2018-07-26 11:52:22 -07:00
Andy
d60f4988a6
In getPropertySymbolsFromContextualType, use union discriminant to filter types (#25914) 2018-07-25 11:53:20 -07:00
Andy
e103692f32
Don't report quickInfo inside a comment in a PropertyAccessExpression (#25813) 2018-07-20 11:49:21 -07:00
Andy
5e2102799b
Reduce non-null assertions in getPropertySymbolsFromContextualType (#24675) 2018-07-10 16:53:08 -07:00
Andy
b6640e9c5d
getJsxClosingTagAtPosition: Return a result if parent has same name and is unclosed (#25557) 2018-07-10 14:31:18 -07:00
Mohamed Hegazy
4bf42fd1c4
Merge pull request #25535 from Microsoft/fixAsserts
Fix assert and check for module symbol
2018-07-10 10:28:17 -07:00
Andy
e9e5ebee73
getEditsForFileRename: Handle all projects and source-mapped files (#25522)
* getEditsForFileRename: Handle all projects and source-mapped files

* Update API (#24966)

* Use areEqual
2018-07-09 17:58:02 -07:00
Mohamed Hegazy
2c70030c8a Compare normalized fileNames 2018-07-09 17:28:10 -07:00
Andy
64555aa6a9
navigateTo: Collect results from all referenced projects. (#25283)
* navigateTo: Collect results from all referenced projects.

* Don't use project references, just source maps

* Move more code to session

* Test when implementation file is deleted

* Use tsserver tests instead of fourslash tests to ensure session is used

* Support find-all-references

* Restore fourslash tests

* Update emit baselines (added missing newline)

* Support rename

* @weswigham code review

* Don't open/close files

* Avoid growing `toDo` too eagerly

* @sheetalkamat code review

* Also get symlinked projects for originalLocation

* Update API (#24966)

* More @sheetalkamat code review

* Remove unnecessary test

* Update API (#24966)
2018-07-05 15:39:03 -07: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
Daniel Rosenwasser
e13fd0c568
Merge pull request #24915 from Microsoft/triggerSignatureHelpIArdlyKnowSignatureHelp
Trigger characters in signature help
2018-07-02 23:36:57 -07: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
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
Andy
dc2dc8d539
rename: Re-use code for isDefinedInLibraryFile (#25367) 2018-07-02 12:25:27 -07:00
Andy
e7543d6d81
Simplify getRangeOfEnclosingComment (#25168) 2018-06-29 16:58:28 -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
Andy
c9d44ce395
getTouchingToken: default includeJsDocComment to true (#25258) 2018-06-27 11:15:15 -07: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
13bc46d970
getTokenAtPosition: default includeJsDocComment to true (#25015)
* getTokenAtPosition: default includeJsDocComment to true

* Update API (#24966)

* Flip meaning of parameter

* Update API (#24966)

* Remove all `ignoreJsDocComment` uses (fixes #25162)
2018-06-26 16:20:44 -07:00
Andy
f52c881ab1
Improve verify.renameLocations (#25192) 2018-06-25 12:41:12 -07:00
Wesley Wigham
bd97e12f76
Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host (#25107)
* Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host

* make cache undefinable and handle correctly

* Remove unneeded cast

* Readd assert

* More useful failure messager
2018-06-22 14:05:36 -07:00
Andy
3e50f502bb
Mark some Type[] and Signature[] as ReadonlyArray (#25099) 2018-06-21 09:57:14 -07:00
Wesley Wigham
2a1503610b
Stop generating sectional sourcemaps (#24917)
* Generate normal 1-part sourcemaps (at increased processing cost), since tools dislike sectional ones

* Add semicolon

* Accept sad baselines]

* Forward along sourcesContent if available

* Supress lint since the API actually calls for null here

* Fix concatenated sourcemap paths

* Accept bad baselines :(

* Add overloads

* Accept api update

* Fix lint
2018-06-13 18:52:23 -07:00
Daniel Rosenwasser
5e3c96bb9a Implemented support for trigger characters in signature help. 2018-06-12 15:48:40 -07:00
Ryan Cavanaugh
f4fcb1912c
Merge pull request #24465 from RyanCavanaugh/tsbuild
"tsc -b" with minimal watch capabilities
2018-06-10 05:15:53 +12:00
Andy
33d0893259
Add completions from literal contextual types (#24674)
* Add completions from literal contextual types

* Remove getTypesOfUnion

* undo baseline changes
2018-06-07 15:03:19 -07:00
Ryan Cavanaugh
cf87bd446d Merge branch 'master' into tsbuild 2018-06-05 14:55:51 -07:00
Ryan Cavanaugh
45842a0c34 Merge remote-tracking branch 'weswigham/sourcemap-concatenation-station' into tsbuild 2018-06-05 12:31:32 -07:00
Ron Buckton
fbeb58a147
Merge pull request #23893 from Microsoft/libReference
Adds 'lib' reference directives
2018-06-04 16:14:52 -07:00
Ron Buckton
666841264c Merge branch 'master' into libReference 2018-06-04 14:38:56 -07:00
Andy
b3a4b72a16
Always include Jsdoc comment in getTouchingPropertyName (#23379) 2018-06-04 14:15:41 -07:00
Andy
886377f8d3
Add autoCloseTag language service (#24543)
* Add autoCloseTag language service

* Change name to getJsxClosingTagAtPosition and return an object
2018-06-04 10:08:15 -07:00
Ryan Cavanaugh
7e9e29ce64 Store + use the resolved path of sourceFiles in proj. ref. scenarios 2018-06-01 13:20:57 -07:00
Andy
d671c7ae96
getEditsForFileRename: Support directory rename (#24305)
* getEditsForFileRename: Support directory rename

* Code review

* Handle imports inside the new file/directory

* Document path updaters

* Shorten relative paths where possible

* Reduce duplicate code

* Rewrite, use moduleSpecifiers.ts to get module specifiers from scratch instead of updating relative paths

* Update additional tsconfig.json fields

* Add test with '.js' extension

* Handle case-insensitive paths

* Better tsconfig handling

* Handle properties inside compilerOptions

* Use getOptionFromName
2018-06-01 08:23:37 -07:00
Andy
e65444214c
Remove deprecated internal method (#24540) 2018-06-01 08:14:07 -07:00
Sheetal Nandi
b0f039c9e2 Make suggestion diagnostics to wire cancellationToken
This especially needed if its a js file without the ts-check, the file wont be typechecked in getSemanticDiagnostics
Fixes part of #19458
2018-05-31 10:47:17 -07:00
Ron Buckton
b4e113b94e Merge branch 'master' into libReference 2018-05-31 10:02:08 -07:00
Andy
f411164483
Simplify calculation of sourceFiles for getReferences (#24475) 2018-05-29 16:12:25 -07:00