Skip to content

Commit df3e0ad

Browse files
committed
docs: document exported modules and symbols
1 parent 5a538c5 commit df3e0ad

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/format.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* This module exports types for representing Bot API methods and types
3+
* in a structured format.
4+
*
5+
* @module
6+
*/
7+
18
import type { types } from './types.gen.ts'
29

310
/**
@@ -8,6 +15,9 @@ export type ApiType
815
= | ApiTypeObject
916
| ApiTypeOneOf
1017

18+
/**
19+
* Bot API type represented as an object with fields.
20+
*/
1121
export interface ApiTypeObject {
1222
/**
1323
* Name of the type.
@@ -27,6 +37,9 @@ export interface ApiTypeObject {
2737
oneOf?: never
2838
}
2939

40+
/**
41+
* Bot API type represented as a union of other types.
42+
*/
3043
export interface ApiTypeOneOf {
3144
/**
3245
* Name of the type.
@@ -46,6 +59,9 @@ export interface ApiTypeOneOf {
4659
fields?: never
4760
}
4861

62+
/**
63+
* Bot API method with parameters and return type.
64+
*/
4965
export interface ApiMethod {
5066
/**
5167
* Name of the method.
@@ -68,6 +84,9 @@ export interface ApiMethod {
6884
returnType: ValueType
6985
}
7086

87+
/**
88+
* Field of a type or parameter of a method.
89+
*/
7190
export interface FieldOrParam {
7291
/**
7392
* Name of the field/parameter.

src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
/**
2+
* This module exports definitions of all Bot API methods and types.
3+
*
4+
* @module
5+
*/
6+
17
export { methods } from './methods.gen.ts'
8+
29
export { types } from './types.gen.ts'

0 commit comments

Comments
 (0)