PolymorphicAttributes Type — astro Architecture
Architecture documentation for the PolymorphicAttributes type/interface in types.d.ts from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 1df075da_e1d0_1a04_c2e1_cbadcbbe6c97["PolymorphicAttributes"] b18a5b31_d420_7227_46f7_f2bf3a6e9d2b["types.d.ts"] 1df075da_e1d0_1a04_c2e1_cbadcbbe6c97 -->|defined in| b18a5b31_d420_7227_46f7_f2bf3a6e9d2b style 1df075da_e1d0_1a04_c2e1_cbadcbbe6c97 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/types.d.ts lines 19–26
type PolymorphicAttributes<P extends { as: HTMLTag }> = Omit<P, 'as'> & {
as?: P['as'];
} & Omit<
// This is the same as HTMLAttributes<P['as']>, except we're using OmitIndexSignature to remove the index signature,
// used for data attribute, because it seems like it get too complex for TypeScript with it, not sure why.
OmitIndexSignature<astroHTML.JSX.DefinedIntrinsicElements[P['as']]>,
keyof Omit<AstroBuiltinAttributes, 'class:list'>
>;
Defined In
Source
Frequently Asked Questions
What is the PolymorphicAttributes type?
PolymorphicAttributes is a type/interface in the astro codebase, defined in packages/astro/types.d.ts.
Where is PolymorphicAttributes defined?
PolymorphicAttributes is defined in packages/astro/types.d.ts at line 19.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free