2680 Commits

Author SHA1 Message Date
Sheetal Nandi
8c7a9ccc27
Merge pull request #24811 from Microsoft/computedPropertyNameWithDefaultImport
Always resolve the first identifier of computed property name to get the symbol and track it
2018-06-08 15:35:38 -07:00
Sheetal Nandi
5d70d9223c Always resolve the first identifier of computed property name to get the symbol and track it
Fixes #24798
2018-06-08 14:03:18 -07:00
Wesley Wigham
4240d9dc0f
always visit them all (#24802) 2018-06-08 13:11:30 -07:00
Wesley Wigham
d0ae03c4cc
Handle import types in serializeType (#24701) 2018-06-07 10:40:14 -07:00
Wesley Wigham
d9b93903c0
Use more nodelike paths for import types when possible (#24610)
* Use more nodelike paths for import types when possible

* move functionality from services into compiler, fix with propert file/directory conflict handling

* mark suspect cast
2018-06-05 12:54:36 -07:00
Andy
735a46f838
If parsing a function type fails, parseTypeReference() to ensure something is returned (#24567)
* If parsing a function type fails, parseTypeReference() to ensure something is returned

* Avoid tryParse

* Add missing semicolon

* Don't check for undefined, check for missing type

* Don't set parameters undefined, set to missingList and return false

* Update API baselines

* Code review
2018-06-05 10:24:37 -07:00
Ron Buckton
fbeb58a147
Merge pull request #23893 from Microsoft/libReference
Adds 'lib' reference directives
2018-06-04 16:14:52 -07:00
Ron Buckton
666841264c Merge branch 'master' into libReference 2018-06-04 14:38:56 -07:00
Wesley Wigham
7eaa78846e
Visit the children of an import type/require call/dynamic import when looking for those (#24663) 2018-06-04 14:31:56 -07:00
Wesley Wigham
cbbf2e4e6f
Resolve aliases before using getTypereferenceType (#24594) 2018-06-04 14:19:41 -07:00
Sheetal Nandi
8427e95386 Tests to acknowledge the public watch api 2018-06-04 12:59:01 -07:00
Sheetal Nandi
d64608dc97
Merge pull request #24615 from Microsoft/jsonSourceMaps
Disable source maps and declaration emit for the json module
2018-06-04 10:48:43 -07:00
Wesley Wigham
779fa98475
Fix merge lexical environment to *always* respect prologue statements (#24602) 2018-06-04 10:34:38 -07:00
Sheetal Nandi
d246c3c2bd Disable source maps and declaration emit for the json module
Fixes #24546
2018-06-01 18:31:58 -07:00
Andy
9be846e1f2
Fix bug when name resolution fails in a @typedef: Don't set lastLocation (#24585)
* Fix bug when name resolution fails in a @typedef: Don't set `lastLocation`

* Add noEmit to test
2018-06-01 16:49:54 -07:00
Wesley Wigham
1b6d9229f2
Visit super arguments even when no signature exists (#24591) 2018-06-01 14:14:56 -07:00
Wesley Wigham
f8503f2632
Include export specifiers in the list of syntactic defaults (#24549) 2018-06-01 10:40:30 -07:00
Sheetal Nandi
fd242250c5
Merge pull request #24536 from Microsoft/trailingCommaInJson
Do not emit trailing comma in json module
2018-05-31 13:16:48 -07:00
Sheetal Nandi
1696da14f2 Do not emit trailing comma in json module
Fixes #24530
2018-05-31 12:40:08 -07:00
Alexander T
7ef7f907b9 Do not emit 'use strict' prologue in .json files with --alwaysStrict 2018-05-31 20:28:53 +03:00
Ron Buckton
b4e113b94e Merge branch 'master' into libReference 2018-05-31 10:02:08 -07:00
Wesley Wigham
576a733378
For type emit, walk non-parent containers when those containers have aliases leading to the target (#24507) 2018-05-30 17:52:59 -07:00
Wesley Wigham
04379d548c
Lookup type arguments correcly for taged templates when checking generic arity (#24496) 2018-05-30 15:03:04 -07:00
Ron Buckton
ec0af20f5a Merge branch 'master' into libReference 2018-05-29 14:13:00 -07:00
Elizabeth Dinella
13734e7d68
Fix for issue #6154 - overriding methods with properties in the derived class (#24343)
* Fix to issue 6154 - Overriding a method with a property in the derived class should not cause a compiler error

* new baselines

* fixed deleted baselines
2018-05-24 14:12:13 -07:00
Andy
5983c45e24
Fix typo: seperate -> separate (#24338)
* Fix typo: seperate -> separate

* update tests
2018-05-23 09:36:17 -07:00
Wesley Wigham
0102f8050c
Check for keyof constraint type instead of syntactic check (#24098)
* Check for keyof constraint type instead of syntactic check

* Readopt older candidateType check, even though it shouldnt really matter

* OK. Just use maybetypeOfKind

* Remove redundant boolean check
2018-05-22 16:58:31 -07:00
Wesley Wigham
8b8cd31784
Use unknown serialization kind when type symbol isnt resolved (#24332)
* Use unknown serialization kind when type symbol isnt resolved

* Add test for the isolated modules case
2018-05-22 16:56:12 -07:00
Wesley Wigham
3fe946df78
Use symbolToTypeNode for class & interface references (#24330)
* Use merged symbols when calculating qualification, use symbolToTypeNode

* Accept baselines
2018-05-22 14:09:45 -07:00
Andy
982c8d0af9
Add suggestion diagnostics for unused label and unreachable code (#24261)
* Add suggestion diagnostics for unused label and unreachable code

* Always error on unused left hand side of comma
2018-05-22 07:56:29 -07:00
Andy
802dc2bb9b
fixUnusedIdentifier: If every VariableDeclaration is unused, remove the VariableStatement (#24231) 2018-05-21 15:54:33 -07:00
Wesley Wigham
02fe840732
Get constraint with this argument of the type parameter for comparisons (#21210)
* Get constraint with this argument of the type parameter for comparisons

* Also instantiate indexed accesses

* Add much simpler test
2018-05-18 18:30:23 -07:00
Wesley Wigham
3800d7b246
More robust circularity detection in node builder (#24225) 2018-05-17 14:30:07 -07:00
Anders Hejlsberg
3fc3df3c3a
Merge pull request #24137 from Microsoft/fix23977
Optimize intersections of unions of unit types
2018-05-17 13:15:28 -07:00
Wesley Wigham
3fc727b256
Use import types to refer to declarations in declaration emit (#24071)
* Stand up a simple implementation using import types for exports of modules which are otherwise inaccessible

* Ensure references exist to link to modules containing utilized ambient modules

* Accept baselines with new import type usage

* Fix lint
2018-05-17 13:08:22 -07:00
Mohamed Hegazy
8dc9b76b6d Add undefined guard 2018-05-17 11:45:34 -07:00
Wesley Wigham
60df4671d0
Fix jsx element parsing within ternary (#24149) 2018-05-16 09:28:22 -07:00
Andy
2200c94a43
Fix unused diagnostic for rename-destructuring { a: b } (#24145) 2018-05-15 16:22:13 -07:00
Sheetal Nandi
77168e5d50
Merge pull request #24112 from Microsoft/packageJsonWithMainInSubDirectory
Resolve using package json's "main" field when resolving typescript extensions
2018-05-15 14:18:27 -07:00
Anders Hejlsberg
1c3dbd4f4b Add regression test 2018-05-15 12:34:29 -07:00
Sheetal Nandi
7be85958a1 Add test for module resolution with package json containing main field referencing js file in sub directory 2018-05-14 13:06:34 -07:00
Wesley Wigham
ba4bf21ead
Cache simplified indexed accesses to better handle circularly constrained indexed acceses (#24072) 2018-05-14 12:54:26 -07:00
Wesley Wigham
b58e4e1fa1
Reduce aggression of parenthesis removal in ts transform (#24073) 2018-05-14 11:20:04 -07:00
Ron Buckton
8548fb835a Merge branch 'master' into libReference 2018-05-11 20:05:26 -07:00
Wesley Wigham
6149b41469
Generate names for type parameter declarations in inferred types (#23902)
* Generate names for type parameter declarations in inferred types

* Fix lint

* Merge functions, make overload private

* Handle some edge cases better (nodes in differing files than current emit)

* Account for transformed nodes
2018-05-10 11:16:27 -07:00
Ron Buckton
698f229bb4 Merge branch 'master' into libReference 2018-05-09 11:41:13 -07:00
Ron Buckton
6c35abe77f Add additional Array.from test case 2018-05-09 11:11:46 -07:00
Nathan Shively-Sanders
e27fb0651b
Fix crash in recursive declared type resolution (#23950)
When one type has a type parameter with a default
2018-05-09 09:25:00 -07:00
Andy
5725428f2d
fixUnusedIdentifier: Handle destructure with all bindings unused (#23805)
* fixUnusedIdentifier: Handle destructure with all bindings unused

* Add parameters test

* Add test for 'for' loop
2018-05-08 13:33:55 -07:00
Wesley Wigham
618da24d6a
Look at simplified types when checking distributive conditional constraints (#23884) 2018-05-04 14:35:39 -07:00