From ff3415b9e5d7b64d69cc99f2c4a9e15a6c035f3c Mon Sep 17 00:00:00 2001 From: Simon Garner Date: Fri, 5 Jul 2019 14:30:50 +1200 Subject: [PATCH] Make ImageMetadata partially initializable To avoid requiring chromaSubsampling field which is erroneously defined as non-optional on sharp.Metadata --- src/ImageMetadata.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageMetadata.ts b/src/ImageMetadata.ts index 6fe5eef3..deeb616f 100644 --- a/src/ImageMetadata.ts +++ b/src/ImageMetadata.ts @@ -1,8 +1,8 @@ import { Metadata, Channels } from 'sharp'; -import { Initializable } from '@madsci/ts-class-initializable'; +import { PartiallyInitializable } from '@madsci/ts-class-initializable'; import { ImageMimeType } from './ImageMimeType'; -export class ImageMetadata extends Initializable implements Metadata { +export class ImageMetadata extends PartiallyInitializable implements Metadata { /** MIME Type of the image format, e.g. image/jpeg */ public mimeType: ImageMimeType;