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
This commit is contained in:
Alfredo González Martínez 2022-07-28 14:13:27 +02:00 committed by GitHub
parent 9697649d31
commit c565465a96
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Add `url` and `file` properties to `MarkdownContent` type

View file

@ -903,6 +903,8 @@ export interface MarkdownParserResponse extends MarkdownRenderingResult {
*/
export type MarkdownContent<T extends Record<string, any> = Record<string, any>> = T & {
astro: MarkdownMetadata;
url: string | undefined;
file: string;
};
/**