-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generated types declaration file for package
- Loading branch information
Showing
4 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*! | ||
* HandlebarsConverter | ||
* Copyright(c) 2023 Tobi Ajibade | ||
* MIT Licensed | ||
*/ | ||
type TemplateInitOptions = { | ||
templateDirPath: string; | ||
extName?: string; | ||
partialDirPath?: string; | ||
defaultLayoutFilePath?: string; | ||
}; | ||
type TemplateGenerationOptions = { | ||
templateName: string; | ||
context?: object; | ||
}; | ||
/** | ||
* @class | ||
* @description A wrapper around handlebars that easily converts handlebars file to a html string or file | ||
* @author Tobi Ajibade | ||
*/ | ||
export declare class HandlebarsConverter { | ||
private templateDirPath; | ||
private defaultExtName; | ||
private extName?; | ||
private defaultLayoutFilePath?; | ||
private partialDirPath?; | ||
constructor(configs: TemplateInitOptions); | ||
/** | ||
* @method compile | ||
* @description Compiles and generate a html code | ||
* @param {object} opts - The needed configuration data containing the template name and optional context to find and generate the html code. | ||
* @memberof HbsToHtml | ||
*/ | ||
compile(opts: TemplateGenerationOptions): Promise<string>; | ||
protected registerPartials(dir: string): Promise<void>; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters