@barchart/chart-lib 2.260.2 → 2.260.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -615,6 +615,16 @@ declare module "@barchart/chart-lib" {
615
615
  backAdjust: boolean;
616
616
  daysToExpiration: number;
617
617
  contractRoll: "expiration" | "combined";
618
+ duplicate(): Aggregation;
619
+ getHashKey(): string;
620
+ toShortString(): string;
621
+ unitToString(): string;
622
+ describe(): string;
623
+ hasSpec: boolean;
624
+ isEndOfDay: boolean;
625
+ isTick: boolean;
626
+ isIntraday: boolean;
627
+ isMultiContract: boolean;
618
628
  }
619
629
 
620
630
  /** A range of values, values are typically inclusive. */
@@ -1137,6 +1147,36 @@ declare module "@barchart/chart-lib" {
1137
1147
  ModelTransformRequired,
1138
1148
  }
1139
1149
 
1150
+ export type Operator = "+" | "-" | "*" | "/" | "^" | "sym" | "num" | "grp";
1151
+
1152
+ export type ExprNodeOrVal = ExprNode | NodeValue;
1153
+
1154
+ export type ExprNode = {
1155
+ op: Operator;
1156
+ left: ExprNodeOrVal;
1157
+ right: ExprNodeOrVal;
1158
+ };
1159
+
1160
+ type NodeValue = string | number | null;
1161
+
1162
+ export type ExprPolicy = {
1163
+ mapper: (series: TimeSeries) => string;
1164
+ loadMoreData: boolean;
1165
+ recompute: ExpressionRecompute;
1166
+ missing: ExpressionMissingBar;
1167
+ stretch: (symbol: string) => boolean;
1168
+ fieldMap: Map<Field, Field>;
1169
+ noDataApproach: ExpressionNoDataApproach;
1170
+ modelTransform: (withData: string[], withoutData: string[]) => ExprNode | null;
1171
+ skipLeadingEmpty: boolean;
1172
+ };
1173
+
1174
+ export function makeExpression(
1175
+ model: ExprNode,
1176
+ innerSeries: TimeSeries[],
1177
+ policy: ExprPolicy
1178
+ ): CalculableTimeSeries;
1179
+
1140
1180
  /** The configuration is extensively documented at our documentation site. */
1141
1181
  interface Config {
1142
1182
  environment?: Environment;
@@ -1917,7 +1957,7 @@ declare module "@barchart/chart-lib" {
1917
1957
  }
1918
1958
 
1919
1959
  export enum SeriesKind {
1920
- Normal = 0,
1960
+ Normal,
1921
1961
  Forward,
1922
1962
  HistoricalForward,
1923
1963
  Study,
@@ -2062,7 +2102,7 @@ declare module "@barchart/chart-lib" {
2062
2102
 
2063
2103
  /** Describes the chunk of the timeseries data. If specified, `Head` means older in time (first in a "list" of chunks) and `Tail` means newer in time (last in a "list" of chunks). */
2064
2104
  export enum ChunkPart {
2065
- Unspecified = 0,
2105
+ Unspecified,
2066
2106
  Head,
2067
2107
  Tail,
2068
2108
  }