Skip to content

Commit

Permalink
refactor: type runtime details separately from runtime versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zimeg committed Mar 21, 2024
1 parent f5429fe commit 96374f3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/doctor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ import { isNewSemverRelease } from "./utilities.ts";
type RuntimeVersion = {
name: string;
current: string;
} & RuntimeDetails;

type RuntimeDetails = {
minimum?: string;
message?: string;
error?: {
message: string;
};
};

const getHostedDenoRuntimeVersion = async (): Promise<{
minimum?: string;
message?: string;
error?: { message: string };
}> => {
const getHostedDenoRuntimeVersion = async (): Promise<RuntimeDetails> => {
try {
const metadataURL = "https://api.slack.com/slackcli/metadata.json";
const response = await fetch(metadataURL);
Expand Down

0 comments on commit 96374f3

Please sign in to comment.