diff options
author | 2022-07-27 15:39:05 +0000 | |
---|---|---|
committer | 2022-07-27 15:39:05 +0000 | |
commit | a397b981f5f46dee85e6e00aa39633d018d4b9a2 (patch) | |
tree | 8622069c50ed93364d01d62f2aa9ac664429ed14 /packages/integrations/image/components/index.ts | |
parent | 55c8aced44a60a664f28de9dabf03ca51897599e (diff) | |
download | astro-a397b981f5f46dee85e6e00aa39633d018d4b9a2.tar.gz astro-a397b981f5f46dee85e6e00aa39633d018d4b9a2.tar.zst astro-a397b981f5f46dee85e6e00aa39633d018d4b9a2.zip |
Fixes type definitions `@astrojs/image` and adds more documentation to the README (#4045)
* 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
Diffstat (limited to 'packages/integrations/image/components/index.ts')
-rw-r--r-- | packages/integrations/image/components/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/integrations/image/components/index.ts b/packages/integrations/image/components/index.ts index be0e10130..088278fc2 100644 --- a/packages/integrations/image/components/index.ts +++ b/packages/integrations/image/components/index.ts @@ -1,2 +1,7 @@ +/// <reference types="astro/astro-jsx" /> export { default as Image } from './Image.astro'; export { default as Picture } from './Picture.astro'; + +// TODO: should these directives be removed from astroHTML.JSX? +export type ImgHTMLAttributes = Omit<astroHTML.JSX.ImgHTMLAttributes, 'client:list' | 'set:text' | 'set:html' | 'is:raw'>; +export type HTMLAttributes = Omit<astroHTML.JSX.HTMLAttributes, 'client:list' | 'set:text' | 'set:html' | 'is:raw'>; |