Skip to content

Commit

Permalink
fix: replace undesired characters in documentation, returns.hbs modified
Browse files Browse the repository at this point in the history
  • Loading branch information
banasa44 committed Feb 20, 2024
1 parent d587564 commit cbd3d86
Show file tree
Hide file tree
Showing 29 changed files with 192 additions and 202 deletions.
7 changes: 3 additions & 4 deletions docs/tweaks/returns.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{{#if returns}}
{{#if returns.[0].description~}}
**Returnsssss**: {{#each returns~}}
**Returns**: {{#each returns~}}
{{#if type~}}
{{#if type.names}}{{>linked-type-list types=type.names delimiter=" \| " ~}}{{/if}}
{{~#if description}} - <p>`{{{stripTags (inlineLinks description)}}}`</p>{{/if~}}
{{~#if description}} - {{{inlineLinks description}}}{{/if~}}
{{else~}}
{{{inlineLinks description}~}}
{{/if~}}
{{~/each}}

{{/if}}{{/if}}
{{/if}}
24 changes: 12 additions & 12 deletions modules/client-common/src/encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
*
* @export
* @param {string} value
* @return {*} {string}
* @return {string}
*/
export function ensure0x(value: string): string {
return value.startsWith("0x") ? value : "0x" + value;
Expand All @@ -26,7 +26,7 @@ export function ensure0x(value: string): string {
*
* @export
* @param {string} value
* @return {*} {string}
* @return {string}
*/
export function strip0x(value: string): string {
return value.startsWith("0x") ? value.substring(2) : value;
Expand All @@ -37,7 +37,7 @@ export function strip0x(value: string): string {
*
* @export
* @param {string} hexString
* @return {*} {Uint8Array}
* @return {Uint8Array}
*/
export function hexToBytes(hexString: string): Uint8Array {
if (!hexString) return new Uint8Array();
Expand All @@ -63,7 +63,7 @@ export function hexToBytes(hexString: string): Uint8Array {
* @export
* @param {Uint8Array} buff
* @param {boolean} [skip0x]
* @return {*} {string}
* @return {string}
*/
export function bytesToHex(buff: Uint8Array, skip0x?: boolean): string {
const bytes: string[] = [];
Expand All @@ -81,7 +81,7 @@ export function bytesToHex(buff: Uint8Array, skip0x?: boolean): string {
* @export
* @param {number} ratio
* @param {number} digits
* @return {*} {bigint}
* @return {bigint}
*/
export function encodeRatio(ratio: number, digits: number): number {
if (ratio < 0 || ratio > 1) {
Expand All @@ -98,7 +98,7 @@ export function encodeRatio(ratio: number, digits: number): number {
* @export
* @param {bigint} onChainValue
* @param {number} digits
* @return {*} {number}
* @return {number}
*/
export function decodeRatio(
onChainValue: bigint | number,
Expand All @@ -119,7 +119,7 @@ export function decodeRatio(
* @export
* @param {string} pluginAddress
* @param {number} id
* @return {*}
* @return
*/
export function encodeProposalId(pluginAddress: string, id: number) {
if (!/^0x[A-Fa-f0-9]{40}$/.test(pluginAddress)) {
Expand All @@ -134,7 +134,7 @@ export function encodeProposalId(pluginAddress: string, id: number) {
*
* @export
* @param {string} proposalId
* @return {*} {{ pluginAddress: string; id: number }}
* @return {{ pluginAddress: string; id: number }}
*/
export function decodeProposalId(
proposalId: string,
Expand All @@ -159,7 +159,7 @@ export function decodeProposalId(
*
* @export
* @param {Array<boolean>} [bools]
* @return {*}
* @return
*/
export function boolArrayToBitmap(bools?: Array<boolean>) {
if (!bools || !bools.length) return BigInt(0);
Expand All @@ -178,7 +178,7 @@ export function boolArrayToBitmap(bools?: Array<boolean>) {
* Transforms a bigint into an array of booleans
*
* @param {bigint} bitmap
* @return {*} {Array<boolean>}
* @return {Array<boolean>}
*/
export function bitmapToBoolArray(bitmap: bigint): Array<boolean> {
if (bitmap >= (BigInt(1) << BigInt(256))) {
Expand All @@ -199,7 +199,7 @@ export function bitmapToBoolArray(bitmap: bigint): Array<boolean> {
*
* @export
* @param {string} proposalId
* @returns {*} {string}
* @returns {string}
*/
export const getExtendedProposalId = (proposalId: string): string => {
if (!isProposalId(proposalId)) {
Expand All @@ -214,7 +214,7 @@ export const getExtendedProposalId = (proposalId: string): string => {
*
* @export
* @param {string} proposalId
* @returns {*} {string}
* @returns {string}
*/
export const getCompactProposalId = (proposalId: string): string => {
if (!proposalId.match(/^(0x[A-Fa-f0-9]{40})_(0x[A-Fa-f0-9]{1,64})$/)) {
Expand Down
6 changes: 3 additions & 3 deletions modules/client-common/src/promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
* @param {Promise<T>} prom The promise to track
* @param {number} timeout Timeout (in milliseconds) to wait before failing
* @param {string} [timeoutMessage] (optional) Message to use when throwing a timeout error. By default: `"Time out"`
* @return {*} {Promise<T>}
* @return {Promise<T>}
*/
export function promiseWithTimeout<T>(
prom: Promise<T>,
Expand Down Expand Up @@ -46,8 +46,8 @@ export function promiseWithTimeout<T>(
* func: () => Promise<T>;
* onFail?: (e: Error) => void;
* shouldRetry: () => boolean;
* }} { func, onFail, shouldRetry }
* @return {*}
* }} params func, onFail, shouldRetry }
* @return
*/
export async function runAndRetry<T>({ func, onFail, shouldRetry }: {
func: () => Promise<T>;
Expand Down
18 changes: 9 additions & 9 deletions modules/client-common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import { Zero } from "@ethersproject/constants";
* @param {ContractReceipt} receipt
* @param {Interface} iface
* @param {string} eventName
* @return {*} {(Log | undefined)}
* @return {(Log | undefined)}
*/
export function findLog(
receipt: ContractReceipt,
Expand All @@ -75,7 +75,7 @@ export function findLog(
* @export
* @param {Uint8Array} data
* @param {string[]} availableFunctions
* @return {*} {FunctionFragment}
* @return {FunctionFragment}
*/
export function getFunctionFragment(
data: Uint8Array,
Expand All @@ -91,7 +91,7 @@ export function getFunctionFragment(
*
* @export
* @param {MetadataAbiInput[]} [inputs=[]]
* @return {*} {string[]}
* @return {string[]}
*/
export function getNamedTypesFromMetadata(
inputs: MetadataAbiInput[] = [],
Expand Down Expand Up @@ -124,7 +124,7 @@ export function getNamedTypesFromMetadata(
* @export
* @param {IClientWeb3Core} web3
* @param {PrepareInstallationParams} params
* @return {*}
* @return
*/
export async function prepareGenericInstallationEstimation(
web3: IClientWeb3Core,
Expand Down Expand Up @@ -180,7 +180,7 @@ export async function prepareGenericInstallationEstimation(
* @export
* @param {IClientWeb3Core} web3
* @param {(PrepareInstallationParams & { pluginSetupProcessorAddress: string })} params
* @return {*} {AsyncGenerator<PrepareInstallationStepValue>}
* @return {AsyncGenerator<PrepareInstallationStepValue>}
*/
export async function* prepareGenericInstallation(
web3: IClientWeb3Core,
Expand Down Expand Up @@ -259,7 +259,7 @@ export async function* prepareGenericInstallation(
*
* @param {IClientGraphQLCore} graphql
* @param {PrepareUpdateParams} params
* @return {*} {Promise<PluginSetupProcessor.PrepareUpdateParamsStruct>}
* @return {Promise<PluginSetupProcessor.PrepareUpdateParamsStruct>}
*/
async function getPrepareUpdateParams(
graphql: IClientGraphQLCore,
Expand Down Expand Up @@ -319,7 +319,7 @@ async function getPrepareUpdateParams(
* @param {IClientWeb3Core} web3
* @param {IClientGraphQLCore} graphql
* @param {(PrepareUpdateParams & { pluginSetupProcessorAddress: string })} params
* @return {*} {Promise<GasFeeEstimation>}
* @return {Promise<GasFeeEstimation>}
*/
export async function prepareGenericUpdateEstimation(
web3: IClientWeb3Core,
Expand Down Expand Up @@ -401,7 +401,7 @@ export async function* prepareGenericUpdate(
*
* @export
* @param {Networkish} networkish
* @return {*} {Network}
* @return {Network}
*/
export function getNetwork(networkish: Networkish): Network {
let network: Network | undefined;
Expand Down Expand Up @@ -437,7 +437,7 @@ export function getNetwork(networkish: Networkish): Network {
*
* @export
* @param {Interface} iface
* @return {*} {string}
* @return {string}
*/
export function getInterfaceId(iface: Interface): string {
let interfaceId = Zero;
Expand Down
10 changes: 5 additions & 5 deletions modules/client-common/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { MultiUri } from "./multiuri";
*
* @export
* @param {string} data
* @return {*} {string}
* @return {string}
*/
export function resolveIpfsCid(data: string): string {
const uri = new MultiUri(data);
Expand All @@ -29,7 +29,7 @@ export function resolveIpfsCid(data: string): string {
*
* @export
* @param {string} proposalId
* @return {*} {boolean}
* @return {boolean}
*/
export function isProposalId(proposalId: string): boolean {
const regex = new RegExp(OSX_PROPOSAL_ID_REGEX);
Expand All @@ -41,7 +41,7 @@ export function isProposalId(proposalId: string): boolean {
*
* @export
* @param {string} name
* @return {*} {boolean}
* @return {boolean}
*/
export function isEnsName(name: string): boolean {
const regex = new RegExp(ENS_REGEX);
Expand All @@ -53,7 +53,7 @@ export function isEnsName(name: string): boolean {
*
* @export
* @param {string} cid
* @return {*} {boolean}
* @return {boolean}
*/
export function isIpfsUri(cid: string): boolean {
const regex = new RegExp(
Expand All @@ -67,7 +67,7 @@ export function isIpfsUri(cid: string): boolean {
*
* @export
* @param {string} name
* @return {*} {boolean}
* @return {boolean}
*/
export function isSubdomain(name: string): boolean {
const regex = new RegExp(SUBDOMAIN_REGEX);
Expand Down
2 changes: 1 addition & 1 deletion modules/client/src/addresslistVoting/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class AddresslistVotingClient extends ClientCore
*
* @param {AddresslistVotingPluginInstall} params
* @param {Networkish} [network="mainnet"]
* @return {*} {PluginInstallItem}
* @return {PluginInstallItem}
* @memberof AddresslistVotingClient
*/
getPluginInstallItem: (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class AddresslistVotingClientDecoding extends ClientCore
* Decodes a dao metadata from an encoded update metadata action
*
* @param {Uint8Array} data
* @return {*} {VotingSettings}
* @return {VotingSettings}
* @memberof AddresslistVotingClientDecoding
*/
public updatePluginSettingsAction(data: Uint8Array): VotingSettings {
Expand All @@ -31,7 +31,7 @@ export class AddresslistVotingClientDecoding extends ClientCore
* Decodes a list of addresses from an encoded add members action
*
* @param {Uint8Array} data
* @return {*} {string[]}
* @return {string[]}
* @memberof AddresslistVotingClientDecoding
*/
public addMembersAction(data: Uint8Array): string[] {
Expand All @@ -48,7 +48,7 @@ export class AddresslistVotingClientDecoding extends ClientCore
* Decodes a list of addresses from an encoded remove members action
*
* @param {Uint8Array} data
* @return {*} {string[]}
* @return {string[]}
* @memberof AddresslistVotingClientDecoding
*/
public removeMembersAction(data: Uint8Array): string[] {
Expand All @@ -67,7 +67,7 @@ export class AddresslistVotingClientDecoding extends ClientCore
* Returns the decoded function info given the encoded data of an action
*
* @param {Uint8Array} data
* @return {*} {(InterfaceParams | null)}
* @return {(InterfaceParams | null)}
* @memberof AddresslistVotingClientDecoding
*/
public findInterface(data: Uint8Array): InterfaceParams | null {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class AddresslistVotingClientEncoding extends ClientCore
*
* @param {AddresslistVotingPluginInstall} params
* @param {Networkish} network
* @return {*} {PluginInstallItem}
* @return {PluginInstallItem}
* @memberof AddresslistVotingClientEncoding
*/
static getPluginInstallItem(
Expand Down Expand Up @@ -67,7 +67,7 @@ export class AddresslistVotingClientEncoding extends ClientCore
*
* @param {string} pluginAddress
* @param {VotingSettings} params
* @return {*} {DaoAction}
* @return {DaoAction}
* @memberof AddresslistVotingClientEncoding
*/
public updatePluginSettingsAction(
Expand All @@ -89,7 +89,7 @@ export class AddresslistVotingClientEncoding extends ClientCore
*
* @param {string} pluginAddress
* @param {string[]} members
* @return {*} {DaoAction}
* @return {DaoAction}
* @memberof AddresslistVotingClientEncoding
*/
public addMembersAction(pluginAddress: string, members: string[]): DaoAction {
Expand Down Expand Up @@ -118,7 +118,7 @@ export class AddresslistVotingClientEncoding extends ClientCore
*
* @param {string} pluginAddress
* @param {string[]} members
* @return {*} {DaoAction}
* @return {DaoAction}
* @memberof AddresslistVotingClientEncoding
*/
public removeMembersAction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class AddresslistVotingClientEstimation extends ClientCore
* Estimates the gas fee of creating a proposal on the plugin
*
* @param {CreateMajorityVotingProposalParams} params
* @return {*} {Promise<GasFeeEstimation>}
* @return {Promise<GasFeeEstimation>}
* @memberof AddresslistVotingClientEstimation
*/
public async createProposal(
Expand Down Expand Up @@ -65,7 +65,7 @@ export class AddresslistVotingClientEstimation extends ClientCore
* Estimates the gas fee of casting a vote on a proposal
*
* @param {VoteProposalParams} params
* @return {*} {Promise<GasFeeEstimation>}
* @return {Promise<GasFeeEstimation>}
* @memberof AddresslistVotingClientEstimation
*/
public async voteProposal(
Expand Down Expand Up @@ -94,7 +94,7 @@ export class AddresslistVotingClientEstimation extends ClientCore
* Estimates the gas fee of executing an AddressList proposal
*
* @param {string} proposalId
* @return {*} {Promise<GasFeeEstimation>}
* @return {Promise<GasFeeEstimation>}
* @memberof AddresslistVotingClientEstimation
*/
public async executeProposal(
Expand All @@ -119,7 +119,7 @@ export class AddresslistVotingClientEstimation extends ClientCore
* Estimates the gas fee of preparing an update
*
* @param {AddresslistVotingPluginPrepareUpdateParams} params
* @return {*} {Promise<GasFeeEstimation>}
* @return {Promise<GasFeeEstimation>}
* @memberof AddresslistVotingClientEstimation
*/
public async prepareUpdate(
Expand Down
Loading

0 comments on commit cbd3d86

Please sign in to comment.