1699 Commits

Author SHA1 Message Date
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
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
Andy Hanson
07630e95e0 Add source maps and declarations to test 2016-11-07 07:14:47 -08:00
Anders Hejlsberg
adfa271e44 Add regression test 2016-11-05 17:36:13 -07:00
Andy Hanson
0b71df5099 Add a .d.ts file to the test to ensure it is excluded from the calculation too 2016-11-03 12:33:03 -07:00
Andy Hanson
b6727ea582 Only resolve symlinks in node_modules 2016-11-03 07:53:10 -07:00
Andy Hanson
2eca0af91b Leave files from node_modules out when calculating getCommonSourceDirectory 2016-11-03 07:50:07 -07:00
Sheetal Nandi
116c87819a Test case for property used in destructuring variable declaration 2016-11-02 11:07:33 -07:00
Sheetal Nandi
d896d3f8a9 Add test cases to report errors for decorators in js file 2016-11-01 11:05:09 -07:00
Nathan Shively-Sanders
d58a13f6a1 Add missed test update 2016-11-01 10:07:30 -07:00
Nathan Shively-Sanders
b0080a253d Merge branch 'master' into fix-comparable-in-switch 2016-10-31 14:20:10 -07:00
Andy Hanson
03ce7b0145 Fix realPathMap in test harness: Must be used in directoryExists 2016-10-31 08:23:02 -07:00
Vladimir Matveev
fcdeecfa4a Merge pull request #11925 from Microsoft/vladima/11880
update CFG to properly handle do statements
2016-10-28 16:12:53 -07:00
Vladimir Matveev
9bb7ba5862 Merge pull request #11928 from Microsoft/vladima/11738
do not inline async IIFEs in control flow graph
2016-10-28 16:12:31 -07:00
Vladimir Matveev
73c59bbf85 do not inline async IIFEs in control flow graph 2016-10-28 14:43:08 -07:00
Vladimir Matveev
fc93e8f6f4 update CFG to properly handle do statements 2016-10-28 14:17:01 -07:00
Nathan Shively-Sanders
fdcc7cc185 Merge pull request #11905 from Microsoft/skip-overloads-with-too-short-function-parameters
Skip overloads with too short function parameters
2016-10-28 09:59:38 -07:00
Nathan Shively-Sanders
cff586d4ad Test skip overloads w/too-short function params
1. Update changed baseline.
2. Add a new test with baseline.
2016-10-27 14:44:54 -07:00
Andy Hanson
8448e741c9 Fix bug: Return a resolution diagnostic for a .jsx import if --allowJs is turned off 2016-10-27 08:08:02 -07:00
Andy
b5ba3152ff Merge pull request #11704 from Microsoft/refactor_module_resolution
Return both ts and js results from module resolution
2016-10-27 06:03:29 -07:00
Vladimir Matveev
50e2fd87da only emit /// types reference for a symbol in d.ts file if all declarations of a symbol come from type reference directives (#11872)
* only emit /// types reference for a symbol in d.ts file if all declarations of a symbol come from type reference directives

* pass proper value for current directory when compiling .d.ts files
2016-10-26 17:15:04 -07:00
Vladimir Matveev
3e18aba36a 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
2016-10-26 16:48:29 -07:00
Andy Hanson
9130fbd731 Merge branch 'master' into refactor_module_resolution 2016-10-26 08:27:34 -07:00
Asad Saeeduddin
66c1178134 Use symbol fully-qualified name instead of node text in error message (#11761)
* Add test

* Add baselines

* Use fqn of symbol instead of node text
2016-10-25 11:45:32 -07:00