0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-17 22:44:24 -05:00

fix: add types for is:inline on slots (#9342)

This commit is contained in:
Erika 2023-12-06 13:09:30 +01:00 committed by GitHub
parent c769010655
commit eb942942d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix missing `is:inline` type for the `<slot />` element

View file

@ -36,6 +36,7 @@ declare namespace astroHTML.JSX {
AstroDefineVarsAttribute;
type AstroStyleAttributes = import('./dist/@types/astro.js').AstroStyleAttributes &
AstroDefineVarsAttribute;
type AstroSlotAttributes = import('./dist/@types/astro.js').AstroSlotAttributes;
// This is an unfortunate use of `any`, but unfortunately we can't make a type that works for every framework
// without importing every single framework's types (which comes with its own set of problems).
@ -1415,7 +1416,7 @@ declare namespace astroHTML.JSX {
ruby: HTMLAttributes;
s: HTMLAttributes;
samp: HTMLAttributes;
slot: SlotHTMLAttributes;
slot: SlotHTMLAttributes & AstroSlotAttributes;
script: ScriptHTMLAttributes & AstroScriptAttributes;
section: HTMLAttributes;
select: SelectHTMLAttributes;

View file

@ -132,6 +132,10 @@ export interface AstroScriptAttributes {
'is:inline'?: boolean;
}
export interface AstroSlotAttributes {
'is:inline'?: boolean;
}
export interface AstroComponentMetadata {
displayName: string;
hydrate?: 'load' | 'idle' | 'visible' | 'media' | 'only';