Skip to content

Commit

Permalink
chore: add type annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung committed Dec 2, 2019
1 parent 558064e commit 96be294
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/babel-preset-env/src/utils.js
Expand Up @@ -8,7 +8,7 @@ import levenshtein from "js-levenshtein";
import { addSideEffect } from "@babel/helper-module-imports";
import unreleasedLabels from "../data/unreleased-labels";
import { semverMin } from "./targets-parser";
import type { Targets } from "./types";
import type { Target, Targets } from "./types";

export const has = Object.hasOwnProperty.call.bind(Object.hasOwnProperty);

Expand Down Expand Up @@ -118,7 +118,10 @@ export function getLowestUnreleased(a: string, b: string, env: string): string {
return semverMin(a, b);
}

export function getLowestImplementedVersion(plugin, environment) {
export function getLowestImplementedVersion(
plugin: Targets,
environment: Target,
): string {
const result = plugin[environment];
// When Android support data is absent, use Chrome data as fallback
if (!result && environment === "android") {
Expand Down

0 comments on commit 96be294

Please sign in to comment.