Commit Graph

32734 Commits

Author SHA1 Message Date
Nathan Shively-Sanders 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
Daniel Rosenwasser 01b22ff37e Merge pull request #23331 from aboveyou00/master
Fix typeo: rename udpateReportDiagnostic to updateReportDiagnostic
2018-04-11 01:40:49 -07:00
csigs 1fb2a12b0f LEGO: Merge pull request 23332
LEGO: Merge pull request 23332
2018-04-10 21:11:04 -07:00
csigs f458e9007d LEGO: check in for master to temporary branch. 2018-04-11 04:10:41 +00:00
Brandon Slade 82e8bcf3b2 Fix typeo: rename udpateReportDiagnostic to updateReportDiagnostic 2018-04-10 21:58:18 -06:00
Wesley Wigham 8a2b4646f0 Include guards on comment kind in pragma extraction (#23313) 2018-04-10 20:50:31 -07:00
Anders Hejlsberg b746f8e8a4 Accept new baselines 2018-04-10 17:39:55 -10:00
Anders Hejlsberg 0a37cd3736 Update test 2018-04-10 17:35:27 -10:00
Anders Hejlsberg b40592c34e String index signatures do not apply to symbols 2018-04-10 17:35:11 -10:00
Wesley Wigham 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 Wigham 1243d1a9ba handle any'd method signature types (ie, from special property declarations) (#23316) 2018-04-10 18:17:57 -07:00
Daniel Rosenwasser 0feefab765 'modulekind' -> 'moduleKind' 2018-04-10 16:30:02 -07:00
Daniel Rosenwasser 1ea269af87 Accepted baselines. 2018-04-10 16:29:05 -07:00
Daniel Rosenwasser 4f497e6c0c Added tests around ES5, assigning to 'import.meta' and properties, global augmentations. 2018-04-10 16:28:50 -07:00
Daniel Rosenwasser 56f4b2eea4 Provide an error when using 'import.meta' without setting 'esnext'. 2018-04-10 16:12:00 -07:00
Daniel Rosenwasser 7c0f249619 Added semicolon. 2018-04-10 16:10:04 -07:00
csigs 0c06f2f44c LEGO: Merge pull request 23322
LEGO: Merge pull request 23322
2018-04-10 15:11:13 -07:00
csigs cb6d4d1ff6 LEGO: check in for master to temporary branch. 2018-04-10 22:10:52 +00:00
Andy dcc4b8854b In getWidenedTypeFromJSSpecialPropertyDeclarations, parent of PropertyAccessExpression must be a BinaryExpression (#22727) 2018-04-10 14:46:26 -07:00
Andy f479de6d02 patternMatcher: Just return 'undefined' for an invalid pattern (#23237)
* patternMatcher: Just return 'undefined' for an invalid pattern

* Fix tests
2018-04-10 14:38:16 -07:00
Daniel Rosenwasser 910c5d338b Accepted baselines. 2018-04-10 12:59:38 -07:00
Daniel Rosenwasser f0081f0a04 Basic checking for 'import.meta'. 2018-04-10 12:59:03 -07:00
Daniel Rosenwasser 9e2bbb6f8a Basic parsing/emitting support for 'import.meta'. 2018-04-10 12:55:43 -07:00
Nathan Shively-Sanders 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
Andy 4b706fc479 Add 'disableSuggestions' to UserPreferences (#23283)
* Add 'disableSuggestions' to UserPreferences

* Make mergeMapLikes return a new object

* Avoid additional clone

* mergeMapLikes -> object spread
2018-04-10 11:53:24 -07:00
Wenlu Wang 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
Andy 556a8010b9 Fix bug: ensure 'reportsUnnecessary' is actually sent by tsserver (#23293) 2018-04-10 10:15:15 -07:00
csigs 8248075550 LEGO: Merge pull request 23302
LEGO: Merge pull request 23302
2018-04-10 03:10:53 -07:00
csigs 651412c887 LEGO: check in for master to temporary branch. 2018-04-10 10:10:29 +00:00
csigs 668c5ff5d6 LEGO: Merge pull request 23298
LEGO: Merge pull request 23298
2018-04-09 21:10:48 -07:00
csigs 3f0dad831d LEGO: check in for master to temporary branch. 2018-04-10 04:10:24 +00:00
Daniel Rosenwasser 9b8670cf92 Accepted baselines. 2018-04-09 15:28:37 -07:00
Daniel Rosenwasser 8923eec80a Added tests for 'import.meta'. 2018-04-09 15:26:30 -07:00
csigs 33a6946ac4 LEGO: Merge pull request 23290
LEGO: Merge pull request 23290
2018-04-09 15:11:04 -07:00
csigs fe6142a2da LEGO: check in for master to temporary branch. 2018-04-09 22:10:41 +00:00
Andy ce5d22fef0 Fix bug: don't insert a semicolon when inserting a FunctionDeclaration (#23240) 2018-04-09 15:03:24 -07:00
Wesley Wigham 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
Andy 71b39014eb Fix bug: Include comment for @param tag with nested tag (#23276)
* Fix bug: Include comment for @param tag with nested tag

* Add another comment to test
2018-04-09 14:09:59 -07:00
Andy 542184a05a Rename infoCheck to suggestionCheck (#23286) 2018-04-09 14:09:07 -07:00
Andy e858de9520 Simplify handling of parameter properties in forEachRelatedSymbol (#23213)
* Simplify handling of parameter properties in forEachRelatedSymbol

* Add assert for other paramProps symbol
2018-04-09 13:26:10 -07:00
Andy 98a5e5cc0d Prioritize spelling fix over add-missing-member fix (#23268) 2018-04-09 13:23:11 -07:00
Andy 998beadba2 Support goto-definition for index signatures (#23220)
* Support goto-definition for index signatures

* Use checker.getIndexInfoOfType

* Handle undefined info.declaration
2018-04-09 12:48:41 -07:00
Anders Hejlsberg b1545fe5ef Accept new baselines 2018-04-09 08:52:20 -10:00
Anders Hejlsberg 0379666bbf Update tests 2018-04-09 08:51:55 -10:00
Anders Hejlsberg 6d93f30839 Enable 'keyof T' for full string | number | symbol 2018-04-09 08:51:26 -10:00
Anders Hejlsberg 2c02195560 Accept new baselines 2018-04-09 07:48:13 -10:00
Anders Hejlsberg 68ce69a351 Move 'PropertyKey' from es2015.core.d.ts to es5.d.ts 2018-04-09 07:45:55 -10:00
Anders Hejlsberg ff20f38405 Add support for numbers and symbols in keyof (but keep it disabled) 2018-04-09 07:45:13 -10:00
csigs fb02d670ff LEGO: Merge pull request 23269
LEGO: Merge pull request 23269
2018-04-09 09:11:00 -07:00
csigs bcbaac92e5 LEGO: check in for master to temporary branch. 2018-04-09 16:10:36 +00:00