Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Remove some unused exports (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
jablko authored Jan 20, 2021
1 parent ba44711 commit 251e2ba
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/compute-pr-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ type Staleness = {
type ApproverKind = "maintainer" | "owner" | "other";

// used to pass around pr info with additional values
export interface ExtendedPrInfo extends PrInfo {
interface ExtendedPrInfo extends PrInfo {
readonly orig: PrInfo;
readonly editsInfra: boolean;
readonly checkConfig: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/execute-pr-actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async function getProjectBoardColumnIdByName(name: string): Promise<string> {
return res;
}

export async function getLabelIdByName(name: string): Promise<string> {
async function getLabelIdByName(name: string): Promise<string> {
const labels = await getLabels();
const res = labels.find(l => l.name === name)?.id;
if (!res) throw new Error(`No label named "${name}" exists`);
Expand Down
4 changes: 2 additions & 2 deletions src/util/comment.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Comment } from "../comments";

export const prefix = "\n<!--typescript_bot_";
export const suffix = "-->";
const prefix = "\n<!--typescript_bot_";
const suffix = "-->";

export function parse(body: string): Comment | undefined {
const start = body.lastIndexOf(prefix);
Expand Down
9 changes: 0 additions & 9 deletions src/util/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ export function unique<T>(xs: T[]) {
return [...new Set(xs)];
}

export async function someAsync<T>(arr: ReadonlyArray<T>, f: (t: T) => Promise<boolean>): Promise<boolean> {
for (const x of arr) {
if (await f(x)) {
return true;
}
}
return false;
}

export function findLast<T, U extends T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => item is U): U | undefined;
export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean): T | undefined;
export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean) {
Expand Down

0 comments on commit 251e2ba

Please sign in to comment.