openapi-typescript-codegen/src/utils/registerHandlebarHelpers.ts
Ferdi Koomen 923c141fdb - Cleanup of templates
- Fixed File type for Node.js and Browser clients
2020-09-30 23:35:02 +02:00

13 lines
507 B
TypeScript

// @ts-nocheck
import * as Handlebars from 'handlebars/runtime';
export function registerHandlebarHelpers(): void {
Handlebars.registerHelper('equals', function (a: string, b: string, options: Handlebars.HelperOptions): string {
return a === b ? options.fn(this) : options.inverse(this);
});
Handlebars.registerHelper('notEquals', function (a: string, b: string, options: Handlebars.HelperOptions): string {
return a !== b ? options.fn(this) : options.inverse(this);
});
}