0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/.changeset/dirty-cycles-lick.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
473 B
Markdown
Raw Normal View History

---
'astro': minor
---
Add `astro/types` entrypoint. These utilities can be used for common prop type patterns.
## `HTMLAttributes`
If you would like to extend valid HTML attributes for a given HTML element, you may use the provided `HTMLAttributes` type—it accepts an element name and returns the valid HTML attributes for that element name.
```ts
import { HTMLAttributes } from 'astro/types';
interface Props extends HTMLAttributes<'a'> {
myProp?: string;
};
```