After upgrading from 0.20 to 0.21 I got the follwoing error:
[tsl] ERROR in /home/travis/build/zxing-js/library/src/test/core/util/SharpImage.ts(8,32)
TS2694: Namespace 'sharp' has no exported member 'SharpInstance'.
I'm using sharp as this:
// https://github.com/zxing-js/library/blob/master/src/test/core/util/SharpImage.ts
import * as sharp from 'sharp';
import BitMatrix from '../../../core/common/BitMatrix';
export default class SharpImage {
public constructor(
private wrapper: sharp.SharpInstance,
private buffer: Uint8ClampedArray,
private width: number,
private height: number
) { }
// ...
}
How can I get SharpInstance in this new version?
Hello, problems with the @types/sharp module should be reported downstream against the https://github.com/DefinitelyTyped/DefinitelyTyped repo.
Okay, but just one more question, should the sharp.SharpInstance class still exist or not?
sharp.SharpInstance is not part of sharp, so I'd guess it is (or was) part of the TypeScript bindings. You'll need to ask this question at the DefinitelyTyped repo.
Okay, thanks!
Just for future reference, the SharpInstance interface was renamed to just Sharp.
Most helpful comment
Just for future reference, the
SharpInstanceinterface was renamed to justSharp.