You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For version 2.0.1 when using a Joi schema that is created via .concat() and then adding a new className via .meta() the resulting type that is generated does not use the new className.
As an example:
Schema:
import Joi from 'joi';
export const A = Joi.object({
a: Joi.string()
}).meta({ className: 'A' });
export const B = Joi.object({
b: Joi.string()
}).meta({ className: 'B' });
export const AB = A
.concat(B)
.meta({ className: 'AB' });
What is generated:
/**
* This file was automatically generated by joi-to-typescript
* Do not modify this file manually
*/
export interface A {
a?: string;
b?: string;
}
export interface A {
a?: string;
}
export interface B {
b?: string;
}
What is expected:
/**
* This file was automatically generated by joi-to-typescript
* Do not modify this file manually
*/
export interface A {
a?: string;
}
export interface B {
b?: string;
}
export interface AB {
a?: string;
b?: string;
}
The text was updated successfully, but these errors were encountered:
For version 2.0.1 when using a Joi schema that is created via
.concat()
and then adding a new className via.meta()
the resulting type that is generated does not use the new className.As an example:
Schema:
What is generated:
What is expected:
The text was updated successfully, but these errors were encountered: