swc/bundler/tests/deno-exec/deno-9350/full/input/helpers/ask_trivia.ts
강동윤 bfde9a1f6e
fix(bundler): Fix bugs (#1373)
swc_bundler:
- Handle export default-ed functions correctly.
2021-02-01 12:31:03 +09:00

15 lines
381 B
TypeScript

import { TRIVIA } from "../types/mod";
import { getUserInput, printQuestion } from "./mod";
export async function askTriviaQuestion(
selectedTrivia: TRIVIA,
): Promise<void> {
printQuestion(selectedTrivia.question);
await getUserInput();
console.log("The correct answer is:", selectedTrivia.correctAnswer);
console.log("Source:", selectedTrivia.source.name, "\n");
}