• Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • svelte-ast-build
  • element
  • isElementLike

Function isElementLike

  • isElementLike(node: unknown): node is ElementLike
  • Type check guard to see if provided AST node is "element-like" AST.ElementLike.

    Those are:

    • standard Svelte-based component - AST.Component
    • regular element (HTML based) - https://developer.mozilla.org/en-US/docs/Web/HTML/Element
    • special Svelte elements - https://svelte.dev/docs/special-elements

    Parameters

    • node: unknown

      Supported AST node to narrow down its inferred type

    Returns node is ElementLike

    @NO_SIDE_EFFECTS

    • Defined in pkgs/svelte-ast-build/src/element.js:47

Settings

Member Visibility
Documentation
  • Loading...

Generated using TypeDoc