Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Missing 'purpose' property in Icon type definition #139

Open
blephy opened this issue Oct 3, 2020 · 1 comment
Open

Missing 'purpose' property in Icon type definition #139

blephy opened this issue Oct 3, 2020 · 1 comment

Comments

@blephy
Copy link

blephy commented Oct 3, 2020

Hi,

First of all, thanks to maintain this plugin.

It seems to be a missing property in type def Icon. I can't use purpose property in my webpack typescript language configuration.

You could also add categories types as mentioned here :

type TCategories =
    | 'books'
    | 'business'
    | 'education'
    | 'entertainment'
    | 'finance'
    | 'fitness'
    | 'food'
    | 'games'
    | 'government'
    | 'health'
    | 'kids'
    | 'lifestyle'
    | 'magazines'
    | 'medical'
    | 'music'
    | 'navigation'
    | 'news'
    | 'personalization'
    | 'photo'
    | 'politics'
    | 'productivity'
    | 'security'
    | 'shopping'
    | 'social'
    | 'sports'
    | 'travel'
    | 'utilities'
    | 'weather'
@blephy
Copy link
Author

blephy commented Oct 4, 2020

Can't make a pull request ... 403 :/

// Type definitions for webpack-pwa-manifest 2.0.4
// Project: https://github.com/arthurbergmz/webpack-pwa-manifest
// Definitions by: Arthur A. Bergamaschi <https://www.github.com/arthurbergmz>

import { Plugin } from 'webpack';

export = WebpackPwaManifest

declare class WebpackPwaManifest extends Plugin {
    constructor(options: WebpackPwaManifest.ManifestOptions);
}

declare namespace WebpackPwaManifest {
    type Category =
    | 'books'
    | 'business'
    | 'education'
    | 'entertainment'
    | 'finance'
    | 'fitness'
    | 'food'
    | 'games'
    | 'government'
    | 'health'
    | 'kids'
    | 'lifestyle'
    | 'magazines'
    | 'medical'
    | 'music'
    | 'navigation'
    | 'news'
    | 'personalization'
    | 'photo'
    | 'politics'
    | 'productivity'
    | 'security'
    | 'shopping'
    | 'social'
    | 'sports'
    | 'travel'
    | 'utilities'
    | 'weather';
    type Direction = 'ltr' | 'rtl' | 'auto';
    type Display = 'fullscreen' | 'standalone' | 'minimal-ui' | 'browser';
    type Orientation = 'any' | 'natural' | 'landscape' | 'landscape-primary' | 'landscape-secondary' | 'portrait' | 'portrait-primary' | 'portrait-secondary';
    type CrossOrigin = 'use-credentials' | 'anonymous';
    interface ManifestOptions {
        background_color?: string;
        description?: string;
        dir?: Direction;
        display?: Display;
        fingerprints?: boolean;
        filename?: string;
        icons?: Icon | Icon[];
        inject?: boolean;
        lang?: string;
        name: string;
        orientation?: Orientation;
        publicPath?: string;
        prefer_related_applications?: boolean;
        related_applications?: RelatedApplications[];
        scope?: string;
        short_name?: string;
        start_url?: string;
        theme_color?: string;
        'theme-color'?: string;
        ios?: boolean | IosOptions;
        crossorigin?: CrossOrigin;
        categories: Category[];
    }
    interface RelatedApplications {
        platform?: string;
        url: string;
        id?: string;
    }
    interface IosOptions {
        'apple-touch-icon'?: string | IosAppleTouchIcon;
        'apple-touch-startup-image'?: string;
        'apple-mobile-web-app-title'?: string;
        'apple-mobile-web-app-capable'?: 'yes' | 'no' | boolean;
        'apple-mobile-web-app-status-bar-style'?: 'default' | 'black' | 'black-translucent';
    }
    interface IosAppleTouchIcon {
        sizes?: string | number;
        href: string;
    }
    interface Icon {
        src: string;
        size?: string | number;
        sizes?: number[];
        destination?: string;
        ios?: boolean | 'default' | 'startup';
        purpose?: 'monochrome' | 'maskable' | 'any';
    }
}

@blephy blephy mentioned this issue Oct 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant