Improved static typing support in photo_view.ts