okmttdhr
7db5f68144
Add index signature for anonymous object literal type ( #37903 )
...
* Use ts.map for stylistic consistency
* Show error only if noImplicitAny is set
* Accept baseline for noImplicitAnyIndexing
* Fix lint error
* Add test cases for indexedAccessWithFreshObjectLiteral
2020-11-02 14:35:56 -08:00
Oleksandr T
f646ec87fc
fix(40901): skip checking custom arguments name in a constructor ( #40912 )
2020-11-02 14:35:07 -08:00
Oleksandr T
075477f9cf
fix(35779): emit comments after trailing comma ( #37887 )
2020-11-02 14:24:55 -08:00
Wesley Wigham
479105090d
Merge pull request #41330 from weswigham/jsx-import-source-as-auto-import
...
Auto-include types for the jsx import source in the new jsx transforms
2020-10-30 16:51:04 -07:00
Wesley Wigham
e044b56d7f
Merge pull request #40985 from weswigham/static-decl-ref
...
Adjust typeof import name lookup to better match type query lookup
2020-10-30 11:13:23 -07:00
Wesley Wigham
6714998e01
Auto-include types for the jsx import source in the new jsx transforms
2020-10-29 14:17:24 -07:00
Wesley Wigham
f0f3862cd9
Merge pull request #41314 from weswigham/fix-global-jsx-ns-alias-crashes
...
Fix crashes when the global JSX namespace is an alias
2020-10-28 18:38:26 -07:00
Wesley Wigham
d722392d81
Fix crashes when the global JSX namespace is an alias
2020-10-28 14:31:40 -07:00
Wesley Wigham
4ec02a56b8
Bind comma expression LHS call expressions
2020-10-28 13:48:29 -07:00
Anders Hejlsberg
bd27bd8d47
Don't relate unmatched parameter positions in signatures ( #41308 )
...
* Don't relate unmatched parameter positions in signatures
* Add regression test
* Accept new baselines
2020-10-28 11:55:32 -07:00
Wesley Wigham
6acce0ca6f
Merge pull request #41075 from uhyo/fix-36958
...
allow type narrowing with NonNullExpression
2020-10-27 20:10:27 -07:00
Wesley Wigham
c923023494
Merge pull request #41191 from weswigham/control-flow-comma-exprs
...
Track control flow for comma expressions in call expressions
2020-10-27 12:37:02 -07:00
Anders Hejlsberg
f9dcd9ef98
Don't cache Ternary.Maybe results when recursion is encountered during variance measurement ( #41218 )
...
* Don't record Ternary.Maybe results in cache during recursive variance measurement
* Add regression test
* Accept new baselines
* Use Ternary.Unknown to signal variance recursion
* Add comments
* Fix comment
2020-10-27 10:53:13 -07:00
Daniel Rosenwasser
3517af8f80
Make 'getIndentString' just use a loop. ( #41221 )
...
* Make 'getIndentString' just use a loop.
* Added test.
* Accepted baselines.
2020-10-26 12:19:31 -07:00
Anders Hejlsberg
d1f87d18b1
Support partial reverse mapped inferences with tuple types ( #41106 )
...
* Support partial reverse mapped inferences with tuple types
* Add tests
* Accept new baselines
2020-10-22 11:27:41 -07:00
Wesley Wigham
6dde1621cb
Track control flow for comma expressions in call expressions
2020-10-21 12:31:29 -07:00
Andrew Branch
1f852ed747
Percent-encode source map URLs ( #41102 )
2020-10-20 13:11:52 -07:00
Wesley Wigham
b8dfa28ca8
Do not consider empty jsx expressions semantically important children
2020-10-19 13:34:16 -07:00
Anders Hejlsberg
3918e6c535
Move anonymous type instantiation cache from AST node to root type ( #41084 )
...
* Move anonymous type instantiation cache from AST node to root type
* Use "root" type reference as cache location for deferred type references
* Add test
Co-authored-by: Andrew Branch <andrew@wheream.io >
2020-10-19 07:26:48 -07:00
Wesley Wigham
ce1947b0be
Merge pull request #41070 from weswigham/use-minimal-endings-in-bundled-declaration-emit
...
Use minimal endings when generating declarations for js
2020-10-14 15:29:50 -07:00
Eli Barzilay
5b2fba3334
transformGenerators: handle CommaListExpression
...
Uses essentially the same code as `visitCommaExpression` (which was
moved, to keep both together and close to
`visit{Right,Left}AssociativeBinaryExpression`).
Fixes #40614 .
2020-10-14 15:58:13 -04:00
Wesley Wigham
84726be01a
Merge pull request #40597 from weswigham/allow-instanceof-array-to-narrow-readonly-array
...
Handle the mapping between Array and ReadonlyArray in isTypeDerivedFrom
2020-10-13 15:08:17 -07:00
uhyo
58781b0d41
allow type narrowing with NonNullExpression
2020-10-13 13:00:09 +09:00
Wesley Wigham
1cdb621257
Use minimal endings when generating declarations for js
2020-10-12 16:01:32 -07:00
Andrew Branch
a09a7144e7
Fix crash resolving ImportTypeNode in JSDoc ( #40838 )
2020-10-12 09:33:39 -07:00
Wesley Wigham
39c2a09b1f
Fix crash due to unchecked cast in addImplementationSuccessElaboration
2020-10-09 10:53:59 -07:00
Wesley Wigham
a49099fd15
Add elaboration when call fails all overloads but succeeds against the implementation signature
2020-10-08 14:55:14 -07:00
Nathan Shively-Sanders
cf3e28ea66
Revert "feat(40197): handle uncalled function checks in binary expressions ( #40260 )"
...
This reverts commit eaf4f46c17 .
2020-10-07 14:14:49 -07:00
Alex T
eaf4f46c17
feat(40197): handle uncalled function checks in binary expressions ( #40260 )
2020-10-07 14:06:42 -07:00
Wesley Wigham
c6734afba5
Adjust typeof import name lookup to better match type query lookup
2020-10-07 12:08:20 -07:00
Mauro Bringolf
48ad25d4b9
Add currency sign to NumberFormatOptions type ( #40709 )
2020-10-06 16:30:09 -07:00
Daniel Rosenwasser
3766be1bde
Test indexed access to this on intersections ( #40967 )
...
* Added test.
* Accepted baselines.
2020-10-06 14:18:44 -07:00
Vincent Boivin
57661607e9
fix(40929) PromiseConstructor error message for newer versions of ECMAScript ( #40931 )
...
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Update package-lock.json
* Fixes #40929
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com >
2020-10-05 16:38:12 -07:00
Tiago Tristao
1191e2e731
Fix class expression from being assignable if types don't match ( #40660 )
...
* Fix class expression from being assignable if types don't match
* Fix class expression from being assignable if types don't match
2020-10-05 13:21:38 -07:00
Wesley Wigham
77df9faabf
Merge pull request #40886 from weswigham/error-on-anonymous-type-with-nonlocal-unique-symbol
...
Limit when we allow nested unique symbols to be serialized
2020-10-05 11:59:45 -07:00
Orta Therox
dd84bc1dc9
Handles creating a reasonable AST when destructuring into a parens'd expresssion ( #40115 )
...
* Handles creating a lgical AST when destructuring into a parens
* Adds an async example
2020-10-05 14:12:47 -04:00
Vincent Boivin
61aadc4ce2
fix(40320): Better errors when using properties/methods from newer versions of ECMAScript ( #40650 )
...
* Update package-lock.json
* Suggesting a library for a missing property/method
* Added more types and added tests
* Added more tests to cover all the latest features
* Added bigintarrays and dataview methods
* Fixed typo in template
* Transform old error message to use 2nd template slot
* Removed test that has been split up between es2015 and es2016+
* Use empty arrays and remove unnecessary function call
* merge
* Added early bail-out and updated baselines
* Implemented early bail-out (misread)
Co-authored-by: TypeScript Bot <typescriptbot@microsoft.com >
2020-10-02 16:47:37 -07:00
Richa Deshmukh
b748484031
#40763 Fixed: Bad error message when forgetting a comma in an array of templ… ( #40907 )
...
* #40763 Bad error message when forgetting a comma in an array of template strings
* Code review fixes
2020-10-02 15:37:59 -07:00
Wesley Wigham
b86dc34386
Limit when we allow nested unique symbols to be serialized to when their declaration is within the same file as the context
2020-10-01 15:20:01 -07:00
Wesley Wigham
e9465c5de5
Properly compare path prefixes when generating module paths
2020-10-01 14:56:32 -07:00
Wesley Wigham
b93da6291a
Emit non-identifier enum member references as typeof parent[some name] ( #40679 )
2020-10-01 13:06:17 -07:00
Wesley Wigham
a91c2879ef
Allow discrimination to identical object types when discriminating contextual types ( #40574 )
...
* Merge identical object types when discriminating contextual types
Co-authored-by: Orta <ortam@microsoft.com >
* Allow identical discriminants when discriminating, rather than trying to unify identical union members
* Fix lint
Co-authored-by: Orta <ortam@microsoft.com >
2020-09-23 00:51:14 -07:00
uhyo
61910e8c97
Fix missing constraints for parenthesized infer T ( #40406 )
...
* add tests
* consider parenthesized types in getInferredTypeParameterConstraint
* update tests
2020-09-23 00:48:40 -07:00
Wesley Wigham
10b240cde3
Allow an infer type node to resolve its own name ( #40483 )
2020-09-22 21:21:13 -07:00
Andrew Branch
735a67a05e
Fix iterable contextual type ( #40592 )
2020-09-17 10:42:47 -07:00
Wesley Wigham
081f98232b
Handle the mapping between Array and ReadonlyArray in isTypeDerivedFrom
2020-09-16 13:31:13 -07:00
Wesley Wigham
98314d77e8
Use unexpanded parameter list in serialization when the expanded list has a non-trailing variadic position ( #40556 )
2020-09-14 19:56:24 -07:00
Wesley Wigham
94123d5744
Issue a diagnostic when the node builder performs truncation despite the NoTruncation flag being set ( #40477 )
2020-09-14 12:20:57 -07:00
Andrew Branch
9c8d11b5ed
Allow 'paths' without 'baseUrl' ( #40101 )
...
* Allow paths without baseUrl
* Remove exception for leading * paths
* Add comment, remove commented code
* Update baselines
* Remove unnecessary default
* Fix test harness
* Fix baseline
* Resolve relative to host.getCurrentDirectory() with createProgram API
2020-09-11 12:58:40 -07:00
Orta Therox
aa2756a5d7
Updates Dom lib with TSJS changes, adding a new library for webworker iterable ( #40500 )
...
* Updates Dom lib with TSJS changes, adding a new library for webworker iterable
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com >
* Fixes tests
Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com >
2020-09-11 15:36:00 -04:00