Commit graph

8827 commits

Author SHA1 Message Date
Andy Hanson 2c40fea9f1 Improve names of whitespace functions 2016-07-01 13:57:20 -07:00
Richard Knoll 9eba8d751d Handle relative paths in tsconfig exclude and include globs 2016-07-01 10:21:23 -07:00
Anders Hejlsberg d37d50afb0 Ensure const enum members with same value have same type identity 2016-07-01 09:18:43 -07:00
Herrington Darkholme d63ef2c9f5 change variable name for strict mode 2016-07-02 00:15:06 +08:00
Bill Ticehurst 613e2d33b6 Merge pull request #9421 from Microsoft/dontEmitNodeModules
Don't emit any source files found under node_modules
2016-06-30 19:47:34 -07:00
Mohamed Hegazy 5de7ca2cb1 Fix #9458: exclude parameters starting with underscore from unusedParamter checks 2016-06-30 19:35:30 -07:00
Mohamed Hegazy 9429176c63 Merge branch 'release-2.0' 2016-06-30 17:33:25 -07:00
Mohamed Hegazy 54b4bef8c8 Handel Swtich statements
check for locals on for statments
only mark private properties
2016-06-30 15:18:17 -07:00
Mohamed Hegazy b93407d11d Merge branch 'release-2.0' into unusedIdentifierFixes-3 2016-06-30 15:04:16 -07:00
zhengbli b848690626 Port 9426 to release 2.0 2016-06-30 14:26:07 -07:00
Zhengbo Li 494fada879 Merge pull request #9426 from zhengbli/fix9411
Add nullcheck when calculating indentations for implort clause
2016-06-30 14:21:11 -07:00
Andy ae4bb62dbe Merge pull request #9445 from Microsoft/export_default_async_function
Parse `export default async function` as a declaration
2016-06-30 13:55:24 -07:00
Andy 594ad64b25 Merge pull request #9442 from Microsoft/navigation_bar_nameless_namespace
Show "<unknown>" if the name of a declaration is unavailable
2016-06-30 13:31:12 -07:00
Mohamed Hegazy 07d7ec3a92 Merge pull request #9422 from Microsoft/allow-destructuring-assignment-with-default-of-undefined-optional-property
Destructuring assignment removes undefined from type when default value is given
2016-06-30 12:41:06 -07:00
Mohamed Hegazy 1fa69caf13 handel private properties correctelly 2016-06-30 10:38:59 -07:00
Bill Ticehurst 573bfec854 Merge remote-tracking branch 'upstream/master' into dontEmitNodeModules 2016-06-30 10:36:50 -07:00
Andy Hanson 9daa800c6a Respond to PR comments 2016-06-30 09:18:25 -07:00
Andy Hanson 4195eb3670 Parse export default async function as a declaration 2016-06-30 07:11:36 -07:00
Andy Hanson 0535d55a97 Show "<unknown>" if the name of a declaration is unavailable 2016-06-30 06:38:18 -07:00
Mohamed Hegazy b40512d8a2 Only mark symbols found in a local symbol table 2016-06-30 01:00:53 -07:00
Mohamed Hegazy 3d9c9206e4 Code review comments 2016-06-30 00:03:54 -07:00
Mohamed Hegazy f751901eee Consolidate refernce marking in resolveName to allow marking aliases correctelly 2016-06-29 23:46:41 -07:00
Mohamed Hegazy dc5cf33861 Do not report unused errors for module augmentations 2016-06-29 22:54:18 -07:00
Nathan Shively-Sanders 5f6e25c8d2 Use checkExpression, not checkExpressionCached 2016-06-29 18:47:10 -07:00
Nathan Shively-Sanders 7b77f6b3fd Merge pull request #9397 from Microsoft/fix-crash-in-async-and-no-implicit-returns-targeting-es5
Fix crash in async functions when targetting ES5.
2016-06-29 18:31:11 -07:00
Bill Ticehurst d8047b607f Renamed API 2016-06-29 17:05:55 -07:00
Bill Ticehurst 5a45c44eb7 Dont load JavaScript if types packages are present 2016-06-29 17:04:42 -07:00
Mohamed Hegazy bc7c6ccc91 Merge branch 'release-2.0' into unusedIdentifierFixes-2 2016-06-29 14:40:55 -07:00
Mohamed Hegazy 97aa987978 Handel type aliases 2016-06-29 14:07:55 -07:00
Mohamed Hegazy d4513c8aff Consolidate type reference marking in getTypeFromTypeReference 2016-06-29 14:07:42 -07:00
Mohamed Hegazy 4789ff0316 Do not check ambients, and overloads 2016-06-29 13:34:41 -07:00
Mohamed Hegazy c28487db92 Report unused identifiers in for statements 2016-06-29 13:18:06 -07:00
Nathan Shively-Sanders c35e374ef4 runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.

This was very obvious on machines with lots of cores.
2016-06-29 13:17:31 -07:00
Mohamed Hegazy b1b3ae07e0 use isParameterPropertyDeclaration to test for paramter propoerties 2016-06-29 12:09:49 -07:00
Mohamed Hegazy 7836ba093e push checks to checkUnusedIdentifiersDeferred 2016-06-29 12:07:08 -07:00
Mohamed Hegazy e7fcb661c3 Use a deferred list to check for unused identifiers 2016-06-29 12:06:47 -07:00
zhengbli 7232513194 Add nullcheck when calculating indentations for implort clause 2016-06-29 12:01:33 -07:00
Nathan Shively-Sanders c5e680c8be Destructuring assignment removes undefined from type when default value is given 2016-06-29 09:12:50 -07:00
Bill Ticehurst 5f8cf1af3e Don't emit source files found under node_modules 2016-06-29 08:44:06 -07:00
Andy Hanson 0a61334677 Do not scan nodes preceding formatted region, just skip over them 2016-06-29 08:39:36 -07:00
Mohamed Hegazy b5247959e9 Merge pull request #9405 from zspitz/patch-1
getVarDate should be on the Date interface
2016-06-29 01:11:14 -07:00
Mohamed Hegazy aeadbe4376 Defere checking unsed identifier checks 2016-06-28 23:37:26 -07:00
Anders Hejlsberg 70e2c43d28 Consider null, undefined, and void to be unit types in type guards 2016-06-28 18:04:44 -07:00
Anders Hejlsberg e14fe5b830 Remove unused functions 2016-06-28 17:12:46 -07:00
Anders Hejlsberg 85128e02da Narrow unions of literal types by equality and truthiness 2016-06-28 17:00:52 -07:00
Zev Spitz 27e66b0bc8 getVarDate should be on the Date interface 2016-06-29 02:16:18 +03:00
Mohamed Hegazy 17a428c21f Fix #9402: Do not report unused identifier errors for catch variables 2016-06-28 16:04:52 -07:00
Yui 690c682b6e Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement

* format jsx expression

* make rules optional

* Remove upper boilerplate from issue template

Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented

* Update issue_template.md

* new options should be optional for compatibility

* Add getCurrentDirectory to ServerHost

* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location

* VarDate interface and relevant Date.prototype members

* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)

* Fix emit incorrect destructuring mapping in var declaration

* Add tests and baselines

* Add additional tests and baselines
2016-06-28 15:55:46 -07:00
zhengbli ddadb472a6 Add This type to lib 2016-06-28 14:45:56 -07:00
Nathan Shively-Sanders 8ff873e7a6 Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
2016-06-28 13:34:01 -07:00
Yui 29107e636b Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration

* Add tests and baselines

* Add additional tests and baselines
2016-06-28 13:33:11 -07:00
zhengbli 67f0ffe7fb Port 9396 to release 2.0 2016-06-28 13:06:26 -07:00
Zhengbo Li 50177b14d0 Merge pull request #9396 from zhengbli/fix9186
Check getCurrentDirectory availability in getEffectiveTypeRoots
2016-06-28 13:01:51 -07:00
Mohamed Hegazy ec020776c2 Merge pull request #9361 from SaschaNaz/noFormatInJsxElement
Fix formatting on JsxElement/JsxExpression
2016-06-28 12:13:10 -07:00
zhengbli d5cad239e8 Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location 2016-06-28 12:10:26 -07:00
zhengbli 6ff91b84ab Add getCurrentDirectory to ServerHost 2016-06-28 11:53:30 -07:00
Zev Spitz 3fdaf194f7 VarDate interface and relevant Date.prototype members 2016-06-28 21:26:18 +02:00
Kagami Sascha Rosylight 6e984eb3a3 new options should be optional for compatibility 2016-06-29 03:28:22 +09:00
Bill Ticehurst 8bf3d54524 Merge pull request #7075 from Microsoft/loadJsFromModules
Load JavaScript modules from Node packages
2016-06-27 18:42:12 -07:00
Bill Ticehurst 3ccb8b2b38 Merge branch 'loadJsFromModules' into loadJsFromModules-2.0 2016-06-27 17:15:55 -07:00
Bill Ticehurst ddad35a680 Marked new method internal 2016-06-27 16:49:53 -07:00
Bill Ticehurst d8e3bd99e8 Added emitHost method to return source from node modules 2016-06-27 16:32:29 -07:00
Mohamed Hegazy bb53b8423c Merge pull request #9377 from Microsoft/updateVersion
Update version to 2.0.0
2016-06-27 16:06:37 -07:00
Yui 9cc48c829d Remove unused compiler option (#9381) 2016-06-27 15:58:29 -07:00
Mohamed Hegazy f67f1f7db7 Update version to 2.0.0 2016-06-27 13:43:07 -07:00
Mohamed Hegazy cc1226cd8a Merge pull request #4609 from SaschaNaz/fixExportImportFormatting
Fix named export/import formatting
2016-06-27 13:30:37 -07:00
zhengbli d9b8fad728 Fix type of the disableSizeLimit option 2016-06-27 11:46:58 -07:00
Bill Ticehurst de559fb3f4 Fixed the regexp for removing full paths 2016-06-27 01:23:22 -07:00
Kagami Sascha Rosylight cbfbfe1aa6 make rules optional 2016-06-27 16:04:53 +09:00
Bill Ticehurst 1b43bd8e83 Removed old TODO comment 2016-06-26 23:33:46 -07:00
Bill Ticehurst 0174bda004 Merge branch 'master' into loadJsFromModules 2016-06-26 23:24:26 -07:00
Bill Ticehurst e9a0c56d3c Fixed bugs and linting 2016-06-26 20:48:22 -07:00
Kagami Sascha Rosylight 378c6b5fc7 format jsx expression 2016-06-26 15:17:05 +09:00
Kagami Sascha Rosylight 9dfcb4419c do not format comma/closeparen in jsxelement 2016-06-25 19:23:46 +09:00
Kagami Sascha Rosylight a8ac0efc1b Merge branch 'master' of https://github.com/Microsoft/TypeScript into fixExportImportFormatting 2016-06-25 17:57:55 +09:00
Kagami Sascha Rosylight 335737973e Merge branch 'master' of https://github.com/SaschaNaz/TypeScript into fixExportImportFormatting 2016-06-25 17:53:46 +09:00
Anders Hejlsberg e900ebf856 Make boolean assignable to union types containing both true and false 2016-06-24 21:12:44 -07:00
Yui be2ca35b00 Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration

* Update tests and baselines

* Update function name

* Fix when accessing static property inside arrow function

* Add tests and baselines
2016-06-24 17:40:07 -07:00
Yui e182ecf2c9 Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself

* Add Transpile unittest

* Wip - Add project tests

* Add project tests and baselines

* Update existed tests

* Add tests for emitting metadata with module targetting system
2016-06-24 17:39:49 -07:00
Nathan Shively-Sanders fb3f823dde Merge pull request #9167 from Microsoft/make-unions-and-intersections-of-readonly-properties-readonly
Unions and intersections of readonly properties are now also readonly
2016-06-24 16:02:01 -07:00
Sarangan Rajamanickam a0a96667ed Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers

* Added code for handling function, method and coonstructor level local variables and parameters

* Rebased with origin master

* Code changes to handle unused private variables, private methods and typed parameters

* Code changes to handle namespace level elements

* Code changes to handle unimplemented interfaces

* Code to optimize the d.ts check

* Correct Code change to handle the parameters for methods inside interfaces

* Fix for lint error

* Remove Trailing whitespace

* Code changes to handle interface implementations

* Changes to display the error position correctly

* Compiler Test Cases

* Adding condition to ignore constructor parameters

* Removing unnecessary tests

* Additional changes for compiler code

* Additional changes to handle constructor scenario

* Fixing the consolidated case

* Changed logic to search for private instead of public

* Response to PR Comments

* Changed the error code in test cases as result  of merge with master

* Adding the missing file

* Adding the missing file II

* Response to PR comments

* Code changes for checking unused imports

* Test Cases for Unused Imports

* Response to PR comments

* Code change specific to position of Import Declaration

* Code change for handling the position for unused import

* New scenarios for handling parameters in lambda function, type parameters in methods, etc.

* Additional scenarios based on PR comments

* Removing a redundant check

* Added ambient check to imports and typeparatmeter reporting

* Added one more scenario to handle type parameters

* Added new scenario for TypeParameter on Interface

* Refactoring the code

* Added scenario to handle private class elements declared in constructor.

* Minor change to erro reporting
2016-06-24 15:38:39 -07:00
Paul van Brenk cca7000032 Merge pull request #9342 from Microsoft/typoinbracecompletion
Fix typo
2016-06-24 14:41:10 -07:00
jramsay 8312168e91 Merge pull request #9236 from Microsoft/BaseIndentationSupport
[Salsa] Adding base indentation for script block formatting and smart indent
2016-06-24 14:22:58 -07:00
Yui db0d8e094b Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly

* wip - just resolve to any type for now

* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx

* Add tests and update baselines

* Remove unneccessary comment

* wip-address PR

* Address PR

* Add tets and update baselines

* Fix linting error
2016-06-24 14:15:44 -07:00
Jason Ramsay 8c503207be Add fourslash tests & address CR comments 2016-06-24 13:16:58 -07:00
Andy 2aa1d718ab Merge pull request #9348 from Microsoft/umd_exports
Fix bug where `exports.` was prepended to namespace export accesses
2016-06-24 12:54:58 -07:00
Anders Hejlsberg 477489699c Correct handling of falsy types ("" | 0 | false) 2016-06-24 11:49:37 -07:00
Andy Hanson 6a60d8bb90 Merge branch 'master' into range_tests 2016-06-24 09:17:57 -07:00
Andy Hanson 6bc8db031c Remove unnecessary parameter 2016-06-24 09:16:39 -07:00
Andy Hanson a011b4df12 Fix bug where exports. was prepended to namespace export accesses 2016-06-24 06:51:19 -07:00
Andy 999ac0add3 Merge pull request #9270 from Microsoft/this_references
Allow to find all references of the 'this 'keyword
2016-06-24 06:24:12 -07:00
zhengbli 83335f59a7 Add new APIs to protocol 2016-06-24 00:50:15 -07:00
Zhengbo Li 69e2f0e459 Merge pull request #9306 from zhengbli/syncGetErrAPIs
Port the sync diagnostics API from tsserverVS-WIP branch to 2.0
2016-06-23 21:59:29 -07:00
Paul van Brenk 6346fc1168 Fix typo 2016-06-23 17:36:59 -07:00
zhengbli 9f9deceeef Correct the api string name 2016-06-23 16:25:30 -07:00
Wesley Wigham 9cd1f786c3 Merge pull request #9332 from Microsoft/object-whitespace-rule
Object whitespace rule
2016-06-23 14:02:36 -07:00
Nathan Shively-Sanders c9511b736e 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
2016-06-23 13:08:27 -07:00
Wesley Wigham 59ae2ff8ef
Fix object whitespace lints 2016-06-23 12:39:20 -07:00
Wesley Wigham be6c34f1c7 Merge pull request #9068 from weswigham/remove-jake
Add Gulpfile.ts
2016-06-23 12:17:27 -07:00
Andy Hanson 89c992a8a1 Respond to PR comments 2016-06-23 12:08:18 -07:00
Andy Hanson 1aafc553dd Change reference tests to verify actual ranges referenced and not just their count 2016-06-23 10:48:35 -07:00
Ryan Cavanaugh 14774d6438 Merge pull request #9305 from RyanCavanaugh/fix9293
Properly detect circular constructor-declared `this` properties (JS)
2016-06-23 10:30:07 -07:00
Andy Hanson 62607722d4 Remove Signature#thisType and use Signature#thisParameter everywhere 2016-06-23 10:04:19 -07:00
Nathan Shively-Sanders 3f6010cd9f Merge pull request #9298 from OrangeShark/new-rest-param-error
New rest parameter properties error message
2016-06-23 08:33:05 -07:00
Nathan Shively-Sanders 9134ed3b7d Merge pull request #9303 from Microsoft/signatures-use-jsdoc-for-minArgumentCount
Signatures use JSDoc to determine optionality
2016-06-22 15:04:14 -07:00
Wesley Wigham d008da5888
Make use of module compiler option explicit, add strip internal to tsconfigs 2016-06-22 13:05:58 -07:00
Ron Buckton 12bfb7e987 Merge pull request #9204 from Microsoft/promiseAndAsyncUpdates
Update Promise and PromiseLike, fix async functions issues with never.
2016-06-21 18:09:28 -07:00
zhengbli 35c50bfb1f Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0 2016-06-21 17:13:21 -07:00
Ryan Cavanaugh 66c30931a9 Lint 2016-06-21 16:13:11 -07:00
Erik Edrosa 20f8c33e52 Change binding pattern parameter property error 2016-06-21 19:08:15 -04:00
Nathan Shively-Sanders 3a7396ea1c For optionality, check question token before JSDoc 2016-06-21 15:55:55 -07:00
Ryan Cavanaugh 0e3ffb5fbe Don't crash when JS class property is self-referential.
Fixes #9293
2016-06-21 15:40:26 -07:00
Bill Ticehurst 8ff2c1ad4f Fixed linting error 2016-06-21 14:00:42 -07:00
Bill Ticehurst 07bfbab6ff Changed implementation to use closure 2016-06-21 13:47:17 -07:00
Nathan Shively-Sanders 553d727148 Signatures use JSDoc to determine optionality 2016-06-21 13:01:26 -07:00
Yui 9a85b9369f Fix rwc-runner from breaking change in compiler (#9284) 2016-06-21 12:25:24 -07:00
Jason Ramsay 369253bbc4 Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
2016-06-21 11:46:49 -07:00
Erik Edrosa 1a66f54e89 Add error message for rest parameter properties 2016-06-21 14:27:14 -04:00
Erik Edrosa 392fe47478 Add new error for rest parameters 2016-06-21 14:27:14 -04:00
Bill Ticehurst 4d4f679ec4 Merge branch 'master' into loadJsFromModules 2016-06-21 09:03:38 -07:00
Andy Hanson 07437a6e7c Make goto-definition work for this parameter 2016-06-21 05:56:18 -07:00
Anders Hejlsberg a91f71488b Literal types for const enum members 2016-06-20 20:24:54 -07:00
Basarat Ali Syed 8e489cb2a4 export interface used by other exported functions 2016-06-21 11:45:42 +10:00
Wesley Wigham b103857b23
Merge branch 'master' into remove-jake 2016-06-20 16:33:01 -07:00
Wesley Wigham 0e5b741d42
Use merge2, gulp-if, gulp-newer, and more projects 2016-06-20 15:30:38 -07:00
Richard Knoll b49acd527a Merge branch 'master' into glob2_merged 2016-06-20 14:10:55 -07:00
Zhengbo Li 7b3abc682b Merge pull request #9213 from zhengbli/fixRealPath
ignore casing when converting a source file path to relative path
2016-06-20 14:07:09 -07:00
Andy 4d5d152788 Merge pull request #9220 from Microsoft/navbar_refactor_3000
Refactor navigation bar
2016-06-20 13:16:40 -07:00
zhengbli d9bd31fc52 Use getCanonicalFileName 2016-06-20 12:39:07 -07:00
Anders Hejlsberg a9309178c4 Introduce literal type locations 2016-06-20 12:14:42 -07:00
Andy Hanson 95cfaafdee Use implicit boolean casts; it doesn't hurt performance 2016-06-20 11:30:48 -07:00
Andy 420b920438 Merge pull request #9271 from Microsoft/classify_this
Classify `this` in parameter position as a keyword
2016-06-20 10:01:55 -07:00
Mohamed Hegazy 8b5616d297 Merge pull request #9176 from Microsoft/Fix9173-2
Clear out unused compiler options when transpiling
2016-06-20 09:54:58 -07:00
Andy Hanson c0eb472b62 Classify this in parameter position as a keyword 2016-06-20 08:28:55 -07:00
Andy Hanson e7acef125d Allow to find all references of the 'this 'keyword 2016-06-20 07:13:53 -07:00
Mohamed Hegazy 2ea7a1db3f Merge branch 'master' into AddLibCheckTests 2016-06-19 23:21:04 -07:00
zhengbli 634818cbac Add missing worker types 2016-06-18 20:35:52 -07:00
Mohamed Hegazy dfed7625af Add libcheck tests 2016-06-18 12:40:22 -07:00
Mohamed Hegazy f568ad0ce4 Add conditional index signature for Canvas2DContextAttributes (https://github.com/Microsoft/TypeScript/issues/9244) 2016-06-18 12:01:29 -07:00
Anders Hejlsberg 89596cb73b Numeric and boolean literal types 2016-06-18 07:21:23 -07:00
Daniel Rosenwasser 3fe546b9ea Merge pull request #9240 from Microsoft/mapBeDamned
Array#map -> ts.map.
2016-06-17 18:24:04 -07:00
Richard Knoll f817ffaf47 Merge branch 'master' into glob2_merged 2016-06-17 17:55:15 -07:00
Richard Knoll 95072aab82 Responding to PR feedback 2016-06-17 17:32:10 -07:00
Daniel Rosenwasser e9226af3f6 Array#map -> ts.map. 2016-06-17 17:18:16 -07:00
Richard Knoll 08ca1c0dff Merge branch 'master' into glob2_merged 2016-06-17 15:34:06 -07:00
Mohamed Hegazy 2b4378daa3 Merge pull request #9180 from HerringtonDarkholme/interface
[Fix #9004] Improve error message for extending interface
2016-06-17 15:29:26 -07:00
Mohamed Hegazy 11bb6c08b9 Merge branch 'master' into Fix9173-2 2016-06-17 15:21:43 -07:00
Zhengbo Li abe7c19e34 Merge pull request #9237 from zhengbli/updateDomJune17
Routine dom lib update
2016-06-17 14:52:54 -07:00
Anders Hejlsberg c7dec0ea68 Merge pull request #9163 from Microsoft/typeGuardDiscriminants
Discriminated union types
2016-06-17 14:37:35 -07:00
zhengbli 48a340f43c routine dom update 2016-06-17 13:02:26 -07:00
Jason Ramsay 218a5ba0bb Adding base indentation for script block formatting and smart indent 2016-06-17 13:02:15 -07:00
Andy Hanson 166bc49f0c Refactor navigation bar 2016-06-17 07:42:26 -07:00
Herrington Darkholme 877977a450 add new tests for extends interface 2016-06-17 11:07:18 +08:00
Herrington Darkholme 38962eea82 use resolveEntityName to find interface 2016-06-17 10:22:56 +08:00
Herrington Darkholme c721b5f981 add tests & add branches for module interface 2016-06-17 01:19:34 +08:00
Sheetal Nandi f96a7f03e4 Merge pull request #9166 from Microsoft/removeDotToken
Remove the stored dotToken from PropertyAccessExpression
2016-06-16 09:59:00 -07:00
zhengbli 478d76347b ignore casing when converting a source file path to relative path 2016-06-16 02:16:47 -07:00
Ron Buckton 90e344e457 Fix linter warning 2016-06-15 17:59:02 -07:00
Ron Buckton fb9806b5f9 Updates type definitions for Promise and PromiseLike, fixes issues in async functions due to introduction of never type.
Fixes #9193.
2016-06-15 17:36:27 -07:00
zhengbli 550d91249b Refactor code to make if statements cheaper 2016-06-15 16:52:07 -07:00
zhengbli 335443693f Merge branch 'master' of https://github.com/Microsoft/TypeScript into fixLargeProjectTry2
# Conflicts:
#	src/compiler/program.ts
#	tests/cases/unittests/tsserverProjectSystem.ts
2016-06-15 14:36:45 -07:00
Zhengbo Li 7bb739fa40 Merge pull request #9083 from zhengbli/i6853
Check use before declaration if both the use and decalration are not in module file
2016-06-15 12:43:30 -07:00
Zhengbo Li 8c38cbfb4b Merge pull request #9073 from zhengbli/i8523
Increase project reference count even when the opened file is referenced by it but not its root
2016-06-15 12:42:14 -07:00
Daniel Rosenwasser 9a2cf115c0 Merge pull request #9170 from Microsoft/emptyTupleAssertions
Correctly check types in type assertions
2016-06-15 12:35:04 -07:00
Mohamed Hegazy ce45ee797c Fix comment 2016-06-15 12:23:00 -07:00
Andy a1e0504ed4 Merge pull request #9189 from Microsoft/js_property_declaration
Allow property declarations in .js files
2016-06-15 12:20:41 -07:00
Mohamed Hegazy 97be083d99 Merge pull request #9100 from Microsoft/Fix9098
Fix #9098: report missing function implementation errors for merged …
2016-06-15 11:53:31 -07:00
Anders Hejlsberg a3a0c9877b Merge pull request #9188 from Microsoft/relaxLogicalAnd
Relax && operator typing
2016-06-15 11:07:54 -07:00
Andy Hanson dd0411a2f3 Allow property declarations in .js files 2016-06-15 09:42:52 -07:00
Anders Hejlsberg 6366a6d6a3 Remove String, Number, and Boolean from TypeFlags.Falsy 2016-06-15 09:28:28 -07:00
Andy Hanson 8a025fcff4 Use helper functions to simplify range tests 2016-06-15 09:05:15 -07:00
Herrington Darkholme 386fa3e1f6 improve error message for extending interface 2016-06-15 20:54:56 +08:00
Mohamed Hegazy da3333e967 Clear out unused compiler options when transpiling 2016-06-14 19:24:38 -07:00
Daniel Rosenwasser 52a96ac819 Always check type assertion types. 2016-06-14 19:13:32 -07:00
Mohamed Hegazy 784a76530c Fix #9173: clear out lib and types before creating a program in transpileModule 2016-06-14 17:44:57 -07:00
Nathan Shively-Sanders cc8d193d4a Calculate readonly? on union/intersection creation 2016-06-14 16:14:59 -07:00
Wesley Wigham 2634a6713e
Merge branch 'master' into remove-jake 2016-06-14 14:52:02 -07:00
Wesley Wigham 1defdc3847
Gulfile runs tests and compiles like a champ 2016-06-14 14:41:25 -07:00
Nathan Shively-Sanders a826892de1 Unions/intersections of readonly props are readonly 2016-06-14 13:23:08 -07:00
Anders Hejlsberg a3635ccd8b Merge branch 'master' into typeGuardDiscriminants
# Conflicts:
#	src/compiler/binder.ts
#	src/compiler/checker.ts
2016-06-14 13:08:17 -07:00
Daniel Rosenwasser c9bab058d5 Check tuple types when getting the type node's type. 2016-06-14 13:06:28 -07:00
Sheetal Nandi 30b387183c Merge branch 'master' into removeDotToken 2016-06-14 12:07:20 -07:00
Nathan Shively-Sanders 7890fd58b9 Merge pull request #9088 from Microsoft/add-members-to-variable-declarations-initialised-with-function-expressions
Add members to variable declarations initialised with function expressions
2016-06-14 11:37:36 -07:00
Nathan Shively-Sanders 57f66b8efa Merge pull request #9148 from Microsoft/add-isDefinition-to-references
Add isDefinition to references
2016-06-14 11:12:53 -07:00
Sheetal Nandi 5ea469a8a8 No Need to store dot token when parsing property access expression 2016-06-14 11:02:40 -07:00
Daniel Rosenwasser 8917ddf8a1 Merge pull request #9151 from Microsoft/commonjsShorthands
Fix emit for shorthand properties when they refer to CommonJS exports.
2016-06-14 10:32:20 -07:00
Nathan Shively-Sanders 102a890214 Use isLiteralComputedPropertyDeclarationName 2016-06-14 10:27:36 -07:00
Andy 13a0f5905d Merge pull request #9159 from Microsoft/code_completion_escaping
Code completion escaping
2016-06-14 10:21:40 -07:00
Andy Hanson 6b05ecab5b Fix bug: do unescaping in the right place, so that it only affects escaped javascript identifiers 2016-06-14 09:39:48 -07:00
Nathan Shively-Sanders 7bf40c4935 Add more isDefinition tests and fix computed property bug 2016-06-14 09:39:30 -07:00
Anders Hejlsberg 00376f42d8 Narrow non-union types to ensure consistent results 2016-06-14 09:33:15 -07:00
Nathan Shively-Sanders 792b23edc2 Make isDefinition required.
For the deprecated getOccurrencesAtPosition, isDefinition is always false.
2016-06-14 08:48:26 -07:00
Andy Hanson 1b4b01eed5 Unescape identifiers used in code completion 2016-06-14 08:13:55 -07:00
Andy Hanson 33e4c7a9a3 Respond to PR comment 2016-06-14 06:50:44 -07:00
Andy Hanson f6cee27af9 Emit 'Promise' decorator metadata return type for async methods 2016-06-14 06:11:00 -07:00
Andy b92a8f2b53 Merge pull request #9144 from Microsoft/decorator_metadata_rest_parameter
Fix decorator metadata emit for rest arg with no type
2016-06-14 05:43:24 -07:00
Wesley Wigham 9d023a83fe Merge pull request #9090 from weswigham/allow-empty-lists-command-line
Allow empty lists on command line
2016-06-14 00:29:15 -07:00
Daniel Rosenwasser eae289c7b7 Emit 'exports.' if the shorthand is a general export. 2016-06-13 23:33:47 -07:00
Ryan Cavanaugh f9923efd09 Merge pull request #9095 from RyanCavanaugh/implicitTypeReferences
Implicit type inclusion changes
2016-06-13 16:33:22 -07:00
Anders Hejlsberg c90b0fe17d No implicit returns following exhaustive switch statements 2016-06-13 16:20:13 -07:00
Ryan Cavanaugh 29f5291453 Refactor 2016-06-13 14:37:07 -07:00
Anders Hejlsberg ce156460eb Narrow type in case/default sections in switch on discriminant property 2016-06-13 14:29:04 -07:00
Ryan Cavanaugh b10d93291f Absolute-ify paths in both places 2016-06-13 14:20:31 -07:00
Nathan Shively-Sanders ac9e617e5e Test isDefinition 2016-06-13 13:23:32 -07:00
Nathan Shively-Sanders 5a7f7469ea Add isDefinition to ReferenceEntry
Clients can now easily tell if the reference is to a definition or a
usage.
2016-06-13 13:21:47 -07:00
Andy Hanson c0c707c37f Fix decorator metadata emit for rest arg with no type 2016-06-13 13:16:13 -07:00
Nathan Shively-Sanders 8b093128b3 Merge pull request #9036 from Microsoft/primitive-type-guards-are-order-independent
Primitive type guards are order independent
2016-06-13 10:52:06 -07:00
Mohamed Hegazy 6f63799151 Merge pull request #9129 from plantain-00/minor_fix_add_missing_return_clause
minor fix: add missing return clause
2016-06-13 10:21:17 -07:00
Ryan Cavanaugh 6702e651a3 CR changes 2016-06-13 10:15:29 -07:00
Ryan Cavanaugh e8ac1abbd6 Baseline fix, CR comments, lint 2016-06-13 09:33:49 -07:00
Yui fb050f17f6 Use camel-case instead of snake-case (#9134) 2016-06-13 09:23:37 -07:00
york yao 61534225e5 minor fix: add missing return clause 2016-06-13 18:48:39 +08:00
Mohamed Hegazy e86f1837d0 Fix #9098: report missing function impelementation errors for merged classes and namespaces 2016-06-11 13:12:08 -07:00
Anders Hejlsberg 4a8f94a553 Type guards using discriminant properties of string literal types 2016-06-10 16:17:32 -07:00
Ryan Cavanaugh 576f09f531 Merge 2016-06-10 15:47:51 -07:00
Ryan Cavanaugh 9827b638b4 Implicit type inclusion changes 2016-06-10 15:44:11 -07:00
Wesley Wigham d20459607b
Remove single-comma empty array form 2016-06-10 14:35:13 -07:00
Wesley Wigham a3a1c49739
Allow empty lists on command line 2016-06-10 14:14:32 -07:00
Nathan Shively-Sanders 642583771d Salsa: get members of variables whose initialisers are functions 2016-06-10 14:10:30 -07:00
tinza123 85ac67f4ee check the declaration and use order if both are not in module file 2016-06-10 11:07:01 -07:00
Mohamed Hegazy 97d7aa5fb5 Merge pull request #9042 from Microsoft/ES6ModulesES5Target
Fix #6319: Add support for `--t: es5` and  `--m es6`
2016-06-10 10:23:39 -07:00
Andy Hanson d973f4d701 Merge branch 'master' into shorthand_ambient_module 2016-06-10 06:08:16 -07:00
Andy Hanson ff6e025e8a Merge branch 'master' into shorthand_ambient_module 2016-06-10 06:03:54 -07:00
zhengbli 1e7790df06 Fix #8523 2016-06-10 03:44:44 -07:00
zhengbli e41b10bbc7 add test and spit commandLineParser changes to another PR 2016-06-10 02:06:31 -07:00
Jonathan Toland 6923cba29a Update more diagnostic messages ES6->2015
Fix #8996 CC @mhegazy.
2016-06-09 18:06:35 -10:00
zhengbli 4383f1a15f Refactoring 2016-06-09 16:28:42 -07:00
Nathan Shively-Sanders 2b46656b4a Merge pull request #9061 from Microsoft/fix-this-resolution-in-parameter-initializers
Fix this resolution in parameter initializers
2016-06-09 16:20:45 -07:00
Nathan Shively-Sanders 86a6959e2a Merge branch 'master' into primitive-type-guards-are-order-independent 2016-06-09 15:56:34 -07:00
Nathan Shively-Sanders a1e4b31d16 Allow null/undefined guard with null/undefined on left
Also add a test with baselines.
2016-06-09 15:48:35 -07:00
Sheetal Nandi a4991b9e98 Merge pull request #9057 from Microsoft/sourceRootWithInlineSources
Allow --sourceRoot with --inlineSources option
2016-06-09 15:38:21 -07:00
zhengbli d387050aaa Fix merging issues and multiple project scenario 2016-06-09 15:30:55 -07:00
Nathan Shively-Sanders e307295fb9 Resolve function-this in parameter initialisers when explicitly provided 2016-06-09 15:20:51 -07:00
Yui 574a64dec9 Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)
* Error when using async modifier in function-expression and arrow-function when target es5

* Add tests and baselines
2016-06-09 15:01:08 -07:00
zhengbli 94d44ad81d Merge branch 'master' of https://github.com/Microsoft/TypeScript into fixLargeProjectTry2
# Conflicts:
#	src/compiler/commandLineParser.ts
#	src/compiler/program.ts
#	src/compiler/sys.ts
#	src/compiler/types.ts
#	src/server/editorServices.ts
#	src/server/session.ts
2016-06-09 14:58:28 -07:00
Andy 9ffd00d6ff Merge pull request #8939 from Microsoft/pattern_ambient_modules
Allow wildcard ("*") patterns in ambient module declarations
2016-06-09 13:08:02 -07:00
Andy Hanson a88366d338 Merge branch 'master' into shorthand_ambient_module 2016-06-09 12:52:15 -07:00
Andy 302cea85ec Merge pull request #9054 from Microsoft/quick_info_meaning
Use proper method of not resolving alias
2016-06-09 12:37:05 -07:00
Nathan Shively-Sanders 0c64b0c24e this in parameter initializers resolves to class
Accept baselines now that the test passes.
2016-06-09 12:30:28 -07:00
Sheetal Nandi b521fd55a4 Allow --sourceRoot with --inlineSources option
Fixes #8445
2016-06-09 11:51:53 -07:00
Andy Hanson 75c1d77606 Merge branch 'master' into shorthand_ambient_module 2016-06-09 11:43:18 -07:00
Andy 512c6719ae Merge pull request #8895 from Microsoft/strip_extension
Allow an import of "foo.js" to be matched by a file "foo.ts"
2016-06-09 11:38:26 -07:00
Andy Hanson 03371c0e6f Improve perf 2016-06-09 11:12:12 -07:00
Andy Hanson 5e72b8a098 Undo change 2016-06-09 10:58:38 -07:00
Andy Hanson 7a2ef428cd Contextually type return statement in async function 2016-06-09 10:55:45 -07:00
Andy 75b82938f5 Merge pull request #8988 from Microsoft/transpile_options
Support using string values in enums for CompilerOptions in transpile
2016-06-09 09:04:23 -07:00
Andy Hanson 9ef9b743d1 Fix module loading error
(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)
2016-06-09 08:22:58 -07:00
Andy Hanson b08fe6f4f6 Use proper method of not resolving alias 2016-06-09 08:00:21 -07:00
Anders Hejlsberg 9e122909d4 Merge pull request #9031 from Microsoft/typeGuardIntersectionTypes
Type guard intersection types
2016-06-08 22:14:19 -07:00
Mohamed Hegazy 6446827886 addExportToArgumentListKind 2016-06-08 16:54:24 -07:00