Skip to content

Commit

Permalink
docs: update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Mar 27, 2022
1 parent 1e01a54 commit 41bd305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler-core/src/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function createTransformContext(root, options): any {
helpers: new Map(),
helper(name) {
// 这里会收集调用的次数
// TODO 但是为什么收集次数呢?
// 收集次数是为了给删除做处理的, (当只有 count 为0 的时候才需要真的删除掉)
// helpers 数据会在后续生成代码的时候用到
const count = context.helpers.get(name) || 0;
context.helpers.set(name, count + 1);
Expand Down

0 comments on commit 41bd305

Please sign in to comment.