Commit Graph
21166 Commits
Author SHA1 Message Date
Nathan Shively-Sanders 7dbea0e82d Merge branch 'master' into fix2-getConstraintOfIndexedAccess 2018-01-10 12:40:35 -08:00
Wesley WighamandGitHub ee87cf409b Print the correct type in the top level chain as the message indicates (#21127) 2018-01-10 11:41:14 -08:00
Sheetal NandiandGitHub ef5b171be2 Merge pull request #21107 from Microsoft/inferredProjectTypings
Use the currentDirectory of the project as projectRootPath in the typings request
2018-01-10 11:40:30 -08:00
AndyandGitHub 102368332e Use 'append' helper more (#21125) 2018-01-10 11:31:13 -08:00
AndyandGitHub ddd8e759c1 Use 'append' helper (#21101) 2018-01-10 11:13:47 -08:00
Priyantha LankapuraandMohamed Hegazy 743d8dbe0a Fix to remove extra space between function and array index. (#21113)
https://github.com/Microsoft/TypeScript/issues/21111
2018-01-10 09:30:35 -08:00
falsandtruandMohamed Hegazy da593ca7a8 Fix WeakSet interface (#19756) 2018-01-09 22:06:06 -08:00
Wesley WighamandGitHub c9ef52b9d8 Do not always instantiate jsx signatures (#21108) 2018-01-09 17:22:19 -08:00
Sharon RolelandMohamed Hegazy c0bdd12c4c add fixAwaitInSyncFunction code fix (#21069)
* add fixAwaitInSyncFunction code fix

* Just insert the keyword

* only one codefix

* remove comment

* Change explicit return type T to Promise<T>

* Review changes

* Change codefix message
2018-01-09 17:15:08 -08:00
Stanislav IlievandMohamed Hegazy 03fd77657d Issue implicit any errors for mapped types without annotations (#21104)
* Fixed #21011

* Updated code of merged message

* Reversed message code change and moved error to it's appropriate position

* Applied suggested improvements

* Fixed wrong diagnostics message in checker

* Reverted diagnostic message change
2018-01-09 17:11:57 -08:00
Sheetal Nandi 667751df2a When sending typings request use project's current directory as project root path
This ensures that we arent picking typings from folder different from the current directory for the project
2018-01-09 15:59:56 -08:00
Sheetal Nandi 90a1df9d92 Add test for failure to use correct current directory in inferred project
Test for #21040
2018-01-09 15:59:55 -08:00
AndyandGitHub 8bce69e6bd Add refactoring to convert CommonJS module to ES6 module (#19916)
* Add refactoring to convert CommonJS module to ES6 module

* Code review

* includeGlobals -> excludeGlobals

* Improve handling of `module.exports = require("...")`

* Allow NoSubstitutionTemplateLiteral as argument to createLiteral
2018-01-09 13:15:47 -08:00
AndyandGitHub 9aa99b90c7 Include directories in completions for path mapping (#21103) 2018-01-09 13:15:30 -08:00
AndyandGitHub fed34cd616 Fix bug: normalize path after combining (#21100) 2018-01-09 11:54:35 -08:00
AndyandGitHub 191b9750c3 Clear jsDocCache for reused nodes (#21099) 2018-01-09 11:22:15 -08:00
AndyandGitHub 82fb294924 For import fix, support path mapping value that begins in "./" or ends in ".ts" (#21035)
* For import fix, support path mapping value that begins in "./" or ends in ".ts"

* Handle repeated "./" in path

* Rename parameters to indicate that they're relative to baseUrl

* Support relative path beginning with `..\`

* Remove unused function
2018-01-09 10:34:35 -08:00
Wesley WighamandGitHub fdd8a52240 Offer per-member diagnostics for incorrectly implemented inherited members (#21036)
* Offer per-member diagnostics for incorrectly implemented inherited members on classes

* Revise error message, make containingChain a thunk

* Fix typo in comment
2018-01-09 10:20:07 -08:00
Andrew CaseyandMohamed Hegazy ba979fa537 Delete redundant test (#21085)
The same test already exists for TS.
2018-01-09 10:11:28 -08:00
AndyandGitHub 5ab5694a5b Don't count self-reference in more cases (skip more nodes when setting lastNonBlockLocation) (#21095) 2018-01-09 09:53:39 -08:00
Wenlu WangandMohamed Hegazy 062f97a6fa allow const enum in type query (#21083) 2018-01-09 09:24:00 -08:00
Andrew CaseyandGitHub ef5a289966 Merge pull request #21014 from amcasey/GH19115
Handle different default export forms the same way in import code fixes
2018-01-08 19:07:43 -08:00
AndyandGitHub 89ceb4b9b5 Support completions that require changing from dot to bracket access (#20547)
* Support completions that require changing from dot to bracket access

* Use insertText and replacementSpan

* Rename includeBracketCompletions to includeInsertTextCompletions

* Don't add completions that start with space
2018-01-08 18:57:46 -08:00
Remo H. JansenandMohamed Hegazy 73e3e8d790 Fixes #20026 (#20157)
* Added test case for #20026

* Implemented #20026

* Addresed comments at Microsoft/TypeScript/pull/20157#discussion_r152086287

* Fixed merge issues

* Fixed baseline issue

* Merged upstream
2018-01-08 17:25:56 -08:00
AndyandGitHub c4d76292f1 Ensure visitor visits the awaitModifier of a ForOfStatement (#21078) 2018-01-08 17:22:32 -08:00
Wesley WighamandGitHub 9efb3ac3a7 Fix this.timeout not actually applying the timeout within it blocks (#21079) 2018-01-08 16:52:58 -08:00
AndyandMohamed Hegazy 37d4f6a69d Mark references to dynamically-named properties as used (#21010)
* Mark references to dynamically-named properties as used

* Avoid showing the symbol ID

* Use symbolToString instead of showSymbol
2018-01-08 16:44:58 -08:00
Wesley WighamandGitHub 7e6315075d Synthesize namespace records for proper esm interop (#19675)
* Integrate importStar and importDefault helpers

* Accept baselines

* Support dynamic imports, write helpers for umd module (and amd is possible) kinds

* Accept baselines

* Support AMD, use same helper initialization as is normal

* update typechecker to have errors on called imported namespaces and good error recovery with a quickfix

* Overhaul allowSyntheticDefaultExports to be safer

* Put the new behavior behind a flag

* Rename strictESM to ESMInterop

* ESMInterop -> ESModuleInterop, make default for tsc --init

* Rename ESMInterop -> ESModuleInterop in module.ts, add emit test (since fourslash doesnt do that)

* Remove erroneous semicolons from helper

* Reword diagnostic

* Change style

* Edit followup diagnostic

* Add secondary quickfix for call sites, tests forthcoming

* Add synth default to namespace import type, enhance quickfix

* Pair of spare tests for good measure

* Fix typos in diagnostic message

* Improve comment clarity

* Actually accept the updated changes to the esmodule interop description

* ESModule -> esModule

* Use find and not forEach

* Use guard

* Rely on implicit falsiness of Result.False

* These should have been emit flags
2018-01-08 16:36:23 -08:00
AndyandGitHub 859f0e3070 Add noDoubleSpaceRule to jakefile (#21077) 2018-01-08 15:44:33 -08:00
AndyandMohamed Hegazy 39dfeb0176 Add stricter parameter types for Object.values and Object.entries (#20553)
* Add stricter parameter types for Object.values and Object.entries

* Use mapped type and constrain 'T extends object'

* Revert everything but change to parameter types
2018-01-08 15:33:33 -08:00
Mohamed Hegazy 2869657da7 Update failing test 2018-01-08 15:22:14 -08:00
Mohamed Hegazy 30c1419ebc Merge branch 'jwbay-import-quickinfo' 2018-01-08 15:11:21 -08:00
Mohamed Hegazy 9ece1a5dd3 Merge branch 'master' of https://github.com/Microsoft/TypeScript 2018-01-08 15:00:14 -08:00
benbraouandMohamed Hegazy 804eb32208 feat(es2018): add definitions for Array.prototype.flatten and Array.prototype.flatMap (#20431)
* bug(esnext): add definitions for flatten and flatMap

Fixes #20410

* bug(esnext) add overloads for flatten
2018-01-08 14:59:37 -08:00
Mohamed HegazyandGitHub 00d4acaad2 Port generated lib files (#21076) 2018-01-08 14:57:31 -08:00
Mohamed Hegazy 24114d8c05 Merge branch 'master' of https://github.com/Microsoft/TypeScript 2018-01-08 14:57:26 -08:00
AndyandGitHub a23bbe65e6 Use substring instead of substr (#20578)
* Use substring instead of substr

* Remove unused scanning of SyntaxKind.DotDotDotToken in jsdoc

* Remove other unnecessary jsdoc syntax kinds

* Move all pos++ together
2018-01-08 14:54:18 -08:00
Mohamed Hegazy 45a10c8401 Merge branch 'import-quickinfo' of https://github.com/jwbay/TypeScript into jwbay-import-quickinfo 2018-01-08 14:43:56 -08:00
Mohamed Hegazy bd6249542f Merge branch 'benbraou-issue20410' 2018-01-08 14:42:57 -08:00
Mohamed Hegazy 1235f78232 Merge branch 'issue20410' of https://github.com/benbraou/TypeScript into benbraou-issue20410 2018-01-08 14:42:51 -08:00
AndyandMohamed Hegazy 464df8f699 Fix build failure with newest @types/mocha (#21075) 2018-01-08 14:34:09 -08:00
Wesley WighamandGitHub b1a0261575 If declaration emit input is a module, output should be a module (#20626) 2018-01-08 13:58:34 -08:00
Wesley WighamandGitHub b2f2610b85 Use getInternalName not getLocalName (#20168) 2018-01-08 13:55:50 -08:00
Jing MaandMohamed Hegazy 16a882eb8b Optimized annotation according to Spec (#19906) 2018-01-08 13:44:49 -08:00
falsandtruandMohamed Hegazy b18ee65418 Add Related section (#20151) 2018-01-08 13:35:28 -08:00
Mohamed HegazyandGitHub c632e44350 Merge branch 'master' into issue20410 2018-01-08 13:28:59 -08:00
Wenlu WangandMohamed Hegazy 7154df10df add support for insertSpaceBeforeTypeAnnotation (#20466) 2018-01-08 13:25:02 -08:00
Daniel RosenwasserandGitHub 6d596c058e Merge pull request #20726 from kujon/indexable_types
Improved error messaging for index signature parameters
2018-01-08 13:23:39 -08:00
Wenlu WangandMohamed Hegazy 0ecdc876f3 imporve conditional operator if missing colon token (#20498)
f2
2018-01-08 13:16:17 -08:00
Wenlu WangandMohamed Hegazy a82d1f8580 ignore Initial check if left of DestructuringAsignment (#20906) 2018-01-08 13:13:23 -08:00