mirror of
https://github.com/molstar/molstar.git
synced 2026-06-04 13:30:24 +08:00
type tweak
This commit is contained in:
@@ -296,9 +296,9 @@ export namespace ParamDefinition {
|
||||
element: Params,
|
||||
ctor(): T,
|
||||
getLabel(t: T): string,
|
||||
presets?: Select<T[]>['options']
|
||||
presets?: SelectOption<T[]>
|
||||
}
|
||||
export function ObjectList<T>(element: For<T>, getLabel: (e: T) => string, info?: Info & { defaultValue?: T[], ctor?: () => T, presets?: Select<T[]>['options'] }): ObjectList<Normalize<T>> {
|
||||
export function ObjectList<T>(element: For<T>, getLabel: (e: T) => string, info?: Info & { defaultValue?: T[], ctor?: () => T, presets?: SelectOption<T[]> }): ObjectList<Normalize<T>> {
|
||||
const ret = setInfo<ObjectList<Normalize<T>>>({ type: 'object-list', element: element as any as Params, getLabel, ctor: _defaultObjectListCtor, defaultValue: (info?.defaultValue) || [] }, info);
|
||||
if (info?.presets) ret.presets = info.presets as any;
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user