--- /dev/null
+export = codegen;\r
+\r
+/**\r
+ * Appends code to the function's body.\r
+ * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any\r
+ * @param [formatParams] Format parameters\r
+ * @returns Itself or the generated function if finished\r
+ * @throws {Error} If format parameter counts do not match\r
+ */\r
+type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function);\r
+\r
+/**\r
+ * Begins generating a function.\r
+ * @param functionParams Function parameter names\r
+ * @param [functionName] Function name if not anonymous\r
+ * @returns Appender that appends code to the function's body\r
+ */\r
+declare function codegen(functionParams: string[], functionName?: string): Codegen;\r
+\r
+/**\r
+ * Begins generating a function.\r
+ * @param [functionName] Function name if not anonymous\r
+ * @returns Appender that appends code to the function's body\r
+ */\r
+declare function codegen(functionName?: string): Codegen;\r
+\r
+declare namespace codegen {\r
+\r
+ /** When set to `true`, codegen will log generated code to console. Useful for debugging. */\r
+ let verbose: boolean;\r
+}\r