Answer the question
In order to leave comments, you need to log in
A mandatory parameter of 2 optional ones, how can this be described?
There is a type
export type PropsType = {
param1?: string;
param2?: string;
};
Answer the question
In order to leave comments, you need to log in
type param1 = {
param1: string
};
type param2 = {
param2: string
};
export type PropsType = param1 | param2;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question