]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: use jsdoc comments in ast
authorEvan You <yyx990803@gmail.com>
Fri, 15 May 2020 15:00:07 +0000 (11:00 -0400)
committerEvan You <yyx990803@gmail.com>
Fri, 15 May 2020 15:00:07 +0000 (11:00 -0400)
packages/compiler-core/src/ast.ts

index 7adfc8cba58164b5028723fc94626d44ad4a8063..417f9cf37c43d6528ce2a83bd50c3cd78bb8ae6b 100644 (file)
@@ -183,7 +183,9 @@ export interface DirectiveNode extends Node {
   exp: ExpressionNode | undefined
   arg: ExpressionNode | undefined
   modifiers: string[]
-  // optional property to cache the expression parse result for v-for
+  /**
+   * optional property to cache the expression parse result for v-for
+   */
   parseResult?: ForParseResult
 }
 
@@ -192,11 +194,15 @@ export interface SimpleExpressionNode extends Node {
   content: string
   isStatic: boolean
   isConstant: boolean
-  // an expression parsed as the params of a function will track
-  // the identifiers declared inside the function body.
+  /**
+   * an expression parsed as the params of a function will track
+   * the identifiers declared inside the function body.
+   */
   identifiers?: string[]
-  // some expressions (e.g. transformAssetUrls import identifiers) are constant,
-  // but cannot be stringified because they must be first evaluated at runtime.
+  /**
+   * some expressions (e.g. transformAssetUrls import identifiers) are constant,
+   * but cannot be stringified because they must be first evaluated at runtime.
+   */
   isRuntimeConstant?: boolean
 }
 
@@ -214,8 +220,11 @@ export interface CompoundExpressionNode extends Node {
     | TextNode
     | string
     | symbol)[]
-  // an expression parsed as the params of a function will track
-  // the identifiers declared inside the function body.
+
+  /**
+   * an expression parsed as the params of a function will track
+   * the identifiers declared inside the function body.
+   */
   identifiers?: string[]
 }
 
@@ -322,7 +331,10 @@ export interface FunctionExpression extends Node {
   returns?: TemplateChildNode | TemplateChildNode[] | JSChildNode
   body?: BlockStatement | IfStatement
   newline: boolean
-  // so that codegen knows it needs to generate ScopeId wrapper
+  /**
+   * This flag is for codegen to determine whether it needs to generate the
+   * withScopeId() wrapper
+   */
   isSlot: boolean
 }