TypeScript Course Completion Results
TypeScript Course Completion Results
22.350 pts
9.33 14/15
Hits
Qualification
@ts-check
2. What is the correct option to tell the TS compiler the version of JavaScript to use?
which must be transpiled?
3. If this variable is defined let myProductPrice = 100; what type does TS infer?
number
5. A practical test is to define a variable with a boolean value like this: const
myBoolean: Boolean = true;
6. Taking into account this instruction `const rta = 1 + '1';` what would be the data type that
Does TS infer from the response?
string
7. What would be the correct way to define an array that only supports numbers and
booleans?
8. What would be the correct way to define a variable that only supports numbers and
strings?
9. Considering this code: `type Sizes = 'S' | 'M' | 'L' |'XL'; let shirtSize: Sizes;`
Is the value assigned to shirtSize valid?
FALSE
The provided text is a URL and does not contain translatable content. 2/4
7/9/22, 21:24 Unable to access the provided URL to retrieve content for translation.
11. If I want to declare a function that has no return, which of the following words
Would you use TS reserved?
void
12. Which of these forms is the correct way to define an object as parameters of
a function?
The provided text does not contain translatable content. REVIEW CLASS
}
13. What is the correct way to create your own type to define the attributes of a
Product?
type Product = { title: string, createAt: Date, stock: number, shirtSize?: Sizes };
14. When there are libraries that do not have type support, for example in the case of lodash.
we can add support for types using the command...
15. What is the correct typing to create a variable that supports strings and null?
RETURN