1721 Commits

Author SHA1 Message Date
Anders Hejlsberg
2cec4c5ebb Add regression test 2016-11-23 18:28:59 -08:00
Mohamed Hegazy
72cee3e045 Merge pull request #12434 from Microsoft/Fix12377
Add special handeling for function and array in Object.freeze
2016-11-23 13:26:36 -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 4e7313b4f69682df92c48feac6aa50910a592d04.
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
Mohamed Hegazy
60395565e6 Handel call and construct signatures 2016-11-23 09:48:25 -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
Anders Hejlsberg
864e1797d9 Merge pull request #12396 from Microsoft/getTypeOfExpression
Introduce 'getTypeOfExpression' function
2016-11-22 15:33:37 -08:00
Mohamed Hegazy
72df02cbbd Add function 2016-11-21 23:27:18 -08:00
Mohamed Hegazy
8a334ac00d Add special handeling for function and array in Object.freeze 2016-11-21 23:13:22 -08:00
Vladimir Matveev
4c6b94f16f wrap subexpressions of conditional expressions in parens if necessary (#12420) 2016-11-21 12:52:13 -08:00
Anders Hejlsberg
c1c12c75f7 Add regression test 2016-11-20 08:55:20 -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
7750fe1a7c Always enable evolving types in Javascript files 2016-11-18 14:13:56 -08:00
Sheetal Nandi
aa556502f3 Handle when type alias's type parameter extends type that wont get emitted in .d.ts
Fixes #12326
2016-11-18 14:02:57 -08:00
Nathan Shively-Sanders
8674d92bdb Disable evolving types with implicit any
That is, without --noImplicitAny
2016-11-18 13:51:44 -08:00
Sheetal Nandi
cbde25f229 Handle the scenario when heritage clause of interface is not entity name expression
Fixes #12291
2016-11-18 13:11:33 -08:00
Myles Megyesi
d8b0f239f1
Fixes error message when Type is used as a Namespace
Fixes #12075
2016-11-18 11:38:24 -06:00
Anders Hejlsberg
73ada7a78d Merge pull request #12251 from Microsoft/fixTypePredicateStructuralMatch
Fix type predicates with structurally identical types
2016-11-15 13:20:35 -08:00
Nathan Shively-Sanders
a74e9d8ccf Merge pull request #12158 from Microsoft/fix-literal-comparability-in-relational-comparison-operators
Fix literal comparability in relational comparison operators
2016-11-15 08:24:06 -08:00
Anders Hejlsberg
6d28595e5a Add repro test 2016-11-14 17:06:46 -08:00
Mohamed Hegazy
1164df2c6d Merge pull request #12197 from Microsoft/commentsSuperCallReturns
Fix up comments for super calls rewritten as returns
2016-11-14 16:10:03 -08:00
Ron Buckton
06a13b9d10 Fix string constituent check in checkElementTypeOfArrayOrString 2016-11-14 15:22:04 -08:00
Anders Hejlsberg
85702197b4 Add regression test 2016-11-13 08:35:40 -08:00
Daniel Rosenwasser
486f156a69 Added test. 2016-11-12 01:40:37 -08:00
Andy Hanson
1e92a9803b Merge branch 'master' into path_mapping_exact_extension 2016-11-11 14:11:40 -08:00
Andy Hanson
a0e4ab94f1 Allow JS files 2016-11-11 13:59:13 -08:00
Andy Hanson
240b474ba3 Merge branch 'master' into path_mapping_exact_extension 2016-11-11 13:52:10 -08:00
Andy Hanson
6c7e1b6913 Merge branch 'master' into symlink3 2016-11-11 13:35:47 -08:00
Andy Hanson
b65729e5b2 Merge branch 'master' into common_source_directory 2016-11-11 13:10:29 -08:00
Nathan Shively-Sanders
e301cfe58c Raise literal type to its base in a comparison
Similar to ===, except that it always applies, even when comparing two
literals.
2016-11-10 14:29:48 -08:00
Mohamed Hegazy
d537b79c61 Merge release-2.1 into master (#12157)
* Update LKG

* Update version

* Update LKG

* Skip overloads with too-short function parameters

If the parameter of an overload is a function and the argument is also a
function, skip the overload if the parameter has fewer arguments than
the argument does. That overload cannot possibly apply, and should not
participate in, for example, contextual typing.

Example:

```ts
interface I {
  (a: number): void;
  (b: string, c): void;
}
declare function f(i: I): void;
f((x, y) => {});
```

This code now skips the first overload instead of considering.

This was a longstanding bug but was only uncovered now that more
functions expressions are context sensitive.

* Test skip overloads w/too-short function params

1. Update changed baseline.
2. Add a new test with baseline.

* Minor style improvements

* Ignore optionality when skipping overloads

* Do not use contextual signatures with too few parameters

* isAritySmaller runs later: getNonGenericSignature

* rewrite void-returning statements in constructors that capture result of super call (#11868)

* rewrite void-returning statements in constructors that capture result of super call

* linter

* Update LKG

* Fix emit inferred type which is a generic type-alias both fully and partially fill type parameters

* Add tests and baselines

* Skip trying to use alias if there is target type

* Update baselines

* Add diagnostics to remind adding tsconfig file for certain external project (#11932)

* Add diagnostics for certain external project

* Show tsconfig suggestion

* fix lint error

* Address pr

* fix comment

* Update error message

* Flag for not overwrite js files by default without generating errors (#11980)

* WIP

* Properly naming things

* refactor

* apply the option to all files and check out options

* Fix typo

* Update LKG

* lockLinter

* use local registry to check if typings package exist (#12014) (#12032)

use local registry to check if typings package exist

* Add test for https://github.com/Microsoft/TypeScript/pull/11980 (#12027)

* add test for the fix for overwrite emitting error

* cr feedback

* enable sending telemetry events to tsserver client (#12034) (#12051)

enable sending telemetry events

* Update LKG

* Reuse subtree transform flags for incrementally parsed nodes (#12088)

* Update LKG

* Update version

* Update LKG

* Do not emit "use strict" when targeting es6 or higher or module kind is es2015 and the file is external module

* Add tests and baselines

* [Release 2.1] fix11754 global augmentation (#12133)

* Exclude global augmentation from module resolution logic

* Address PR: check using string literal instead of NodeFlags.globalAugmentation

* Remove comment
2016-11-10 14:28:34 -08:00
Nathan Shively-Sanders
6e1aac1c42 Merge pull request #12147 from mylesmegyesi/12050-IncompatableAssignementOfIdenticallyNamedTypes
Adds error message for incompatible assignment of identically named type
2016-11-10 13:17:31 -08:00
Nathan Shively-Sanders
ba6e5a0ffa Test error for import helpers with no __rest 2016-11-10 11:47:03 -08:00
Sheetal Nandi
c87bce1119 Merge pull request #11978 from Microsoft/errorReportingInJsFile
Report all the js file errors and skip only the nodes that are not allowed in JS file
2016-11-10 10:37:16 -08:00
Andy Hanson
0422a756d9 Add test with a referenced dts file 2016-11-10 10:25:33 -08:00
Sheetal Nandi
c458576553 Merge pull request #12135 from Microsoft/jsxFactory
Support for --jsxFactory option
2016-11-10 09:49:57 -08:00
Myles Megyesi
c05e226c4b
Adds error message for incompatible assignment of identically named type
Fixes issue #12050
2016-11-10 11:32:03 -06:00
Nathan Shively-Sanders
6398e0d6dd Merge pull request #11633 from Microsoft/fix-comparable-in-switch
Fix comparable in switch
2016-11-10 09:20:46 -08:00
Sheetal Nandi
a88c2ae1e4 Add test cases for when jsxFactory cannot be resolved 2016-11-09 16:56:43 -08:00
Sheetal Nandi
c6b1bbe12d Enabled test case for source map 2016-11-09 16:51:10 -08:00
Sheetal Nandi
f7bac98948 Verify that jsxFactory is either identifier or qualified name 2016-11-09 14:32:42 -08:00
Sheetal Nandi
4b8a55793a Add support for taking in jsxFactory option and report errors for invalid combinations 2016-11-09 12:23:59 -08:00
Sheetal Nandi
78bb276216 Merge branch 'master' into errorReportingInJsFile 2016-11-09 11:38:11 -08:00
Sheetal Nandi
6456325973 Handle abstract and const modifiers 2016-11-09 10:39:46 -08:00
Andy Hanson
d8b541afa1 Fix test 2016-11-09 10:14:25 -08:00
Andy Hanson
d559f7f17d Merge branch 'master' into symlink3 2016-11-09 09:11:25 -08:00
Andy Hanson
9c80909a90 Resolve symlinks for type reference directives too. 2016-11-09 08:08:10 -08:00
Andy Hanson
1c64615e32 Allow a path mapping to provide a file extension 2016-11-08 07:19:17 -08:00
Anders Hejlsberg
be0358cc0c Include declaration file emit 2016-11-08 06:09:41 -08:00