refactor(msjs): avoid any (part 1) (#13247)

* refactor(msjs): avoid any

* run api extractor

---------

Co-authored-by: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>
Co-authored-by: kakkokari-gtyih <daisho7308+f@gmail.com>
This commit is contained in:
Kisaragi 2024-02-12 11:38:16 +09:00 committed by GitHub
parent a1e12c0ec3
commit b95e25004f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View file

@ -2165,7 +2165,7 @@ type IResponse = operations['i']['responses']['200']['content']['application/jso
type IRevokeTokenRequest = operations['i/revoke-token']['requestBody']['content']['application/json'];
// @public (undocumented)
function isAPIError(reason: any): reason is APIError;
function isAPIError(reason: Record<PropertyKey, unknown>): reason is APIError;
// @public (undocumented)
type ISigninHistoryRequest = operations['i/signin-history']['requestBody']['content']['application/json'];

View file

@ -17,7 +17,7 @@ export type APIError = {
info: Record<string, any>;
};
export function isAPIError(reason: any): reason is APIError {
export function isAPIError(reason: Record<PropertyKey, unknown>): reason is APIError {
return reason[MK_API_ERROR] === true;
}

View file

@ -15,10 +15,10 @@ type Overwrite<T, U extends { [Key in keyof T]?: unknown }> = Omit<
keyof U
> & U;
type SwitchCase = {
type SwitchCase<Condition = unknown, Result = unknown> = {
$switch: {
$cases: [any, any][],
$default: any;
$cases: [Condition, Result][],
$default: Result;
};
};