Skip to content

Commit 0412edb

Browse files
committed
chore(types): move ts types for types
move typescript types for `Types` class to separate folder
1 parent 0f28366 commit 0412edb

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/types/@types/index.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export type AllowedTypes =
2+
| 'string'
3+
| 'integer'
4+
| 'float'
5+
| 'boolean'
6+
| 'datetime'
7+
| 'string_array'
8+
| 'integer_array'
9+
| 'float_array'
10+
| 'boolean_array'
11+
| 'datetime_array';
12+
13+
export type MethodParamsOptions = {
14+
contextId: string;
15+
};

src/types/types.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
import { Hyper } from '../hyper';
2-
3-
type allowedTypes =
4-
| 'string'
5-
| 'integer'
6-
| 'float'
7-
| 'boolean'
8-
| 'datetime'
9-
| 'string_array'
10-
| 'integer_array'
11-
| 'float_array'
12-
| 'boolean_array'
13-
| 'datetime_array';
14-
15-
type MethodParamsOptions = {
16-
contextId: string;
17-
};
2+
import type { AllowedTypes, MethodParamsOptions } from './@types';
183

194
export class Types {
205
constructor(private readonly hyper: Hyper) {}
@@ -24,7 +9,7 @@ export class Types {
249
query,
2510
contextId,
2611
}: {
27-
endpointType: allowedTypes;
12+
endpointType: AllowedTypes;
2813
query: string;
2914
contextId?: string;
3015
}): Promise<{

0 commit comments

Comments
 (0)