Commit Graph
7552 Commits
Author SHA1 Message Date
AndyandGitHub 5c94bef0e1 Add 'renameFile' command to services (#23573)
* Add 'renameFile' command to services

* renameFile -> getEditsForFileRename

* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Nathan Shively-SandersandGitHub e65681a2b7 Fix assert in getjsdochost (#23575)
* Fix assert in getJSDocHost

* Update public API to add wider type

* Remove now-unnecessary type assertion
2018-04-20 10:41:58 -07:00
AndyandGitHub 22f2b118b7 Add 'triggerCharacter' option for completions requests (#23491)
* Add 'triggerCharacter' option for completions requests

* mhegazy code review

* More code review

* Handle '<' in comment
2018-04-20 10:25:58 -07:00
AndyandGitHub 94cc59ca60 Support getting JSDoc comment starting at a FunctionType node (#23546)
* Support getting JSDoc comment starting at a FunctionType node

* Move || to end of line
2018-04-20 09:43:20 -07:00
Klaus Meinhardt 8e565fb4a6 avoid generated helpers in baseline 2018-04-20 16:39:37 +02:00
Klaus Meinhardt 4827728b16 binder: don't inline generator function's control flow
Fixes: #23565
2018-04-20 16:26:53 +02:00
Nathan Shively-SandersandGitHub 8d969a23cb In JS, class supports @template tag for declaring type parameters (#23511)
* Support @template as a class type parameter

Still need to do the following:
1. Correctly get jsdoc host in predicate.
2. Make this work for constructor functions too.
3. Scan rest of codebase for other usages of the type parameters
property that should be calls to getEffectiveTypeParameterDeclarations.
4. Rename tp to something more readable, like typar or ts'.

* Use jsdoc host declaration to find container

* Longer names for type parameters

* Fix renaming operation

* Update fourslash test

* Support @template for JS constructors

* Look for both outer and tag type parameters

* Improve naming to improve code clarity
2018-04-19 15:58:43 -07:00
Daniel RosenwasserandGitHub 84b12910e8 Merge pull request #23430 from Microsoft/taggedTemplateTypeArguments
Allow type arguments in generic tagged templates
2018-04-19 15:50:19 -07:00
AndyandGitHub a7c08e4691 Make code fix to add 'this.' work for statics (#23527)
* Make code fix to add 'this.' work for statics

* Add 'C.' instead of 'this.'

* DanielRosenwasser code review
2018-04-19 15:39:44 -07:00
AndyandGitHub c258d6e1b6 Fix bug: Don't rename 'default' in export { default as x } from "m"; (#23434)
* Fix bug: Don't rename 'default' in `export { default as x } from "m";`

* Rename `foo` in `{ default as foo }` if that's the original export name
2018-04-19 15:35:25 -07:00
AndyandGitHub bc7979c174 quickInfo: Get JSDoc tags from aliased symbol (#23526)
* quickInfo: Get JSDoc tags from aliased symbol

* Add test with existing tags
2018-04-19 15:33:36 -07:00
Daniel Rosenwasser 7f96fec9d9 Added test in case 'super' is ever possibly parsed as a tagged template string. 2018-04-19 15:16:25 -07:00
Daniel Rosenwasser 8e27f4693c Added test for ASI concerns. 2018-04-19 10:34:31 -07:00
Wesley WighamandGitHub 557a34e897 Visit typedef type expressions so they contribute to referenced-ness (#23525) 2018-04-19 10:28:30 -07:00
Wesley WighamandGitHub 238ed7a94c Visit EOF to collect jsdoc import types (#23521)
* Visit EOF to collect jsdoc import types

* Add flag to prevent jsdoc import types from influencing compilation set
2018-04-18 19:52:34 -04:00
Mohamed HegazyandGitHub 52192006cf Merge pull request #20671 from Kingwl/fix-import-not-existed-module
error if import empty object form module not existed
2018-04-17 17:29:07 -07:00
Nathan Shively-SandersandGitHub e26745f129 Add axios' source to user tests (#23490)
* Add axios' source to user tests

We already have the npm-installed version in order to test their d.ts so
that we don't break their users.

* Just compile lib, plus fix some config lint
2018-04-17 15:20:48 -07:00
AndyandGitHub f5101e21c3 Find-all-references: Don't crash on 'typeof import' (#23448)
* Find-all-references: Don't crash on 'typeof import'

* Move `| ImportTypeNode` out of `AnyImportOrReExport`
2018-04-17 15:01:36 -07:00
AndyandGitHub d1fde3786c Symbol kind for a method on a mapped type should still be 'method' (#23478) 2018-04-17 14:07:59 -07:00
Wesley WighamandGitHub c645f1753f Update configurePrerelease to not utilize ts internals (#23476)
* update configure nightly to not utilize ts internals

* Nightly -> Prerelease

* Remove alias
2018-04-17 15:42:31 -04:00
AndyandGitHub b00e370605 Add '?' in quick info for optional properties/methods (#23480) 2018-04-17 12:42:23 -07:00
Benjamin LichtmanandGitHub 48f98bdd4d Merge pull request #23452 from uniqueiniquity/normalizeDocumentHighlightsPaths
Normalize document highlights paths
2018-04-17 12:31:00 -07:00
Nathan Shively-SandersandGitHub db68075b67 Add create-react-app and puppeteer user tests (#23471)
* Add create-react-app

* Add puppeteer

Everything is broken now. I am going back to master to see if that fixes
things.

* Add puppeteer baseline

* Add chalk override (gitignore was ignoring it)
2018-04-17 11:21:11 -07:00
AndyandGitHub e50b24a83b convertFunctionToEs6Class: Copy comment from variable declaration (#23445) 2018-04-17 09:15:05 -07:00
AndyandGitHub 55f9a6ffc2 Fix bug: VariableDeclaration initiazer may be undefined (#23439) 2018-04-17 08:59:07 -07:00
AndyandGitHub bc285aa9a1 findAllReferences: Mark *every* search symbol as seen, not just search.symbol (#23451) 2018-04-17 07:53:43 -07:00
AndyandGitHub 40fd6aebdc Shrink span for convert-to-es6-module suggestion (#23441) 2018-04-16 16:46:27 -07:00
Benjamin LichtmanandGitHub 221ac50c4c Merge pull request #23437 from Microsoft/getOutliningSpansDepthElseIf
In outliningElementsCollector, treat 'else if' as having same depth as the 'if'
2018-04-16 16:25:57 -07:00
uniqueiniquity e9d6f788ca Add test 2018-04-16 15:59:22 -07:00
AndyandGitHub aac9ef5e51 convertToEs6Module: Avoid replacing entire function (#22507)
* convertToEs6Module: Avoid replacing entire function

* Code review

* Fix typo
2018-04-16 13:16:04 -07:00
Andy Hanson a60caba467 In outliningElementsCollector, treat 'else if' as having same depth as the 'if' 2018-04-16 11:33:30 -07:00
Daniel Rosenwasser 6107e05e8c Added test for tagged templates in new expressions. 2018-04-15 15:57:38 -07:00
Daniel Rosenwasser 60b6d3fbce Fixed up test. Thanks arrow functions... 2018-04-13 23:45:15 -07:00
Daniel Rosenwasser b409888cbc Added tests. 2018-04-13 23:01:24 -07:00
Nathan Shively-SandersandGitHub 941777848f Switch webpack to submodule (#23372)
* Prepare for adding webpack submodule

* Actually switch webpack to submodule

I'm sure this will work with no problems!

* Add ignore=all to webpack gitmodule entry

The other submodules do this, although I'm not sure why.

* Add newline at end of .gitmodules
2018-04-12 14:09:07 -07:00
AndyandGitHub d2dc2e6d48 Don't copy trivia when implementing an interface (#23343)
* Don't copy trivia when implementing an interface

* Use an `includeTrivia` flag instead of a separate function
2018-04-12 11:47:42 -07:00
Nathan Shively-SandersandGitHub 5d23cb49d0 Exclude generated files from user tests (#23371)
* Exclude generated files from user tests

The top 3 offenders, at least: bcryptjs, bluebird and lodash.

* Clean url-search-params too

Only need to build the commonjs original, not the browserified ones.
2018-04-12 10:25:53 -07:00
AndyandGitHub d36f83a98d Remove TODO: GH#18795 comments (#23337) 2018-04-11 16:23:04 -07:00
AndyandGitHub b0552b089d Don't include "/index" in import from @types even with classic resolution (#23347) 2018-04-11 16:22:10 -07:00
Nathan Shively-SandersandGitHub 79ad7df7e1 Improve user test tsconfig (#23325)
* Improve user test tsconfigs

Also incorporate updates from the packages themselves (they fixed
some of the bugs the compiler noticed).

* Fix enhanced-resolve module resolution

* Update baselines after merge w/master
2018-04-11 15:59:19 -07:00
AndyandGitHub f6b206a75a When testing references, also test documentHighlights respects filesToSearch (#23306)
* When testing references, also test documentHighlights respects filesToSearch

* Fix handling for redirects and move assertion inside getDocumentHighlights

* Add another assert
2018-04-11 14:07:22 -07:00
Nathan Shively-SandersandGitHub 9ceb113ec5 Allow exports assignments (#23319)
1. Allow assignment to `exports`.
2. The type of the rhs is not checked against the type of `exports`
since they are aliased declarations.

To support more complex patterns like `exports = c.name = c`, we may
have to treat `c.name` as a declaration. That will be more complicated
than this PR.
2018-04-11 06:49:58 -07:00
Wesley WighamandGitHub 8a2b4646f0 Include guards on comment kind in pragma extraction (#23313) 2018-04-10 20:50:31 -07:00
Wesley WighamandGitHub b2e0c4bea6 Add support for destructuring well-known and late-bound names (#23297)
* Add support for destructuring well-known and late-bound names

* Add test of not present late bound prop
2018-04-10 18:21:24 -07:00
Wesley WighamandGitHub 1243d1a9ba handle any'd method signature types (ie, from special property declarations) (#23316) 2018-04-10 18:17:57 -07:00
Nathan Shively-SandersandGitHub 22919d57fe JSDoc:positional matching of destructured params (#23307)
* JSDoc:positional matching of destructured params

1. When looking up tags for a parameter whose name is a binding pattern, use
the index of the parameter to get the type.
2. When reporting errors for `@param` tags with no matching parameter
name, do not report the error for tags whose index in the `@param` tag list
matches the index of a parameter whose name is a binding pattern.

* Change to an assert

* Improve comment text
2018-04-10 12:48:35 -07:00
Wenlu WangandAndy 9c0671d661 add refactor of convert private field to getter and setter (#22143)
* add refactor of convert private field to getter and setter

* fix refactor

* stash

* refactor accessor generate

* revert merge union type

* refeactor and accept baseline

* add support of PropertyAssignment and StringLiteral

* add support for js file

* allow static modifier in js file
2018-04-10 11:51:41 -07:00
AndyandGitHub ce5d22fef0 Fix bug: don't insert a semicolon when inserting a FunctionDeclaration (#23240) 2018-04-09 15:03:24 -07:00
Wesley WighamandGitHub 83ab341531 Allow variable statements used as declaration sites to be marked visible (#22798)
* Allow variable statements used as declaration sites to be marked visible and included in declaration emit by alias marking

* Dont forget to transform statements

* Accept baselines

* Accept updated baselines for new test

* Emit scope fix markers

* Add partial private variable declaration emit test
2018-04-09 14:30:40 -07:00
AndyandGitHub 98a5e5cc0d Prioritize spelling fix over add-missing-member fix (#23268) 2018-04-09 13:23:11 -07:00