@dlightjs/dlight
Advanced tools
Comparing version 1.0.0-beta.26 to 1.0.0-beta.27
@@ -10,2 +10,9 @@ import { type Properties } from "csstype" | ||
export type OmitIndexSignature<ObjectType> = { | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
[KeyType in keyof ObjectType as {} extends Record<KeyType, unknown> | ||
? never | ||
: KeyType]: ObjectType[KeyType] | ||
} | ||
// ---- For each key, check whether there is readonly, if there is, return never, and then Pick out is not never | ||
@@ -28,3 +35,5 @@ type WritableKeysOf<T> = { | ||
type OmitFuncAndReadOnly<T> = RemoveReadOnly<OmitFunction<T>> | ||
type OmitFuncAndReadOnly<T> = RemoveReadOnly< | ||
OmitFunction<OmitIndexSignature<T>> | ||
> | ||
@@ -31,0 +40,0 @@ // ---- properties |
@@ -1,3 +0,3 @@ | ||
import { DLightGlobalEventHandlers } from "./event" | ||
import { type HTMLAttributes } from "./htmlElement" | ||
import type { DLightGlobalEventHandlers } from "./event" | ||
import type { OmitIndexSignature, HTMLAttributes } from "./htmlElement" | ||
@@ -38,3 +38,3 @@ // ---- If there is an event(start with on), remove it | ||
innerText?: string | number | ||
) => DLightHTMLAttributesFunc<PropertyWithEvent<T>, G, T> | ||
) => DLightHTMLAttributesFunc<PropertyWithEvent<OmitIndexSignature<T>>, G, T> | ||
@@ -78,5 +78,3 @@ export const a: DLightHtmlTagFunc<HTMLAnchorElement> | ||
export const footer: DLightHtmlTagFunc | ||
// ---- Don't know why HTMLFormElement is not working | ||
// export const form: DLightHtmlTagFunc<HTMLFormElement> | ||
export const form: DLightHtmlTagFunc | ||
export const form: DLightHtmlTagFunc<HTMLFormElement> | ||
export const h1: DLightHtmlTagFunc<HTMLHeadingElement> | ||
@@ -83,0 +81,0 @@ export const h2: DLightHtmlTagFunc<HTMLHeadingElement> |
{ | ||
"name": "@dlightjs/dlight", | ||
"version": "1.0.0-beta.26", | ||
"version": "1.0.0-beta.27", | ||
"description": "DX-first UI rendering library", | ||
@@ -5,0 +5,0 @@ "author": { |
227730
1004