Debian Codegraph @

node/@bufbuild/protobuf/dist/commonjs/reflect/names.d.ts

raw
1 import type { AnyDesc } from "../descriptors.js";
2 /**
3 * Return a fully-qualified name for a Protobuf descriptor.
4 * For a file descriptor, return the original file path.
5 *
6 * See https://protobuf.com/docs/language-spec#fully-qualified-names
7 */
8 export declare function qualifiedName(desc: AnyDesc): string;
9 /**
10 * Converts snake_case to protoCamelCase according to the convention
11 * used by protoc to convert a field name to a JSON name.
12 *
13 * See https://protobuf.com/docs/language-spec#default-json-names
14 *
15 * The function protoSnakeCase provides the reverse.
16 */
17 export declare function protoCamelCase(snakeCase: string): string;
18 /**
19 * Converts protoCamelCase to snake_case.
20 *
21 * This function is the reverse of function protoCamelCase. Note that some names
22 * are not reversible - for example, "foo__bar" -> "fooBar" -> "foo_bar".
23 */
24 export declare function protoSnakeCase(lowerCamelCase: string): string;
25 /**
26 * Escapes names that are reserved for ECMAScript built-in object properties.
27 *
28 * Also see safeIdentifier() from @bufbuild/protoplugin.
29 */
30 export declare function safeObjectProperty(name: string): string;