1
0
Fork 0
mirror of synced 2024-07-04 05:50:57 +12:00

Fix typings

This commit is contained in:
Adria Navarro 2024-02-22 11:26:22 +01:00
parent c3531ac8ba
commit 566c4e5c17
2 changed files with 4 additions and 3 deletions

View file

@ -113,7 +113,7 @@ export async function processObject(
export async function processString(
string: string,
context: object,
opts?: { noHelpers?: boolean; escapeNewlines?: boolean; onlyFound?: boolean }
opts?: ProcessOptions
) {
// TODO: carry out any async calls before carrying out async call
return processStringSync(string, context, opts)
@ -156,7 +156,7 @@ export function processObjectSync(
export function processStringSync(
string: string,
context: object,
opts?: { noHelpers?: boolean; escapeNewlines?: boolean; onlyFound: any }
opts?: ProcessOptions
) {
// Take a copy of input in case of error
const input = string
@ -397,7 +397,7 @@ export function convertToJS(hbs: string) {
prevBlock = block
const { variable, value } = convertHBSBlock(block, count++)
variables[variable] = value
js += `${stringPart.split()}\${${variable}}`
js += `${stringPart.split("")}\${${variable}}`
}
let varBlock = ""
for (let [variable, value] of Object.entries(variables)) {

View file

@ -4,4 +4,5 @@ export interface ProcessOptions {
noHelpers?: boolean
noFinalise?: boolean
escapeNewlines?: boolean
onlyFound?: boolean
}