Fix types
This commit is contained in:
parent
215d68715b
commit
8bd89a27a5
|
@ -126,7 +126,7 @@ const excludeFunctions = { string: ["raw"] }
|
||||||
* This script is very specific to purpose, parsing the handlebars-helpers files to attempt to get information about them.
|
* This script is very specific to purpose, parsing the handlebars-helpers files to attempt to get information about them.
|
||||||
*/
|
*/
|
||||||
function run() {
|
function run() {
|
||||||
const foundNames = []
|
const foundNames: string[] = []
|
||||||
for (let collection of COLLECTIONS) {
|
for (let collection of COLLECTIONS) {
|
||||||
const collectionFile = fs.readFileSync(
|
const collectionFile = fs.readFileSync(
|
||||||
`${path.dirname(require.resolve(HELPER_LIBRARY))}/lib/${collection}.js`,
|
`${path.dirname(require.resolve(HELPER_LIBRARY))}/lib/${collection}.js`,
|
||||||
|
@ -147,7 +147,7 @@ function run() {
|
||||||
}
|
}
|
||||||
foundNames.push(name)
|
foundNames.push(name)
|
||||||
// this is ridiculous, but it parse the function header
|
// this is ridiculous, but it parse the function header
|
||||||
const fnc = entry[1].toString()
|
const fnc = entry[1]!.toString()
|
||||||
const jsDocInfo = getCommentInfo(collectionFile, fnc)
|
const jsDocInfo = getCommentInfo(collectionFile, fnc)
|
||||||
let args = jsDocInfo.tags
|
let args = jsDocInfo.tags
|
||||||
.filter(tag => tag.title === "param")
|
.filter(tag => tag.title === "param")
|
||||||
|
@ -176,8 +176,8 @@ function run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert all markdown to HTML
|
// convert all markdown to HTML
|
||||||
for (let collection of Object.values(outputJSON)) {
|
for (let collection of Object.values<any>(outputJSON)) {
|
||||||
for (let helper of Object.values(collection)) {
|
for (let helper of Object.values<any>(collection)) {
|
||||||
helper.description = marked.parse(helper.description)
|
helper.description = marked.parse(helper.description)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue