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:
parent
c769010655
commit
eb942942d6
3 changed files with 11 additions and 1 deletions
5
.changeset/cold-toys-greet.md
Normal file
5
.changeset/cold-toys-greet.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix missing `is:inline` type for the `<slot />` element
|
3
packages/astro/astro-jsx.d.ts
vendored
3
packages/astro/astro-jsx.d.ts
vendored
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Add table
Reference in a new issue