Nathan Shively-Sanders
50f39102aa
Merge pull request #17096 from Microsoft/improve-return-type-parse-error
...
Improve return type parse error
2017-07-12 07:18:23 -07:00
Nathan Shively-Sanders
3638ff19b3
Test:better error for wrong return token (: vs =>)
2017-07-11 10:16:35 -07:00
Andy
f45ccf541d
In getDeclarationSpaces, treat a type alias as a SymbolFlags.Type, not a SymbolFlags.Value ( #16624 )
2017-07-11 09:54:42 -07:00
Andy
12163cc02e
Allow to narrow the type of an import ( #16658 )
...
* Allow to narrow the type of an import
* Assume alias is initialized
2017-07-10 09:18:35 -07:00
Wesley Wigham
4e6b2f3c93
Created a branded type for identifier-escaped strings ( #16915 )
...
* Created a branded type for escaped strings
Then flowed it throughout the compiler, finding and fixing a handful of
bugs relating to underscore-prefixed identifiers in the process.
Includes a test for two cases noticed - diagnostics from conflicting
symbols from export *'s, and enum with underscore prefixed member emit.
* Correctly double underscores WRT mapped types
* Add fourslash tests for other fixed issues
* use function call over cast
* Update forEachEntry type accuracy
* Just use escaped names for ActiveLabel
* Remove casts from getPropertyNameForPropertyNameNode
* This pattern has occurred a few times, could use a helper function.
* Remove duplicated helper
* Remove unneeded check, use helper
* Identifiers list is no longer escaped strings
* Extract repeated string-getting code into helper
* Rename type and associated functions
* Make getName() return UnderscoreEscapedString, add getUnescapedName()
* Add list of internal symbol names to escaped string type to cut back on casting
* Remove outdated comments
* Reassign interned values to nodes, just in case
* Swap to string enum
* Add deprecated aliases to escapeIdentifier and unescapeIdentifier
* Add temp var
* Remove unsafe casts
* Rename escaped string type as per @sandersn's suggestion, fix string enum usages
* Reorganize double underscore tests
* Remove jfreeman from TODO
* Remove unneeded parenthesis
2017-07-06 14:45:50 -07:00
Daniel Rosenwasser
22f38b720c
Merge pull request #16704 from charlespierce/namespace_export_default
...
Diagnostics for default class / function export in namespace
2017-06-28 17:10:45 -07:00
Nathan Shively-Sanders
c51c2aecca
Merge pull request #16736 from DickvdBrink/issue/15208
...
Also check TypeAlias for unused type parameters
2017-06-28 12:37:04 -07:00
Nathan Shively-Sanders
2f5ecf00a1
Merge pull request #16698 from Microsoft/master-16017
...
[Master] Fix 16017 - ordering of promise all method
2017-06-28 10:46:53 -07:00
Charles Pierce
386454a255
#16300 #16301 Diagnostics for default export in namespace
2017-06-22 20:20:41 -07:00
Nathan Shively-Sanders
6a111928b4
Merge pull request #16375 from Microsoft/skip-block-scope-for-global-symbol
...
Skip block scope check for global symbol
2017-06-22 15:29:35 -07:00
Kanchalai Tanglertsampan
77d69c8c1d
Add tests and update baselines
2017-06-22 11:56:49 -07:00
Dick van den Brink
33224747b3
Added test for unused typeparameters in a typealias declaration
2017-06-22 16:45:09 +02:00
Andy
537695c313
In TypeScript code, never bind JSDoc normally, just set parent pointers ( #16555 )
2017-06-15 10:02:16 -07:00
Daniel Rosenwasser
5b12a04965
Merge pull request #16213 from charlespierce/await_yield_literals
...
Update special cases for await / yield expression parsing
2017-06-15 00:39:57 -07:00
Ron Buckton
fbe002a595
Merge pull request #16502 from Microsoft/fix16211
...
Fix 'extends' with type parameter default returned from superclass construct signature
2017-06-13 19:30:27 -07:00
Nathan Shively-Sanders
57f8648b0f
Merge pull request #16505 from Microsoft/decl-emit-parenthesize-keyof
...
Add parentheses around keyof in declaration emit when needed
2017-06-13 14:17:49 -07:00
Nathan Shively-Sanders
2d2ac6794f
Test:correct parens around keyof in decl emit
2017-06-13 14:00:26 -07:00
Ron Buckton
696643998a
Fix constructor instantiation with defaults
2017-06-13 13:19:54 -07:00
Nathan Shively-Sanders
5780494ddb
Test:declaration emit of optional parameter props
2017-06-13 11:50:46 -07:00
Nathan Shively-Sanders
ecc211345a
Merge pull request #16465 from Microsoft/skip-non-null-assertion-for-reference-expr
...
Skip non-null assertion for references
2017-06-12 15:33:36 -07:00
Nathan Shively-Sanders
497d627a02
Test: Allow ++ after non-null assertion
2017-06-12 14:41:10 -07:00
Andy
fbcddb61e2
Don't bind JSDoc namespace in a TS file ( #16416 )
2017-06-12 14:35:35 -07:00
Anders Hejlsberg
4e9e62d861
Add test
2017-06-12 13:17:24 -07:00
Andy
13b7d17da7
Don't bind JSDoc type parameter in a TS file ( #16413 )
...
* Don't bind JSDoc type parameter in a TS file
* Fix tests
* Remove unnecessary non-null assertions
2017-06-09 14:52:01 -07:00
Andy
a2d524252c
--isolatedModules: Still allow re-export of type in a declaration file ( #16399 )
...
* --isolatedModules: Still allow re-export of type in a declaration file
* Use isInAmbientContext
2017-06-09 09:39:55 -07:00
Nathan Shively-Sanders
cae1286b72
Merge pull request #16343 from Microsoft/weak-types-for-primitives
...
Weak type errors for primitives
2017-06-09 09:03:48 -07:00
Nathan Shively-Sanders
ffc899ed38
Merge pull request #16377 from Microsoft/fix-synthetic-properties-in-hasExcessProperties
...
Fix synthetic properties in hasExcessProperties
2017-06-08 15:49:51 -07:00
Nathan Shively-Sanders
d3f2234529
Test synthetic properties w/hasExcessProperties
2017-06-08 14:19:06 -07:00
Ron Buckton
ef86f7da50
Adjust source map offsets for variables in downlevel async funcs and generators
2017-06-08 14:15:40 -07:00
Nathan Shively-Sanders
91f4f3910d
Test:Block-scoped definition of Promise works
...
Previously, a block-scoped definition of Promise like `class Promise<T>` in
a script would cause a crash
2017-06-08 13:46:48 -07:00
Nathan Shively-Sanders
2eea0989ea
Merge branch 'master' into delay-signature-return-type-instantiation
2017-06-08 09:42:50 -07:00
Nathan Shively-Sanders
b509e681c1
Test weak type errors with primitives
2017-06-07 16:20:58 -07:00
Nathan Shively-Sanders
40dd8ba18f
Merge pull request #16330 from Microsoft/fix-js-infer-rest-args
...
Fix JS-inferred rest parameters
2017-06-07 14:44:02 -07:00
Nathan Shively-Sanders
c0b8c217b1
Test returning an infinite type in an intersection
2017-06-07 13:27:31 -07:00
Nathan Shively-Sanders
f5f2d24372
Add tests for JS-inferred rest parameters
2017-06-07 11:28:26 -07:00
Ron Buckton
9250d0a290
Merge branch 'master' into externalExportStar
2017-06-07 10:53:42 -07:00
Ron Buckton
2f6c6e6538
Merge branch 'master' into fix16086
2017-06-06 16:09:37 -07:00
Nathan Shively-Sanders
617f60e3f0
Merge pull request #16306 from Microsoft/fix-nullable-filtering-in-spreads
...
Fix nullable filtering in spreads
2017-06-06 15:00:48 -07:00
Nathan Shively-Sanders
ea830d4fad
Move spreadUnion* tests into conformance suite
2017-06-06 13:58:54 -07:00
Ron Buckton
b5f81f9ede
Fix emit when type import merges with local value
2017-06-05 18:39:32 -07:00
Nathan Shively-Sanders
8f4af49ccd
Merge pull request #16194 from Microsoft/fix-reexported-missing-alias
...
Fix reexported missing alias
2017-06-05 16:04:26 -07:00
Nathan Shively-Sanders
bb54a6a53e
Typeof can refer to a class in a previous file with --out ( #16269 )
...
* Typeof can refer block-scoped values in prev file
`typeof C` can now refer to block-scoped values in a preceding file when
used with --out or --outFile. Previously this was not allowed with --out
or --outFile since they depend on file order for their emit.
* Test `typeof C` reference across files with --out
2017-06-05 15:57:32 -07:00
Nathan Shively-Sanders
1d8f57e7b3
Favour exact-match spelling suggestions
...
Previously, the first match that was close enough was returned as the
spelling suggestion. Now, if there is a candidate that differs only by
case, it will always be the suggestion.
2017-06-05 11:17:44 -07:00
Nathan Shively-Sanders
24e35cd940
Merge pull request #16047 from Microsoft/sandersn/weakType
...
Weak type detection
2017-06-02 13:11:45 -07:00
Andrew Casey
87b00fdd8d
Add @checkJs: true to JS bind error tests
2017-06-02 10:29:53 -07:00
Charles Pierce
556e268bd0
#15943 #15981 Update special cases for await / yield parsing
2017-06-01 20:37:52 -07:00
Andrew Casey
01d6d489be
Add regression tests
...
Report unreachable code in JS files when --checkjs is passed, but not
otherwise.
2017-06-01 18:11:26 -07:00
Nathan Shively-Sanders
9bcbeffcc7
Test reexport of a missing alias
2017-06-01 09:21:31 -07:00
Ron Buckton
3029313f32
Fix issue with 'for await' over a union type
2017-05-30 15:14:52 -07:00
Kate Miháliková
2d60b2d117
Add tests and baselines
2017-05-30 08:04:18 +02:00