广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-02 80ff784bf60637cd348ae665fc907f7b1e527dd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/** The common type namespace */
declare namespace CommonType {
  /** The strategic pattern */
  interface StrategicPattern {
    /** The condition */
    condition: boolean;
    /** If the condition is true, then call the action function */
    callback: () => void;
  }
 
  /**
   * The option type
   *
   * @property value: The option value
   * @property label: The option label
   */
  type Option<K = string, M = string> = { value: K; label: M };
 
  /** The record type */
  type Record<K extends string | number = string> = { [key in K]: string };
 
  type YesOrNo = 'Y' | 'N';
 
  /** add null to all properties */
  type RecordNullable<T> = {
    [K in keyof T]?: T[K] | null;
  };
 
  /** The id type */
  type IdType = string | number;
 
  /** The res error code */
  type ErrorCode = '401' | '403' | '404' | 'default';
 
  /** The configuration options for constructing tree structure data */
  type TreeConfig<T> = {
    /** id field name */
    idField?: keyof T;
    /** parent id field name */
    parentIdField?: keyof T;
    /** children field name */
    childrenField?: keyof T;
    /** filter function */
    filterFn?: (node: any) => boolean;
  };
}