6418 Commits

Author SHA1 Message Date
Nathan Shively-Sanders
d4e3e19763 Merge pull request #18333 from Microsoft/fix-forEachChild-JSDocTypedefTag
Fix forEachChild jsdoc `@typedef` tag
2017-09-08 08:52:46 -07:00
Nathan Shively-Sanders
7aac67b9b4 Test: parsing of two-line @typedef jsdoc 2017-09-07 16:22:16 -07:00
Andy
2e02778960 When loading a module from node_modules, get packageId even in the loadModuleFromFile case (#18185)
* When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case

* Support packageId for <reference types> too
2017-09-07 14:31:20 -07:00
Andy
ed4e2e6e3b Ensure that emitter calls callbacks (#18284)
* Ensure that emitter calls calbacks

* Move new parameter to end of parameters

* Fix for ConditionalExpression

* Make suggested changes to emitter

* Fix parameter ordering

* Respond to minor comments

* Remove potentially expensive assertion

* More emitter cleanup
2017-09-07 14:30:19 -07:00
Nathan Shively-Sanders
2bc9ecb4fd Merge pull request #18296 from Microsoft/disable-lookahead-isStartOfParameter
Disable isStartOfType's lookahead when called from isStartOfParameter
2017-09-07 13:57:28 -07:00
Nathan Shively-Sanders
397ff84f1a Merge pull request #18317 from Microsoft/object-literal-enum-property-names
Object literals computed property names allow literal-typed expressions
2017-09-07 13:56:10 -07:00
Wesley Wigham
6695255d86 Allow trailing newline to have fake position (#18298)
* Actually support baselining pretty in the harness

* Test case from 18216

* Use host newline in formatDiagnosticsWithColorAndContext

* Merge statements
2017-09-07 12:26:23 -07:00
Nathan Shively-Sanders
3c5b2a5e9d Test Literal-typed computed property names in obj literals 2017-09-07 11:41:13 -07:00
Wesley Wigham
c1f2afd645 Add typedef declaration space, unify typedef name gathering (#18172)
* Add typedef declaration space, unify typedef name gathering, strengthen errorUnusedLocal

* Bonus round: make jsdoc presence way mroe typesafe

* Be exhaustive in nameForNamelessJSDocTypedef

* Remove nonrequired casts

* Replace more casts with guards

* Cannot be internal

* Debug.fail returns never, assert never no longer needs unreachable throw to satisfy checker

* Rename type

* Add replacement message as in 18287
2017-09-07 10:28:58 -07:00
Andy
be0633825c Don't provide string literal completions for string enums (#18288)
* Don't provide string literal completions for string enums

* Rename test
2017-09-07 09:13:46 -07:00
Nathan Shively-Sanders
b84e6bc188 Merge pull request #18096 from Microsoft/fix-codefix-jsdoc-variablelike-decls
Fix the jsdoc codefix for VariableLike declarations
2017-09-07 08:11:19 -07:00
Andy
7541c705bf Support navTo for special assignment kinds (#18154)
* Support navTo for special assignment kinds

* Return ScriptElementKind.unknown
2017-09-07 07:45:11 -07:00
Andy
b533b24686 extractMethod: Don't try to extract a single token (#18090)
* extractMethod: Don't try to extract a single token

* Update tests
2017-09-07 07:28:12 -07:00
Andy
b3c87aa919 Support find-all-references for default keyword (#17992)
* Support find-all-references for anonymous default exports

* Also handle re-exported default exports

* Add test for using `export =` with `--allowSyntheticDefaultExports`
2017-09-07 07:26:22 -07:00
Andy
23f793fc3e findAllReferences: Handle root symbols of binding element property symbol (#17738) 2017-09-07 07:23:06 -07:00
Andy
0434fe797a Get quickInfo from a contextual type if possible (#18119) 2017-09-07 07:22:39 -07:00
Andy
8c714c3651 Support special JS property assignments in doc comment templates (#18193) 2017-09-07 07:21:47 -07:00
Wesley Wigham
c3e090695e Do not consider UMD alias symbols as visible within external modules (#18049)
* Do not consider UMD alias symbols as visible within external modules in the symbol writer

* Minimal repro
2017-09-06 22:07:30 -07:00
Wesley Wigham
72884b8f27 Emit comments on system export default expressions on the surrounding export call epxression instead (#17970) 2017-09-06 21:59:06 -07:00
Nathan Shively-Sanders
a5c2eac2ee Test:disable lookahead in isStartOfParameter 2017-09-06 15:54:14 -07:00
Wesley Wigham
73eff819b5 Fix 18224 (#18259)
* Probably fix 18224

* Corrected test
2017-09-06 14:44:29 -07:00
Andy
36607e1bde Allow quoted names in completions (#18162)
* Allow quoted names in completions

* Don't allow string literal completions if not in an object literal; and use string literals for number keys

* Add TODO
2017-09-06 14:39:53 -07:00
Nathan Shively-Sanders
d790f1d9d3 Merge pull request #18258 from Microsoft/improve-complexRecursiveCollections-baseline
Improve baseline of complexRecursiveCollections
2017-09-05 14:58:22 -07:00
Wesley Wigham
6ae761720e Add test for #14574 (#18024) 2017-09-05 13:37:51 -07:00
Nathan Shively-Sanders
3a164b955b Improve baseline of complexRecursiveCollections
By adding @lib:es6, which gets rid of tons of bogus errors.
The point of the test is compile time, but it's more
confidence-inspiring to know that basic ES6 collections are getting
resolved and typechecked too.
2017-09-05 12:55:18 -07:00
Nathan Shively-Sanders
541920eb31 Merge pull request #18014 from Microsoft/allow-bang+dotdotdot-as-start-of-type
Allow bang+dotdotdot as start of type
2017-09-01 14:26:16 -07:00
Wesley Wigham
3e850156da Propagate isRestParameter through symbol instantiation (#18087)
* Add repro from #17666

* Actually use repro from issue, propegate isRestParameter on instantiation
2017-08-31 10:15:42 -07:00
Anders Hejlsberg
42b66066f9 Add regression test 2017-08-30 17:14:16 -07:00
Andy
601c113d93 Handle indexed access types in getSymbolAtLocation and findAllReferences (#18149)
* Handle indexed access types in getSymbolAtLocation and findAllReferences

* Update baselines, simplify `const objectType`
2017-08-30 14:19:49 -07:00
Mohamed Hegazy
562abf333a Follow up on #16223 cleaning up Array declarations (#18116)
* Follow up on #16223, Remove generic signatures from Array, ReadOnlyArray and TypedArrays

* Remove test

* Accept baselines

* Remove invalid `this: void` in callbacks

* accept baselines
2017-08-30 10:22:02 -07:00
Nathan Shively-Sanders
63cb84f3d1 Codefix jsdoc types for anything with a .type
That means type parameters and type arguments are still not handled.
2017-08-29 10:38:16 -07:00
Andy
9daa70c47e Revert "Handle indexed access types in getSymbolAtLocation and findAllReferences (#17787)" (#18111)
This reverts commit 30b3cb0f682df870fe23f8b1196bab06de1380b6.
2017-08-29 09:37:27 -07:00
Andy
7306b13f74 Don't issue a use-before-declared error for a property that exists in a superclass (#17910)
* Don't issue a use-before-declared error for a property that exists in a superclass

* Simplify isInPropertyInitializer

* Respond to PR comments
2017-08-29 09:18:09 -07:00
Andy
30b3cb0f68 Handle indexed access types in getSymbolAtLocation and findAllReferences (#17787) 2017-08-29 07:53:22 -07:00
Nathan Shively-Sanders
b082c27fbe Test:jsdoc codefix for variable-like declarations 2017-08-28 16:10:03 -07:00
Nathan Shively-Sanders
197040d3fd Merge branch 'master' into allow-string-enum-in-element-access 2017-08-28 11:00:13 -07:00
Wesley Wigham
38c3f67652 Visit destructuring computed names (#18052) 2017-08-25 15:10:47 -07:00
Anders Hejlsberg
555a742d16 Merge pull request #18042 from Microsoft/fixMappedTypeIndexedAccess
Defer mapped type indexed access transformations
2017-08-25 20:59:16 +01:00
Andy
fe1242c8a9 Don't try to extract import to a method (#18025) 2017-08-25 09:53:56 -07:00
Andy
3a0ab74ed6 Test for action description of code actions, and simplify description for extracting method to file (#18030)
* Test for action description of code actions, and simplify description for extracting method to file

* Add unit test file missing from tsconfig.json (only affects gulp) and update tests

* Use the actual number

* Use "module scope" or "global scope" instead of "this file"
2017-08-25 09:53:28 -07:00
Anders Hejlsberg
e79d75a383 Add regression test 2017-08-25 08:55:43 -07:00
Wesley Wigham
62eaaf9206 Fix crash when attempting to merge an import with a local declaration (#18032)
* There should be no crash when attempting to merge an import with a local declaration

* Show symbol has actually merged within the module
2017-08-24 17:12:42 -07:00
Wesley Wigham
643a7e7e33 Call dynamic import transform on expression used by export equal statement (#18028)
* Call dynamic import transform on expression used by export equal statement

* Use Debug.fail
2017-08-24 17:08:57 -07:00
Ron Buckton
05402b8596 Merge pull request #18027 from Microsoft/fix16924
Switch to arrow for ts class wrapper IIFE
2017-08-24 17:02:18 -07:00
Ron Buckton
4c68b6d7f0 Merge pull request #16686 from Microsoft/fix16467
Improve JavaScript type from constructor imported via require
2017-08-24 17:00:38 -07:00
Wesley Wigham
f824e7214d Give mapped type properties a synthetic declaration name (#18023)
* Escape symbol names which are not valid identifiers and wrap them in quotes

* Pass forward type, do work in getNameOfSymbol

* Minimal test

* Fix nit
2017-08-24 16:48:11 -07:00
Wesley Wigham
336df751ea Fix issue #16803 do not error on getters/setters (#18031) 2017-08-24 15:53:09 -07:00
Wesley Wigham
2f1bd8cff9 Escape \0 followed by a number as a hex escape to avoid printing an octal literal (#18026) 2017-08-24 15:52:04 -07:00
Ron Buckton
ccd0158c40 Added additional test 2017-08-24 15:06:06 -07:00
Nathan Shively-Sanders
d7d69a1622 Test:string enum in element access 2017-08-24 14:06:21 -07:00