Skip to content

Commit fbc014e

Browse files
committed
refactor: add HasAccountResult interface
1 parent a5c69aa commit fbc014e

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ EmailComposer.open({
120120
### hasAccount()
121121

122122
```typescript
123-
hasAccount() => Promise<{ hasAccount: boolean; }>
123+
hasAccount() => Promise<HasAccountResult>
124124
```
125125

126126
Checks if the User can send a Mail
127127
iOS: Check if the current Device is configured to send mail
128128
Android: Currently does nothing
129129

130-
**Returns:** <code>Promise&lt;{ hasAccount: boolean; }&gt;</code>
130+
**Returns:** <code>Promise&lt;<a href="#hasaccountresult">HasAccountResult</a>&gt;</code>
131131

132132
--------------------
133133

@@ -150,6 +150,13 @@ Open the E-Mail Composer
150150
### Interfaces
151151

152152

153+
#### HasAccountResult
154+
155+
| Prop | Type |
156+
| ---------------- | -------------------- |
157+
| **`hasAccount`** | <code>boolean</code> |
158+
159+
153160
#### OpenOptions
154161

155162
| Prop | Type | Description |

src/definitions.ts

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface EmailComposerPlugin {
66
*
77
* @since 1.0.0
88
*/
9-
hasAccount(): Promise<{ hasAccount: boolean }>;
9+
hasAccount(): Promise<HasAccountResult>;
1010

1111
/**
1212
* Open the E-Mail Composer
@@ -17,6 +17,13 @@ export interface EmailComposerPlugin {
1717
open(options?: OpenOptions): Promise<void>;
1818
}
1919

20+
export interface HasAccountResult {
21+
/**
22+
* @since 1.0.0
23+
*/
24+
hasAccount: boolean;
25+
}
26+
2027
export interface OpenOptions {
2128
/**
2229
* email addresses for TO field

0 commit comments

Comments
 (0)