Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/danielroe/roe.dev. This is the code and content for my personal website, built in Nuxt. roe.dev
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122import type { ResolvedImage } from 'airspace'
/** * An image resolved for rendering. */export interface ResolvedViewImage { url: string alt: string width: number | null height: number | null}
export function toViewImage (image: ResolvedImage | null): ResolvedViewImage | null { if (!image) return null return { url: image.url, alt: image.alt, width: image.width ?? null, height: image.height ?? null, }}