Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix @celo/base docs #240

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/sdk/base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
@celo/base

# @celo/base

## Table of contents

### Modules

- [account](modules/account.md)
- [address](modules/address.md)
- [async](modules/async.md)
- [collections](modules/collections.md)
- [contacts](modules/contacts.md)
- [currencies](modules/currencies.md)
- [displayFormatting](modules/displayFormatting.md)
- [future](modules/future.md)
- [index](modules/index.md)
- [inputValidation](modules/inputValidation.md)
- [io](modules/io.md)
- [lock](modules/lock.md)
- [logger](modules/logger.md)
- [parsing](modules/parsing.md)
- [phoneNumbers](modules/phoneNumbers.md)
- [result](modules/result.md)
- [signatureUtils](modules/signatureUtils.md)
- [string](modules/string.md)
- [task](modules/task.md)
- [types](modules/types.md)
145 changes: 145 additions & 0 deletions docs/sdk/base/classes/future.Future.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
[@celo/base](../README.md) / [future](../modules/future.md) / Future

# Class: Future\<T\>

[future](../modules/future.md).Future

## Type parameters

| Name |
| :------ |
| `T` |

## Table of contents

### Constructors

- [constructor](future.Future.md#constructor)

### Accessors

- [error](future.Future.md#error)
- [finished](future.Future.md#finished)

### Methods

- [asPromise](future.Future.md#aspromise)
- [reject](future.Future.md#reject)
- [resolve](future.Future.md#resolve)
- [wait](future.Future.md#wait)

## Constructors

### constructor

• **new Future**\<`T`\>(): [`Future`](future.Future.md)\<`T`\>

#### Type parameters

| Name |
| :------ |
| `T` |

#### Returns

[`Future`](future.Future.md)\<`T`\>

#### Defined in

[packages/sdk/base/src/future.ts:10](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L10)

## Accessors

### error

• `get` **error**(): `any`

#### Returns

`any`

#### Defined in

[packages/sdk/base/src/future.ts:21](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L21)

___

### finished

• `get` **finished**(): `boolean`

#### Returns

`boolean`

#### Defined in

[packages/sdk/base/src/future.ts:17](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L17)

## Methods

### asPromise

▸ **asPromise**(): `Promise`\<`T`\>

#### Returns

`Promise`\<`T`\>

#### Defined in

[packages/sdk/base/src/future.ts:41](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L41)

___

### reject

▸ **reject**(`error`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `error` | `any` |

#### Returns

`void`

#### Defined in

[packages/sdk/base/src/future.ts:31](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L31)

___

### resolve

▸ **resolve**(`value`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `value` | `T` |

#### Returns

`void`

#### Defined in

[packages/sdk/base/src/future.ts:25](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L25)

___

### wait

▸ **wait**(): `Promise`\<`T`\>

#### Returns

`Promise`\<`T`\>

#### Defined in

[packages/sdk/base/src/future.ts:37](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/future.ts#L37)
73 changes: 73 additions & 0 deletions docs/sdk/base/classes/lock.Lock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
[@celo/base](../README.md) / [lock](../modules/lock.md) / Lock

# Class: Lock

[lock](../modules/lock.md).Lock

## Table of contents

### Constructors

- [constructor](lock.Lock.md#constructor)

### Methods

- [acquire](lock.Lock.md#acquire)
- [release](lock.Lock.md#release)
- [tryAcquire](lock.Lock.md#tryacquire)

## Constructors

### constructor

• **new Lock**(): [`Lock`](lock.Lock.md)

#### Returns

[`Lock`](lock.Lock.md)

#### Defined in

[packages/sdk/base/src/lock.ts:14](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/lock.ts#L14)

## Methods

### acquire

▸ **acquire**(): `Promise`\<`void`\>

#### Returns

`Promise`\<`void`\>

#### Defined in

[packages/sdk/base/src/lock.ts:29](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/lock.ts#L29)

___

### release

▸ **release**(): `void`

#### Returns

`void`

#### Defined in

[packages/sdk/base/src/lock.ts:54](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/lock.ts#L54)

___

### tryAcquire

▸ **tryAcquire**(): `boolean`

#### Returns

`boolean`

#### Defined in

[packages/sdk/base/src/lock.ts:20](https://github.com/celo-org/developer-tooling/blob/master/packages/sdk/base/src/lock.ts#L20)
Loading
Loading