Commit graph

29306 commits

Author SHA1 Message Date
Sheetal Nandi 0e736a7438
Fix the usage of pattern matching in module resolution for check of hasZeroOrOneAsteriskCharacter (#35209)
* Fix the usage of pattern matching for check of hasZeroOrOneAsteriskCharacter
Fixes #35171

* Fix error message
2019-11-20 10:55:40 -08:00
Kārlis Gaņģis 17f5469a2c Fix crash with Object.defineProperty for imported alias (--allowJs) (#35198)
Fixes #35196
2019-11-20 10:50:47 -08:00
Nathan Shively-Sanders 75301c8e2c
DOM update 2019-11-19 (#35207)
* DOM update 2019-11-19

* update baselines

* update more baselines
2019-11-19 15:02:51 -08:00
Andrew Branch 571ca60b08
Add preceding semicolon on await insertion when parentheses are included (#34627)
* Add preceding semicolon on await insertion when parentheses are included

* Just start with precedingToken

* Fix semicolon formatter regression

* Delete test with debatable expected behavior

* Lint after control flow changes
2019-11-19 13:11:42 -08:00
Daniel Rosenwasser b50b9e0fd2
Fix check for get/set recommendation (#34885)
* Added more tests.

* Accepted baselines.

* Work better with any parameter type.

* Accepted baselines.

* Use the actual indexed expression.

* Add tests that exhibit bad stringification.

* Accepted baselines.

* Short-circuit stringification on 'undefined'.

* Accepted baselines.

* Remove space.

* Accepted baselines.
2019-11-19 13:00:24 -08:00
Nathan Shively-Sanders 0bbeab6e61
Revert "Skip costly tests" (#35197)
* Revert "Skip costly tests"

* fix package.json format
2019-11-19 12:59:09 -08:00
Orta af0d5d33b6
Improve positioning of the implement interface codefix (#34928) 2019-11-19 12:13:50 -05:00
Ron Buckton 6c59dc34ac
More tests for super.method call chain, improve vary-by (#35013) 2019-11-18 18:03:37 -08:00
Klaus Meinhardt fce728e07f fix emit for delete on optional chain (#35090)
* fix emit for delete on optional chain

* Apply suggestions from code review

Co-Authored-By: Ron Buckton <ron.buckton@microsoft.com>
2019-11-18 16:34:47 -08:00
Anders Hejlsberg 8b83703632
Properly strip readonly from rest argument types (#35169)
* Properly strip readonlyness from rest argument types

* Add tests

* Accept new baselines
2019-11-18 13:11:36 -08:00
Orta e39bdc3606
Adds back the script to request a playrgound build (#35168) 2019-11-18 12:05:54 -05:00
Sheon Han 2511f3438b fix: mardkown link syntax error (#35123) 2019-11-18 10:36:23 -05:00
Anders Hejlsberg 196c0aa078
Fix excess property checking for unions with index signatures (#34927)
* Fix excess property checking for union targets with index signatures

* Accept new baselines

* Remove unused code

* Add tests

* Accept new baselines
2019-11-15 10:59:58 -08:00
Andrew Branch 48fa3a5f18
Update LKG (#35128) 2019-11-15 10:31:30 -08:00
Jack Williams 3bcea0dbba Fix #35060 (#35065)
* Fix 35060

* Refactor and check ro-array to tuple case

* Lint
2019-11-15 10:13:10 -08:00
Klaus Meinhardt 5321dcb09f disallow 'await' and 'yield' in property and enum member initializer (#34892)
* disallow 'await' and 'yield' in property and enum member initializer

* accept baseline changes

* Add a test for #34887

Ensures that this fixes #34887
2019-11-14 17:44:48 -08:00
Klaus Meinhardt 8f40ac06cc optimize transform of optional chaining and nullish coalescing (#34951)
* optimize transform of optional chaining and nullish coalescing

* remove unnecessary condition

* typo

* fix lint

* prevent capturing of super

* swap branches again

* accept new baselines

* avoid temporary objects
2019-11-14 17:34:13 -08:00
Sheetal Nandi aa0cb889da
Support dynamic file names with project root path (#35111)
* Support dynamic file names with project root path
Fixes #35094

* Remove unexpected change
2019-11-14 15:37:00 -08:00
Orta ef0cca7d12
Adds 'did you mean' to the CLI args parser (#35063)
* Adds did you mean to the CLI args parser

* Adds test coverage for the did you mean on CLI args

* Adds did you mean to convertOptionsFromJson

* Ensure tsconfig compiler flags also get 'did you mean?'
2019-11-13 20:16:48 -05:00
TypeScript Bot f5bdd4daca Update user baselines (#35075) 2019-11-13 13:13:38 -08:00
Anders Hejlsberg 38db7ae59e
Properly analyze switch statement bypass control flow (#35087)
* Properly analyze switch statement bypass control flow

* Add regression test

* Accept new baselines
2019-11-13 09:22:18 -08:00
Wesley Wigham aa39080ac7
Do not allow freshness to move errors out of the current file, ensure json documents are deeply unfreshened and fully widened (#35048) 2019-11-12 13:30:27 -08:00
Nathan Shively-Sanders f3344767dd
Fix import type resolution in jsdoc, mark 2 (#35057)
Fake alias resolution only applies when the import type is followed by a
qualified name. Otherwise the alias is sufficiently resolved already.
2019-11-12 12:44:30 -08:00
Klaus Meinhardt 94f85901d7 strip QuestionToken from MethodDeclaration and PropertyDeclaration emit (#34954)
* strip QuestionToken from MethodDeclartion emit

Fixes: #34953

* test property emit
2019-11-12 10:30:46 -08:00
Andrew Casey 5c951635e5
Fix chalk import (#35040) 2019-11-11 11:24:20 -08:00
Anders Hejlsberg 3a5230ab3d
Defer switch exhaustiveness checks (#35000)
* Defer switch exhaustiveness checks until they're actually needed

* Add regression test

* Accept new baselines
2019-11-09 07:52:39 -08:00
Wesley Wigham 165b4bc100
More version sanitization 2019-11-07 17:14:16 -08:00
Andrew Branch 53d2b7ed60
Don’t assume importing some JSON means you want everything imported with .js extensions (#34961) 2019-11-07 14:55:54 -08:00
Andrew Branch 4cbace7110
Add "auto" to importModuleSpecifierPreference (#34981)
* Add "auto" to importModuleSpecifierPreference

* Update APIs
2019-11-07 14:55:13 -08:00
Wesley Wigham db43be130d
Fix missing semicolon 2019-11-07 14:53:12 -08:00
Wesley Wigham 07d80edb3f
Strip more timestamps and versions from docker logs to better handle the more verbose logging from office-ui-fabric 2019-11-07 14:11:33 -08:00
Andrew Branch f2146a627c
Fix isInJsxText after JSXOpeningElement with type arguments (#34958)
* Fix `isInJsxText` after JSXOpeningElement with type arguments

* Do the same thing a different way
2019-11-06 15:02:45 -08:00
Orta b9fe84e591
Fix up some of the ignore files, and removing the create language service script (#33684)
* Fix up some of the ignore files, and removing the create script

* Update .dockerignore
2019-11-06 11:11:29 -05:00
Anders Hejlsberg 1c42c1aaa8
Fix control flow analysis in try-catch-finally (#34880)
* Revise creation of control flow graph for try-catch-finally statements

* Add tests

* Accept new baselines
2019-11-05 12:06:25 -08:00
Anders Hejlsberg 95be956320
Fix switch statement exhaustiveness checking (#34840)
* Don't optimize away CFA nodes representing missing default clauses

* Add regression test

* Accept new baselines
2019-11-05 12:05:41 -08:00
Anders Hejlsberg 966d9864d0
Properly instantiate object types created from rest parameters (#34826)
* Anonymous types of rest variable declarations need instantiation

* Add regression test

* Accept new baselines

* Accept new API baselines
2019-11-05 12:04:45 -08:00
Alexander T 56cad36678 (34894): Wrong information in error message for overridden acc… (#34901) 2019-11-05 00:07:03 -05:00
Ozair Patel be960fa356 Add related diagnostic to "used before defined" if type is a function that returns a union with undefined (#33171)
* Add "use before defined" diagnostic

* Make "use before defined" diagnostic as related information to TS2454

* Add baseline tests for "use before defined"

* Add test for type alias union with undefined for "use before defined" diagnostic

* Update baselines
2019-11-04 17:53:31 -05:00
Sheetal Nandi 47ec514cf4
Use empty object for invalid package json contents instead of undefined (#34906)
* Use empty object for invalid package json contents instead of undefined
Fixes #34726

* Behave as if package json doesnt exist in case of invalid json in package json
2019-11-04 14:31:45 -08:00
Luka Hartwig 9a3ec5f229 Improve error message when compiling a .js file (#34861)
* Improve error message when compiling a .js file

* Add dedicated error message for .json and .js files

* Update missing baseline tests

* Remove error hint for .json files
2019-11-04 14:59:06 -05:00
Ron Buckton ba5e86f140
Propagate 'undefined' instead of the optional type marker at an optional chain boundary (#34588)
* Propagate 'undefined' instead of the optional type marker at an optional chain boundary

* Update src/compiler/types.ts

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2019-11-01 11:36:22 -07:00
Orta ec367feb58
Remove the ping for playgrounds on TS deploys (#34862) 2019-10-31 18:50:00 -07:00
TypeScript Bot e228294463 Update user baselines (#34851) 2019-10-31 14:23:55 -07:00
TypeScript Bot 239937df7a Update user baselines (#34845) 2019-10-31 11:00:03 -07:00
Anders Hejlsberg 9ff378aab3
Exclude types originating in literals from recursion depth limiter check (#34742)
* Exclude types originating in literals from recursion depth limiter check

* Add tests

* Accept new baselines

* Remove superfluous test
2019-10-31 06:14:43 -07:00
Wenlu Wang 234680851b add template literal spans (#34699) 2019-10-30 23:54:00 -07:00
TypeScript Bot 9cc0fcd3da Update user baselines (#34838) 2019-10-30 16:58:59 -07:00
TypeScript Bot 0c2e964506 Update user baselines (#34820) 2019-10-30 14:05:20 -07:00
Wesley Wigham 7b02c635b6
Report generic rest parameters as unreliable variance positions (#33020)
* Report generic rest parameters as unreliable variance positions

* Add example from discussion on #30301
2019-10-30 13:54:39 -07:00
Wesley Wigham 5e0fbc677a
Add circularity checking during deferred type argument creation (#34791) 2019-10-30 13:36:43 -07:00