Commit graph

17647 commits

Author SHA1 Message Date
Kanchalai Tanglertsampan
d103504ba6 Update tests anad baselines 2017-05-04 17:12:52 -07:00
Kanchalai Tanglertsampan
f619d5add4 Allow excess property in spread attributes but also check if any explicitly specified attributes are correct 2017-05-04 17:12:39 -07:00
Nathan Shively-Sanders
58e72fe1b6 Update baselines 2017-05-04 17:05:09 -07:00
Nathan Shively-Sanders
efe502e609 Address PR comments 2017-05-04 17:04:37 -07:00
Nathan Shively-Sanders
aceadeb04b Update baselines 2017-05-04 16:13:32 -07:00
Nathan Shively-Sanders
d35f6c3581 getNameOfDeclaration uniformly, including JS decls
JS-style assignment declarations have a name, but it's not stored on the
name property of the BinaryExpression. This commit adds
`getNameOfDeclaration` to uniformly get the name of a declaration.

It also reworks the declaration of `Declaration` so that accessing
`name` is an error unless the type does *not* include
BinaryExpression.
2017-05-04 16:12:54 -07:00
Sheetal Nandi
96aca4c7d0 Merge pull request #13540 from Microsoft/metadataReferences
Mark as referenced aliases in Union that will get emitted as part of decorator metadata
2017-05-04 15:04:13 -07:00
Yui T
ae06e12238 Wip-fixing spread type 2017-05-04 14:39:51 -07:00
Andy Hanson
705774e707 Remove tests that depended on exact number of jsdoc tag names 2017-05-04 14:38:06 -07:00
Andy Hanson
7dddcb816f Deduplicate jsDocTagNames and sort alphabetically 2017-05-04 14:16:09 -07:00
Andy
7fe1aba82a Merge pull request #15557 from Microsoft/unused-type-parameter
Mark type arguments as used even if used in an invalid way
2017-05-04 14:15:16 -07:00
Ron Buckton
500dd16bc1 Merge pull request #15590 from Microsoft/fix15471
Add check for tslib __await helper
2017-05-04 13:59:54 -07:00
Ron Buckton
6f357e5a6c Update baselines 2017-05-04 13:33:28 -07:00
Ron Buckton
cbeb11eabf Add check for tslib __await helper 2017-05-04 13:13:10 -07:00
Nathan Shively-Sanders
d2bdfbbf0a Merge pull request #15586 from Microsoft/fix-index-constraint-check-for-js-class-exprs
Add Javascript declarations to index constraint check error reporting
2017-05-04 12:55:55 -07:00
Andy Hanson
398d3aaf6c Symbol table for homomorphic mapped type: Don't needlessly create twice 2017-05-04 12:45:15 -07:00
Mohamed Hegazy
d9b459bc3d Merge pull request #15490 from SaschaNaz/allowArguments
Allow use of "arguments" on ambient context
2017-05-04 12:27:17 -07:00
Ron Buckton
e642691526 Merge pull request #15521 from Microsoft/fix15471
Fix over agressive async delegation
2017-05-04 11:30:26 -07:00
Anders Hejlsberg
a6dfd66fc1 Update tests 2017-05-04 10:20:13 -07:00
Anders Hejlsberg
4123068f19 Only get apparent type when constraint includes nullable types 2017-05-04 10:20:04 -07:00
Mohamed Hegazy
c1b180d43a Merge pull request #15577 from mleko/master
Remove @types/gulp-typescript dependency
2017-05-04 10:13:21 -07:00
Nathan Shively-Sanders
3e85ac0627 Test:index constraint check on js class expression 2017-05-04 10:12:49 -07:00
Nathan Shively-Sanders
49fd1ad80b Add JS declaration to index constraint check error reporting
Now Javascript-style declarations like `this.foo = "bar"` are handled
correctly.
2017-05-04 10:11:25 -07:00
Andy Hanson
8d8c4c2990 Reuse code from getTypeReferenceType 2017-05-04 08:42:56 -07:00
Daniel Król
ab7e59649b Remove @types/gulp-typescript dependency
gulp-typescript since 2.13 comes with types included
2017-05-04 09:19:07 +02:00
Anders Hejlsberg
238067eb3b Add tests 2017-05-03 21:28:17 -07:00
Anders Hejlsberg
3d069f7a54 New behavior only for type variables with nullable constraints 2017-05-03 21:28:03 -07:00
Yui
e1c97e104f Merge pull request #15568 from Microsoft/master-15455
[Master]  Fix #15455
2017-05-03 16:12:55 -07:00
Nathan Shively-Sanders
9eaf40bded Merge branch 'master' into spelling-correction 2017-05-03 15:34:32 -07:00
Nathan Shively-Sanders
0c10098c66 Fix case of suggestion blacklist.
It should be all lowercase since candidates have been lowercased by the
point the blacklist is checked.
2017-05-03 15:28:08 -07:00
Kanchalai Tanglertsampan
b1cfee2070 Add tests and baselines 2017-05-03 15:15:51 -07:00
Kanchalai Tanglertsampan
1e806cea01 For React Component class, we fill in missing type parameter and instantiate the constructor signature with the new type arguments. 2017-05-03 15:15:47 -07:00
Yui
975bc765c0 Merge pull request #15566 from Microsoft/master-fix15469
[Master]  Port fix15469
2017-05-03 15:08:00 -07:00
Anders Hejlsberg
34481640c5 Obtain apparent type before narrowing type variables 2017-05-03 14:52:28 -07:00
Nathan Shively-Sanders
5a7e967628 Blacklist some built-ins and improve max cutoff
The maximum distance cutoff was being checked after the close-enough
early exit. Now it's checked before.

Note that `null` doesn't show up in the globals list, so it's not part
of the blacklist either.
2017-05-03 14:48:23 -07:00
Nathan Shively-Sanders
2a7398b12a Include primitives in type-as-value error message
Previously, you would get the generic message when writing incorrect
code like `let y = number`. "Cannot find name 'number'". Now the message
says "'number' is a type but is used a value here."

Fixes #15565
2017-05-03 14:04:09 -07:00
Yui T
f3a3198bec Add tests and update baselines 2017-05-03 13:42:48 -07:00
Yui T
6d4f83f1b2 Update baseline 2017-05-03 13:42:43 -07:00
Yui T
1125657210 Don't stop checking other attributes even though we see spread type. This is so that things are correctly marked as reference and type-checked 2017-05-03 13:42:38 -07:00
Andy Hanson
99c18744d2 Add isCallOrNewExpression helper 2017-05-03 10:57:57 -07:00
Nathan Shively-Sanders
9bf5209632 Lower allowed length difference for suggestions
And update baselines
2017-05-03 10:46:00 -07:00
Nathan Shively-Sanders
4877343538 Reduce max number of spelling suggestions to 10 2017-05-03 10:10:13 -07:00
Andy Hanson
c61a371e62 Make TokenRange an interface and remove ITokenAccess delegation 2017-05-03 10:07:27 -07:00
Nathan Shively-Sanders
ee1edf0421 Lower allowed levenshtein distance for suggestions
And update baselines
2017-05-03 09:42:19 -07:00
Andy Hanson
ac7429535e Mark type arguments as used even if used in an invalid way 2017-05-03 09:10:49 -07:00
Arthur Ozga
78df75426f Merge pull request #15542 from aozgaa/importFixesOrganization
move import getCodeActions into named method
2017-05-02 17:27:17 -07:00
Arthur Ozga
4c0735218e move import getCodeActions into named method 2017-05-02 15:52:17 -07:00
Andy Hanson
e12b708221 For completions of union type, get all possible properties 2017-05-02 15:38:15 -07:00
Ron Buckton
729c1e19ab __asyncDelegator cleanup 2017-05-02 15:00:56 -07:00
Andy
ad76338acd Merge pull request #15528 from Microsoft/async-computed-method
Fix formatting for async computed method: Allow space between 'async' and '['
2017-05-02 14:24:40 -07:00