Skip to content

Commit

Permalink
refactor: misspell of TriggerReturnType
Browse files Browse the repository at this point in the history
  • Loading branch information
Cnily03 committed Jun 7, 2024
1 parent ec86c8a commit d4c7bb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/ssl-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type CertificateData = {
private: string
}

export type TriggerReturnTyoe<T> = {
export type TriggerReturnType<T> = {
/**
* 生成消息的原料
*/
Expand Down Expand Up @@ -235,7 +235,7 @@ export default abstract class SSLUpdater {
* 触发更新
* @param domains 检测的域名列表
*/
abstract triggerUpdate(domains: string[]): Promise<TriggerReturnTyoe<Object>>;
abstract triggerUpdate(domains: string[]): Promise<TriggerReturnType<Object>>;

/**
* 解析状态记录
Expand Down
4 changes: 2 additions & 2 deletions src/updater/qcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import path from "path"
import Timer from "@/utils/timer"
import { sha256, ansi2html } from "@/utils/utils"
import MailSender from "@/utils/mail-sender"
import SSLUpdater, { SSLUpdaterOptions, TriggerReturnTyoe, sendMsgStatus } from "@/components/ssl-updater"
import SSLUpdater, { SSLUpdaterOptions, TriggerReturnType, sendMsgStatus } from "@/components/ssl-updater"
import "colors"

type StatusRecord = {
Expand Down Expand Up @@ -303,7 +303,7 @@ export class QCloudSSLUpdater extends SSLUpdater {
* 触发更新
* @param domains 检测的域名列表(留空则检测所有)
*/
async triggerUpdate(domains: string[]): Promise<TriggerReturnTyoe<StatusRecord[]>> {
async triggerUpdate(domains: string[]): Promise<TriggerReturnType<StatusRecord[]>> {
let status_record_json: { [cert_id: string]: StatusRecord } = {};
let do_send_mail = false;
const fmt = (c?: number) => typeof c === "undefined" ? "?" : c.toString();
Expand Down
4 changes: 2 additions & 2 deletions src/updater/qiniu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from "path"
import Timer from "@/utils/timer"
import { sha256, ansi2html, hmacSha1 } from "@/utils/utils"
import MailSender from "@/utils/mail-sender"
import SSLUpdater, { SSLUpdaterOptions, CertificateData, sendMsgStatus, TriggerReturnTyoe } from "@/components/ssl-updater"
import SSLUpdater, { SSLUpdaterOptions, CertificateData, sendMsgStatus, TriggerReturnType } from "@/components/ssl-updater"
import urllib from "urllib"
import "colors"

Expand Down Expand Up @@ -767,7 +767,7 @@ export class QiniuSSLUpdater extends SSLUpdater {
})
}

async triggerUpdate(domains: string[]): Promise<TriggerReturnTyoe<StatusRecord[]>> {
async triggerUpdate(domains: string[]): Promise<TriggerReturnType<StatusRecord[]>> {
let status_record_json: { [cert_id: string]: StatusRecord } = {};
let do_send_mail = false
const fmt = (c?: number) => typeof c === "undefined" ? "?" : c.toString();
Expand Down

0 comments on commit d4c7bb5

Please sign in to comment.