File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1414 */
1515
1616/* istanbul ignore file */
17+
18+ export * from './user' ;
Original file line number Diff line number Diff line change 1+ /*
2+ * *** MIT LICENSE ***
3+ * -------------------------------------------------------------------------
4+ * This code may be modified and distributed under the MIT license.
5+ * See the LICENSE file for details.
6+ * -------------------------------------------------------------------------
7+ *
8+ * @summary Collection of user related types
9+ *
10+ * @author Alvis HT Tang <alvis@hilbert.space>
11+ * @license MIT
12+ * @copyright Copyright (c) 2021 - All Rights Reserved.
13+ * -------------------------------------------------------------------------
14+ */
15+
16+ interface UserBase < T extends string > {
17+ object : 'user' ;
18+ id : string ;
19+ type : T ;
20+ name : string ;
21+ avatar_url ?: string ;
22+ }
23+
24+ export interface PersonUser extends UserBase < 'person' > {
25+ person ?: {
26+ email : string ;
27+ } ;
28+ }
29+
30+ export type BotUser = UserBase < 'bot' > ;
31+
32+ export type User = PersonUser | BotUser ;
You can’t perform that action at this time.
0 commit comments