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

Commit 251e2ba

Browse files
authored
Remove some unused exports (#345)
1 parent ba44711 commit 251e2ba

File tree

4 files changed

+4
-13
lines changed

4 files changed

+4
-13
lines changed

src/compute-pr-actions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ type Staleness = {
9595
type ApproverKind = "maintainer" | "owner" | "other";
9696

9797
// used to pass around pr info with additional values
98-
export interface ExtendedPrInfo extends PrInfo {
98+
interface ExtendedPrInfo extends PrInfo {
9999
readonly orig: PrInfo;
100100
readonly editsInfra: boolean;
101101
readonly checkConfig: boolean;

src/execute-pr-actions.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ async function getProjectBoardColumnIdByName(name: string): Promise<string> {
124124
return res;
125125
}
126126

127-
export async function getLabelIdByName(name: string): Promise<string> {
127+
async function getLabelIdByName(name: string): Promise<string> {
128128
const labels = await getLabels();
129129
const res = labels.find(l => l.name === name)?.id;
130130
if (!res) throw new Error(`No label named "${name}" exists`);

src/util/comment.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Comment } from "../comments";
22

3-
export const prefix = "\n<!--typescript_bot_";
4-
export const suffix = "-->";
3+
const prefix = "\n<!--typescript_bot_";
4+
const suffix = "-->";
55

66
export function parse(body: string): Comment | undefined {
77
const start = body.lastIndexOf(prefix);

src/util/util.ts

-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ export function unique<T>(xs: T[]) {
1313
return [...new Set(xs)];
1414
}
1515

16-
export async function someAsync<T>(arr: ReadonlyArray<T>, f: (t: T) => Promise<boolean>): Promise<boolean> {
17-
for (const x of arr) {
18-
if (await f(x)) {
19-
return true;
20-
}
21-
}
22-
return false;
23-
}
24-
2516
export function findLast<T, U extends T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => item is U): U | undefined;
2617
export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean): T | undefined;
2718
export function findLast<T>(arr: readonly T[] | null | undefined, predicate: (item?: T) => boolean) {

0 commit comments

Comments
 (0)