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> { ...@@ -75,17 +75,13 @@ function schemasFromDict<T>(dict: SchemaOptionsDict<T>): Schema<T> {
); );
} }
function schemaOptionsFromClass<C extends { new (...args: any[]): any }>( function schemaOptionsFromClass<T>(cl: ClassType<T>): SchemaOptionsDict<T> {
cl: C, const keys = reflector.getArray('SchemaMetaKey', cl) as (keyof T &
): SchemaOptionsDict<TypeFromClass<C>> { (string | symbol))[];
const keys = reflector.getArray(
'SchemaMetaKey',
cl,
) as (keyof TypeFromClass<C> & (string | symbol))[];
if (!keys) { if (!keys) {
return null; return null;
} }
const result: SchemaOptionsDict<TypeFromClass<C>> = {}; const result: SchemaOptionsDict<T> = {};
for (const key of keys) { for (const key of keys) {
const option = reflector.get('SchemaMeta', cl, key); const option = reflector.get('SchemaMeta', cl, key);
result[key] = option; 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