@helfy/helfy-ts-plugin
v0.0.2
Published
TypeScript Language Service Plugin for Helfy framework directives (@if, @for, @slot, @bind, @ref, @field)
Downloads
127
Maintainers
Readme
@helfy/helfy-ts-plugin
TypeScript Language Service Plugin for Helfy framework template directives.
Features
- IDE support for
@if,@for,@slot,@bind,@ref,@fielddirectives in.tsxfiles - Autocompletion inside
@forand@slotblocks - 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-pluginConfiguration
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
