暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031
  1. export = codegen;
  2. /**
  3. * Appends code to the function's body.
  4. * @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
  5. * @param [formatParams] Format parameters
  6. * @returns Itself or the generated function if finished
  7. * @throws {Error} If format parameter counts do not match
  8. */
  9. type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function);
  10. /**
  11. * Begins generating a function.
  12. * @param functionParams Function parameter names
  13. * @param [functionName] Function name if not anonymous
  14. * @returns Appender that appends code to the function's body
  15. */
  16. declare function codegen(functionParams: string[], functionName?: string): Codegen;
  17. /**
  18. * Begins generating a function.
  19. * @param [functionName] Function name if not anonymous
  20. * @returns Appender that appends code to the function's body
  21. */
  22. declare function codegen(functionName?: string): Codegen;
  23. declare namespace codegen {
  24. /** When set to `true`, codegen will log generated code to console. Useful for debugging. */
  25. let verbose: boolean;
  26. }