dev-credit
Version:
Add essential developer credits (4 meta tags) to Next.js projects - Published by Softq Web Solutions
86 lines (77 loc) • 2.48 kB
TypeScript
/**
* TypeScript declarations for dev-credit package
* @author Himangshu Mishra <contact@mishra.codes>
* @publisher Softq Web Solutions - softq.live
*/
export interface DevCreditData {
/** Developer name */
developer?: string;
/** Developer website URL */
website?: string;
/** Developer email address */
email?: string;
}
export interface NextjsMetadata {
/** Page title */
title?: string;
/** Page description */
description?: string;
/** Page keywords */
keywords?: string | string[];
/** Author information */
authors?: Array<{ name?: string; url?: string }>;
/** Content creator */
creator?: string;
/** Content publisher */
publisher?: string;
/** Icons */
icons?: {
icon?: string;
[key: string]: any;
};
/** Other meta tags */
other?: {
[key: string]: string;
};
/** Any other metadata properties */
[key: string]: any;
}
/**
* Merges developer credit information into Next.js metadata object (main function)
* @param creditData - Developer credit information (optional)
* @param existingMetadata - Existing Next.js metadata object (optional)
* @returns Merged metadata object with essential developer credits (4 meta tags only)
*/
export declare function withDevMeta(
creditData?: DevCreditData,
existingMetadata?: NextjsMetadata
): NextjsMetadata;
/**
* Generates metadata for Next.js using default developer credit (Himangshu Mishra)
* @param existingMetadata - Existing Next.js metadata object (optional)
* @returns Metadata object with default developer credits
*/
export declare function getDevMeta(
existingMetadata?: NextjsMetadata
): NextjsMetadata;
/**
* Creates custom meta tags specifically for developer attribution
* @param creditData - Developer credit information (optional)
* @returns Metadata object with essential developer attribution meta tags
*/
export declare function createDevMeta(
creditData?: DevCreditData
): NextjsMetadata;
/**
* Default developer credit information
*/
export declare const DEFAULT_CREDIT: DevCreditData;
// Backward compatibility exports
export declare const withDevCredit: typeof withDevMeta;
export declare const getDevCreditMetadata: typeof getDevMeta;
export declare const createDevCreditMeta: typeof createDevMeta;
/**
* Default export - same as withDevMeta
*/
declare const _default: typeof withDevMeta;
export default _default;