UNPKG

@finsweet/ts-utils

Version:

Typescript utils for custom Webflow projects.

61 lines (60 loc) 2.17 kB
/** * @returns `true` if the target is an instance of File type. * @param target */ export declare const isFile: (target: unknown) => target is File; /** * @returns `true` if the target is an instance of Node type. * @param target */ export declare const isNode: (target: unknown) => target is Node; /** * @returns `true` if the target is an instance of Element type. * @param target */ export declare const isElement: (target: unknown) => target is Element; /** * @returns `true` if the target is an instance of HTMLElement type. * @param target */ export declare const isHTMLElement: (target: unknown) => target is HTMLElement; /** * @returns `true` if the target is an instance of HTMLInputElement type. * @param target */ export declare const isHTMLInputElement: (target: unknown) => target is HTMLInputElement; /** * @returns `true` if the target is an instance of HTMLSelectElement type. * @param target */ export declare const isHTMLSelectElement: (target: unknown) => target is HTMLSelectElement; /** * @returns `true` if the target is an instance of HTMLTextAreaElement type. * @param target */ export declare const isHTMLTextAreaElement: (target: unknown) => target is HTMLTextAreaElement; /** * @returns `true` if the target is an instance of HTMLVideoElement type. * @param target */ export declare const isHTMLVideoElement: (target: unknown) => target is HTMLVideoElement; /** * @returns `true` if the target is an instance of HTMLAnchorElement type. * @param target */ export declare const isHTMLAnchorElement: (target: unknown) => target is HTMLAnchorElement; /** * @returns `true` if the target is an instance of HTMLImageElement type. * @param target */ export declare const isHTMLImageElement: (target: unknown) => target is HTMLImageElement; /** * @returns `true` if the target is an instance of HTMLOptionElement type. * @param target */ export declare const isHTMLOptionElement: (target: unknown) => target is HTMLOptionElement; /** * @returns `true` if the target is an instance of HTMLButtonElement type. * @param target */ export declare const isHTMLButtonElement: (target: unknown) => target is HTMLButtonElement;