This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
2021-04-02 02:24:13 +03:00

28 lines
927 B
TypeScript

export declare type ContentsJsonImageIdiom = 'iphone' | 'ipad' | 'ios-marketing' | 'universal';
export declare type ContentsJsonImageAppearance = {
appearance: 'luminosity';
value: 'dark';
};
export declare type ContentsJsonImageScale = '1x' | '2x' | '3x';
export interface ContentsJsonImage {
appearances?: ContentsJsonImageAppearance[];
idiom: ContentsJsonImageIdiom;
size?: string;
scale: ContentsJsonImageScale;
filename?: string;
}
export interface ContentsJson {
images: ContentsJsonImage[];
info: {
version: number;
author: string;
};
}
/**
* Writes the Config.json which is used to assign images to their respective platform, dpi, and idiom.
*
* @param directory path to add the Contents.json to.
* @param contents image json data
*/
export declare function writeContentsJsonAsync(directory: string, { images }: Pick<ContentsJson, 'images'>): Promise<void>;