Complete the code to declare a module named "myModule".
declare module [1] {
export const greeting: string;
}The module name must be a string literal enclosed in quotes. Using double quotes is standard.
Complete the code to export a function named "sayHello" inside the module.
declare module "utils" { export function [1](): void; }
The function name must match the export name "sayHello" as declared.
Fix the error in the module declaration by completing the code correctly.
declare module [1] {
export interface User {
id: number;
name: string;
}
}The module name must be a string literal with double quotes to be valid.
Fill both blanks to declare a module "mathLib" that exports a constant PI with value 3.14.
declare module [1] { export const PI: [2]; }
The module name must be a string literal "mathLib" and the type of PI is number.
Fill all three blanks to declare a module "shapes" exporting a type Circle and a function area.
declare module [1] { export type [2] = { radius: number }; export function [3](c: Circle): number; }
The module name is "shapes", the type is Circle, and the function is named area.