2223 Commits

Author SHA1 Message Date
Nathan Shively-Sanders
0197357e31 Remove mistakenly added test file
Intended for a different PR
2017-09-15 10:28:13 -07:00
Nathan Shively-Sanders
7497d4cb3a Merge branch 'master' into allow-booleans-in-spreads 2017-09-15 10:26:57 -07:00
Nathan Shively-Sanders
f97d5fa11d Update tests with improved spread-falsy-union rules 2017-09-15 10:06:58 -07:00
Wesley Wigham
e1ede37ec7 Add name to amd definition in umd module if present (#18479) 2017-09-14 14:41:56 -07:00
Andy
66abcb9166 Handle undefined symbol.declarations in cloneSymbol (#18474) 2017-09-14 13:03:12 -07:00
Andy
d1e2242ee4 Allow to access exports from inside a commonjs module (#17745)
* Allow to access `exports` from inside a commonjs module

* Don't contextually type `this` in `exports.f = function() { ... }`

* Update test
2017-09-14 12:36:55 -07:00
Andy
e91af7d30d Allow template string with no substitutions to be used as a string literal type (#18452) 2017-09-14 11:19:54 -07:00
Wesley Wigham
76eab54ab7 Add error for using generalized expressions with export assignments in ambient contexts (#18444) 2017-09-14 11:11:54 -07:00
Anders Hejlsberg
2077835ff7 Merge pull request #18438 from Microsoft/unionIntersectionUnit
Remove empty intersection types in unit types
2017-09-14 18:44:02 +01:00
Nathan Shively-Sanders
274faa4e9c Merge branch 'master' into allow-booleans-in-spreads 2017-09-14 10:30:58 -07:00
Andy
cf53743bd6 In isInPropertyInitializer, don't bail out at a PropertyAssignment (#18449) 2017-09-14 07:59:53 -07:00
Nathan Shively-Sanders
d2e2faad5c Update tests and baselines 2017-09-13 15:13:34 -07:00
Anders Hejlsberg
0ac942f7ab Update test 2017-09-13 11:52:21 -07:00
Andy
2a70bf5158 Don't count a write-only reference as a use (#17752)
* Don't count a write-only reference as a use

* Split isWriteAccess to isWriteOnlyAccess and isReadOnlyAccess

* Update "unusedParameterUsedInTypeOf" to use "b"

* Update diagnostic messages: "is never used" -> "its value is never read"

* Use a WriteKind enum

* Rename enum and move documentation to enum members
2017-09-13 09:02:33 -07:00
Nathan Shively-Sanders
2fbc2259a1 Merge pull request #18392 from Microsoft/fix-contextually-typing-arguments-object
Fix contextually typing arguments object
2017-09-11 16:22:17 -07:00
Anders Hejlsberg
d90814bc57 Merge pull request #18391 from Microsoft/fixMappedTypeInference
Inference for higher order mapped, index and lookup types
2017-09-11 20:47:38 +01:00
Anders Hejlsberg
1b49c8f0a8 Merge pull request #18246 from Microsoft/fixControlFlowStackOverflow
Error on excessively large control flow graphs
2017-09-11 20:45:22 +01:00
Herrington Darkholme
29d5e4dadd fix #18225, fix error message on abstract class instance (#18368)
* fix #18225, fix error message on abstract class instance

abstract class check should be inside constructor call

* add new test and accept baseline
2017-09-11 11:21:35 -07:00
Nathan Shively-Sanders
4e04a740f8 Test:contextual typing of arguments obj in JS files 2017-09-11 11:17:14 -07:00
Anders Hejlsberg
0823eba8a3 Add tests 2017-09-11 10:38:46 -07:00
Wesley Wigham
eb80799ef0 Care about esnext where we look for es2015 (#18331)
* Care about esnext where we look for es2015

* Update diagnostic message to be more agnostic
2017-09-09 16:30:06 -07:00
Anders Hejlsberg
4ba50aadb0 Update test 2017-09-08 15:51:25 -07:00
Anders Hejlsberg
ecea2871bd Merge branch 'master' into fixControlFlowStackOverflow 2017-09-08 14:26:13 -07:00
Andy
2e02778960 When loading a module from node_modules, get packageId even in the loadModuleFromFile case (#18185)
* When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case

* Support packageId for <reference types> too
2017-09-07 14:31:20 -07:00
Nathan Shively-Sanders
397ff84f1a Merge pull request #18317 from Microsoft/object-literal-enum-property-names
Object literals computed property names allow literal-typed expressions
2017-09-07 13:56:10 -07:00
Wesley Wigham
6695255d86 Allow trailing newline to have fake position (#18298)
* Actually support baselining pretty in the harness

* Test case from 18216

* Use host newline in formatDiagnosticsWithColorAndContext

* Merge statements
2017-09-07 12:26:23 -07:00
Nathan Shively-Sanders
3c5b2a5e9d Test Literal-typed computed property names in obj literals 2017-09-07 11:41:13 -07:00
Wesley Wigham
c1f2afd645 Add typedef declaration space, unify typedef name gathering (#18172)
* Add typedef declaration space, unify typedef name gathering, strengthen errorUnusedLocal

* Bonus round: make jsdoc presence way mroe typesafe

* Be exhaustive in nameForNamelessJSDocTypedef

* Remove nonrequired casts

* Replace more casts with guards

* Cannot be internal

* Debug.fail returns never, assert never no longer needs unreachable throw to satisfy checker

* Rename type

* Add replacement message as in 18287
2017-09-07 10:28:58 -07:00
Wesley Wigham
c3e090695e Do not consider UMD alias symbols as visible within external modules (#18049)
* Do not consider UMD alias symbols as visible within external modules in the symbol writer

* Minimal repro
2017-09-06 22:07:30 -07:00
Wesley Wigham
72884b8f27 Emit comments on system export default expressions on the surrounding export call epxression instead (#17970) 2017-09-06 21:59:06 -07:00
Wesley Wigham
73eff819b5 Fix 18224 (#18259)
* Probably fix 18224

* Corrected test
2017-09-06 14:44:29 -07:00
Nathan Shively-Sanders
3a164b955b Improve baseline of complexRecursiveCollections
By adding @lib:es6, which gets rid of tons of bogus errors.
The point of the test is compile time, but it's more
confidence-inspiring to know that basic ES6 collections are getting
resolved and typechecked too.
2017-09-05 12:55:18 -07:00
Anders Hejlsberg
4f43ae207a Add test 2017-09-04 16:57:36 -07:00
Wesley Wigham
3e850156da Propagate isRestParameter through symbol instantiation (#18087)
* Add repro from #17666

* Actually use repro from issue, propegate isRestParameter on instantiation
2017-08-31 10:15:42 -07:00
Anders Hejlsberg
42b66066f9 Add regression test 2017-08-30 17:14:16 -07:00
Mohamed Hegazy
562abf333a Follow up on #16223 cleaning up Array declarations (#18116)
* Follow up on #16223, Remove generic signatures from Array, ReadOnlyArray and TypedArrays

* Remove test

* Accept baselines

* Remove invalid `this: void` in callbacks

* accept baselines
2017-08-30 10:22:02 -07:00
Andy
7306b13f74 Don't issue a use-before-declared error for a property that exists in a superclass (#17910)
* Don't issue a use-before-declared error for a property that exists in a superclass

* Simplify isInPropertyInitializer

* Respond to PR comments
2017-08-29 09:18:09 -07:00
Wesley Wigham
38c3f67652 Visit destructuring computed names (#18052) 2017-08-25 15:10:47 -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
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