Skip to content

v0.23.0

Compare
Choose a tag to compare
@ryansolid ryansolid released this 06 Dec 10:48

This release is mostly to support breaking change for TS users. JSX types no longer pollutes the global namespace. This means you need to update your projects to import it.

For users TS 4.1 or above add to your tsconfig to have JSX types in all your TSX files:

"compilerOptions" {
  "jsx": "preserve",
  "jsxImportSource": "solid-js",
}

Or mixing and matching? You can set JSX types per file using the pragma at the top of each file:

/* @jsxImportSource solid-js */

You can now import JSX types directly from Solid as neccessary:

import { JSX } from "solid-js";

For instance, to add a custom element you would:

import { JSX } from "solid-js";

declare module "solid-js" {
  export namespace JSX {
    interface IntrinsicElements {
      foo: CustomFooHTMLElementAttributes
    }
  }
}