Wesley Wigham
cb4cb7a75f
Check if module reference requires type reference before path reference ( #25385 )
2018-07-03 11:41:07 -07:00
Anders Hejlsberg
e8d64a9c7c
Merge pull request #25336 from Microsoft/fixResolveTypeMembers
...
Fix runaway recursion in object type member resolution
2018-07-03 07:53:02 -10:00
Wesley Wigham
65655f2c6b
Change import type determination to not use a RE on the symbol name ( #25381 )
2018-07-02 17:43:39 -07:00
Mohamed Hegazy
4dd1f9fc7c
Consolidate overloads in constructors for Map, Set, WeakMap, and WeakSet
...
Fixes https://github.com/Microsoft/TypeScript/issues/23551
Fixes https://github.com/Microsoft/TypeScript/issues/25362
2018-07-02 11:58:48 -07:00
Wesley Wigham
7084e6cf47
Adds related spans and error grouping for duplicate identifier errors ( #25328 )
...
* Adds related spans and error grouping for duplicate identifier errors
* Trim trailing whitespace
* Record related info in error baselines
* Make error more whimsical
2018-07-02 10:47:52 -07:00
Anders Hejlsberg
92f5f1dd9d
Add regression test
2018-06-29 17:16:23 -10:00
Wesley Wigham
30db30055f
Fix module specifier case handling for declaration emit ( #25110 )
2018-06-29 11:02:43 -07:00
Daniel Rosenwasser
d46b54b639
Actually make the test file use '--strict'.
2018-06-28 22:36:59 -07:00
Daniel Rosenwasser
f23c180a38
Merge pull request #25287 from Microsoft/skipToNonNullTargets
...
Skip to non null targets in error messages
2018-06-28 22:26:36 -07:00
Daniel Rosenwasser
12a201c29e
Added test case.
2018-06-28 15:30:10 -07:00
Martin Probst
55c3ec3e94
Fix decorator design:types emit for type variables.
...
Previously, TypeScript would resolve the reified types for the
`design:types` decorator emit in the regular `currentScope`. That scope
does not include class declaration bodies.
However when reifying types, class declarations do introduce a new scope
for any `TypeVariable`s declared on them. Because TS resolved the
EntityName for such types against the parent scope (e.g. the source
file), not the class scope, TypeScript would either fail to resolve the type (giving `TypeReferenceSerializationKind.Unknown`), or
incorrectly resolve to a different, accidentally matching symbol in the outer scope (giving `TypeWithConstructSignatureAndValue`).
This would result in an emit referencing an undeclared symbol, or
mis-referencing the wrong symbol.
__metadata("design:type", typeof (_a = typeof TypeVariable !== "undefined" && TypeVariable) === "function" && _a || Object)
__metadata("design:type", TypeVariable)
This change special cases `currentScope` for
`serializeTypeReferenceNode` to use a class scope, if present. This
changes the emit for a `TypeVariable` back to `Object`:
__metadata("design:type", Object)
2018-06-25 17:24:05 +02:00
Daniel Rosenwasser
72068e22af
Merge pull request #25115 from Microsoft/matchingTypeRefs
...
Improved errors using type reference targets
2018-06-21 13:46:21 -07:00
Wenlu Wang
51e7ae0813
provide spelling suggestion for indexed access ( #22225 )
...
* provide spelling suggestion for indexed access
* update merge
* accept baseline
* fix suggession return type
* allow string or identifier on getSuggestionForNonexistentProperty
* fix lint
2018-06-21 13:40:41 -07:00
Andy
40899eaf5b
Error on 'const' in class expression ( #25125 )
2018-06-21 09:57:52 -07:00
Daniel Rosenwasser
639d9ebb15
Added test.
2018-06-21 00:27:12 -07:00
Nathan Shively-Sanders
0f55566cf4
In JS, always check the extends tag of a class before its heritage clause ( #25111 )
...
* Check extends tag first in getClassExtendsHeritageClauseElement
Previously getBaseTypeNodeOfClass checked, but this is only used in a
few places.
* Fix names and add test
* Update API baseline
* Move jsdocAugments tests to conformance/jsdoc
* Better naming in checkClassLikeDeclaration
2018-06-20 16:28:30 -07:00
Wesley Wigham
640af3f75e
Introduce related spans into tsserver protocol ( #24548 )
...
* Introduce related spans into tsserver protocol
* Incorporate pretty output, implement esModuleInterop related span
2018-06-15 10:54:36 -07:00
Andy
345012e29d
Don't add diagnostic on unused import starting with underscore ( #24958 )
...
* Don't add diagnostic on unused import starting with underscore
* Fix lint
2018-06-14 12:55:12 -07:00
Wesley Wigham
a77068827d
Handle combinations of rootdir and outdir when calculating paths ( #24941 )
2018-06-14 11:07:46 -07:00
Mohamed Hegazy
838b76e928
Merge remote-tracking branch 'origin/master' into fixAPISampleTests
2018-06-12 13:03:11 -07:00
Wesley Wigham
61fb222cd2
Use symlinks when looking for module names for declaration emit ( #24874 )
...
* fix symlink tag, support arbitrary (ie, directory) links via @link
Introduce indirect symlink lookup to specifier deriver
Use fileset, move exec
vfs path resolution :shakes fist:
Apply files symlink relative to dirname
Use directory function
* Accept really bad baseline updates
2018-06-12 12:52:44 -07:00
Mohamed Hegazy
1b6f0ea07e
Fix API Sample tests
2018-06-12 12:52:06 -07:00
Mohamed Hegazy
c34a6d9d12
Remove error baseline
2018-06-11 15:29:52 -07:00
Mohamed Hegazy
b33d5e3f19
Fix #24826 : Add mapping for ES2018 target to library
2018-06-11 12:46:13 -07:00
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