mirror of
https://github.com/bendtherules/react-fiber-traverse.git
synced 2026-08-18 22:01:49 +00:00
Refactor FiberNode typedef to separate file
This commit is contained in:
+1
-6
@@ -1,10 +1,5 @@
|
|||||||
// import { isNodeSimple } from './utils';
|
// import { isNodeSimple } from './utils';
|
||||||
|
import {FiberNode} from './mocked-types';
|
||||||
export interface FiberNode {
|
|
||||||
child: FiberNode | null;
|
|
||||||
sibling: FiberNode | null;
|
|
||||||
// Add type
|
|
||||||
}
|
|
||||||
|
|
||||||
function traverse(node: FiberNode, fn: (node: FiberNode) => any) {
|
function traverse(node: FiberNode, fn: (node: FiberNode) => any) {
|
||||||
// if (node.child) {
|
// if (node.child) {
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
export interface FiberNode {
|
||||||
|
child: FiberNode | null;
|
||||||
|
sibling: FiberNode | null;
|
||||||
|
// Add type
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user