mirror of
https://github.com/withastro/astro.git
synced 2024-12-23 21:53:55 -05:00
a397b981f5
* WIP: moving to a static .d.ts types file * fixing named exports for getImage and getPicture * removing the exports.astro map for now * WIP: adding readme docs for component attributes * Adding docs for getImage and getPicture * leaning fully on TSC to build .d.ts files * finally found the solution for proper ESM import types * adding a note to the README for tsconfig updates * chore: add changesets * typo * docs: removing the "Images in Markdown" example * removing the need for publishing src to NPM * fix: make type re-export explicit * updating image module defs to match InputFormat * using astro syntax highlighting for README code blocks * nit: missing backtick in README * make sure Astro component directives aren't recommended twice
35 lines
602 B
TypeScript
35 lines
602 B
TypeScript
/// <reference path="./client-base.d.ts" />
|
|
|
|
// images
|
|
declare module '*.jpg' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.jpeg' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.png' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.gif' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.svg' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.ico' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.webp' {
|
|
const src: string;
|
|
export default src;
|
|
}
|
|
declare module '*.avif' {
|
|
const src: string;
|
|
export default src;
|
|
}
|