Skip to content

Commit f48a2ff

Browse files
iNerVyyx990803
authored andcommitted
chore: fix typos (vuejs#103)
1 parent ec8f7c6 commit f48a2ff

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

packages/compiler-core/__tests__/transform.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ describe('compiler: transform', () => {
267267
}
268268
}
269269

270-
test('no chidlren', () => {
270+
test('no children', () => {
271271
const ast = transformWithCodegen(``)
272272
expect(ast.codegenNode).toBeUndefined()
273273
})

packages/compiler-core/__tests__/transforms/transformElement.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function parseWithElementTransform(
5050
}
5151

5252
describe('compiler: element transform', () => {
53-
test('import + resovle component', () => {
53+
test('import + resolve component', () => {
5454
const { root } = parseWithElementTransform(`<Foo/>`)
5555
expect(root.imports).toContain(RESOLVE_COMPONENT)
5656
expect(root.statements[0]).toMatch(`${RESOLVE_COMPONENT}("Foo")`)
@@ -575,7 +575,7 @@ describe('compiler: element transform', () => {
575575
expect(node2.arguments.length).toBe(4)
576576
expect(node2.arguments[3]).toBe(`${PatchFlags.TEXT} /* TEXT */`)
577577

578-
// multiple nodes, merged with optimze text
578+
// multiple nodes, merged with optimize text
579579
const { node: node3 } = parseWithBind(`<div>foo {{ bar }} baz</div>`)
580580
expect(node3.arguments.length).toBe(4)
581581
expect(node3.arguments[3]).toBe(`${PatchFlags.TEXT} /* TEXT */`)

packages/reactivity/__tests__/readonly.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ describe('reactivity/readonly', () => {
264264
})
265265

266266
if (Collection === Map) {
267-
test('should retrive readonly values on iteration', () => {
267+
test('should retrieve readonly values on iteration', () => {
268268
const key1 = {}
269269
const key2 = {}
270270
const original = new Collection([[key1, {}], [key2, {}]])
@@ -334,7 +334,7 @@ describe('reactivity/readonly', () => {
334334
})
335335

336336
if (Collection === Set) {
337-
test('should retrive readonly values on iteration', () => {
337+
test('should retrieve readonly values on iteration', () => {
338338
const original = new Collection([{}, {}])
339339
const observed: any = readonly(original)
340340
for (const value of observed) {

packages/runtime-core/__tests__/errorHandling.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
describe('error handling', () => {
1414
mockWarn()
1515

16-
test('propagtaion', () => {
16+
test('propagation', () => {
1717
const err = new Error('foo')
1818
const fn = jest.fn()
1919

@@ -365,8 +365,8 @@ describe('error handling', () => {
365365

366366
const onError = jest.spyOn(console, 'error')
367367
onError.mockImplementation(() => {})
368-
const groupCollpased = jest.spyOn(console, 'groupCollapsed')
369-
groupCollpased.mockImplementation(() => {})
368+
const groupCollapsed = jest.spyOn(console, 'groupCollapsed')
369+
groupCollapsed.mockImplementation(() => {})
370370
const log = jest.spyOn(console, 'log')
371371
log.mockImplementation(() => {})
372372

@@ -397,7 +397,7 @@ describe('error handling', () => {
397397
expect(onError).toHaveBeenCalledWith(err)
398398

399399
onError.mockRestore()
400-
groupCollpased.mockRestore()
400+
groupCollapsed.mockRestore()
401401
log.mockRestore()
402402
process.env.NODE_ENV = 'test'
403403
})

packages/runtime-core/__tests__/rendererSuspense.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ describe('renderer: suspense', () => {
285285
expect(serializeInner(root)).toBe(`<div>fallback</div>`)
286286
expect(calls).toEqual([])
287287

288-
// remvoe the async dep before it's resolved
288+
// remove the async dep before it's resolved
289289
toggle.value = false
290290
await nextTick()
291291
// should cause the suspense to resolve immediately

packages/runtime-core/src/apiOptions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export interface LegacyOptions<
168168
beforeUpdate?(): void
169169
updated?(): void
170170
activated?(): void
171-
decativated?(): void
171+
deactivated?(): void
172172
beforeUnmount?(): void
173173
unmounted?(): void
174174
renderTracked?(e: DebuggerEvent): void
@@ -206,7 +206,7 @@ export function applyOptions(
206206
beforeUpdate,
207207
updated,
208208
// TODO activated
209-
// TODO decativated
209+
// TODO deactivated
210210
beforeUnmount,
211211
unmounted,
212212
renderTracked,

packages/runtime-core/src/componentProps.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,36 @@ export type PropType<T> = PropConstructor<T> | PropConstructor<T>[]
3333

3434
type PropConstructor<T> = { new (...args: any[]): T & object } | { (): T }
3535

36-
type RequiredKeys<T, MakeDefautRequired> = {
36+
type RequiredKeys<T, MakeDefaultRequired> = {
3737
[K in keyof T]: T[K] extends
3838
| { required: true }
39-
| (MakeDefautRequired extends true ? { default: any } : never)
39+
| (MakeDefaultRequired extends true ? { default: any } : never)
4040
? K
4141
: never
4242
}[keyof T]
4343

44-
type OptionalKeys<T, MakeDefautRequired> = Exclude<
44+
type OptionalKeys<T, MakeDefaultRequired> = Exclude<
4545
keyof T,
46-
RequiredKeys<T, MakeDefautRequired>
46+
RequiredKeys<T, MakeDefaultRequired>
4747
>
4848

4949
type InferPropType<T> = T extends null
5050
? any // null & true would fail to infer
5151
: T extends { type: null | true }
52-
? any // somehow `ObjectContructor` when inferred from { (): T } becomes `any`
52+
? any // somehow `ObjectConstructor` when inferred from { (): T } becomes `any`
5353
: T extends ObjectConstructor | { type: ObjectConstructor }
5454
? { [key: string]: any }
5555
: T extends Prop<infer V> ? V : T
5656

5757
export type ExtractPropTypes<
5858
O,
59-
MakeDefautRequired extends boolean = true
59+
MakeDefaultRequired extends boolean = true
6060
> = O extends object
6161
? {
62-
readonly [K in RequiredKeys<O, MakeDefautRequired>]: InferPropType<O[K]>
62+
readonly [K in RequiredKeys<O, MakeDefaultRequired>]: InferPropType<O[K]>
6363
} &
6464
{
65-
readonly [K in OptionalKeys<O, MakeDefautRequired>]?: InferPropType<
65+
readonly [K in OptionalKeys<O, MakeDefaultRequired>]?: InferPropType<
6666
O[K]
6767
>
6868
}

packages/runtime-core/src/helpers/renderSlot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function renderSlot(
1313
name: string,
1414
props: any = {},
1515
// this is not a user-facing function, so the fallback is always generated by
16-
// the compiler and gurunteed to be an array
16+
// the compiler and guaranteed to be an array
1717
fallback?: VNodeChildren
1818
): VNode {
1919
const slot = slots[name]

packages/runtime-core/src/helpers/toString.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { isArray, isPlainObject, objectToString } from '@vue/shared'
22

3-
// for conversting {{ interpolation }} values to displayed strings.
3+
// for converting {{ interpolation }} values to displayed strings.
44
export function toString(val: any): string {
55
return val == null
66
? ''

packages/runtime-core/src/warning.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ function getComponentTrace(): ComponentTraceStack {
6565
// we can't just use the stack because it will be incomplete during updates
6666
// that did not start from the root. Re-construct the parent chain using
6767
// instance parent pointers.
68-
const normalizeStack: ComponentTraceStack = []
68+
const normalizedStack: ComponentTraceStack = []
6969

7070
while (currentVNode) {
71-
const last = normalizeStack[0]
71+
const last = normalizedStack[0]
7272
if (last && last.vnode === currentVNode) {
7373
last.recurseCount++
7474
} else {
75-
normalizeStack.push({
75+
normalizedStack.push({
7676
vnode: currentVNode,
7777
recurseCount: 0
7878
})
@@ -82,7 +82,7 @@ function getComponentTrace(): ComponentTraceStack {
8282
currentVNode = parentInstance && parentInstance.vnode
8383
}
8484

85-
return normalizeStack
85+
return normalizedStack
8686
}
8787

8888
function formatTrace(trace: ComponentTraceStack): string[] {

0 commit comments

Comments
 (0)