Skip to content

Commit

Permalink
feat: preact interop
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette committed Jul 23, 2023
1 parent 494e425 commit b67ce01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ export function compile<A extends string[] = []>(
html: string
): (args: Record<A[number], number | string | boolean>) => string

/**
* Here for interop with preact and many build systems.
*/
export declare const h = createElement;

export declare type Children =
| number
| string
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ module.exports.toKebabCase = toKebabCase
module.exports.isUpper = isUpper
module.exports.styleToString = styleToString
module.exports.createElement = createElement
module.exports.h = createElement
module.exports.contentsToString = contentsToString
module.exports.compile = compile
module.exports.Fragment = Fragment
Expand Down

0 comments on commit b67ce01

Please sign in to comment.