Skip to content

Commit baaddaa

Browse files
committed
(@fluent/sequence) Overload function signatures
1 parent a468794 commit baaddaa

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

fluent-sequence/src/map_async.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import { FluentBundle } from "@fluent/bundle";
22

3+
export function mapBundleAsync(
4+
bundles: AsyncIterable<FluentBundle>,
5+
ids: string
6+
): Promise<FluentBundle | null>
7+
8+
export function mapBundleAsync(
9+
bundles: AsyncIterable<FluentBundle>,
10+
ids: Array<string>
11+
): Promise<Array<FluentBundle | null>>;
12+
313
/*
414
* Asynchronously map an identifier or an array of identifiers to the best
515
* `FluentBundle` instance(s).

fluent-sequence/src/map_sync.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
import { FluentBundle } from "@fluent/bundle";
22

3+
export function mapBundleSync(
4+
bundles: Iterable<FluentBundle>,
5+
ids: string
6+
): FluentBundle | null;
7+
8+
export function mapBundleSync(
9+
bundles: Iterable<FluentBundle>,
10+
ids: Array<string>
11+
): Array<FluentBundle | null>;
12+
313
/*
414
* Synchronously map an identifier or an array of identifiers to the best
515
* `FluentBundle` instance(s).

0 commit comments

Comments
 (0)