|
| 1 | +## What's New |
| 2 | + |
| 3 | +- **Type narrowing in templates**: Full support for discriminated unions, `{#if}` / `{:else if}` chains, and `{#each}` blocks with proper type narrowing propagation |
| 4 | +- **SvelteKit integration**: Automatic `PageData` type annotations for route files and generated types discovery |
| 5 | +- **Snippet improvements**: Proper narrowing context from `@render` call sites, `{@const}` bindings inside snippet bodies, and optional parameter handling |
| 6 | +- **Component prop validation**: Check required props, type mismatches, and `bind:` prop types |
| 7 | +- **CSS vendor prefix diagnostics**: Warn about compatibility issues with CSS vendor prefixes |
| 8 | +- **TypeScript file diagnostics**: Report errors from all `.ts` files in workspace, not just `.svelte` files |
| 9 | +- **`state_referenced_locally` warning**: Detect `$state()` variables referenced only in the defining scope |
| 10 | +- **`slot_element_deprecated` warning**: Warn about deprecated `<slot>` elements in Svelte 5 components |
| 11 | + |
| 12 | +## Bug Fixes |
| 13 | + |
| 14 | +- Fix false positives for destructured `@const` bindings and local types |
| 15 | +- Fix `state_referenced_locally` false positives for `$bindable` props, object property keys, and `$props()` rest patterns |
| 16 | +- Fix import source mapping for files with leading comments or scattered imports |
| 17 | +- Fix `typeof` type hoisting and layout `children` prop handling |
| 18 | +- Fix `style:` directive parsing and skip custom action events |
| 19 | +- Fix tsconfig filtering with relative workspace paths |
| 20 | +- Fix snippet narrowing for `{:else if}` branches and enclosing `if` conditions |
| 21 | +- Emit `const` for `{@const}` bindings to enable closure narrowing |
| 22 | +- Preserve arrow function props for type checking |
| 23 | +- Fix snippets in logic blocks not being treated as component props |
| 24 | +- Respect `// svelte-ignore` comments for `state_referenced_locally` |
| 25 | +- Fix callback parameter type inference |
| 26 | +- Transform Svelte 4 store assignment syntax to `set()` calls |
| 27 | +- Fix generic component props referencing out-of-scope type params |
| 28 | +- Fix `{#each}` binding scoping and destructuring with keyed expressions |
| 29 | +- Fix class directive parsing for Tailwind class names with dots/brackets |
| 30 | +- Handle pipe modifiers on transition directives |
| 31 | +- Fix brace matching in attribute expressions with comments |
| 32 | +- Import `Snippet` type globally for Svelte 5 compatibility |
| 33 | +- Fix discriminated union narrowing in template `if`/`else-if` chains |
| 34 | +- Detect unsupported TypeScript `enum` and `namespace` features |
| 35 | + |
| 36 | +## Installation |
| 37 | + |
| 38 | +```bash |
| 39 | +brew install ampcode/tap/zvelte-check |
| 40 | +``` |
0 commit comments