-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.d.ts
21 lines (19 loc) · 842 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* eslint-disable import/export */
/**
* Converts Handlebars code to JSX code
* @param hbsCode Handlebars code to JSX
* @param options Compilation options
* @param [isComponent] Should return JSX code wrapped as a function component
* @returns JSX code
*/
export function compile(hbsCode: string, isComponent?: boolean): string
/**
* Converts Handlebars code to JSX code
* @param hbsCode Handlebars code to JSX
* @param options Compilation options
* @param [options.isComponent] Should return JSX code wrapped as a function component
* @param [options.isModule] Should return generated code exported as default
* @param [options.includeImport] Should include react import
* @returns JSX code
*/
export function compile(hbsCode: string, options?: { isComponent?: boolean; isModule?: boolean, includeImport?: boolean }): string