Skip to content

Commit

Permalink
🐛 fix: 修正 IPluginErrorType 类型
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Aug 25, 2023
1 parent 83129a0 commit 52f1af7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export const PluginErrorType = {
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
};
} as const;
/* eslint-enable */

export type IPluginErrorType = keyof typeof PluginErrorType;
export type IPluginErrorType = (typeof PluginErrorType)[keyof typeof PluginErrorType];

const getStatus = (errorType: IPluginErrorType | string) => {
switch (errorType) {
Expand Down

0 comments on commit 52f1af7

Please sign in to comment.