refactor: Remove duplicate type alias in resolveParameters.ts

This commit is contained in:
jacoobes
2022-05-13 23:35:18 -05:00
parent c4e8e517b3
commit f5d02aedca

View File

@@ -2,9 +2,6 @@ import type { CommandType } from '../sern';
import type { ModuleDefs } from '../structures/modules/commands/moduleHandler';
import type { ParseType } from '../../types/handler';
type UnionToTupleUnion<T extends CommandType> = {
[K in T] : Parameters<ModuleDefs[K]['execute']>
}[T];
type ParamMap<T extends CommandType> = {
[K in T] : Parameters<ModuleDefs[K]['execute']>
}[T]
@@ -15,7 +12,7 @@ type ParamMap<T extends CommandType> = {
* @param params
*/
export function resolveParameters<T extends CommandType>
( params: ParamMap<T> ) : UnionToTupleUnion<T>
( params: ParamMap<T> )
{
return params;
}