@mdfriday/foundry
Version:
The core engine of MDFriday. Convert Markdown and shortcodes into fully themed static sites – Hugo-style, powered by TypeScript.
45 lines • 1.37 kB
TypeScript
export interface SuffixInfo {
/** Suffix without the delimiter, e.g. "xml" */
suffix: string;
/** Full suffix with delimiter, e.g. ".xml" */
fullSuffix: string;
}
export declare class MediaType {
/** Full MIME type string, e.g. "application/rss+xml" */
type: string;
/** Main type, e.g. "application" */
mainType: string;
/** Subtype, e.g. "rss" */
subType: string;
/** Delimiter before the suffix, e.g. "." */
delimiter: string;
/** First suffix (not exposed to external JSON) */
firstSuffix: SuffixInfo;
/** Optional MIME suffix after "+", e.g. "xml" */
private mimeSuffix;
/** CSV of alternative suffixes, for internal comparison only */
private suffixesCSV;
constructor(init: {
type: string;
mainType: string;
subType: string;
delimiter: string;
firstSuffix: SuffixInfo;
mimeSuffix: string;
suffixesCSV: string;
});
/**
* Returns the subtype part of the MIME type.
* If subType is empty, try to extract it from the full type string.
*/
sub(): string;
/**
* Returns the MIME suffix, e.g. "xml" from "application/rss+xml"
*/
getMimeSuffix(): string | undefined;
/**
* Returns the list of suffixes if defined.
*/
getSuffixList(): string[];
}
//# sourceMappingURL=type.d.ts.map