From bcb9dd9f3e111d12c46515bcd231339f3ceb00d0 Mon Sep 17 00:00:00 2001 From: Princesseuh Date: Tue, 16 May 2023 15:22:06 +0200 Subject: [PATCH 1/4] feat(typescript): Add doc for polymorphic type --- src/content/docs/en/guides/typescript.mdx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/content/docs/en/guides/typescript.mdx b/src/content/docs/en/guides/typescript.mdx index 78496cacd5d0f..7b8e017998691 100644 --- a/src/content/docs/en/guides/typescript.mdx +++ b/src/content/docs/en/guides/typescript.mdx @@ -235,6 +235,24 @@ type MyAttributes = astroHTML.JSX.ImgHTMLAttributes; ``` ::: +### Polymorphic type + + + +Astro includes an helper to make it easier to build components that can render as different HTML elements. This is useful for components like `` that can render as `` or `