Daniel Rosenwasser
4b736da231
Fixed issue in test.
2015-10-02 16:30:22 -07:00
Daniel Rosenwasser
315b06dc99
Accepted baselines.
2015-10-02 16:09:57 -07:00
Daniel Rosenwasser
d8d72aabae
Separated the concept of apparent types from contextual types for string literal types.
...
In most cases, expressions are interested in the apparent type of the
contextual type. For instance:
var x = { hasOwnProperty(prop) { /* ... */ };
In the above, 'prop' should be contextually typed as 'string' from the
signature of 'hasOwnProperty' in the global 'Object' type.
However, in the case of string literal types, we don't want to get the
apparent type after fetching the contextual type. This is because the
apparent type of the '"onload"' string literal type is the global 'String'
type. This has adverse effects in simple assignments like the following:
let x: "onload" = "onload";
In this example, the right-hand side of the assignment will grab the type
of 'x'. After figuring out the type is "onload", we then get the apparent
type which is 'String'. This is problematic because when we then check the
assignment itself, 'String's are not assignable to '"onload"'s.
So in this case, we grab the contextual type *without* getting its
apparent type.
2015-10-02 16:05:32 -07:00
Daniel Rosenwasser
7b4e94dbd5
Accepted baselines.
2015-10-02 15:42:16 -07:00
Daniel Rosenwasser
f721971063
Capture compatible contextual types for unions containing string literals.
2015-10-02 15:41:12 -07:00
Daniel Rosenwasser
87f2957e4d
Accepted baselines.
2015-10-02 15:23:53 -07:00
Daniel Rosenwasser
20c2c4e5e5
Amended fourslash tests to expect double quotes.
2015-10-02 15:22:35 -07:00
Daniel Rosenwasser
a3e7ccb108
Use normalized text for text on string literal types.
2015-10-02 15:00:46 -07:00
Daniel Rosenwasser
ed927d8cf6
Accepted baselines.
2015-10-01 16:58:17 -07:00
Daniel Rosenwasser
82545ce854
Added test for string types in tuples.
2015-10-01 16:58:03 -07:00
Daniel Rosenwasser
8891fba149
Accepted baselines.
2015-10-01 16:47:31 -07:00
Daniel Rosenwasser
dc0e368f82
Make string literals valid types in type lists.
2015-10-01 16:45:48 -07:00
Daniel Rosenwasser
84786d82c1
Accepted baselines.
2015-10-01 16:33:08 -07:00
Daniel Rosenwasser
191be4f8fe
Make string literals valid constituent types nodes in the parser.
2015-10-01 15:55:36 -07:00
Daniel Rosenwasser
f04cc39a68
Accepted baselines.
2015-10-01 15:54:16 -07:00
Daniel Rosenwasser
911e907306
Added test for string literal types in type arguments.
2015-10-01 15:26:48 -07:00
Daniel Rosenwasser
311a0cff55
Added tests.
2015-09-25 17:38:07 -07:00
Daniel Rosenwasser
d9559d58ca
Merge branch 'grabParamsFromInitializers'
2015-09-25 17:11:33 -07:00
Daniel Rosenwasser
2692cde712
:%s/apst/apt
2015-09-25 17:10:58 -07:00
Daniel Rosenwasser
6bfc28f883
Try to grab parameters for single-declaration variable statements.
...
We only do this for a (parenthesized) function expression, arrow function,
or class expression with a constructor.
In the presence of a class expression, if there are multiple constructor
declarations, the parameters are acquired from the first one.
2015-09-25 16:30:26 -07:00
Daniel Rosenwasser
7b7e62ce72
Modified/added tests.
2015-09-25 16:27:58 -07:00
Daniel Rosenwasser
0ab9536f73
Merge pull request #4978 from Microsoft/expandDocTemplateCoverage
...
Expand JSDoc template generation locations (to 'master')
2015-09-25 15:28:28 -07:00
Daniel Rosenwasser
a458d4b2f4
Amended comments.
2015-09-25 13:59:47 -07:00
Wesley Wigham
76ef9ce2f3
Merge pull request #4973 from weswigham/4699-fix
...
#4699 fix
2015-09-25 11:49:58 -07:00
Daniel Rosenwasser
43a6eb8171
Switched parameter name to array binding pattern.
2015-09-25 11:43:29 -07:00
Wesley Wigham
031240fd42
Yeah.
2015-09-25 11:39:42 -07:00
Wesley Wigham
ff4c20c0de
Remove postinstall, make it manual, make sure jakefile is in gitignore
2015-09-25 11:26:41 -07:00
Wesley Wigham
106b32d97b
Better messages.
2015-09-25 11:07:03 -07:00
Wesley Wigham
c88ba9bbe9
Run linking script only if present
2015-09-25 10:59:01 -07:00
Vladimir Matveev
b866781609
Merge pull request #4946 from Microsoft/constInitializersInEnums
...
align behavior of constant expressions in initializers of ambient enu…
2015-09-24 21:49:35 -07:00
Wesley Wigham
b786687af8
Merge pull request #4961 from weswigham/repo-hooks
...
Git post-checkout hook
2015-09-24 17:56:54 -07:00
Daniel Rosenwasser
81dabb4d51
Ensure that doc comments don't appear between dotted names.
...
Also updated TODO
2015-09-24 17:11:05 -07:00
Daniel Rosenwasser
08e2b0a159
Added tests for dotted namespace declarations, object literal methods.
2015-09-24 17:09:16 -07:00
Wesley Wigham
29f7c2c9c8
intentation is powerful
2015-09-24 17:07:02 -07:00
Wesley Wigham
9984ae9000
We can go simpler
2015-09-24 17:04:57 -07:00
Wesley Wigham
e747bf2b36
fix hook
2015-09-24 17:02:10 -07:00
Wesley Wigham
758e4402da
Add git hooks
2015-09-24 17:00:27 -07:00
Daniel Rosenwasser
67b44b59c0
Add JSDoc to methods, constructors, classes, and namespace/module declarations.
2015-09-24 16:40:13 -07:00
Daniel Rosenwasser
7f4f461a84
Amended tests.
2015-09-24 16:30:40 -07:00
Daniel Rosenwasser
1545ab56f3
Use a loop because reduce is unreadable.
2015-09-24 16:01:47 -07:00
Anders Hejlsberg
bcea3594a3
Merge pull request #4956 from Microsoft/bindingElementContextualTyping
...
Fix parameter destructuring issues
2015-09-24 15:55:37 -07:00
Anders Hejlsberg
80e3b72816
Adding repro from #4818 to test
2015-09-24 15:46:00 -07:00
Daniel Rosenwasser
b2821c5321
Added tests for JSDoc comment templates on other declarations/statements.
2015-09-24 15:00:51 -07:00
Anders Hejlsberg
eb73565429
Adding tests
2015-09-24 13:52:19 -07:00
Anders Hejlsberg
1a26789615
Properly propagate contextual types into parameter destructuring elements
2015-09-24 13:35:12 -07:00
Wesley Wigham
dd660dca39
Merge pull request #4811 from weswigham/es6-module-type
...
Support modules when targeting ES6 and an ES6 ModuleKind
2015-09-24 12:09:58 -07:00
Vladimir Matveev
fa3d9f3997
align behavior of constant expressions in initializers of ambient enum members with spec
2015-09-23 21:30:27 -07:00
Anders Hejlsberg
a292da593b
Check if binding element already has been assigned a contextual type
2015-09-23 14:45:09 -07:00
Vladimir Matveev
5a77d67b63
Merge pull request #4921 from Microsoft/implementsAsIdentifier
...
disambiguate: 'implements' starts heritage clause vs 'implements' is …
2015-09-22 09:13:37 -07:00
Vladimir Matveev
1482adeb75
Merge pull request #4919 from Microsoft/removeUnusedCode
...
[cleanup] removed duplicate function implementation
2015-09-22 09:13:18 -07:00