index.d.ts 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import blit from '@jimp/plugin-blit';
  2. import blur from '@jimp/plugin-blur';
  3. import circle from '@jimp/plugin-circle';
  4. import color from '@jimp/plugin-color';
  5. import contain from '@jimp/plugin-contain';
  6. import cover from '@jimp/plugin-cover';
  7. import crop from '@jimp/plugin-crop';
  8. import displace from '@jimp/plugin-displace';
  9. import dither from '@jimp/plugin-dither';
  10. import fisheye from '@jimp/plugin-fisheye';
  11. import flip from '@jimp/plugin-flip';
  12. import gaussian from '@jimp/plugin-gaussian';
  13. import invert from '@jimp/plugin-invert';
  14. import mask from '@jimp/plugin-mask';
  15. import normalize from '@jimp/plugin-normalize';
  16. import print from '@jimp/plugin-print';
  17. import resize from '@jimp/plugin-resize';
  18. import rotate from '@jimp/plugin-rotate';
  19. import scale from '@jimp/plugin-scale';
  20. import shadow from '@jimp/plugin-shadow';
  21. import threshold from '@jimp/plugin-threshold';
  22. type BlitRet = ReturnType<typeof blit>;
  23. type BlurRet = ReturnType<typeof blur>;
  24. type CircleRet = ReturnType<typeof circle>;
  25. type ColorRet = ReturnType<typeof color>;
  26. type ContainRet = ReturnType<typeof contain>;
  27. type CoverRet = ReturnType<typeof cover>;
  28. type CropRet = ReturnType<typeof crop>;
  29. type DisplaceRet = ReturnType<typeof displace>;
  30. type DitherRet = ReturnType<typeof dither>;
  31. type FlipRet = ReturnType<typeof flip>;
  32. type FisheyeRet = ReturnType<typeof fisheye>;
  33. type GaussianRet = ReturnType<typeof gaussian>;
  34. type InvertRet = ReturnType<typeof invert>;
  35. type MaskRet = ReturnType<typeof mask>;
  36. type NormalizeRet = ReturnType<typeof normalize>;
  37. type PrintRet = ReturnType<typeof print>;
  38. type ResizeRet = ReturnType<typeof resize>;
  39. type RotateRet = ReturnType<typeof rotate>;
  40. type ScaleRet = ReturnType<typeof scale>;
  41. type ShadowRet = ReturnType<typeof shadow>;
  42. type ThresholdRet = ReturnType<typeof threshold>;
  43. /**
  44. * This is made union and not intersection to avoid issues with
  45. * `IllformedPlugin` and `WellFormedPlugin` when using typings with Jimp
  46. * generic
  47. *
  48. * In reality, this should be an intersection but our type data isn't
  49. * clever enough to figure out what's a class and what's not/etc
  50. */
  51. type Plugins =
  52. | BlitRet
  53. | BlurRet
  54. | CircleRet
  55. | ColorRet
  56. | ContainRet
  57. | CoverRet
  58. | CropRet
  59. | DisplaceRet
  60. | DitherRet
  61. | FlipRet
  62. | FisheyeRet
  63. | GaussianRet
  64. | InvertRet
  65. | MaskRet
  66. | NormalizeRet
  67. | PrintRet
  68. | ResizeRet
  69. | RotateRet
  70. | ScaleRet
  71. | ShadowRet
  72. | ThresholdRet;
  73. export default function(): Plugins;