I am trying to create a definition file for Handlebars for use with precompiled steering scripts. Handlebars places the precompiled scripts in a string indexed hash of the functions, but I cannot figure out how this will be determined.
Hypothetical definition:
declare module Handlebars { export var templates: { (model:any) => string; }[index: string]; }
but this is not a valid definition. The definition should work for a call as follows:
var myHtml = Handlebars.templates["person-template"]({FNmae: "Eric"});
Such a definition is close:
export var templates: { (model:any) => string; }[];
But it is an array with a numerical index, and it is not the same, and VS Intellisense simply decides what functions are in the array.
Efvincent
source share