import { Photo } from "./photo" ; export function getLocalPhotos ( ) { const api = ( window as any ) . api ; if ( typeof api === "undefined" ) throw new Error ( "The localPhotos module only works when running in Electron." ) ; const photos = api . getLocalPhotos ( ) ; return Promise . resolve ( photos ) ; }