6e27a5fdc2
* Renamed getHeaders() to getHeadings(), according to RFC #208. * chore: update changeset * fix: expose MarkdownHeading type from `astro` Co-authored-by: Félix Sanz <me@felixsanz.com> Co-authored-by: Nate Moore <nate@astro.build>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
/// <reference path="./client.d.ts" />
|
|
|
|
type Astro = import('astro').AstroGlobal;
|
|
|
|
// We duplicate the description here because editors won't show the JSDoc comment from the imported type (but will for its properties, ex: Astro.request will show the AstroGlobal.request description)
|
|
/**
|
|
* Astro global available in all contexts in .astro files
|
|
*
|
|
* [Astro documentation](https://docs.astro.build/reference/api-reference/#astro-global)
|
|
*/
|
|
declare const Astro: Readonly<Astro>;
|
|
|
|
declare const Fragment: any;
|
|
|
|
declare module '*.md' {
|
|
type MD = import('astro').MarkdownInstance<Record<string, any>>;
|
|
|
|
export const frontmatter: MD['frontmatter'];
|
|
export const file: MD['file'];
|
|
export const url: MD['url'];
|
|
export const getHeadings: MD['getHeadings'];
|
|
/** @deprecated Renamed to `getHeadings()` */
|
|
export const getHeaders: () => void;
|
|
export const Content: MD['Content'];
|
|
export const rawContent: MD['rawContent'];
|
|
export const compiledContent: MD['compiledContent'];
|
|
|
|
const load: MD['default'];
|
|
export default load;
|
|
}
|
|
|
|
declare module '*.html' {
|
|
const Component: { render(opts: { slots: Record<string, string> }): string };
|
|
export default Component;
|
|
}
|