@types/sitemap2
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Installation

npm install --save @types/sitemap2

Summary

This package contains type definitions for sitemap2 (https://github.com/vlkosinov/sitemap2).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sitemap2.

index.d.ts

declare var sitemap2: Sitemap;

export = sitemap2;

interface Sitemap {
    new(conf?: SitemapConfig): Sitemap;

    addUrl(urlData: UrlData | UrlData[] | string | string[]): this;
    addSitemap(sm: Sitemap): this;
    toXML(): SitemapXml[];

    hostName: string;
    fileName: string;
    limit: number;
    urls: string[];
    childrens: Sitemap[];
}

interface SitemapConfig {
    hostName?: string | undefined;
    fileName?: string | undefined;
    limit?: number | undefined;
    cacheTime?: number | undefined;
    xslUrl?: string | undefined;
    urls?: string[] | undefined;
    childrens?: Sitemap[] | undefined;
}

interface UrlData {
    url: string;
    chengefreq?: string | undefined;
    priority?: number | string | undefined;
    lastmod?: Date | undefined;
    lastmodWithTime?: boolean | undefined;
    lastmodInISO?: boolean | undefined;
    video?: {
        title: string;
        description: string;
        thumbnail_loc: string;
        content_loc: string;
    } | undefined;
}

interface SitemapXml {
    fileName: string;
    xml: string;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Yuichi Shundo.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sitemap2

Weekly Downloads

28

Version

1.0.5

License

MIT

Unpacked Size

4.67 kB

Total Files

5

Last publish

Collaborators

  • types