Is there a way to determine if a class property is required in Typescript at runtime?
export class A {
public readonly ab?: number;
public readonly ac?: number;
public readonly ad: number;
public readonly ae: number;
}
Can emitDecoratorMetadata or experimentalDecorators be used to identify that the properties ad and ae are required?
I am working on a REST API where the object of class A is generated automatically, and I need to validate whether ad and ae are provided when POST data is received.
Thank you for your help!