设计tracer
This commit is contained in:
@@ -13,9 +13,8 @@ type TracerTypeKey = keyof typeof TracerType;
|
||||
|
||||
type TracerTypeVal = (typeof TracerType)[TracerTypeKey];
|
||||
|
||||
const Action = {
|
||||
const ArrayTracerAction = {
|
||||
Define: 'define',
|
||||
|
||||
Preset: 'preset',
|
||||
Expand: 'expand',
|
||||
Reduce: 'reduce',
|
||||
@@ -25,6 +24,14 @@ const Action = {
|
||||
Reset: 'reset',
|
||||
} as const;
|
||||
|
||||
type ArrayTracerActionKey = keyof typeof ArrayTracerAction;
|
||||
|
||||
type ArrayTracerActionVal = (typeof ArrayTracerAction)[ArrayTracerActionKey];
|
||||
|
||||
const Action = {
|
||||
...ArrayTracerAction,
|
||||
} as const;
|
||||
|
||||
type ActionKey = keyof typeof Action;
|
||||
|
||||
type ActionVal = (typeof Action)[ActionKey];
|
||||
|
||||
Reference in New Issue
Block a user