mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* Add types for hbs * Use dtsg-gen generated tsconfig.json * Add additional tests * Now lints with less cheating * Avoid losing type information
27 lines
917 B
TypeScript
27 lines
917 B
TypeScript
// Type definitions for hbs 4.0
|
|
// Project: https://github.com/pillarjs/hbs
|
|
// Definitions by: David Muller <https://github.com/davidm77>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.3
|
|
|
|
import handlebars = require('handlebars');
|
|
|
|
type handlebarsModule = typeof handlebars;
|
|
|
|
interface hbsModule {
|
|
readonly handlebars: handlebarsModule;
|
|
localsAsTemplateData(app: any): void;
|
|
registerHelper(helperName: string, helperFunction: (...args: any[]) => any): void;
|
|
registerPartial(partialName: string, partialValue: string): void;
|
|
registerPartials(directoryName: string, callback?: () => void): void;
|
|
__express(filename: string, options: any, cb: (...args: any[]) => any): any;
|
|
}
|
|
|
|
interface hbsModuleWithCreate extends hbsModule {
|
|
create(handlebars?: handlebarsModule): hbsModule;
|
|
}
|
|
|
|
declare var baseModule: hbsModuleWithCreate;
|
|
|
|
export = baseModule;
|