I'm writing 3rd part TypeScript/Definition file that consumes Jimp (this part works marvelously):
import mergeImg from 'merge-img';
import { resolve } from 'path';
import Jimp from 'jimp';
const fixturePath = resolve(__dirname, 'fixtures');
mergeImg(['image-1.png', 'image-2.jpg']).then(img => {
// Save image as file
img.write('out.png', () => console.log('done'));
});
```ts
export default function mergeImg(
images: Array
options?: Options,
): Promise
I cannot see the outcome of the adding TS support as the tsc tooling complains:
```bash
Error: Errors in typescript@next for external dependencies:
node_modules/@jimp/core/types/utils.d.ts(16,3): error TS2536: Type '"class"' cannot be used to index type 'T'.
node_modules/@jimp/core/types/utils.d.ts(17,3): error TS2536: Type '"constants"' cannot be used to index type 'T'.
Relevant jimp def type:
export type WellFormedValues<T extends any> =
T['class'] &
T['constants'];
Shoudl this one be changed by restructuring consuming code? Or there in the upstream source?
Thanks folks!
Thanks for raising this issue! Sorry for missing it beforehand 馃槄 This should be fixed in #858
@hipstersmoothie think we can close this issue out now?
Most helpful comment
@hipstersmoothie think we can close this issue out now?