Commit Graph
4805 Commits
Author SHA1 Message Date
Sergio Baidon bb58558e64 Fix signature help not showing in block body bug 2018-09-18 17:30:07 -05:00
Sheetal NandiandGitHub 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
AndyandGitHub c57ff087d6 Add codefix to generate types for untyped module (#26588) 2018-09-18 11:47:29 -07:00
Benjamin LichtmanandGitHub cd28af0260 Merge pull request #27188 from uniqueiniquity/miscAsyncFixes
Miscellaneous async code fix fixes
2018-09-18 10:53:26 -07:00
Benjamin Lichtman b484370dcc Clean up for type precision and clarity 2018-09-18 09:34:08 -07:00
Anders HejlsbergandGitHub 6adb9d194f Merge pull request #27157 from Microsoft/fixEmptyObjectFalsiness
Fix empty object falsiness
2018-09-18 09:26:24 -07:00
Anders Hejlsberg c0eb742cf3 Merge branch 'master' into fixEmptyObjectFalsiness 2018-09-18 06:28:27 -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
Benjamin LichtmanandGitHub 0cb9fd62ba Merge branch 'master' into promisesAndUnderscores 2018-09-17 16:43:08 -07:00
Benjamin Lichtman b2378ca40c Stop adding name of function being fixed and update baseline 2018-09-17 16:33:32 -07:00
Benjamin Lichtman a73b561dd3 Ensure name for callback is generated even when it has no args 2018-09-17 16:23:47 -07:00
Ryan CavanaughandGitHub 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
Benjamin Lichtman 0995869377 Stop creating empty identifier name 2018-09-17 15:53:15 -07:00
Benjamin Lichtman 1a3ff452c1 Respond to CR 2018-09-17 15:44:08 -07:00
AndyandGitHub cfd0a62357 When renaming module, ensure rename span is just the last component of the path (#27151) 2018-09-17 15:26:41 -07:00
AndyandGitHub 4e3e8f5ea7 convertToAsyncFunction: Reduce casts in getTransformationBody (#27158) 2018-09-17 15:23:44 -07:00
Benjamin Lichtman 830b387765 No longer specially recognize underscore and update baselines 2018-09-17 14:34:31 -07:00
Benjamin Lichtman 1b9507ad06 Wrap expressions returned from promises in awaits when appropriate 2018-09-17 11:33:28 -07:00
AndyandGitHub e710645bf9 Never escape string literals from textChanges (#26971)
* Never escape string literals from textChanges

* Use `boolean | undefined`
2018-09-17 11:06:39 -07:00
AndyandGitHub a57467a317 Fix bugs: Replace SourceFile if '--noUnusedLabels' changed (#27060)
* Fix bugs: Replace SourceFile if '--noUnusedLabels' changed

* Use properties on CommandLineOptionBase

* Handle "alwaysStrict" and better categorize options

* Properly handle "strict"

* Code review

* fix test
2018-09-17 10:53:48 -07:00
Benjamin Lichtman f9072621a9 Run callback as expression statement when no arg to assign to exists 2018-09-17 09:48:19 -07:00
Anders Hejlsberg 46de5067b0 Fix resulting issue in compiler 2018-09-17 09:06:38 -07:00
Benjamin LichtmanandGitHub 70ce7abe12 Merge pull request #27109 from uniqueiniquity/diagnosticLocation
Report async code fix diagnostic on name whenever it exists
2018-09-15 18:36:42 -07:00
Sheetal NandiandGitHub e4718564e5 Merge pull request #27082 from Microsoft/watchAPIAndProjectReferences
Fix tsc watch and watch API for a project that has project references
2018-09-14 17:58:42 -07:00
Benjamin Lichtman 9e1a05c9ec Handle function assigned to binding pattern 2018-09-14 17:20:41 -07:00
Benjamin Lichtman 2c881fd90a Report diagnostic on expression name if it exists 2018-09-14 16:34:16 -07:00
Wesley WighamandGitHub 20eafb5b74 Introduce boolean literal freshness (#27042) 2018-09-14 15:00:09 -07:00
Sheetal Nandi 40d33c809a Merge branch 'master' into watchAPIAndProjectReferences 2018-09-14 10:54:07 -07:00
Benjamin LichtmanandGitHub 0e985eb342 Merge branch 'master' into asyncCatchUniqueNames 2018-09-14 09:50:27 -07:00
Benjamin Lichtman 98055ad540 Use separate map with smaller scope to track renames 2018-09-14 09:46:58 -07:00
Benjamin LichtmanandGitHub 13deedf841 Merge pull request #26930 from uniqueiniquity/onlyReportExpectedPromiseArgs
Only perform async code fix if it can successfully refactor all parts
2018-09-14 09:41:34 -07:00
AndyandGitHub 95c1570c4b Fix bug: VariableDeclaration may have SemanticMeaning.All if an @enum in JS (#27085) 2018-09-14 09:20:54 -07:00
AndyandGitHub 009dc0f1b9 For completion in string literal union, don't include strings already in the union (#26755) 2018-09-14 09:20:11 -07:00
Benjamin Lichtman 57a6dbd6fa Add clarifying comments 2018-09-14 08:50:18 -07:00
AndyandGitHub ee7d0e21da getEditsForFileRename: Don't resolve to a.js when a.ts is moved (#27081) 2018-09-13 15:49:42 -07:00
Sheetal Nandi ea67e3ac56 Fix watch of project with project references 2018-09-13 15:41:07 -07:00
Nathan Shively-SandersandGitHub 64d0e0d448 Shorten more internal names to JS or TS (#27080) 2018-09-13 15:05:57 -07:00
Benjamin Lichtman e700022cef Remove unnecessary case 2018-09-13 09:46:40 -07:00
Benjamin Lichtman d12110d3e5 Respond to CR 2018-09-13 09:32:38 -07:00
Benjamin Lichtman 905578cf37 Use existing identifier when possible for renaming functions 2018-09-13 09:02:02 -07:00
AndyandGitHub cc7bfc0349 Support testing jsdoc tags of completions (#26962) 2018-09-13 08:47:50 -07:00
Benjamin Lichtman 906fbae37b Handle promise handler block bodies with no return and other cleanup 2018-09-12 14:47:06 -07:00
Nathan Shively-SandersandGitHub 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
Ryan CavanaughandGitHub 5a26747428 Merge pull request #27004 from RyanCavanaugh/noJsNewModuleCompletions
Don't offer module completions in non-module JS files
2018-09-12 08:32:14 -07:00
Benjamin Lichtman 92edc2db56 [WIP] Record original name of renamed variable 2018-09-11 11:12:11 -07:00
Benjamin Lichtman a4c87df821 [WIP] Use original identifier name to count up from when renaming collisions 2018-09-11 11:12:11 -07:00
Benjamin Lichtman 8c9e8666ed Miscellaneous cleanup 2018-09-11 11:12:10 -07:00
AndyandGitHub 24a5bdd1b1 Add 'fileToRename' property to RenameInfo (#24702)
* Add 'fileToRename' property to RenameInfo

* Update tests

* Support directory rename
2018-09-10 11:25:03 -07:00
Ryan Cavanaugh 95ba73e16b Don't offer module completions in non-module JS files 2018-09-10 11:24:51 -07:00