mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
Adds auto completion of astro:
events when adding or removing event listeners on document
(#10263)
This commit is contained in:
parent
f6fc18cc61
commit
9bdbed723e
2 changed files with 14 additions and 3 deletions
5
.changeset/few-worms-rush.md
Normal file
5
.changeset/few-worms-rush.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Adds auto completion for `astro:` event names when adding or removing event listeners on `document`.
|
|
@ -36,6 +36,7 @@ import type {
|
||||||
import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
|
import type { AstroComponentFactory, AstroComponentInstance } from '../runtime/server/index.js';
|
||||||
import type { DeepPartial, OmitIndexSignature, Simplify } from '../type-utils.js';
|
import type { DeepPartial, OmitIndexSignature, Simplify } from '../type-utils.js';
|
||||||
import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
|
import type { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './../core/constants.js';
|
||||||
|
import type { TransitionBeforePreparationEvent, TransitionBeforeSwapEvent } from '../transitions/events.js';
|
||||||
|
|
||||||
export { type AstroIntegrationLogger };
|
export { type AstroIntegrationLogger };
|
||||||
|
|
||||||
|
@ -2831,11 +2832,16 @@ declare global {
|
||||||
'astro-dev-overlay-icon': DevToolbarIcon;
|
'astro-dev-overlay-icon': DevToolbarIcon;
|
||||||
'astro-dev-overlay-card': DevToolbarCard;
|
'astro-dev-overlay-card': DevToolbarCard;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||||
namespace Config {
|
namespace Config {
|
||||||
type Database = Record<string, any>;
|
type Database = Record<string, any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface DocumentEventMap {
|
||||||
|
'astro:before-preparation': TransitionBeforePreparationEvent;
|
||||||
|
'astro:after-preparation': Event;
|
||||||
|
'astro:before-swap': TransitionBeforeSwapEvent;
|
||||||
|
'astro:after-swap': Event;
|
||||||
|
'astro:page-load': Event;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue