mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 09:36:08 +08:00
ui: fix types
This commit is contained in:
1 file changed
+1
-1
@@ -34,7 +34,7 @@ export function secureRandomString(digit = 32, dict = defaultDict) {
|
||||
|
||||
type Substitution = string | number | { templateRaw: true, html: string };
|
||||
|
||||
export function tpl<T extends boolean>(node: React.ReactNode, reactive?: T): T extends true ? React.ReactElement : string;
|
||||
export function tpl<T extends boolean>(node: React.ReactNode, reactive?: T): T extends true ? HTMLDivElement : string;
|
||||
export function tpl(pieces: TemplateStringsArray, ...substitutions: Substitution[]): string;
|
||||
export function tpl(pieces: TemplateStringsArray | React.ReactNode, ...substitutions: Substitution[] | boolean[]) {
|
||||
if (React.isValidElement(pieces)) {
|
||||
|
||||
Reference in new issue
Block a user