-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
handlebars-lang/docs
#128Description
- Please don't open issues for security issues. Instead, file a report at https://www.npmjs.com/advisories/report?package=handlebars
- Have a look at https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md
- Read the FAQ at https://github.com/wycats/handlebars.js/blob/master/FAQ.md
- Use the jsfiddle-template at https://jsfiddle.net/4nbwjaqz/4/ to reproduce problems or bugs
Typescript 4.4 as recently introduced this breaking change: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-4.html#more-compliant-indirect-calls-for-imported-functions
This change breaks the registerHelper function, and possibly other functions as well. Taking the following example code:
registerHelper('myHelper', function (value, options) {});This gets transpiled into the following:
(0, handlebars_1.registerHelper)('myHelper', function (value, options) {});Which causes the following error:
Cannot read property 'helpers' of undefined
at registerHelper ([...]/node_modules/handlebars/lib/handlebars/base.js:47:12)
This is using the current latest version of Handlebars (4.7.7) and Typescript 4.4.3
neilime, KurtPreston, hpx7 and 3ximusneilime, hpx7, KurtPreston, nexus-uw, jillhubahib and 4 more