Top "Conditional-types" questions

Questions about [Conditional Types](https://www.

How do I type an object with known and unknown keys in TypeScript

I am looking for a way to create TypeScript types for the following object that has two known keys and …

typescript conditional-types
Typescript: Type of a property dependent on another property within the same object

I have a TypeScript interface with two properties (type:string and args:object). The args may have different properties depending …

typescript conditional-types
Conditional type based on value of variable in a class (TypeScript)

I'm creating a generic class named Loadable<T>, with two fields. One is named state, and contains the …

typescript conditional-types
TypeScript conditional types: Extract component props type from react component

Using TypeScript 2.8 new conditional generic type feature, is it possible to extract the TProps of a React.ComponentType<TProps&…

reactjs typescript types conditional-types
Why is the infer keyword needed in Typescript?

Why did the Typescript folks create the infer keyword? According to the documents, this is an example of how you …

typescript keyword type-inference conditional-types
Typescript enum type check for conditional types?

I have restful services that accept enum values as either the number OR the string, but always return just the …

typescript enums mapped-types conditional-types