Skip to content

Commit c07719b

Browse files
committed
typo fix
1 parent 121debd commit c07719b

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/core/src/view/view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ export type TagVirtualNodeFactory = () => TagVirtualNode;
163163

164164
export type PlainVirtualNode = TextVirtualNode | CommentVirtualNode;
165165

166-
export type CanHasChildren = TagVirtualNode | Component;
166+
export type CanHaveChildren = TagVirtualNode | Component;
167167

168168
export type ViewOptions = {
169169
as: string;

packages/core/src/workloop/workloop.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { type Component, detectIsComponent } from '../component';
3030
import { type ElementKey, type Instance, type Callback } from '../shared';
3131
import { Fiber, getHook, Hook } from '../fiber';
3232
import {
33-
type CanHasChildren,
33+
type CanHaveChildren,
3434
Text,
3535
detectIsVirtualNode,
3636
detectIsVirtualNodeFactory,
@@ -107,7 +107,7 @@ function performUnitOfWork(fiber: Fiber, $scope: Scope): Fiber | null {
107107
const isDeepWalking = $scope.getMountDeep();
108108
const isStream = $scope.getIsStreamZone();
109109
const emitter = $scope.getEmitter();
110-
const children = (fiber.inst as CanHasChildren).children;
110+
const children = (fiber.inst as CanHaveChildren).children;
111111
const hasChildren = isDeepWalking && children && children.length > 0;
112112

113113
fiber.hook && (fiber.hook.idx = 0);
@@ -141,7 +141,7 @@ function mountChild(parent: Fiber, $scope: Scope) {
141141
const $hook = parent.child ? parent.child.hook || null : null; // from previous fiber after throwing promise
142142
const $inst = parent.inst;
143143
const idx = 0;
144-
const children = ($inst as CanHasChildren).children;
144+
const children = ($inst as CanHaveChildren).children;
145145
const inst = setupInstance(children, idx);
146146
const alt = getAlternate(parent, inst, idx, $scope);
147147
const fiber = createFiber(alt, inst, idx);
@@ -161,7 +161,7 @@ function mountSibling(left: Fiber, $scope: Scope) {
161161
const $hook = left.next ? left.next.hook || null : null; // from previous fiber after throwing promise
162162
const $inst = left.parent.inst;
163163
const idx = $scope.getMountIndex();
164-
const children = ($inst as CanHasChildren).children;
164+
const children = ($inst as CanHaveChildren).children;
165165
const inst = setupInstance(children, idx);
166166
const hasSibling = Boolean(inst);
167167

@@ -268,7 +268,7 @@ function getAlternate(fiber: Fiber, inst: Instance, idx: number, $scope: Scope)
268268
function reconcile(fiber: Fiber, alt: Fiber, $scope: Scope) {
269269
const { id, inst } = fiber;
270270
const areSameTypes = detectAreSameInstanceTypes(alt.inst, inst);
271-
const nextChildren = (inst as CanHasChildren).children;
271+
const nextChildren = (inst as CanHaveChildren).children;
272272

273273
if (!areSameTypes) {
274274
$scope.addDeletion(alt);
@@ -532,7 +532,7 @@ function commit($scope: Scope) {
532532
$scope.runInsertionEffects();
533533

534534
for (const fiber of candidates) {
535-
const item = fiber.inst as CanHasChildren;
535+
const item = fiber.inst as CanHaveChildren;
536536

537537
fiber.tag !== SKIP_EFFECT_TAG && platform.commit(fiber);
538538
fiber.alt = null;

0 commit comments

Comments
 (0)