Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Jun 25, 2024
1 parent f6e996c commit 19aed49
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions packages/utils/types/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,31 +60,6 @@ export declare const getEnumValues: (proto: ProtoEnum) => EnumValue[];
* @returns
*/
export declare const getTypeNameByEnumObj: (field: any, pkg: string, traversal: string[], isNested: boolean) => any;
/**
* Converts a protobuf package path into a deeply nested JSON path format suitable for
* hierarchical representations. This function is ideal for adapting proto package paths
* to structured configurations or mappings in JSON.
*
* @param protoPath The protobuf package path as a string, typically formatted as
* a directory-like structure such as "cosmwasm/wasm/v1/types.proto".
* The "types.proto" or any file name with '.proto' is excluded from
* the conversion.
*
* Example input:
* - "cosmwasm/wasm/v1/types.proto"
*
* @returns A string representing the deeply nested JSON path. The function constructs this
* by starting with "/root/nested" and appending "/nested/{part}" for each segment
* of the original path.
*
* Example output for "cosmwasm/wasm/v1/types.proto":
* - "/root/nested/cosmwasm/nested/wasm/nested/v1"
*
* Usage:
* const jsonNestedPath = convertProtoPathToNestedJSONPath("cosmwasm/wasm/v1/types.proto");
* console.log(jsonNestedPath); // Outputs: "/root/nested/cosmwasm/nested/wasm/nested/v1/nested"
*/
export declare function convertProtoPathToNestedJSONPath(protoPath: string): string;
/**
* Converts a dot-separated package name into a deeply nested JSON path format suitable for
* hierarchical representations. This function is ideal for adapting package names like those
Expand Down

0 comments on commit 19aed49

Please sign in to comment.