From c565465a964ee14bf5d55c0a6eaf1091d3a68429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alfredo=20Gonz=C3=A1lez=20Mart=C3=ADnez?= <48945157+alfredogonzalezmartinez@users.noreply.github.com> Date: Thu, 28 Jul 2022 14:13:27 +0200 Subject: [PATCH] Add properties (url, file) to MarkdownContent type (#4028) 'url' and 'file' properties were missing in MarkdownContent type, but they should there according to: https://docs.astro.build/en/guides/markdown-content/#markdown-layouts --- .changeset/quick-onions-itch.md | 5 +++++ packages/astro/src/@types/astro.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/quick-onions-itch.md diff --git a/.changeset/quick-onions-itch.md b/.changeset/quick-onions-itch.md new file mode 100644 index 000000000..68bc505b3 --- /dev/null +++ b/.changeset/quick-onions-itch.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Add `url` and `file` properties to `MarkdownContent` type diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 5003f42ab..570df260c 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -903,6 +903,8 @@ export interface MarkdownParserResponse extends MarkdownRenderingResult { */ export type MarkdownContent = Record> = T & { astro: MarkdownMetadata; + url: string | undefined; + file: string; }; /**