Commit Graph
4929 Commits
Author SHA1 Message Date
AndyandGitHub 12f3d0d54c Enable --strictPropertyInitialization (#27558)
* Enable --strictPropertyInitialization

* Code review
2018-11-16 16:02:23 -08:00
Nathan Shively-SandersandGitHub ea8ccc2ce4 In JS, constructor functions infer from call+construct (#28353)
* constructor functions infer from call+construct

Also fix an incorrect combining of inferences for rest parameters: the
inferred types will be arrays in the body of the function and the
arguments from outside the function will be the element type.

* All functions infer from call+construct contexts
2018-11-16 09:51:07 -08:00
AndyandGitHub a6ef176dbb Consistently return 'void' from ChangeTracker methods (#28563) 2018-11-16 08:58:00 -08:00
AndyandGitHub b059135c51 When adding relative completions with rootDirs, still add completions for regular relative imports (#28561) 2018-11-15 15:11:27 -08:00
Klaus MeinhardtandNathan Shively-Sanders 1ad7b0fe69 forEachToken: correctly handle JSDocTag (#28369)
* forEachChild: handle JSDocTags and all their children

* fix codefix for unused identifier

* fix lint

* fix build

* Fix test failures
2018-11-15 13:22:25 -08:00
Nathan Shively-SandersandGitHub 6cee7c3080 Better nameless parameter implicit any error (#28554)
* Initial version, doesn't work for primitives yet.

Need to find out why.

* Primitives now work, plus improve error message

null and void don't even parse without parameter names so they are not
tested.

* Codefix: Add names to nameless parameters

* Improve error wording

* Add detail to error message
2018-11-15 12:45:39 -08:00
Nathan Shively-SandersandGitHub 7a7328a17f string|number inferences are low priority (#28381)
* string|number inferences are low priority

Also, refactor unifyFromContext to explicitly handle priorities

* string/number/strnum are not mutually exclusive

* Assert that high/low can't apply to same element
2018-11-15 08:32:28 -08:00
AndyandGitHub 2600250a24 Add 'bigint' to type keywords (#28537) 2018-11-14 22:18:05 -08:00
Daniel RosenwasserandGitHub fe263708be Merge pull request #27019 from iliashkolyar/codefix_add_missing_new_operator
Codefix: add quick fix for missing 'new' operator
2018-11-14 16:53:25 -08:00
AndyandGitHub da37457c72 When renaming an imported symbol, rename only in current file (#28406)
* When renaming an imported symbol, rename only in current file

* Improve re-export references

* Remember to use 'range' in for loop

* Uncomment tests
2018-11-14 09:09:00 -08:00
Wesley WighamandGitHub d99de73e85 Handle type argument lists as jsx completion starts (#28493)
* Handle type argument lists as jsx completion starts

* preceeding -> preceding
2018-11-12 16:30:04 -08:00
Wesley WighamandGitHub 11eee2b6ee Slightly improve missing property errors (#28298)
* Slightly improve missing property errors

* Add missing quote

* Fix jsx case

* Add related span

* Fix crash (why can declarations be undefined)

* Only skip top elaboration when no variant message is provided
2018-11-12 14:31:15 -08:00
AndyandGitHub fe1ba9bee3 Improvements to generateTypes (#28458)
* Improvements to generateTypes

* createProperty only if necessary
2018-11-12 11:50:48 -08:00
AndyandGitHub 0077016c63 Reduce duplicate code in getListByRange (#28455) 2018-11-12 09:43:40 -08:00
Sheetal NandiandGitHub d569743640 Merge pull request #28194 from iliashkolyar/add_missing_apostrophe_in_codefix
Add missing apostrophe to codefix suggestion
2018-11-12 09:31:24 -08:00
Sheetal NandiandGitHub d6df82a77c Merge pull request #28454 from Microsoft/codeFixAfterPrologue
Include code fix after prologue
2018-11-09 16:56:43 -08:00
Sheetal Nandi c60ff902f1 Include code fix after prologue
Fixes #15515
2018-11-09 16:02:16 -08:00
iliashkolyar 047b76f979 Merge branch 'master' into codefix_add_missing_new_operator 2018-11-10 01:45:11 +02:00
Daniel RosenwasserandGitHub 02ca5bebbf Merge pull request #28340 from saschanaz/listindent-revive
List position based formatting
2018-11-09 15:34:16 -08:00
Ron BucktonandGitHub 50a0174582 Merge pull request #27629 from Microsoft/sourceMapGenerator
Simplify source map generation
2018-11-09 14:50:22 -08:00
Daniel RosenwasserandGitHub 2585ccbe39 Merge pull request #28281 from ryanclarke/master
Add codefix for 'convert to unknown' diagnostic
2018-11-09 14:43:25 -08:00
AndyandGitHub e335a360c8 Change 'if' in combined switch case to two separate cases (#28444) 2018-11-09 12:48:47 -08:00
Ron Buckton 151dc074a8 Merge branch 'master' into sourceMapGenerator 2018-11-09 11:50:51 -08:00
AndyandGitHub aaf1d8055b Support finding references at module in module.exports = or export in export = (#28221)
* Support finding references at `module` in `module.exports =` or `export` in `export =`

* Add json test
2018-11-09 09:38:45 -08:00
Markus Wolf 499bed540b Better reference usage detection 2018-11-09 09:45:20 +01:00
Markus Wolf 6bd298b884 add test for remove modifier and parameter 2018-11-09 09:45:12 +01:00
Markus Wolf 13e85ac3a9 add more modifiers 2018-11-09 09:45:12 +01:00
Markus Wolf de7faa1b7e Remove obsolte ts namespace 2018-11-09 09:45:11 +01:00
Markus Wolf e6e71978df Correct codefix by removing private modifier
In case of private attribute and private constructor parameter with
assignment in the constructor body, the parameter is flagged as unused.
This is caused by the private modifier which is shadowed by the
explicity assignment in the body.
This commit updates the codefix to just remove the private modifier in
this cases.

Closes #24931
2018-11-09 09:45:11 +01:00
Kagami Sascha Rosylight 7995f9153a apply suggested changes 2018-11-09 11:26:58 +09:00
Sheetal NandiandGitHub c0587191fc Merge pull request #28418 from ajafff/internal-comments
remove even more internal comments
2018-11-08 14:58:33 -08:00
Sheetal NandiandGitHub b534fb4849 Merge pull request #27980 from EECOLOR/leading-slash-imports
match leading slash imports with path mappings - fixes #13730
2018-11-08 09:20:45 -08:00
Ryan Clarke ecb88f5a3e Fix comments on pull request 2018-11-07 21:43:02 -05:00
EECOLOR 1a9c20949e path mappings now supports rooted disk paths and urls - fixes #13730 2018-11-07 22:19:04 +01:00
Sheetal Nandi ab4be8da42 Fix the issue with file being included in the referencing project on rename when it wasnt included earlier
Fixes #28307
2018-11-07 11:30:39 -08:00
Sheetal Nandi 1d87250573 Fix the issue with file being included in the referencing project on rename when it wasnt included earlier
Fixes #28043
2018-11-07 09:48:27 -08:00
Klaus Meinhardt e2947fac1c remove even more redundant internal comments 2018-11-07 16:12:48 +00:00
Sheetal Nandi f0f02754f3 Change type of metadata to unknown 2018-11-06 18:45:08 -08:00
Sheetal Nandi 4a51f12c3e Add metadata to response if it exists for results from language service.
Currently its wired through for completions requests.
Handles #21999
2018-11-06 15:06:54 -08:00
Daniel RosenwasserandGitHub 41d3f0ad57 Merge pull request #28071 from pesca/improveCodeFix
Improve code fix for missing members
2018-11-06 11:29:51 -08:00
AndyandGitHub 772f6cdf48 Remove JSDocTag#atToken (#28376) 2018-11-06 09:54:23 -08:00
Caleb Sander 28e9ec497c Address review comments 2018-11-05 11:36:32 -08:00
Caleb Sander ac2a118f07 Add bigint type 2018-11-05 11:36:31 -08:00
Nathan Shively-SandersandGitHub 4cb210ce2e Parameters infer from body and call sites (#28342)
* Parameters infer from body usage and call sites

* Function expressions infer from variable decl usages

If the function expression is the initialiser of a variable declaration.

* Update isApplicableFunctionForInference too

* Update baseline
2018-11-05 11:29:16 -08:00
Kagami Sascha Rosylight 7fa447b56f strict types 2018-11-05 21:45:19 +09:00
Kagami Sascha Rosylight ac517336c4 indent using list start position 2018-11-05 21:45:18 +09:00
Kagami Sascha Rosylight 655bf203d0 indent using list start position before first list item 2018-11-05 21:45:18 +09:00
Kagami Sascha Rosylight cd19a8910d add getListByPosition 2018-11-05 21:45:18 +09:00
Kagami Sascha Rosylight d7f1935c30 remove deprecated function 2018-11-05 21:45:18 +09:00
Kagami Sascha Rosylight 7561ec0f39 use last line indentation on formatter
... and add explicit delta suppressor for list end tokens
2018-11-05 21:45:18 +09:00