mirror of
https://github.com/swc-project/swc.git
synced 2025-01-04 03:21:58 +03:00
bfde9a1f6e
swc_bundler: - Handle export default-ed functions correctly.
15 lines
381 B
TypeScript
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");
|
|
}
|