I am currently attempting to implement handlebars in Typescript, but I encountered an error.
/// <reference path="../../../jquery.d.ts" />
/// <reference path="../../../require.d.ts" />
My issue lies in referencing the handlebars definition file to get it to work properly.
private populateData(data){
var base=this;
var jsData=document.getElementById('header').innerHTML;
var getdata=document.getElementById('header').innerHTML;
var compiledData = Handlebars.compile(getdata);
$('.displayData').html(compiledData(data));
}
Error: dev/include/ts/test.ts(43,28): error TS2304: Cannot find name 'Handlebars'.
When attempting to include @types/handlebar using:
import * as Handlebars from 'handlebars';
The following errors are generated:
>> handlebars.d.ts(21,31): error TS1005: ',' expected.
>> handlebars.d.ts(23,32): error TS1005: ',' expected.
>> handlebars.d.ts(98,40): error TS1005: ',' expected.