From d8a6888c909e231a8c3a9f346a914e3b58476e77 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 8 Nov 2020 11:45:55 +0100 Subject: [PATCH] move types --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index af4d6b9..2a6685b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,10 +38,12 @@ function getSizeOfElementOrSelector(node: ElementOrString, elOrString: ElementOr } } +type BindType = ElementOrString | true | { width?: ElementOrString; height?: ElementOrString } + export type ImageParameters = { src: string options?: Transformation | Transformation.Options - bind?: ElementOrString | true | { width?: ElementOrString; height?: ElementOrString } + bind?: BindType } export function image(node: HTMLImageElement, parameters?: ImageParameters) {