Easy
Given the following TypeScript code, what is the type of result?
type SomeType = { a: number; b: string; c: boolean };
type OtherType = Pick<SomeType, 'a' | 'b'>;
const result: OtherType = { a: 42, b: 'hello' };
Author: Vincent CotroStatus: PublishedQuestion passed 914 times
Edit
6
Community EvaluationsNo one has reviewed this question yet, be the first!
4
What file is used to configure TypeScript?6
Define a custom type that represents a coordinate with an x and y property of type number in Typescript8
Which of the following utility types makes all properties of a given type optional?4
Create a generic identity function that returns the passed value in Typescript4
Explain the difference between the `any` and `unknown` types in TypeScript.5
Write a generic interface in Typescript7
Import an add function from a TypeScript module math.ts