Skip to content

Commit

Permalink
Added basic/minimal typescript declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonKleban committed Aug 30, 2018
1 parent b874582 commit 6f3e306
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.3.8",
"description": "Mobile-first HTML template engine",
"main": "dist/template7.js",
"types": "template7.d.ts",
"jsnext:main": "dist/template7.esm.js",
"module": "dist/template7.esm.js",
"repository": {
Expand Down
15 changes: 15 additions & 0 deletions template7.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
declare module "Template7" {
interface Template7{
global?: any
templates?: any;
compile? (htmlString: string): any;
registerHelper? (name: string, helper: Function): any;
unregisterHelper? (name: string) : void;
registerPartial? (name: string, template: string) : void;
unregisterPartial? (name: string) : void;
}

const Template7 : Template7;

export default Template7
}

0 comments on commit 6f3e306

Please sign in to comment.