Commit 3bb635b0 authored by nanahira's avatar nanahira

fi

parent 478994b3
Pipeline #6980 passed with stages
in 1 minute and 14 seconds
......@@ -75,17 +75,13 @@ function schemasFromDict<T>(dict: SchemaOptionsDict<T>): Schema<T> {
);
}
function schemaOptionsFromClass<C extends { new (...args: any[]): any }>(
cl: C,
): SchemaOptionsDict<TypeFromClass<C>> {
const keys = reflector.getArray(
'SchemaMetaKey',
cl,
) as (keyof TypeFromClass<C> & (string | symbol))[];
function schemaOptionsFromClass<T>(cl: ClassType<T>): SchemaOptionsDict<T> {
const keys = reflector.getArray('SchemaMetaKey', cl) as (keyof T &
(string | symbol))[];
if (!keys) {
return null;
}
const result: SchemaOptionsDict<TypeFromClass<C>> = {};
const result: SchemaOptionsDict<T> = {};
for (const key of keys) {
const option = reflector.get('SchemaMeta', cl, key);
result[key] = option;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment