Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed Apr 15, 2024
1 parent 3fceceb commit 49b16e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/reactivity-core/TaskQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ export class TaskQueue {
private queue: Task[] = [];
private channel = new MessageChannel();

constructor() {}

/**
* Enqueues a function to be executed in the next task queue iteration.
*
Expand Down Expand Up @@ -52,6 +50,7 @@ export class TaskQueue {
}

private messageHandler = () => this.runIteration();

private scheduleIteration() {
// register and unregister for every iteration otherwise node will not terminate
// https://stackoverflow.com/a/61574326
Expand Down
4 changes: 2 additions & 2 deletions packages/reactivity-core/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ import { EffectFunc, syncEffect, syncEffectOnce, syncWatch, WatchOptions } from
* // later:
* handle.destroy();
* ```
*
*
* You can also return a _function_ from your effect callback.
* It will be called automatically when either the effect will be re-executed or when the effect is being destroyed.
* This can be very convenient to revert (or clean up) the side effects made by an effect:
*
*
* ```js
* effect(() => {
* const job = startAJob();
Expand Down

0 comments on commit 49b16e3

Please sign in to comment.