Commit 89190ab1 authored by Timon Stampfli's avatar Timon Stampfli

annotating types

parent 84e0ca4d
Pipeline #5683 passed with stages
in 41 seconds
import * as vscode from "vscode";
export function toSortedKeys<T>(map: Map<string, T>): string[] {
// Todo can I ignore the map value type in a better way
type platform = "darwin-amd64" | "windows-amd64" | "linux-amd64";
export function toSortedKeys(map: Map<string, unknown>): string[] {
return Array.from(map.keys()).sort();
}
export function executableFileEnding() {
export function executableFileEnding(): "" | ".exe" | never {
if (determinePlatform() === "windows-amd64") {
return ".exe";
} else {
......@@ -13,7 +14,7 @@ export function executableFileEnding() {
}
}
export function determinePlatform() {
export function determinePlatform(): platform {
// also look at process.arch
switch (process.platform) {
case "darwin":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment