The name mappers for helper functions.
*/
export interface HelperFuncNameMappersRule {
funcBody: "unchanged" | "get" | ((name: string) => string);
creatorPrefix?: string;
hookPrefix?: string;
}
/**
The name mappers for helper functions.
*/
export interface HelperFuncNameMappers {
/**
the key is a pattern to apply rules of followed body and prefix. case insensitive
.e.g: cosmos.gov.v1beta1.Vote
*/
// change the method name to a new name to make the body part without the prefix, if pattern matched.
// Otherwise, see defaults in Query and Msg.
funcBody: "unchanged" | "get" | ((name: string) => string);
// prefix for the creator function, if pattern matched. Otherwise, default to "create"
creatorPrefix?: string;
// prefix for the hook function, if pattern matched. Otherwise, default to "use"
hookPrefix?: string;
};
}
More details please see telescope-helper-func.test.ts
changed structure of nameMappers and added types:
/**
/**
More details please see telescope-helper-func.test.ts