it would be great if you could export the FlatMetadata type:
|
/** |
|
* The flat object emitted by the `as=metadata` output format: the raw sharp |
|
* metadata of the image combined with the final output `width`, `height` and |
|
* `format`, plus the image URL. The applied-transform directives are not |
|
* included, since they cannot be reconstructed from a cached file, keeping the |
|
* output identical between cache hits and misses. |
|
*/ |
|
type FlatMetadata = Omit<Metadata, 'format'> & { |
|
format: string |
|
src: string |
|
} |
I'd like to be able to use this for a typescript module declaration:
declare module "*as=metadata" {
import {FlatMetadata} from "imagetools-core";
const value: FlatMetadata | FlatMetadata[];
export default value;
}
declare module "*as=meta" {
import {FlatMetadata} from "imagetools-core";
const value: FlatMetadata | FlatMetadata[];
export default value;
}
however, because it's not exported currently, I need to vendor the type.
also, it would be great if the flatten function could also be exported, as I have my own custom output format which previously used Metadata from sharp (similar to how this package used to), but I'd like to replace it with FlatMetadata.
it would be great if you could export the
FlatMetadatatype:imagetools/packages/core/src/output-formats.ts
Lines 19 to 29 in 3d4f02b
I'd like to be able to use this for a typescript module declaration:
however, because it's not exported currently, I need to vendor the type.
also, it would be great if the
flattenfunction could also be exported, as I have my own custom output format which previously usedMetadatafrom sharp (similar to how this package used to), but I'd like to replace it withFlatMetadata.