SolidJSS
SolidJSโ€ข2y agoโ€ข
10 replies
average tea enjoyer

use directive typescript error

When i try to use the use: directive i get the error
Type '{ type: string; placeholder: string; value: string; "use:test": true; oninput: (e: InputEvent & { currentTarget: HTMLInputElement; target: HTMLInputElement; }) => void; }' is not assignable to type 'InputHTMLAttributes<HTMLInputElement>'.
  Property 'use:test' does not exist on type 'InputHTMLAttributes<HTMLInputElement>'.ts(2322)


I tried to put
declare module "solid-js" {
  namespace JSX {
    interface Directives {
      model: [() => any, (v: any) => any]
    }
  }
}

into types.d.ts but then it would not recognize any of the other solidjs imports
Was this page helpful?