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 1086 times
Edit
9
Community EvaluationsNo one has reviewed this question yet, be the first!
11
Define a custom type that represents a coordinate with an x and y property of type number in Typescript7
Write a generic interface in Typescript7
Import an add function from a TypeScript module math.ts5
Typescript: What is the resulting type of MyType in the following TypeScript code?12
Which of the following utility types makes all properties of a given type optional?5
Find the error in the following TypeScript code:7
Create a generic identity function that returns the passed value in Typescript