mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
// Type definitions for Handlebars 1.0
|
|
// Project: http://handlebarsjs.com/
|
|
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
|
|
declare module Handlebars {
|
|
function registerHelper(name: string, fn: Function, inverse?: boolean): void;
|
|
function registerPartial(name: string, str: any): void;
|
|
function K(): void;
|
|
function createFrame(object: any): any;
|
|
function Exception(message: string): void;
|
|
class SafeString {
|
|
constructor(str: string);
|
|
static toString(): string;
|
|
}
|
|
function parse(input: string): boolean;
|
|
var logger: Logger;
|
|
function log(level: number, obj: any): void;
|
|
function compile(input: any, options?: any): (context: any, options?: any) => string;
|
|
|
|
interface Logger {
|
|
DEBUG: number;
|
|
INFO: number;
|
|
WARN: number;
|
|
ERROR: number;
|
|
level: number;
|
|
|
|
methodMap: { [level: number]: string };
|
|
|
|
log(level: number, obj: string): void;
|
|
}
|
|
}
|