diff options
Diffstat (limited to 'tools/language-server/astro.d.ts')
-rw-r--r-- | tools/language-server/astro.d.ts | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/language-server/astro.d.ts b/tools/language-server/astro.d.ts new file mode 100644 index 000000000..267f6f108 --- /dev/null +++ b/tools/language-server/astro.d.ts @@ -0,0 +1,27 @@ +type AstroRenderedHTML = string; + +type FetchContentResult<ContentFrontmatter extends Record<string, any> = Record<string, any>> = { + astro: { + headers: string[]; + source: string; + html: AstroRenderedHTML; + }; + url: URL; +} & ContentFrontmatter; + +interface AstroPageRequest { + url: URL; + canonicalURL: URL; +} + +interface Astro { + isPage: boolean; + fetchContent<ContentFrontmatter>(globStr: string): FetchContentResult<ContentFrontmatter>[]; + props: Record<string, number | string | any>; + request: AstroPageRequest; + site: URL; +} + +declare const Astro: Astro; + +export default function(): string;
\ No newline at end of file |