2185 Commits

Author SHA1 Message Date
Anders Hejlsberg
555a742d16 Merge pull request #18042 from Microsoft/fixMappedTypeIndexedAccess
Defer mapped type indexed access transformations
2017-08-25 20:59:16 +01:00
Anders Hejlsberg
e79d75a383 Add regression test 2017-08-25 08:55:43 -07:00
Wesley Wigham
62eaaf9206 Fix crash when attempting to merge an import with a local declaration (#18032)
* There should be no crash when attempting to merge an import with a local declaration

* Show symbol has actually merged within the module
2017-08-24 17:12:42 -07:00
Ron Buckton
05402b8596 Merge pull request #18027 from Microsoft/fix16924
Switch to arrow for ts class wrapper IIFE
2017-08-24 17:02:18 -07:00
Wesley Wigham
f824e7214d Give mapped type properties a synthetic declaration name (#18023)
* Escape symbol names which are not valid identifiers and wrap them in quotes

* Pass forward type, do work in getNameOfSymbol

* Minimal test

* Fix nit
2017-08-24 16:48:11 -07:00
Wesley Wigham
336df751ea Fix issue #16803 do not error on getters/setters (#18031) 2017-08-24 15:53:09 -07:00
Wesley Wigham
2f1bd8cff9 Escape \0 followed by a number as a hex escape to avoid printing an octal literal (#18026) 2017-08-24 15:52:04 -07:00
Ron Buckton
ccd0158c40 Added additional test 2017-08-24 15:06:06 -07:00
Ron Buckton
038d256fe5 Merge pull request #17996 from Microsoft/fix16681
Fix crash when exporting class without name
2017-08-24 11:07:12 -07:00
Ron Buckton
40f9ee4b02 Merge pull request #16767 from Yogu/patch-2
Add missing visitNode call to object literal members
2017-08-23 17:26:31 -07:00
Ron Buckton
26a02860b0 Fix crash when exporting class without name 2017-08-23 17:09:47 -07:00
Daniel Rosenwasser
a52030db8b Merge pull request #17907 from Microsoft/excessPropCorrection
Provide spelling suggestions for excess property errors
2017-08-23 15:41:48 -07:00
Nathan Shively-Sanders
2b9aba47d6 Merge pull request #17984 from Microsoft/typeReferenceRelations
Recursive-related-check generic type references based on the id of their targets and type arguments
2017-08-23 13:22:27 -07:00
Nathan Shively-Sanders
e27d0917c9 Test performance improvement:nested reference skip 2017-08-23 11:46:44 -07:00
Ron Buckton
a6015e94a5 Merge pull request #17879 from Microsoft/fix17875
Remove debug assertions due to invalid syntax in generators transform
2017-08-22 14:34:25 -07:00
Wesley Wigham
009d9b4f22 For JSX Attributes, map over unions of props for contextual types (#17790)
* For JSX Attributes, allow attributes to fulfill the member of any union member; rather than all of them

* Use cached way of getting partial union members

* Reuse methodology used for object literals for jsx attributes

* Inline assignment

* Rename type
2017-08-22 14:13:56 -07:00
Daniel Rosenwasser
40e9e85cb3 Merge branch 'master' into excessPropCorrection 2017-08-22 12:10:16 -07:00
Anders Hejlsberg
2b10784415 Merge pull request #17922 from Microsoft/baseExpressionTypeParameters
Class type parameters not in scope in base class expression
2017-08-22 07:14:54 +01:00
Anders Hejlsberg
914d428ff1 Add regression test 2017-08-19 09:53:46 +02:00
Daniel Rosenwasser
7739a1cea0 Actually misspell the property name. 2017-08-19 00:03:50 -07:00
Wesley Wigham
a136f554a7 Fix stack overflow when resolving default construct signatures (#17878)
* Fix stack overflow when resolving default construct signatures

* No need for || emptyArray
2017-08-18 17:20:57 -07:00
Daniel Rosenwasser
4983e11b67 Added test for leading underscore property name suggestions. 2017-08-18 11:46:34 -07:00
Ron Buckton
fad97e369a Remove debug assertions due to invalid syntax in generators transform 2017-08-17 17:32:06 -07:00
Andy
eef7d8bd3d Treat explicit imports from node_modules as external library imports (#16364)
* Treat explicit imports from `node_modules` as external library imports

* Update baselines
2017-08-17 13:26:38 -07:00
Nathan Shively-Sanders
146f828919 Merge pull request #17710 from Microsoft/add-readonly-check-to-property-access-of-index-signature
Add readonly check to property access of index signature
2017-08-16 11:16:54 -07:00
Anders Hejlsberg
ce2ac1751e Merge pull request #17771 from Microsoft/fixCircularContextualType
Fix circular contextual return type error
2017-08-16 09:17:15 +02:00
Anders Hejlsberg
57705fc4e0 Add regression test 2017-08-14 09:08:11 +02:00
Tycho Grouwstra
1d6863ab0b loosen number index check, fixes #15768 2017-08-14 02:18:47 +08:00
Jan Melcher
8b4db9875d Add test case for nested object spread / methods
See #16765.
2017-08-13 15:11:49 +02:00
Wesley Wigham
d03d1074ee Make compiler options which map to a flag case-insensitive again (#17755) 2017-08-11 19:59:43 -07:00
Andy
f64b8ad902 Add "preserveSymlinks" option (#16661)
* Add "preserveSymlinks" option

* Respond to PR comments
2017-08-11 10:03:21 -07:00
Andy
fe3a05e89a A function should be context-sensitive if its return expression is (#17697)
* A function should be context-sensitive if its return expression is

* Remove outdated comment

* Fix typo
2017-08-10 07:08:24 -07:00
Wesley Wigham
8fde483393 Add test for #16144 (#17712) 2017-08-10 00:10:36 -07:00
Nathan Shively-Sanders
85c10320db Test:property access respects readonly index signature 2017-08-09 16:16:28 -07:00
Andy
e1ba65ae64 Add simple version of chooseOverload for common case of single non-generic signature (#17589)
* Add simple version of `chooseOverload` for common case of single non-generic signature

* Use a single function
2017-08-09 14:41:38 -07:00
Andy
37b20ee670 For duplicate source files of the same package, make one redirect to the other (#16274)
* For duplicate source files of the same package, make one redirect to the other

* Add reuseProgramStructure tests

* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure

* Use fallthrough instead of early exit from loop

* Use a set to efficiently detect duplicate package names

* Move map setting outside of createRedirectSourceFile

* Correctly handle seenPackageNames set

* sourceFileToPackageId -> sourceFileToPackageName

* Renames

* Respond to PR comments

* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect

* Clean up redirectInfo

* Respond to PR comments
2017-08-09 14:39:06 -07:00
Yui
39e0cc61a7 Fix 16628: "undefined" exception when name of binding element in binding pattern is empty (#17132)
* Handle the case where binding pattern name element is empty

* Update tests and baselines

* Feedback from PR

* Handle empty binding patterns more generally in emitter

* Dont simply handling fo empty binding patterns and stay spec compliant

* PR feedback
2017-08-09 13:47:44 -07:00
Wesley Wigham
c399230767 Retain comments inside return statements (#17557)
* Retain comments inside return statements by including the return keyword in the parse tree

* Revert "Retain comments inside return statements by including the return keyword in the parse tree"

This reverts commit 5d2142edb1ffb9f6cb150b815aff6e627ae80449.

* Readd test

* Function for handling printing comments on a token
2017-08-08 19:53:53 -07:00
Wesley Wigham
43e758e1a9 Create synthetic default exports for dynamic imports (#17492)
* Create synthetic default exports for dynamic imports

* Slightly better solution

* Actually accept baselines

* Slightly adjust synthetic type

* Cache synthetic type

* Inline variables, remove non-required calls

* Rename function
2017-08-08 17:01:18 -07:00
Nathan Shively-Sanders
847d7fe3c8 Merge pull request #17404 from Microsoft/use-type-param-constraints-for-computed-prop-types
Use type parameter constraints for computed property types
2017-08-08 16:29:28 -07:00
Wesley Wigham
d2625678f9 Add test case from #14439 (#17627) 2017-08-08 14:44:41 -07:00
Nathan Shively-Sanders
e494d73b29 Merge branch 'master' into use-type-param-constraints-for-computed-prop-types 2017-08-08 13:26:24 -07:00
Wesley Wigham
af20adb137 Add tests for #15358 (#17664) 2017-08-08 13:06:12 -07:00
Nathan Shively-Sanders
a2c66c3262 Merge pull request #17660 from Microsoft/weak-type-errors-on-signature-only-types
Weak type errors on signature-only types
2017-08-08 12:40:50 -07:00
Nathan Shively-Sanders
7ff1d8e797 Add specific weak type error for callable types
"Did you mean to call it?"
2017-08-08 11:25:32 -07:00
Andy
94518e8533 Don't count self-reference when setting isReferenced (#17495)
* Don't count self-reference when setting `isReferenced`

* Improve comment
2017-08-08 11:18:20 -07:00
Nathan Shively-Sanders
781da2332d Merge branch 'master' into weak-type-errors-on-signature-only-types 2017-08-08 10:45:52 -07:00
Anders Hejlsberg
aa0fc0b885 Merge pull request #17633 from Microsoft/indexSignatureMappedType
Mapped type and string index signature relations
2017-08-07 14:17:29 -07:00
Anders Hejlsberg
3118e81297 Merge pull request #17634 from Microsoft/fixSignatureStackOverflow
Fix stack overflow related to contextual signature instantiations
2017-08-07 14:00:14 -07:00
Anders Hejlsberg
3efeb1e27f Address CR feedback 2017-08-07 13:59:52 -07:00