设计tracer

This commit is contained in:
2025-10-27 17:03:08 +08:00
parent bac4df0e24
commit beac8e222b
3 changed files with 43 additions and 2 deletions

View File

@@ -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];