declarations.d.ts 461 B

1234567891011121314151617
  1. /** Import HTML as modules - https://stackoverflow.com/a/47705264/3323672 */
  2. declare module "*.html" {
  3. /** Content of the HTML file as a string */
  4. const htmlContent: string;
  5. export default htmlContent;
  6. }
  7. declare module "*.md" {
  8. interface Exports {
  9. /** Content of the markdown file, converted to an HTML string */
  10. html: string;
  11. metadata: Record<string, unknown>;
  12. filename: string;
  13. path: string;
  14. }
  15. export default {} as Exports;
  16. }