@bubblewrap/core
Version:
Core Library to generate, build and sign TWA projects
33 lines (32 loc) • 1.57 kB
TypeScript
import { WebManifestShortcutJson } from './types/WebManifest';
/**
* A wrapper around the WebManifest's ShortcutInfo.
*/
export declare class ShortcutInfo {
readonly name: string;
readonly shortName: string;
readonly url: string;
readonly chosenIconUrl?: string | undefined;
readonly chosenMaskableIconUrl?: string | undefined;
readonly chosenMonochromeIconUrl?: string | undefined;
/**
* @param {string} name
* @param {string} shortName
* @param {string} url target Url for when the shortcut is clicked
* @param {string} chosenIconUrl Url for the icon with an "any" purpose
* @param {string} chosenMaskableIconUrl Url for the icon with a maskable purpose
* @param {string} chosenMonochromeIconUrl Url for the icon with a monochrome purpose
*/
constructor(name: string, shortName: string, url: string, chosenIconUrl?: string | undefined, chosenMaskableIconUrl?: string | undefined, chosenMonochromeIconUrl?: string | undefined);
toString(index: number): string;
assetName(index: number): string;
/**
* Creates a new TwaManifest, using the URL for the Manifest as a base URL and uses the content
* of the Web Manifest to generate the fields for the TWA Manifest.
*
* @param {URL} webManifestUrl the URL where the webmanifest is available.
* @param {WebManifest} webManifest the Web Manifest, used as a base for the TWA Manifest.
* @returns {TwaManifest}
*/
static fromShortcutJson(webManifestUrl: URL, shortcut: WebManifestShortcutJson): ShortcutInfo;
}