refac: APICall에 타입 지정

- 비 undefined 타입에서 ?타입 호출 제거
- API 소속 type들을 defs/API/ 로 이동
- 모든 SammoAPI, SammoRootAPI 지정
This commit is contained in:
Hide_D committed 2022-04-03 18:16:53 +09:00
1 parent d0dc0f2bd1
commit 2d06f368f8
17 files changed
+176 -115

No files matched your search

+3
View File
@@ -26,6 +26,9 @@ interface EmptyAPICallT<ResultType extends ValidResponse, ErrorType extends Inva
(args: undefined, returnError: true): Promise<ResultType | ErrorType>;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type ArgTypeOf<T> = T extends APICallT<infer A, any, any> ? A : never;
export type APICallT<
ArgType extends RawArgType,
ResultType extends ValidResponse = ValidResponse,