Add docstrings

This commit is contained in:
Daniel Flanagan 2021-12-01 10:51:14 -06:00
parent 5fe2f3343d
commit 8afaa22a08
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -50,6 +50,9 @@ async function fileLines(
return readLines(await Deno.open(filePath)); return readLines(await Deno.open(filePath));
} }
/** Returns an generator that will yield lines of input for the given Advent of
* Code 2021 day.
*/
export async function inputLines( export async function inputLines(
day: string, day: string,
): Promise<AsyncIterableIterator<string>> { ): Promise<AsyncIterableIterator<string>> {
@ -65,6 +68,9 @@ async function* readStringsAsNumbers(
} }
} }
/** Returns an generator that will yield lines of input parsed as integers for
* the given Advent of Code 2021 day.
*/
export async function inputNumbers( export async function inputNumbers(
day: string, day: string,
): Promise<AsyncIterableIterator<number>> { ): Promise<AsyncIterableIterator<number>> {