• Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • svelte-ast-build
  • template
  • isTemplate

Function isTemplate

  • isTemplate(node: unknown): node is TemplateNode
  • Type check guard to see if provided AST node is part of node used for templating AST.TemplateNode.

    Those are:

    • root - what you obtain from the results of from using parse() from "svelte/compiler",
    • text that is included between HTML tags - AST.Text,
    • HTML comment - AST.Comment.

    Parameters

    • node: unknown

      Supported AST node to narrow down its inferred type

    Returns node is TemplateNode

    @NO_SIDE_EFFECTS

    • Defined in pkgs/svelte-ast-build/src/template.js:49

Settings

Member Visibility
Documentation
  • Loading...

Generated using TypeDoc