Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import only the type User from the module.
Typescript
import [1] { User } from './models';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
const, let, or var instead of type.Omitting the
type keyword and importing as a normal import.✗ Incorrect
Using
import type imports only the type information without including runtime code.2fill in blank
mediumComplete the code to export only the type Config from this module.
Typescript
export [1] { Config }; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
export const or other runtime exports instead of export type.Forgetting to specify
type and exporting as a normal export.✗ Incorrect
Using
export type exports only the type information without runtime code.3fill in blank
hardFix the error in the import statement to import only the type Product.
Typescript
import { [1] Product } from './inventory';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Placing
type after the braces or omitting it.Using runtime import keywords like
const inside braces.✗ Incorrect
The
type keyword must be placed before the imported type name inside the braces.4fill in blank
hardFill both blanks to import only the types Order and Customer from the module.
Typescript
import [1] { Order, [2] Customer } from './sales';
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using runtime import keywords like
const or let.Omitting
type before the second type.✗ Incorrect
The
type keyword before the braces and before each type inside allows importing multiple types only.5fill in blank
hardFill all three blanks to export only the types Settings, Theme, and Layout.
Typescript
export [1] { Settings, [2] Theme, [3] Layout };
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using runtime export keywords like
const.Omitting
type before some type names.✗ Incorrect
Use
type after export and before each type name to export only types.