Skip to content

Instantly share code, notes, and snippets.

@LeoDog896
Created February 17, 2022 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LeoDog896/158ae88de175134680fd8097357ba738 to your computer and use it in GitHub Desktop.
Save LeoDog896/158ae88de175134680fd8097357ba738 to your computer and use it in GitHub Desktop.
Detailed TypeScript definitions designed to align with the schema.
type DisplayType = "fullscreen" | "standalone" | "minimal-ui" | "browser"
interface WebManifest {
background_color?: string;
categories?: string[];
description?: string;
dir?: "ltr" | "rtl" | "auto"
display?: DisplayType;
display_override?: [DisplayType];
iarc_rating_id?: string;
icons?: [{
src: string;
sizes: string;
type?: string;
}],
lang?: string;
name: string;
orientation: "any" | "natural" | "landscape" |
"landscape-primary" | "landscape-secondary" | "portrait" |
"portrait-primary" | "portrait-secondary";
prefer_related_applications: boolean;
protocol_handlers: [{
protocol: string,
url: string;
}];
related_applications: [{
platform: string;
url: string;
id?: string;
}];
scope: string;
screenshots: [{
src: string;
sizes: string;
type: string;
platform: "wide" | "narrow";
label: string;
}];
shortcuts: [{
name: string;
url: string;
description?: string;
}];
short_name?: string;
start_url?: string;
theme_color?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment