diff --git a/packages/gatsby-plugin-image/src/components/hooks.ts b/packages/gatsby-plugin-image/src/components/hooks.ts index 54f9afd3a9e4f..1cb84c2ccebbe 100644 --- a/packages/gatsby-plugin-image/src/components/hooks.ts +++ b/packages/gatsby-plugin-image/src/components/hooks.ts @@ -61,7 +61,7 @@ const isGatsbyImageDataParent = ( node: IGatsbyImageDataParent | any ): node is IGatsbyImageDataParent => Boolean(node?.gatsbyImageData) -type ImageDataLike = FileNode | IGatsbyImageDataParent | IGatsbyImageData +export type ImageDataLike = FileNode | IGatsbyImageDataParent | IGatsbyImageData export const getImage = (node: ImageDataLike): IGatsbyImageData | undefined => { if (isGatsbyImageData(node)) { return node diff --git a/packages/gatsby-plugin-image/src/index.ts b/packages/gatsby-plugin-image/src/index.ts index eb6ee653dd5e2..5961811df1506 100644 --- a/packages/gatsby-plugin-image/src/index.ts +++ b/packages/gatsby-plugin-image/src/index.ts @@ -15,6 +15,7 @@ export { IArtDirectedImage, IGetImageDataArgs, IUrlBuilderArgs, + ImageDataLike, } from "./components/hooks" export { generateImageData,