6381 Commits

Author SHA1 Message Date
Anders Hejlsberg
dedce6dc33 Merge branch 'master' into readonlyTypes
# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/types.ts
#	src/lib/es5.d.ts
#	tests/baselines/reference/arrayConcat2.types
#	tests/baselines/reference/arrayConcatMap.types
#	tests/baselines/reference/arrayOfSubtypeIsAssignableToReadonlyArray.errors.txt
#	tests/baselines/reference/concatError.types
#	tests/baselines/reference/concatTuples.types
#	tests/baselines/reference/emitSkipsThisWithRestParameter.types
#	tests/baselines/reference/iteratorSpreadInArray7.types
#	tests/baselines/reference/staticAnonymousTypeNotReferencingTypeParameter.types
2017-08-25 14:14:38 -07:00
Anders Hejlsberg
555a742d16 Merge pull request #18042 from Microsoft/fixMappedTypeIndexedAccess
Defer mapped type indexed access transformations
2017-08-25 20:59:16 +01:00
Andy
fe1242c8a9 Don't try to extract import to a method (#18025) 2017-08-25 09:53:56 -07:00
Andy
3a0ab74ed6 Test for action description of code actions, and simplify description for extracting method to file (#18030)
* Test for action description of code actions, and simplify description for extracting method to file

* Add unit test file missing from tsconfig.json (only affects gulp) and update tests

* Use the actual number

* Use "module scope" or "global scope" instead of "this file"
2017-08-25 09:53:28 -07: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
Wesley Wigham
643a7e7e33 Call dynamic import transform on expression used by export equal statement (#18028)
* Call dynamic import transform on expression used by export equal statement

* Use Debug.fail
2017-08-24 17:08:57 -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
Ron Buckton
4c68b6d7f0 Merge pull request #16686 from Microsoft/fix16467
Improve JavaScript type from constructor imported via require
2017-08-24 17:00:38 -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
ca86dc4deb Test:jsdoc nullable syntax legal in type arguments
And update baselines
2017-08-23 15:00:40 -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
Andy
5e8e735db5 quickInfo: Don't check for type === undefined, check for any (#17815)
* quickInfo: Don't check for `type === undefined`, check for `any`

* Fixes:
* We still want to do some work even if type is `any`
* Second test for `if (type)` is necessary because it might not have been assigned.
2017-08-18 17:21:25 -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
Benjamin Lichtman
45c62ac0a6 Merge pull request #17709 from uniqueiniquity/objectsInArray
Correct outlining spans for object and array literals in array
2017-08-18 16:25:08 -07:00
Arthur Ozga
a3d113bed3 Merge pull request #16385 from aozgaa/isInMultiLineComment
multi-line comment formatting fix and handler
2017-08-18 12:43:37 -07:00
Daniel Rosenwasser
4983e11b67 Added test for leading underscore property name suggestions. 2017-08-18 11:46:34 -07:00
Arthur Ozga
6b68da1185 Revert "Fix getConstraintOfIndexedAccess" 2017-08-18 11:32:53 -07:00
Arthur Ozga
439cdca52f Merge pull request #17870 from Microsoft/fix-getConstraintOfIndexedAccess
Fix getConstraintOfIndexedAccess
2017-08-18 11:32:48 -07:00
Arthur Ozga
e7d2af0d72 remove duplicate verify 2017-08-17 20:06: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
1b4f90705f Test getConstraintOfIndexedAccess fixes and update baselines 2017-08-17 12:45:20 -07:00
Arthur Ozga
bc0c9a440e Merge branch 'master' into formattingAfterParseError 2017-08-16 20:27:06 -07:00
Arthur Ozga
760ef44c36 test if onlyMultiLine flag changes answer 2017-08-16 18:48:27 -07:00
Arthur Ozga
19e2fa6fc5 Merge branch 'master' into isInMultiLineComment 2017-08-16 17:57:04 -07:00
Arthur Ozga
62f16bee55 add tests 2017-08-16 17:36:50 -07:00
Arthur Ozga
4b9f5a0f8f rename tests 2017-08-16 17:36:39 -07:00
Arthur Ozga
70e4f346bb update test 2017-08-16 17:35:14 -07:00
Arthur Ozga
153b94aeb4 JsxText has no leading comments 2017-08-16 15:28:47 -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
Nathan Shively-Sanders
7809398ad4 Indexed-assignment readonly err is not unknownType
Now, in an assignment to an indexed access of a readonly property, the
resulting type is still the property's type. Previously it was
unknownType. This improves error reporting slightly by reporting some
errors that were previously missed.
2017-08-16 10:06:01 -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
Arthur Ozga
ad9c29b928 add test 2017-08-15 12:44:21 -07:00
Andy
10c8d5effa In services, show the aliasSymbol for a type even if it's not accessible in the current scope (#17433)
* In services, show the aliasSymbol for a type even if it's not accessible in the current scope

* Rename flag
2017-08-15 10:23:45 -07:00
uniqueiniquity
760812f714 Add explanatory comments, consolidate main body 2017-08-14 09:27:45 -07:00