Skip to content

Commit

Permalink
add types
Browse files Browse the repository at this point in the history
  • Loading branch information
JoviDeCroock committed Jun 28, 2023
1 parent abc3e98 commit ac7ed37
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assign } from './util';
import { diff, commitRoot, applyRef } from './diff/index';
import { diff, commitRoot } from './diff/index';
import options from './options';
import { Fragment } from './create-element';

Expand Down
1 change: 1 addition & 0 deletions src/diff/children.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { isArray } from '../util';
* render (except when hydrating). Can be a sibling DOM element when diffing
* Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.
* @param {boolean} isHydrating Whether or not we are in hydration
* @param {Array<any>} refQueue an array of elements needed to invoke refs
*/
export function diffChildren(
parentDom,
Expand Down
4 changes: 3 additions & 1 deletion src/diff/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import options from '../options';
* element any new dom elements should be placed around. Likely `null` on first
* render (except when hydrating). Can be a sibling DOM element when diffing
* Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.
* @param {boolean} [isHydrating] Whether or not we are in hydration
* @param {boolean} isHydrating Whether or not we are in hydration
* @param {Array<any>} refQueue an array of elements needed to invoke refs
*/
export function diff(
parentDom,
Expand Down Expand Up @@ -330,6 +331,7 @@ export function commitRoot(commitQueue, root, refQueue) {
* @param {Array<import('../internal').Component>} commitQueue List of components
* which have callbacks to invoke in commitRoot
* @param {boolean} isHydrating Whether or not we are in hydration
* @param {Array<any>} refQueue an array of elements needed to invoke refs
* @returns {import('../internal').PreactElement}
*/
function diffElementNodes(
Expand Down
2 changes: 1 addition & 1 deletion src/render.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EMPTY_OBJ } from './constants';
import { applyRef, commitRoot, diff } from './diff/index';
import { commitRoot, diff } from './diff/index';
import { createElement, Fragment } from './create-element';
import options from './options';
import { slice } from './util';
Expand Down

0 comments on commit ac7ed37

Please sign in to comment.