示例工程 56-auto-update
56-auto-update/app/.tsc/shared/feed.d.ts
export type Platform = "macos" | "windows" | "linux";
export type Scheme = {
id: "static" | "official" | "server" | "store";
name: string;
feed: string;
updates: string;
limits: string;
};
export type FeedKind = "mac" | "win" | "invalid";
export type Feed = {
id: string;
label: string;
kind: FeedKind;
raw: string;
};
export type Decision = {
status: "update" | "none" | "error";
current: string;
latest: string;
notes: string;
reason: string;
};
export declare const SCHEMES: Scheme[];
export declare function compareVersions(a: string, b: string): number;
export declare function parseMacFeed(raw: string): {
version: string;
url: string;
notes: string;
};
export declare function parseWinFeed(raw: string): {
version: string;
url: string;
notes: string;
};
export declare function decideUpdate(current: string, feed: Feed): Decision;
export declare function officialEligible(input: {
platform: Platform;
publicRepo: boolean;
signed: boolean;
}): {
ok: boolean;
reason: string;
};
export declare function storeInAppUpdate(): boolean;
//# sourceMappingURL=feed.d.ts.map