metadata.d.ts
 1  /**
 2   * An entry in the construct metadata table.
 3   *
 4   * @stability stable
 5   */
 6  export interface MetadataEntry {
 7      /**
 8       * The metadata entry type.
 9       *
10       * @stability stable
11       */
12      readonly type: string;
13      /**
14       * The data.
15       *
16       * @stability stable
17       */
18      readonly data: any;
19      /**
20       * Stack trace.
21       *
22       * Can be omitted by setting the context key
23       * `ConstructMetadata.DISABLE_STACK_TRACE_IN_METADATA` to 1.
24       *
25       * @default - no trace information
26       * @stability stable
27       */
28      readonly trace?: string[];
29  }
30  /**
31   * Metadata keys used by constructs.
32   *
33   * @stability stable
34   */
35  export declare class ConstructMetadata {
36      /**
37       * If set in the construct's context, omits stack traces from metadata entries.
38       *
39       * @stability stable
40       */
41      static readonly DISABLE_STACK_TRACE_IN_METADATA = "disable-stack-trace";
42      /**
43       * Context type for info level messages.
44       *
45       * @stability stable
46       */
47      static readonly INFO_METADATA_KEY = "info";
48      /**
49       * Context type for warning level messages.
50       *
51       * @stability stable
52       */
53      static readonly WARNING_METADATA_KEY = "warning";
54      /**
55       * Context type for error level messages.
56       *
57       * @stability stable
58       */
59      static readonly ERROR_METADATA_KEY = "error";
60      private constructor();
61  }