Commit Graph
100 Commits
Author SHA1 Message Date
Ron Buckton e67b06e909 Simplistic watch mode for runtests (#51461)
* Simplistic watch mode for runtests

* Use esbuild WatchMode object for testRunner updates

* switch AbortController to CancelToken
2022-11-09 15:07:08 -05:00
Ron Buckton 5cfb3a2fe3 Only call return() for an abrupt completion in user code (#51297) 2022-10-28 18:36:40 -04:00
Ron Buckton a7a9d158e8 Fix for broken baseline in yieldInForInInDownlevelGenerator (#51345) 2022-10-28 16:56:53 -04:00
Ron Buckton 7f8426f4df fix for-in enumeration containing yield in generator (#51295) 2022-10-28 15:09:10 -04:00
Ron Buckton 702de1eeaa Fix early call to return/throw on generator (#51294) 2022-10-24 22:37:42 -04:00
Ron Buckton a56b254ad3 Include 'this' type parameter in isRelatedTo fast path (#51230) 2022-10-21 08:00:24 -04:00
Ron Buckton 3abd351c0e Fix super property transform in async arrow in method (#51240) 2022-10-21 08:00:00 -04:00
Ron Buckton 2dff34e8c4 markAliasReferenced should include ExportValue as well (#51219) 2022-10-19 13:24:01 -04:00
Ron Buckton 865848fcfb Fix <= and > comparisons when compared against prerelease versions (#50915)
* Fix <= and > comparisons when compared against prerelease versions

* Improve coverage for semver
2022-09-28 18:46:06 -04:00
Ron Buckton a4cabe725b Support for auto-accessor fields from the Stage 3 Decorators proposal (#49705)
* Support for auto-accessor fields

* Add tests, ensure accessors are initialized in ctor

* classFields cleanup and PR feedback
2022-09-12 15:12:11 -04:00
Ron Buckton aaa4f9d9ff Make canHaveModifiers/Decorators public (#50399) 2022-08-22 15:01:17 -04:00
Ron Buckton 284837d66b Fixes for decorators property deprecations (#50343)
* Change type of deprecated 'decorators' property

* fix 'Invalid Arguments' error for create/update constructor in factory

* Update deprecation comments

* Make 'decorators' optional and 'undefined'

* Rename '_decorators' to 'illegalDecorators'

* Update baselines
2022-08-19 14:27:26 -04:00
Ron Buckton 1592210673 Add a jump-table for visitEachChild (#50266)
* Add a jump-table for visitEachChild

* Name each visitor function for better stack traces

* Fix node tests and some minor cleanup
2022-08-18 15:03:17 -04:00
Ron Buckton 6bbe6d67d1 Fix return value and error reporting for getIterationTypesOfMethod (#50146) 2022-08-03 19:07:29 -04:00
Ron Buckton d6d26430c7 Add rule to auto-paren optional chain in normal prop or element access (#50156) 2022-08-03 17:17:26 -04:00
Ron Buckton 55f2c0cb49 No synthetic Awaited for unconstrained type when not a type variable (#50100) 2022-08-01 17:19:15 -04:00
Ron Buckton 88a1e3a1dd Transform decorators that reference private names into a 'static {}' block (#50074) 2022-07-29 15:29:48 -04:00
Ron Buckton 12dbdf03b1 Parse parameter decorators outside of Await context when appropriate (#50040) 2022-07-25 17:17:27 -04:00
Ron Buckton c6ff5f3b52 Fix for Awaited<T> inference (#49748) 2022-07-01 15:00:54 -07:00
Ron Buckton b3a79dbe04 fix missing 'internal' comment 2022-06-09 18:39:05 -07:00
Ron Buckton 1e65b330a7 Merge 'decorators' into 'modifiers' on various nodes (#49089)
* Merge 'decorators' into 'modifiers' on various Nodes

* Drop RESERVED argument in favor of removing parameter

* Ignore grammar error nodes when asserting invariants

* Revert 'illegalX' property renames

* PR Feedback
2022-06-09 17:24:02 -07:00
Ron Buckton cb1bc6169b Move legacy decorators into separate transform (#48669) 2022-06-03 09:36:29 -07:00
Ron Buckton ba4525202e More specific inference for constrained 'infer' types in template literal types (#48094)
* More specific inference for constrained 'infer' types in template literal types

* PR feedback

* Add inference priority for template type placeholders

* Infer to a preferred constraint instead of a union

* Add reduceType

* Switch tests to use infer..extends

* Add missing primitive constraint cases

* Update .types tests

* Remove TemplateTypePlaceholderPriority

* Remove reduceType
2022-05-27 11:05:24 -07:00
Ron Buckton e2bd89b309 Report error for invalid 'this' type during 'await' (#48946) 2022-05-09 13:58:36 -07:00
Ron Buckton b975dfa102 Write more useful types in .types test outputs (#48578) 2022-04-07 09:51:17 -07:00
Ron Buckton 7da80d79e2 Add 'extends' clause to 'infer' type (#48112)
* Add 'extends' clause to 'infer' type

* Revise parse for infer..extends, improve parenthesizer

* More aggressive parens to match existing DT tests

* tests 'infer' constraint using outer type parameter

* Adds a test showing 'infer' cannot reference other 'infer' in same 'extends'

* Emit extends clause for synthetic infer typesduring declaration emit
2022-04-05 12:35:28 -07:00
Ron Buckton 3328feb799 Use 'static {}' for static fields when available and useDefineForClassFields is false (#47707) 2022-02-04 12:34:29 -08:00
Ron Buckton 21bbb576ad Fix captured const in downlevel for-await (#47680) 2022-02-01 11:47:29 -08:00
Ron Buckton 63d9d4c8bf Transform param patterns/initializers after object rest (#47095) 2022-02-01 11:46:29 -08:00
Ron Buckton 7183b14831 Fix captured let/const in 'for' condition or incrementer (#47681) 2022-02-01 09:48:15 -08:00
Ron Buckton c8f1a874a3 Exempt tslib from indirect call transform (#47070) 2021-12-08 15:42:37 -08:00
Ron Buckton 67f84ef771 Fix Awaited<T> for onfulfilled callbacks with more than one argument (#46951) 2021-12-07 15:21:11 -08:00
Ron Buckton c792a66065 Pin chalk to ^4.1 (#46985)
* Pin chalk to ^4.1

* Revert #46931
2021-12-02 11:05:17 -08:00
Ron Buckton 4c0a51e14b Avoid Promise<Awaited<T>> in return type inference (#45925) 2021-09-22 16:29:07 -07:00
Ron Buckton b23f44aee5 Simplify a branch of the Awaited type and clean up comments (#45918) 2021-09-16 15:04:09 -07:00
Ron Buckton ea521d45e9 Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any (#45350)
* Adds 'Awaited' type alias and updates to Promise.all/race/allSettled/any

* Use Awaited<T> with 'await'

* Clean up overloads

* Further restrict 'Awaited<T>' auto-wrapping for 'await'
2021-09-09 18:23:17 -07:00
Ron Buckton cf787e9bcf Fix name resolution in typedef and allow defaults for template tags (#45483)
* Fix name resolution in typedef and allow defaults for template tags

* Inline parseBracketNameInTemplateTag

* Update baselines

* Add js declaration emit tests
2021-09-08 17:05:07 -07:00
Ron Buckton 6f7f3b1775 Minor fixes to "Convert To Async" refactor (#45536)
* Minor fixes to convertToAsync

* Back out on nested return in inner continuation

* Baseline update

* Verify type argument for call can be used, add a few more early exit shortcuts
2021-09-01 13:13:12 -07:00
Ron Buckton 107c556fe4 Fix 'as const'-like behavior in JSDoc type cast (#45464) 2021-08-27 18:22:02 -07:00
Ron Buckton d8e830d132 Fix __spreadArray for non-concat-spreadables (#45386) 2021-08-09 17:08:07 -07:00
Ron Buckton 4fc4c18299 Fix completions in return when in function with contextual 'this' (#45340) 2021-08-05 22:40:20 -07:00
Ron Buckton 365b25693c Fix and validate post-increment/decrement in module emit (#44968) 2021-07-19 13:34:42 -07:00
Ron Buckton 66c3063b06 Add collision check for 'Reflect' when using super in static initializers (#44876)
* Add collision check for 'Reflect' when using super in static initializers

* PR feedback

* Accept baseline for new failing test
2021-07-10 12:48:54 -07:00
Ron Buckton 8590f0db40 Fix decorator emit regression for static fields (#44933) 2021-07-07 16:58:36 -07:00
Ron Buckton 069650f602 Change PerformanceObserver to be compatible with new Node types (#44884) 2021-07-03 21:26:56 -07:00
Ron Buckton 09406524b3 Add evaluation tests for class static initializers (#44878) 2021-07-03 18:30:42 -07:00
Ron Buckton 8b496ed34c Fix class name reference in class expr (#44877) 2021-07-02 18:37:23 -07:00
Ron Buckton 711b4e778b Indirect calls for imported functions (#44624)
* Indirect calls for imported functions

* Fix unit tests
2021-06-21 19:51:13 -07:00
Ron Buckton a0c44b26b7 Improve __spreadArray perf, and other fixes related to SpreadElement (#44527)
* Improve __spreadArray perf, fix array packing and trailing omitted expressions

* Ensure __spreadArray is backwards-compatible

* Add signature restriction for __spreadArray

* Added reusable true/false literals
2021-06-11 16:21:55 -07:00
Ron Buckton 4ce12f9f65 Move class name capture for private state until after declaration evaluates (#44186) 2021-05-20 14:35:40 -07:00
Ron Buckton cb9cd898d1 Revert #35877 - fix receiver on calls of imported and exported functions (#43993) 2021-05-07 13:42:12 -07:00
Ron Buckton e0d551606f Remove preprinter, add parenthesizer callback to emit (#43652) 2021-04-19 09:34:46 -07:00
Ron Buckton e10a32591c Use 'abstract new' in InstanceType and ConstructorParameters (#43380) 2021-03-25 15:27:06 -07:00
Ron Buckton fbd7f7db20 Update typescript-eslint to latest (#43381) 2021-03-25 14:46:16 -07:00
Ron Buckton 03bf732f73 Accepts baseline change caused by #43035 (#43322) 2021-03-21 13:42:20 -07:00
Ron Buckton 9af313db77 Use shared binary trampoline in checker (#43035) 2021-03-19 18:54:51 -07:00
Ron Buckton ec4863cc0e Fix37991 (#43166)
* Add failing test

* Fix tslib check errors for commonjs imports
2021-03-09 11:43:19 -08:00
Ron Buckton 38fdce9440 Expose 'reservedInNestedScopes' option when creating temp and loop variables (#43083) 2021-03-04 15:37:45 -08:00
Ron Buckton 68b0323b72 Refactor emit substitution into transform (#42676)
* Refactor emit substitution into transform

* Add reusable state machine for binary expressions

* Allow emitBinary to use state machine for comments/sourcemaps

* Switch core trampoline state back to arrays

* Switch binder to parallel stacks, temporarily partially revert emitBinary

* Add link to benchmark when posting perf results

* Ensure work stacks are per-execution

* Reenable comments and sourcemaps
2021-02-25 23:01:41 -08:00
Ron Buckton c953969698 Switched 'ts.performance' to a mixed mode only uses native performance APIs when necessary (#42586)
* Partially revert native performance

* Fix bug in measure

* Conditionally enable native perf events
2021-02-01 15:33:34 -08:00
Ron Bucktonandtypescript-bot 786a7e86ef Update user baselines (#42451)
* Update user baselines +cc @sandersn

* Update user baselines

Co-authored-by: typescript-bot <typescript@microsoft.com>
2021-01-22 18:44:25 -08:00
Ron Buckton ee3fe472d7 Fix broken user and docker tests (#42431)
* Add --force to npm install script for user tests

* Migrate prettier to docker

* Fix vscode Dockerfile

* Fix stack space issue in isJSLiteralType

* Use --legacy-peer-deps based on npm version

* Fix xterm.js Dockerfile
2021-01-22 13:23:41 -08:00
Ron Buckton 0d284e6c26 Add support for abstract constructor types (#36392)
* Add support for abstract constructor types

* Add backwards-compatible overloads for creating/updating constructor types

* Reverting use of 'abstract' in lib/es5.d.ts due to eslint issues

* Update baseline due to reverting lib

* Add error for failing to mark an mixin class as abstract

* Fix declaration/quick info for abstract construct signatures
2021-01-07 17:11:14 -08:00
Ron Buckton 44ec8ddaee Fix array spread with sideeffects (#41523)
* Fix array spread with sideeffects

* Minor cleanup, ensure multiple emit helpers for outfile tests
2021-01-05 17:24:21 -08:00
Ron Buckton 6fac3ddfd4 Fix module resolution for import call emit (#41390) 2021-01-04 15:08:57 -08:00
Ron Buckton 4239904517 Report implicit any error for 'yield' result with no contextual type (#41348) 2020-12-18 09:55:33 -08:00
Ron Buckton e789cb1356 Fix single-line comment disrupting return w/optional chain (#42026) 2020-12-17 18:55:09 -08:00
Ron Buckton 2a736a88e3 Simplify visitNode's 'lift' argument (#42000) 2020-12-17 12:43:59 -08:00
Ron Buckton 9b2eab9da2 Merge pull request #41810 from microsoft/fixDeprecations
Fix deprecation messages to point to correct APIs
2020-12-14 12:51:48 -08:00
Ron Buckton 9b1fec29b4 Fix deprecation messages to point to correct APIs 2020-12-03 15:34:06 -08:00
Ron Buckton 324f0469c0 Merge pull request #41791 from microsoft/fix40643
Reuse temp variable scope for converted loop body
2020-12-03 13:33:09 -08:00
Ron Buckton 27dc177f29 Reuse temp variable scope for converted loop body 2020-12-02 18:11:45 -08:00
Ron Buckton e012417471 Merge pull request #37283 from JoshuaKGoldberg/extends-constructor-typeerror
Added runtime TypeError for non-function, non-null __extends
2020-12-01 17:43:25 -08:00
Ron Buckton 64a6e6c30d Merge pull request #41507 from microsoft/fix32890
Fix definition of ts.Iterator
2020-11-11 20:50:09 -08:00
Ron Buckton 54e54f4f19 Fix definition of ts.Iterator 2020-11-11 18:42:12 -08:00
Ron Buckton b9ed93ee6c Merge pull request #41331 from microsoft/fix39149
Fix double alias of complex export/import/default/namespace combination
2020-10-30 09:25:58 -07:00
Ron Buckton f944afd053 Fix double alias of complex export/import/default/namespace combination 2020-10-29 18:42:36 -07:00
Ron Buckton bcbe1d7638 Merge pull request #41094 from microsoft/destructuringEvaluationOrder
Fix destructuring evaluation order for initializers
2020-10-29 17:12:18 -07:00
Ron Buckton 2b7e790732 Update control flow for nested binary exprs 2020-10-29 13:32:32 -07:00
Ron Buckton 8a15291541 Update control flow for correct destructuring evaluation order 2020-10-28 16:50:15 -07:00
Ron Buckton 90e944daba Merge pull request #41253 from microsoft/nativePerformanceHooks2
Fix dependency order and observer registration
2020-10-26 12:56:44 -07:00
Ron Buckton 0847d85a4c Fix dependency order and observer registration 2020-10-26 12:27:34 -07:00
Ron Buckton db6f66cc4e Merge pull request #40593 from microsoft/nativePerformanceHooks
Migrate 'ts.performance' to use native performance hooks when available
2020-10-23 17:32:55 -07:00
Ron Buckton 7b0d049b89 PR feedback 2020-10-23 17:08:07 -07:00
Ron Buckton 8ed645ae1a Don't emit duplicate triple-slash directives when using API to print a .d.ts (#40968) 2020-10-23 16:31:58 -07:00
Ron Buckton 0b303ff08a Fix some rest cases and handling of unused results 2020-10-22 18:58:21 -07:00
Ron Buckton 28c4f32ddf Merge branch 'master' into destructuringEvaluationOrder 2020-10-22 17:14:23 -07:00
Ron Buckton c5800d1928 Remove shims, workaround for bug in peformance.measure 2020-10-22 13:52:10 -07:00
Ron Buckton 68806c67f1 Simplify tests for enablement in mark/measure, remove onProfilerEvent 2020-10-15 19:10:51 -04:00
Ron Buckton c52e3b29e7 Add unit tests for PerformanceHooks shim 2020-10-15 19:10:51 -04:00
Ron Buckton dfa55add5a Write message instead of crashing when native perf API not found. 2020-10-15 19:10:51 -04:00
Ron Buckton a197beef6d Migrate 'ts.performance' to use native performance hooks when available 2020-10-15 19:10:50 -04:00
Ron Buckton 7393dba6bd Fix destructuring evaluation order for initializers 2020-10-13 17:14:35 -07:00
Ron Buckton 14714bbace Don't emit duplicate triple-slash directives when using API to print a .d.ts 2020-10-06 15:02:41 -07:00
Ron Buckton dba042d7d5 Add quick fix to add 'void' to Promise resolved without value (#40558)
* Add codefix to add 'void' to Promise resolved without value

* Add specific error message in checker to reduce quick-fix time in editor
2020-09-14 19:12:33 -07:00
Ron Buckton d5a646eb66 Remove optionality for Promise resolve callback (#39817) 2020-09-03 17:21:53 -07:00
Ron Buckton d89635381a Add support for vscode-js-debug's customDescriptionGenerators (#40308) 2020-09-02 20:05:50 -07:00
Ron Buckton 10fb9c9381 Treat trailing 'void' as optional for assignability (#40231) 2020-08-28 09:12:09 -07:00
Ron Buckton 598e9b2e88 Allow trailing params of 'undefined', 'unknown', and 'any' to be optional in non-strictNullChecks JS (#40057) 2020-08-20 13:38:14 -07:00
Ron Buckton fca9f451d8 Add missing 'importName' for private field helpers (#39932) 2020-08-06 13:27:19 -07:00