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.