/** * While there is nothing in these typings that prevent it from running in TS 2.8 even, * due to the complexity of the typings anything lower than TS 3.1 will only see * Jimp as `any`. In order to test the strict versions of these types in our typing * test suite, the version has been bumped to 3.1 */ import { Jimp as JimpType, Bitmap, RGB, RGBA, UnionToIntersection, GetPluginVal, GetPluginConst, GetPluginEncoders, GetPluginDecoders, JimpConstructors, } from "@jimp/core"; import typeFn from "@jimp/types"; import pluginFn from "@jimp/plugins"; type Types = ReturnType; type Plugins = ReturnType; type IntersectedPluginTypes = UnionToIntersection< GetPluginVal | GetPluginVal >; type IntersectedPluginConsts = UnionToIntersection< GetPluginConst | GetPluginConst >; type IntersectedPluginEncoders = UnionToIntersection< GetPluginEncoders | GetPluginEncoders >; type IntersectedPluginDecoders = UnionToIntersection< GetPluginDecoders | GetPluginDecoders >; type Jimp = JimpType & IntersectedPluginTypes; declare const Jimp: JimpConstructors & IntersectedPluginConsts & { prototype: Jimp; encoders: IntersectedPluginEncoders; decoders: IntersectedPluginDecoders; }; export = Jimp;