我正在尝试使用Typescript中的把手。我收到以下错误
/// <reference path="../../../jquery.d.ts" />
/// <reference path="../../../require.d.ts" />
我无法理清如何引用车把定义文件以使其正常工作
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));
}
错误:dev / include / ts / test.ts(43,48):错误TS2304:找不到名称'Handlebars'。
包括@ types / handlebar
import * as Handlebars from 'handlebars';
获得以下错误
>> handlebars.d.ts(21,31): error TS1005: ',' expected.
>> handlebars.d.ts(23,32): error TS1005: ',' expected.
>> handlebars.d.ts(98,40): error TS1005: ',' expected.