Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MR414N-ID
GitHub Repository: MR414N-ID/botku2
Path: blob/master/node_modules/@protobufjs/codegen/index.d.ts
1126 views
1
export = codegen;
2
3
/**
4
* Appends code to the function's body.
5
* @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
6
* @param [formatParams] Format parameters
7
* @returns Itself or the generated function if finished
8
* @throws {Error} If format parameter counts do not match
9
*/
10
type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function);
11
12
/**
13
* Begins generating a function.
14
* @param functionParams Function parameter names
15
* @param [functionName] Function name if not anonymous
16
* @returns Appender that appends code to the function's body
17
*/
18
declare function codegen(functionParams: string[], functionName?: string): Codegen;
19
20
/**
21
* Begins generating a function.
22
* @param [functionName] Function name if not anonymous
23
* @returns Appender that appends code to the function's body
24
*/
25
declare function codegen(functionName?: string): Codegen;
26
27
declare namespace codegen {
28
29
/** When set to `true`, codegen will log generated code to console. Useful for debugging. */
30
let verbose: boolean;
31
}
32
33