Commit Graph

7690 Commits

Author SHA1 Message Date
Anders Hejlsberg f55b3ef87a Preserve modifiers in isomorphic mapped types 2016-11-29 12:48:41 -08:00
Anders Hejlsberg c89b1eb9e9 Merge pull request #12386 from mariusschulz/union-and-intersection-types-with-leading-operator
Union and intersection types with leading operator
2016-11-28 15:57:24 -08:00
Anders Hejlsberg 5dd4c9ef54 Merge pull request #12528 from Microsoft/mappedTypeInference
Type inference for isomorphic mapped types
2016-11-28 13:30:45 -08:00
Anders Hejlsberg 9065b50172 getRegularTypeOfLiteralType before exhaustive switch check 2016-11-28 10:53:25 -08:00
Anders Hejlsberg 3e1b443d77 Deduplicate intersection types before distributing over union types 2016-11-28 09:34:50 -08:00
Anders Hejlsberg 9970606f35 Remove unused code in resolveMappedTypeMembers 2016-11-27 19:58:05 -08:00
Anders Hejlsberg 8ee5f7d64f Remove unused case in type inference 2016-11-27 19:49:57 -08:00
Anders Hejlsberg ecd10be177 Reorder type inference cases 2016-11-27 12:48:59 -08:00
Anders Hejlsberg 0a1a3eced4 Merge branch 'master' into mappedTypeInference
# Conflicts:
#	src/compiler/checker.ts
2016-11-26 18:39:27 -08:00
Anders Hejlsberg 88b7d53978 Merge pull request #12515 from Microsoft/fixMappedTypeInference
Include mapped types in type inference infinite recursion check
2016-11-26 18:14:18 -08:00
Anders Hejlsberg 283c50c183 Merge pull request #12514 from Microsoft/keyofAndForIn
Fix issues related to 'keyof' with 'for-in' and 'in' operator
2016-11-26 18:14:00 -08:00
Mohamed Hegazy 5ab2fec6e5 Merge pull request #12482 from wittydeveloper/fix-generateClassElementDecorationExpression-documentation
doc(compiler/ts): fix documentation typo in generateClassElementDecorationExpression()
2016-11-26 14:45:12 -08:00
Anders Hejlsberg f2c32d251f Include mapped types in type inference infinite recursion check 2016-11-26 12:17:19 -08:00
Anders Hejlsberg 46ca0ba41e Fix multiple 'keyof' issues with 'for-in' and 'in' operator 2016-11-26 09:58:44 -08:00
Charly POLY 7b37918a11 doc(compiler/ts): fix documentation typo about __decorator code generation
When __decorator applied to method, the last parameter (descriptor)
is null, not undefined
2016-11-24 10:16:21 +01:00
Anders Hejlsberg 36ad772c55 Type inference for isomorphic mapped types 2016-11-23 20:07:53 -08:00
Anders Hejlsberg cdda5dfd61 keyof T is a literal contextual type 2016-11-23 18:22:57 -08:00
Anders Hejlsberg e128add54e Merge pull request #12447 from Microsoft/mappedTypesAndUnions
Isomorphic mapped types and unions
2016-11-23 17:36:44 -08:00
Sheetal Nandi 20a8a30b76 Instead of creating clone of the jsxFactory's leaf node, create synthesized node
Fixes #12467
This avoid setting original node which would be something from isolated parsing and hence not valid when resolving expression
2016-11-23 12:26:02 -08:00
Sheetal Nandi 79bf477b67 Revert "Instead of creating clone of the jsxFactory's leaf node, create synthesized node"
This reverts commit 4e7313b4f6.
2016-11-23 12:24:44 -08:00
Sheetal Nandi 4e7313b4f6 Instead of creating clone of the jsxFactory's leaf node, create synthesized node
Fixes #12467
This avoid setting original node which would be something from isolated parsing and hence not valid when resolving expression
2016-11-23 12:22:28 -08:00
Daniel Rosenwasser 4701eb70e2 Merge pull request #12357 from mylesmegyesi/12075-incorrectErrorMessageForUseOfTypeAsNamespace
Fixes error message when Type is used as a Namespace
2016-11-23 11:08:38 -05:00
jramsay 855431a943 Merge pull request #12373 from Microsoft/RenameTypingOptions
Rename typingOptions.enableAutoDiscovery to typeAcquisition.enable
2016-11-22 17:22:30 -08:00
Jason Ramsay 2b89d919a0 Addressing CR feedback 2016-11-22 17:08:43 -08:00
Anders Hejlsberg 864e1797d9 Merge pull request #12396 from Microsoft/getTypeOfExpression
Introduce 'getTypeOfExpression' function
2016-11-22 15:33:37 -08:00
Anders Hejlsberg d7dd0289d5 Distribute isomorphic mapped types over union types 2016-11-22 14:27:39 -08:00
Tim Lancina 61204cc05d Re-add sourceFiles to program emit callback
Addresses https://github.com/Microsoft/TypeScript/issues/12444.
2016-11-22 14:20:47 -06:00
Ryan Cavanaugh 86583d495c Merge pull request #12441 from RyanCavanaugh/jsDocAugments
Support JSDoc @augments tag
2016-11-22 11:23:45 -08:00
Ryan Cavanaugh 6a5682c4a3 Support JSDoc @augments tag
Fixes #12428
2016-11-22 10:52:47 -08:00
Jason Ramsay 70e130b08c Maintain support for deprecated API typingOptions.enableAutoDiscovery 2016-11-21 18:17:27 -08:00
Anders Hejlsberg 77c0540433 Merge pull request #12425 from Microsoft/keyofOnlyStrings
Change 'keyof T' to always be string-like
2016-11-21 15:51:00 -08:00
Anders Hejlsberg 1710df5f28 Type of for-in variable is keyof T when object type is a type parameter 2016-11-21 12:56:32 -08:00
Vladimir Matveev 4c6b94f16f wrap subexpressions of conditional expressions in parens if necessary (#12420) 2016-11-21 12:52:13 -08:00
Andy 90ee161391 Merge pull request #12350 from Microsoft/default_excludes
Make "exclude" default to empty if "include" is present.
2016-11-21 12:23:53 -08:00
Anders Hejlsberg 76ceab97dd Make keyof T a string-like type 2016-11-21 11:41:51 -08:00
Nathan Shively-Sanders 409253145e Merge pull request #12335 from Microsoft/getJSDoc-cleanup
getJSDocs cleanup
2016-11-21 11:30:27 -08:00
Zhengbo Li 110c3ac6ac Add locale options to tsserver (#12369)
* add locale options to tsserver

* make sys an argument

* fix mistakes and address code review
2016-11-21 10:30:38 -08:00
Anders Hejlsberg 998246af9c Merge pull request #12389 from Microsoft/keyofRelations
Minor fixes for 'keyof T' and indexed acces types
2016-11-20 15:54:41 -08:00
Anders Hejlsberg 4ed3225c06 Add optimized getTypeOfExpression function 2016-11-20 08:13:39 -08:00
Marius Schulz cd70f22b88 Add “|” and “&” to list of tokens that start a type 2016-11-20 10:48:03 +01:00
Marius Schulz 443abe5373 Allow one leading ignored “|” or “&” in a type position 2016-11-19 22:30:18 +01:00
Anders Hejlsberg dcd225a892 Fix comparable relation for keyof T
Treat keyof T as string | number for purposes of indexing
Allow indexed access types with for-in and in operator
2016-11-19 09:03:23 -08:00
Jason Ramsay 5a9451ae23 Rename typingOptions.enableAutoDiscovery to typeAcquisition.enable 2016-11-18 18:14:32 -08:00
Nathan Shively-Sanders 71b28a024a Merge pull request #12310 from Microsoft/check-object-rest-destructuring-assignment
Check object rest destructuring assignment
2016-11-18 16:01:25 -08:00
Nathan Shively-Sanders 91e6bce34c Address PR comments 2016-11-18 15:44:15 -08:00
Nathan Shively-Sanders b514d7c91c Merge pull request #12362 from Microsoft/disable-evolving-types-with-implicit-any
Disable evolving types with implicit any
2016-11-18 15:39:02 -08:00
Nathan Shively-Sanders 7caee79ce7 Rename getJSDocComments -> getCommentsFromJSDoc 2016-11-18 15:10:19 -08:00
Nathan Shively-Sanders ab84cd0647 Improve readability of types and names 2016-11-18 15:03:40 -08:00
Sheetal Nandi f626ff777f Merge pull request #12363 from Microsoft/declarationsInFilesWithErrors
Fixes for #12291 and  #12326: Declaration emit when there are errors in the source file
2016-11-18 14:57:09 -08:00
Nathan Shively-Sanders 7750fe1a7c Always enable evolving types in Javascript files 2016-11-18 14:13:56 -08:00