Skip to content

v0.14.0

Compare
Choose a tag to compare
@metonym metonym released this 09 Apr 20:16
· 117 commits to main since this release

Features

  • add sveltekit:prefetch, sveltekit:noscroll attributes to props that extend a attributes

    Input

    <a href="/" {...$$restProps}><slot /></a>

    Output

    /// <reference types="svelte" />
    import type { SvelteComponentTyped } from "svelte";
    
    export interface LinkProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["a"]> {
      /**
       * SvelteKit attribute to enable data prefetching
       * if a link is hovered over or touched on mobile.
       * @see https://kit.svelte.dev/docs/a-options#sveltekit-prefetch
       * @default false
       */
      "sveltekit:prefetch"?: boolean;
    
      /**
       * SvelteKit attribute to prevent scrolling
       * after the link is clicked.
       * @see https://kit.svelte.dev/docs/a-options#sveltekit-prefetch
       * @default false
       */
      "sveltekit:noscroll"?: boolean;
    }
    
    export default class Input extends SvelteComponentTyped<InputProps, {}, { default: {} }> {}
  • use type-only imports for SvelteComponentTyped and extended props

    import type { SvelteComponentTyped } from "svelte";
    import type { AccordionProps } from "./Accordion.svelte";