Skip to content

Commit 0ff3079

Browse files
authored
chore: fix typo in compiler-vapor (#10)
1 parent 0231290 commit 0ff3079

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

packages/compiler-vapor/src/transform.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export interface TransformContext<T extends Node = Node> {
3737
once: boolean
3838

3939
reference(): number
40-
incraseId(): number
40+
increaseId(): number
4141
registerTemplate(): number
4242
registerEffect(expr: string, operation: OperationNode): void
43-
registerOpration(...oprations: OperationNode[]): void
43+
registerOperation(...operations: OperationNode[]): void
4444
helper(name: string): string
4545
}
4646

@@ -61,15 +61,15 @@ function createRootContext(
6161
dynamic: ir.dynamic,
6262
once: false,
6363

64-
incraseId: () => globalId++,
64+
increaseId: () => globalId++,
6565
reference() {
6666
if (this.dynamic.id !== null) return this.dynamic.id
6767
this.dynamic.referenced = true
68-
return (this.dynamic.id = this.incraseId())
68+
return (this.dynamic.id = this.increaseId())
6969
},
7070
registerEffect(expr, operation) {
7171
if (this.once) {
72-
return this.registerOpration(operation)
72+
return this.registerOperation(operation)
7373
}
7474
if (!effect[expr]) effect[expr] = []
7575
effect[expr].push(operation)
@@ -93,7 +93,7 @@ function createRootContext(
9393
})
9494
return ir.template.length - 1
9595
},
96-
registerOpration(...node) {
96+
registerOperation(...node) {
9797
operation.push(...node)
9898
},
9999
// TODO not used yet
@@ -194,17 +194,17 @@ function transformChildren(
194194
if (prevChildren.length)
195195
if (hasStatic) {
196196
childrenTemplate[index - prevChildren.length] = `<!>`
197-
const anchor = (prevChildren[0].placeholder = ctx.incraseId())
197+
const anchor = (prevChildren[0].placeholder = ctx.increaseId())
198198

199-
ctx.registerOpration({
199+
ctx.registerOperation({
200200
type: IRNodeTypes.INSERT_NODE,
201201
loc: ctx.node.loc,
202202
element: prevChildren.map((child) => child.id!),
203203
parent: ctx.reference(),
204204
anchor,
205205
})
206206
} else {
207-
ctx.registerOpration({
207+
ctx.registerOperation({
208208
type: IRNodeTypes.PREPEND_NODE,
209209
loc: ctx.node.loc,
210210
elements: prevChildren.map((child) => child.id!),
@@ -219,7 +219,7 @@ function transformChildren(
219219
prevChildren.push(child)
220220

221221
if (index === children.length - 1) {
222-
ctx.registerOpration({
222+
ctx.registerOperation({
223223
type: IRNodeTypes.APPEND_NODE,
224224
loc: ctx.node.loc,
225225
elements: prevChildren.map((child) => child.id!),
@@ -324,7 +324,7 @@ function transformInterpolation(
324324
} else {
325325
const id = ctx.reference()
326326
ctx.dynamic.ghost = true
327-
ctx.registerOpration({
327+
ctx.registerOperation({
328328
type: IRNodeTypes.CREATE_TEXT_NODE,
329329
loc: node.loc,
330330
id,

0 commit comments

Comments
 (0)