mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
Fix limitInputPixels type (#9622)
* Fix limitInputPixels type * Use sharp options
This commit is contained in:
parent
d87a97e109
commit
5156c74050
3 changed files with 8 additions and 3 deletions
5
.changeset/slow-impalas-taste.md
Normal file
5
.changeset/slow-impalas-taste.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"astro": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes the Sharp image service `limitInputPixels` option type
|
|
@ -1118,7 +1118,7 @@ export interface AstroUserConfig {
|
||||||
* @docs
|
* @docs
|
||||||
* @name image.service.config.limitInputPixels
|
* @name image.service.config.limitInputPixels
|
||||||
* @kind h4
|
* @kind h4
|
||||||
* @type {boolean}
|
* @type {number | boolean}
|
||||||
* @default `true`
|
* @default `true`
|
||||||
* @version 4.1.0
|
* @version 4.1.0
|
||||||
* @description
|
* @description
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { FormatEnum } from 'sharp';
|
import type { FormatEnum, SharpOptions } from 'sharp';
|
||||||
import { AstroError, AstroErrorData } from '../../core/errors/index.js';
|
import { AstroError, AstroErrorData } from '../../core/errors/index.js';
|
||||||
import type { ImageOutputFormat, ImageQualityPreset } from '../types.js';
|
import type { ImageOutputFormat, ImageQualityPreset } from '../types.js';
|
||||||
import {
|
import {
|
||||||
|
@ -12,7 +12,7 @@ export interface SharpImageServiceConfig {
|
||||||
/**
|
/**
|
||||||
* The `limitInputPixels` option passed to Sharp. See https://sharp.pixelplumbing.com/api-constructor for more information
|
* The `limitInputPixels` option passed to Sharp. See https://sharp.pixelplumbing.com/api-constructor for more information
|
||||||
*/
|
*/
|
||||||
limitInputPixels?: number;
|
limitInputPixels?: SharpOptions['limitInputPixels'];
|
||||||
}
|
}
|
||||||
|
|
||||||
let sharp: typeof import('sharp');
|
let sharp: typeof import('sharp');
|
||||||
|
|
Loading…
Add table
Reference in a new issue