chore: fix typos (#1090)
This commit is contained in:
@@ -664,7 +664,7 @@ describe('BaseTransition', () => {
|
||||
expect(props.onAfterEnter).toHaveBeenCalledTimes(1)
|
||||
assertCalledWithEl(props.onAfterEnter, falseSerialized)
|
||||
|
||||
// toggele again
|
||||
// toggle again
|
||||
toggle.value = true
|
||||
await nextTick()
|
||||
expect(serializeInner(root)).toBe(`${falseSerialized}<!---->`)
|
||||
@@ -740,7 +740,7 @@ describe('BaseTransition', () => {
|
||||
await nextTick()
|
||||
// expected behavior: the previous true branch is preserved,
|
||||
// and a placeholder is injected for the replacement.
|
||||
// the leaving node is repalced with the replace node (of the same branch)
|
||||
// the leaving node is replaced with the replace node (of the same branch)
|
||||
// when it finishes leaving
|
||||
expect(serializeInner(root)).toBe(`${trueSerialized}<!---->`)
|
||||
// enter hooks should never be called (for neither branch)
|
||||
|
||||
@@ -112,7 +112,7 @@ describe('hot module replacement', () => {
|
||||
test('reload', async () => {
|
||||
const root = nodeOps.createElement('div')
|
||||
const childId = 'test3-child'
|
||||
const unmoutSpy = jest.fn()
|
||||
const unmountSpy = jest.fn()
|
||||
const mountSpy = jest.fn()
|
||||
|
||||
const Child: ComponentOptions = {
|
||||
@@ -120,7 +120,7 @@ describe('hot module replacement', () => {
|
||||
data() {
|
||||
return { count: 0 }
|
||||
},
|
||||
unmounted: unmoutSpy,
|
||||
unmounted: unmountSpy,
|
||||
render: compileToFunction(`<div @click="count++">{{ count }}</div>`)
|
||||
}
|
||||
createRecord(childId, Child)
|
||||
@@ -142,7 +142,7 @@ describe('hot module replacement', () => {
|
||||
})
|
||||
await nextTick()
|
||||
expect(serializeInner(root)).toBe(`<div>1</div>`)
|
||||
expect(unmoutSpy).toHaveBeenCalledTimes(1)
|
||||
expect(unmountSpy).toHaveBeenCalledTimes(1)
|
||||
expect(mountSpy).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -653,7 +653,7 @@ describe('SSR hydration', () => {
|
||||
// fragment ends early and attempts to hydrate the extra <div>bar</div>
|
||||
// as 2nd fragment child.
|
||||
expect(`Hydration text content mismatch`).toHaveBeenWarned()
|
||||
// exccesive children removal
|
||||
// excessive children removal
|
||||
expect(`Hydration children mismatch`).toHaveBeenWarned()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('scheduler', () => {
|
||||
const calls: string[] = []
|
||||
const job1 = () => {
|
||||
calls.push('job1')
|
||||
// job2 will be excuted after job1 at the same tick
|
||||
// job2 will be executed after job1 at the same tick
|
||||
queueJob(job2)
|
||||
}
|
||||
const job2 = () => {
|
||||
@@ -123,7 +123,7 @@ describe('scheduler', () => {
|
||||
const calls: string[] = []
|
||||
const cb1 = () => {
|
||||
calls.push('cb1')
|
||||
// cb2 will be excuted after cb1 at the same tick
|
||||
// cb2 will be executed after cb1 at the same tick
|
||||
queuePostFlushCb(cb2)
|
||||
}
|
||||
const cb2 = () => {
|
||||
|
||||
@@ -199,7 +199,7 @@ describe('vnode', () => {
|
||||
expect(cloneVNode(node2)).toEqual(node2)
|
||||
expect(cloneVNode(node2)).toEqual(cloned2)
|
||||
|
||||
// #1041 should use reoslved key/ref
|
||||
// #1041 should use resolved key/ref
|
||||
expect(cloneVNode(createVNode('div', { key: 1 })).key).toBe(1)
|
||||
expect(cloneVNode(createVNode('div', { key: 1 }), { key: 2 }).key).toBe(2)
|
||||
expect(cloneVNode(createVNode('div'), { key: 2 }).key).toBe(2)
|
||||
@@ -260,15 +260,15 @@ describe('vnode', () => {
|
||||
})
|
||||
|
||||
test('handlers', () => {
|
||||
let clickHander1 = function() {}
|
||||
let clickHander2 = function() {}
|
||||
let focusHander2 = function() {}
|
||||
let clickHandler1 = function() {}
|
||||
let clickHandler2 = function() {}
|
||||
let focusHandler2 = function() {}
|
||||
|
||||
let props1: Data = { onClick: clickHander1 }
|
||||
let props2: Data = { onClick: clickHander2, onFocus: focusHander2 }
|
||||
let props1: Data = { onClick: clickHandler1 }
|
||||
let props2: Data = { onClick: clickHandler2, onFocus: focusHandler2 }
|
||||
expect(mergeProps(props1, props2)).toMatchObject({
|
||||
onClick: [clickHander1, clickHander2],
|
||||
onFocus: focusHander2
|
||||
onClick: [clickHandler1, clickHandler2],
|
||||
onFocus: focusHandler2
|
||||
})
|
||||
})
|
||||
|
||||
@@ -359,7 +359,7 @@ describe('vnode', () => {
|
||||
// #1039
|
||||
// <component :is="foo">{{ bar }}</component>
|
||||
// - content is compiled as slot
|
||||
// - dynamic component reoslves to plain element, but as a block
|
||||
// - dynamic component resolves to plain element, but as a block
|
||||
// - block creation disables its own tracking, accidentally causing the
|
||||
// slot content (called during the block node creation) to be missed
|
||||
test('element block should track normalized slot children', () => {
|
||||
|
||||
@@ -14,7 +14,7 @@ import { VNodeProps } from './vnode'
|
||||
|
||||
// defineComponent is a utility that is primarily used for type inference
|
||||
// when declaring components. Type inference is provided in the component
|
||||
// options (provided as the argument). The returned value has artifical types
|
||||
// options (provided as the argument). The returned value has artificial types
|
||||
// for TSX / manual render function / IDE support.
|
||||
|
||||
// overload 1: direct setup function
|
||||
@@ -83,7 +83,7 @@ export function defineComponent<
|
||||
EE
|
||||
>
|
||||
): {
|
||||
// array props technically doesn't place any contraints on props in TSX
|
||||
// array props technically doesn't place any constraints on props in TSX
|
||||
new (): ComponentPublicInstance<VNodeProps, RawBindings, D, C, M, E>
|
||||
} & ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, E, EE>
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ type PropConstructor<T = any> =
|
||||
| PropMethod<T>
|
||||
|
||||
type PropMethod<T> = T extends (...args: any) => any // if is function with args
|
||||
? { new (): T; (): T; readonly proptotype: Function } // Create Function like contructor
|
||||
? { new (): T; (): T; readonly proptotype: Function } // Create Function like constructor
|
||||
: never
|
||||
|
||||
type RequiredKeys<T, MakeDefaultRequired> = {
|
||||
|
||||
@@ -75,7 +75,7 @@ export interface TransitionState {
|
||||
|
||||
export interface TransitionElement {
|
||||
// in persisted mode (e.g. v-show), the same element is toggled, so the
|
||||
// pending enter/leave callbacks may need to cancalled if the state is toggled
|
||||
// pending enter/leave callbacks may need to be cancelled if the state is toggled
|
||||
// before it finishes.
|
||||
_enterCb?: PendingCallback
|
||||
_leaveCb?: PendingCallback
|
||||
|
||||
@@ -432,7 +432,7 @@ function createSuspenseBoundary(
|
||||
handleSetupResult(instance, asyncSetupResult, false)
|
||||
if (hydratedEl) {
|
||||
// vnode may have been replaced if an update happened before the
|
||||
// async dep is reoslved.
|
||||
// async dep is resolved.
|
||||
vnode.el = hydratedEl
|
||||
}
|
||||
setupRenderEffect(
|
||||
|
||||
Reference in New Issue
Block a user