JSPM

@helfy/helfy-ts-plugin

0.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q66831F
  • License MIT

TypeScript Language Service Plugin for Helfy framework directives (@if, @for, @slot, @bind, @ref, @field)

Package Exports

  • @helfy/helfy-ts-plugin
  • @helfy/helfy-ts-plugin/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@helfy/helfy-ts-plugin) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@helfy/helfy-ts-plugin

TypeScript Language Service Plugin for Helfy framework template directives.

Features

  • IDE support for @if, @for, @slot, @bind, @ref, @field directives in .tsx files
  • Autocompletion inside @for and @slot blocks
  • Type checking without false "Cannot find name" errors for slot parameters and bound expressions
  • Quick info and signature help in directive contexts

Installation

npm install @helfy/helfy-ts-plugin

Configuration

tsconfig.json

Add the plugin to your TypeScript configuration:

{
  "compilerOptions": {
    "plugins": [{ "name": "@helfy/helfy-ts-plugin" }]
  }
}

VSCode

Install the Helfy Template Syntax extension, which automatically registers the plugin when @helfy/helfy-ts-plugin is installed in your project.

Supported Directives

Directive Description
@if / @elseif / @else Conditional rendering
@for Iteration over arrays
@slot.NAME Slot consumers with typed parameters
@slot:NAME Slot providers
@bind Two-way data binding
@ref Element reference
@field Form field binding

License

MIT