Release 2025-05-19
This commit is contained in:
11
web/src/lib/astro.ts
Normal file
11
web/src/lib/astro.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable @typescript-eslint/no-empty-object-type */
|
||||
import type { ComponentProps, HTMLTag, Polymorphic } from 'astro/types'
|
||||
|
||||
export type AstroComponent = (args: any) => any
|
||||
|
||||
export type PolymorphicComponent<Component extends AstroComponent | HTMLTag> =
|
||||
(Component extends AstroComponent ? ComponentProps<Component> & { as?: Component } : {}) &
|
||||
(Component extends HTMLTag ? Polymorphic<{ as: Component }> : {})
|
||||
|
||||
export type AstroChildren = any
|
||||
Reference in New Issue
Block a user