Commit Graph

23447 Commits

Author SHA1 Message Date
csigs
4b3d3bc00d LEGO: Merge pull request 22215
LEGO: Merge pull request 22215
2018-02-27 15:11:12 -08:00
Nathan Shively-Sanders
125a317a9a Fix lint 2018-02-27 15:11:06 -08:00
csigs
20fe73bb66 LEGO: check in for master to temporary branch. 2018-02-27 23:10:46 +00:00
Anders Hejlsberg
de3871a4fc Propagate 'never' and the wildcard type in type inference 2018-02-27 15:10:43 -08:00
Nathan Shively-Sanders
c31808922d Remove assert for undeclared js-nested-exports
Previously, this would assert:

```ts
exports.undeclared.n = 1;
```

Because undeclared was never declared in any recognised way. Now it no
longer asserts, but does not bind. That's because the full pattern
starts with the line `exports = require('./x')` and assumes that x.js
declares `undeclared`. I am not sure how to bind this. The new test
contains this pattern in case I figure it out.
2018-02-27 15:04:10 -08:00
Andy
f4af74aae1 Simplify TextChanges#getChanges (#22157)
* Simplify TextChanges#getChanges

* Rename function and improve assert
2018-02-27 12:26:05 -08:00
Nathan Shively-Sanders
c3143d2e47 Support js nested namespace decls on exports
and module.exports.
2018-02-27 10:20:16 -08:00
Wesley Wigham
32c63a2628 Add support for transpiling per-file jsx pragmas (#21218)
* Add support for per-file jsx pragmas

* Add error for using jsx factory pragma with fragments

* More tests, use different regex class for pragma capture

* Unify all pragma parsing machinery
2018-02-26 16:10:00 -08:00
Andy
0b1e21794d fourslash diagnostics tests: use objects instead of strings (#22193) 2018-02-26 14:55:26 -08:00
Anders Hejlsberg
b9e06bfd38 Merge branch 'master' into fixConditionalTypes
# Conflicts:
#	src/compiler/checker.ts
2018-02-26 14:50:23 -08:00
Anders Hejlsberg
eaf806fedc Accept new baselines 2018-02-26 14:26:35 -08:00
Anders Hejlsberg
3ad62ef3d6 Update tests 2018-02-26 14:26:26 -08:00
Anders Hejlsberg
6e672b7c9d Use '{}' instead of 'never' for no candidates in conditional inference 2018-02-26 14:26:15 -08:00
Sheetal Nandi
c154b81986 Ensure our readonly emptyArray stays non modified. 2018-02-26 13:52:09 -08:00
Anders Hejlsberg
1f434feeb7 Accept API baseline changes 2018-02-26 13:49:23 -08:00
Anders Hejlsberg
c2e6f7aacc Disallow recursion 2018-02-26 13:48:40 -08:00
Wesley Wigham
d15b098e70 Increase rwc js verification timeout (#22191)
* Increase js verification timeout

* Add seperator
2018-02-26 12:55:08 -08:00
Wesley Wigham
0dc5f18bdb Remove excess comment ranges from initialized and property parameter emit (#22152) 2018-02-26 12:43:31 -08:00
Andy
95dfd271e2 Make some internal types @internal (#22190) 2018-02-26 12:37:45 -08:00
Andy
e4e4b17669 Improve error message for untyped import of scoped package (#22189) 2018-02-26 10:38:54 -08:00
Sheetal Nandi
4f1640d8e1 Verify the output file paths for the json module emit 2018-02-24 10:15:32 -08:00
Sheetal Nandi
23a7e2f840 Report errors about correctness of the json file 2018-02-24 09:46:29 -08:00
kingwl
eba4d36739 error if import empty object form module not existed 2018-02-24 18:43:02 +08:00
Andrew Casey
b31aa4e012 Merge pull request #22087 from amcasey/AmbientModuleImports
Organize imports in ambient modules
2018-02-23 17:43:28 -08:00
Sheetal Nandi
4257c2fa04 Resolve the .json file only if module name contains the extension 2018-02-23 17:27:17 -08:00
Sheetal Nandi
a790a92f7d Parse all json values at root 2018-02-23 14:00:30 -08:00
Sheetal Nandi
ca590d6fed Need allowJs to be true to use the json module resolution 2018-02-23 14:00:23 -08:00
Sheetal Nandi
a1922fd41f More tests and also do not add index signature for json module 2018-02-23 14:00:11 -08:00
Sheetal Nandi
00b6c32a10 Fix emit for json file 2018-02-23 13:59:58 -08:00
Sheetal Nandi
3572fad981 Bind and resolve the module for json file 2018-02-23 13:59:54 -08:00
Sheetal Nandi
ee2e267d38 Replace usage of jsonObject on JsonSourceFile 2018-02-23 13:59:47 -08:00
Sheetal Nandi
5771adbbe7 Resolve Json file when module resolution strategy is node 2018-02-23 13:54:39 -08:00
Sheetal Nandi
f1c879d090 Merge branch 'master' into watchOptions 2018-02-23 13:16:46 -08:00
Daniel Rosenwasser
4d284d617f Merge pull request #22098 from alexeagle/pretty
fix --pretty output when context is multi-line
2018-02-23 12:51:01 -08:00
Sheetal Nandi
08ab6eb42d Reload the text from file if there is pending reload of the script info before determining to use SVC
Fixes #20806
2018-02-23 12:10:24 -08:00
Sheetal Nandi
4d6b53bae5 Add test for scenario when script info being operated is pending on reload but has svc for the previous version
Test for #20806
2018-02-23 12:05:19 -08:00
Nathan Shively-Sanders
4099d48ea5 Update chrome-devtools baseline 2018-02-23 09:40:44 -08:00
Nathan Shively-Sanders
aa6b76fb6f Merge branch 'master' into js-object-literal-assignments-as-declarations 2018-02-23 09:24:32 -08:00
Nathan Shively-Sanders
5d32a3145e Merge branch 'js-prototype-assignment' into js-object-literal-assignments-as-declarations 2018-02-23 09:24:09 -08:00
Nathan Shively-Sanders
dd2523650e Fix nested js-containers+proto assignment in types space
1. The actual symbols needed to be marked as containers.
2. Type node resolution needed to understand prototype assignments.
2018-02-23 09:16:01 -08:00
csigs
8e8efaf363 LEGO: Merge pull request 22148
LEGO: Merge pull request 22148
2018-02-23 09:10:44 -08:00
csigs
3adeef8572 LEGO: check in for master to temporary branch. 2018-02-23 17:10:14 +00:00
Wenlu Wang
30a96ba335 add support of codefix for Strict Class Initialization (#21528)
* add support of add undefined type to propertyDeclaration

* add support of add Definite Assignment Assertions to propertyDeclaration

* add support of add Initializer to propertyDeclaration

* remove useless parameter

* fix PropertyDeclaration emit missing exclamationToken

* merge fixes and fix

* fix unnecessary type assert
2018-02-23 07:25:50 -08:00
Alex Eagle
2e66e74e14 fix --pretty output when context is multi-line
Fixes #22097
2018-02-22 22:56:00 -08:00
uniqueiniquity
96441abce6 Update category for TS4090 to Error 2018-02-22 17:01:31 -08:00
Andrew Casey
8ead7ab29c Organize imports within ambient module declarations 2018-02-22 16:30:57 -08:00
Andrew Casey
189eb505b9 Factor worker method out of ts.OrganizeImports.organizeImports 2018-02-22 16:30:56 -08:00
Andrew Casey
427e6ed3e6 Tidy isAmbientModule 2018-02-22 16:30:55 -08:00
Andy
e8fb587097 organizeImports: Avoid using full FindAllReferences (#22102)
* organizeImports: Avoid using full FindAllReferences

* Add parentheses
2018-02-22 16:26:37 -08:00
Sheetal Nandi
86dca7bada Merge pull request #22090 from Microsoft/fileDeletedWatchClose
In tsc--watch, fix the leaking watch when old source file is not part of program any more
2018-02-22 16:04:17 -08:00