oakscriptjs 0.13.2 → 0.14.0

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.
Files changed (119) hide show
  1. package/AGENTS.md +6 -1
  2. package/README.md +1 -1
  3. package/bin/oakscript.mjs +5 -0
  4. package/dist/cjs/check/checks.d.ts +78 -0
  5. package/dist/cjs/check/checks.d.ts.map +1 -0
  6. package/dist/cjs/check/checks.js +109 -0
  7. package/dist/cjs/check/checks.js.map +7 -0
  8. package/dist/cjs/check/format.d.ts +26 -0
  9. package/dist/cjs/check/format.d.ts.map +1 -0
  10. package/dist/cjs/check/format.js +106 -0
  11. package/dist/cjs/check/format.js.map +7 -0
  12. package/dist/cjs/check/harness.d.ts +94 -0
  13. package/dist/cjs/check/harness.d.ts.map +1 -0
  14. package/dist/cjs/check/harness.js +302 -0
  15. package/dist/cjs/check/harness.js.map +7 -0
  16. package/dist/cjs/check/index.d.ts +253 -0
  17. package/dist/cjs/check/index.d.ts.map +1 -0
  18. package/dist/cjs/check/index.js +466 -0
  19. package/dist/cjs/check/index.js.map +7 -0
  20. package/dist/cjs/check/node.d.ts +53 -0
  21. package/dist/cjs/check/node.d.ts.map +1 -0
  22. package/dist/cjs/check/node.js +318 -0
  23. package/dist/cjs/check/node.js.map +7 -0
  24. package/dist/cjs/check/spec.d.ts +44 -0
  25. package/dist/cjs/check/spec.d.ts.map +1 -0
  26. package/dist/cjs/check/spec.js +199 -0
  27. package/dist/cjs/check/spec.js.map +7 -0
  28. package/dist/cjs/index.d.ts +1 -1
  29. package/dist/cjs/index.js +1 -1
  30. package/dist/cjs/index.js.map +1 -1
  31. package/dist/cjs/runtime/series.d.ts +6 -0
  32. package/dist/cjs/runtime/series.d.ts.map +1 -1
  33. package/dist/cjs/runtime/series.js +15 -0
  34. package/dist/cjs/runtime/series.js.map +2 -2
  35. package/dist/cjs/script/constants.d.ts +200 -0
  36. package/dist/cjs/script/constants.d.ts.map +1 -0
  37. package/dist/cjs/script/constants.js +217 -0
  38. package/dist/cjs/script/constants.js.map +7 -0
  39. package/dist/cjs/script/drawing-args.d.ts +25 -0
  40. package/dist/cjs/script/drawing-args.d.ts.map +1 -0
  41. package/dist/cjs/script/drawing-args.js +203 -0
  42. package/dist/cjs/script/drawing-args.js.map +7 -0
  43. package/dist/cjs/script/globals.d.ts +127 -0
  44. package/dist/cjs/script/globals.d.ts.map +1 -0
  45. package/dist/cjs/script/globals.js +17 -0
  46. package/dist/cjs/script/globals.js.map +7 -0
  47. package/dist/cjs/script/index.d.ts +499 -166
  48. package/dist/cjs/script/index.d.ts.map +1 -1
  49. package/dist/cjs/script/index.js +236 -96
  50. package/dist/cjs/script/index.js.map +3 -3
  51. package/dist/esm/check/checks.d.ts +78 -0
  52. package/dist/esm/check/checks.d.ts.map +1 -0
  53. package/dist/esm/check/checks.js +95 -0
  54. package/dist/esm/check/checks.js.map +1 -0
  55. package/dist/esm/check/format.d.ts +26 -0
  56. package/dist/esm/check/format.d.ts.map +1 -0
  57. package/dist/esm/check/format.js +105 -0
  58. package/dist/esm/check/format.js.map +1 -0
  59. package/dist/esm/check/harness.d.ts +94 -0
  60. package/dist/esm/check/harness.d.ts.map +1 -0
  61. package/dist/esm/check/harness.js +317 -0
  62. package/dist/esm/check/harness.js.map +1 -0
  63. package/dist/esm/check/index.d.ts +253 -0
  64. package/dist/esm/check/index.d.ts.map +1 -0
  65. package/dist/esm/check/index.js +470 -0
  66. package/dist/esm/check/index.js.map +1 -0
  67. package/dist/esm/check/node.d.ts +53 -0
  68. package/dist/esm/check/node.d.ts.map +1 -0
  69. package/dist/esm/check/node.js +347 -0
  70. package/dist/esm/check/node.js.map +1 -0
  71. package/dist/esm/check/spec.d.ts +44 -0
  72. package/dist/esm/check/spec.d.ts.map +1 -0
  73. package/dist/esm/check/spec.js +198 -0
  74. package/dist/esm/check/spec.js.map +1 -0
  75. package/dist/esm/index.d.ts +1 -1
  76. package/dist/esm/index.js +1 -1
  77. package/dist/esm/runtime/series.d.ts +6 -0
  78. package/dist/esm/runtime/series.d.ts.map +1 -1
  79. package/dist/esm/runtime/series.js +14 -0
  80. package/dist/esm/runtime/series.js.map +1 -1
  81. package/dist/esm/script/constants.d.ts +200 -0
  82. package/dist/esm/script/constants.d.ts.map +1 -0
  83. package/dist/esm/script/constants.js +151 -0
  84. package/dist/esm/script/constants.js.map +1 -0
  85. package/dist/esm/script/drawing-args.d.ts +25 -0
  86. package/dist/esm/script/drawing-args.d.ts.map +1 -0
  87. package/dist/esm/script/drawing-args.js +171 -0
  88. package/dist/esm/script/drawing-args.js.map +1 -0
  89. package/dist/esm/script/globals.d.ts +127 -0
  90. package/dist/esm/script/globals.d.ts.map +1 -0
  91. package/dist/esm/script/globals.js +28 -0
  92. package/dist/esm/script/globals.js.map +1 -0
  93. package/dist/esm/script/index.d.ts +499 -166
  94. package/dist/esm/script/index.d.ts.map +1 -1
  95. package/dist/esm/script/index.js +256 -83
  96. package/dist/esm/script/index.js.map +1 -1
  97. package/package.json +31 -1
  98. package/skills/oakscript/SKILL.md +62 -26
  99. package/skills/oakscript/examples/ma-cross.js +2 -2
  100. package/skills/oakscript/examples/mtf-trend-filter.js +3 -3
  101. package/skills/oakscript/reference/check.md +150 -0
  102. package/skills/oakscript/reference/errors.md +31 -7
  103. package/skills/oakscript/reference/pine-differences.md +17 -16
  104. package/skills/oakscript/reference/plotting.md +25 -19
  105. package/skills/oakscript/reference/script-structure.md +8 -5
  106. package/skills/oakscript/reference/timeframes-symbols.md +5 -1
  107. package/skills/oakscript/spec.schema.json +199 -0
  108. package/src/check/checks.ts +175 -0
  109. package/src/check/format.ts +117 -0
  110. package/src/check/harness.ts +372 -0
  111. package/src/check/index.ts +708 -0
  112. package/src/check/node.ts +368 -0
  113. package/src/check/spec.ts +200 -0
  114. package/src/index.ts +1 -1
  115. package/src/runtime/series.ts +19 -0
  116. package/src/script/constants.ts +169 -0
  117. package/src/script/drawing-args.ts +179 -0
  118. package/src/script/globals.ts +129 -0
  119. package/src/script/index.ts +457 -81
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var constants_exports = {};
20
+ __export(constants_exports, {
21
+ adjustment: () => adjustment,
22
+ currency: () => currency,
23
+ daysOfWeek: () => daysOfWeek,
24
+ display: () => display,
25
+ extend: () => extend,
26
+ font: () => font,
27
+ format: () => format,
28
+ labelStyles: () => labelStyles,
29
+ lineStyles: () => lineStyles,
30
+ location: () => location,
31
+ order: () => order,
32
+ scale: () => scale,
33
+ shape: () => shape,
34
+ size: () => size,
35
+ xloc: () => xloc,
36
+ yloc: () => yloc
37
+ });
38
+ module.exports = __toCommonJS(constants_exports);
39
+ const shape = {
40
+ xcross: "xcross",
41
+ cross: "cross",
42
+ triangleup: "triangleup",
43
+ triangledown: "triangledown",
44
+ flag: "flag",
45
+ circle: "circle",
46
+ arrowup: "arrowup",
47
+ arrowdown: "arrowdown",
48
+ labelup: "labelup",
49
+ labeldown: "labeldown",
50
+ square: "square",
51
+ diamond: "diamond"
52
+ };
53
+ const location = {
54
+ abovebar: "abovebar",
55
+ belowbar: "belowbar",
56
+ top: "top",
57
+ bottom: "bottom",
58
+ absolute: "absolute"
59
+ };
60
+ const size = {
61
+ auto: "auto",
62
+ tiny: "tiny",
63
+ small: "small",
64
+ normal: "normal",
65
+ large: "large",
66
+ huge: "huge"
67
+ };
68
+ const xloc = {
69
+ bar_index: "bar_index",
70
+ bar_time: "bar_time"
71
+ };
72
+ const yloc = {
73
+ price: "price",
74
+ abovebar: "abovebar",
75
+ belowbar: "belowbar"
76
+ };
77
+ const extend = {
78
+ none: "none",
79
+ left: "left",
80
+ right: "right",
81
+ both: "both"
82
+ };
83
+ const display = {
84
+ none: "none",
85
+ all: "all",
86
+ data_window: "data_window",
87
+ status_line: "status_line",
88
+ pane: "pane"
89
+ };
90
+ const format = {
91
+ inherit: "inherit",
92
+ price: "price",
93
+ volume: "volume",
94
+ percent: "percent",
95
+ mintick: "mintick"
96
+ };
97
+ const font = {
98
+ family_default: "default",
99
+ family_monospace: "monospace"
100
+ };
101
+ const scale = {
102
+ right: "right",
103
+ left: "left",
104
+ none: "none"
105
+ };
106
+ const order = {
107
+ ascending: "ascending",
108
+ descending: "descending"
109
+ };
110
+ const adjustment = {
111
+ none: "none",
112
+ splits: "splits",
113
+ dividends: "dividends"
114
+ };
115
+ const CURRENCIES = [
116
+ "AED",
117
+ "ARS",
118
+ "AUD",
119
+ "BDT",
120
+ "BHD",
121
+ "BRL",
122
+ "BTC",
123
+ "CAD",
124
+ "CHF",
125
+ "CLP",
126
+ "CNY",
127
+ "COP",
128
+ "CZK",
129
+ "DKK",
130
+ "EGP",
131
+ "ETH",
132
+ "EUR",
133
+ "GBP",
134
+ "GEL",
135
+ "HKD",
136
+ "HUF",
137
+ "IDR",
138
+ "ILS",
139
+ "INR",
140
+ "ISK",
141
+ "JPY",
142
+ "KES",
143
+ "KRW",
144
+ "KWD",
145
+ "LKR",
146
+ "MAD",
147
+ "MXN",
148
+ "MYR",
149
+ "NGN",
150
+ "NOK",
151
+ "NZD",
152
+ "PEN",
153
+ "PHP",
154
+ "PKR",
155
+ "PLN",
156
+ "QAR",
157
+ "RON",
158
+ "RSD",
159
+ "RUB",
160
+ "SAR",
161
+ "SEK",
162
+ "SGD",
163
+ "THB",
164
+ "TND",
165
+ "TRY",
166
+ "TWD",
167
+ "USD",
168
+ "USDT",
169
+ "VES",
170
+ "VND",
171
+ "ZAR"
172
+ ];
173
+ const currency = {
174
+ ...Object.fromEntries(CURRENCIES.map((c) => [c, c])),
175
+ NONE: "NONE"
176
+ };
177
+ const labelStyles = {
178
+ style_none: "none",
179
+ style_xcross: "xcross",
180
+ style_cross: "cross",
181
+ style_triangleup: "triangleup",
182
+ style_triangledown: "triangledown",
183
+ style_flag: "flag",
184
+ style_circle: "circle",
185
+ style_arrowup: "arrowup",
186
+ style_arrowdown: "arrowdown",
187
+ style_label_up: "label_up",
188
+ style_label_down: "label_down",
189
+ style_label_left: "label_left",
190
+ style_label_right: "label_right",
191
+ style_label_lower_left: "label_lower_left",
192
+ style_label_lower_right: "label_lower_right",
193
+ style_label_upper_left: "label_upper_left",
194
+ style_label_upper_right: "label_upper_right",
195
+ style_label_center: "label_center",
196
+ style_square: "square",
197
+ style_diamond: "diamond",
198
+ style_text_outline: "text_outline"
199
+ };
200
+ const lineStyles = {
201
+ style_solid: "solid",
202
+ style_dotted: "dotted",
203
+ style_dashed: "dashed",
204
+ style_arrow_left: "arrow_left",
205
+ style_arrow_right: "arrow_right",
206
+ style_arrow_both: "arrow_both"
207
+ };
208
+ const daysOfWeek = {
209
+ sunday: 1,
210
+ monday: 2,
211
+ tuesday: 3,
212
+ wednesday: 4,
213
+ thursday: 5,
214
+ friday: 6,
215
+ saturday: 7
216
+ };
217
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/script/constants.ts"],
4
+ "sourcesContent": ["/**\n * @fileoverview PineScript constant namespaces of the script API: `shape.*`, `location.*`, `size.*`, `xloc.*`,\n * `yloc.*`, `extend.*`, `display.*`, `format.*`, `font.*`, `scale.*`, `order.*`, `currency.*`, `adjustment.*`, and the\n * `label.style_*`, `line.style_*`, `dayofweek.*` members. Each constant is the string (or number) the functions take,\n * so `plotshape(cond, \"Buy\", { style: shape.triangleup })` and `{ style: \"triangleup\" }` are the same.\n *\n * @module script/constants\n */\n\n/** PineScript `shape.*`: the shapes of plotshape(). */\nexport const shape = {\n xcross: 'xcross',\n cross: 'cross',\n triangleup: 'triangleup',\n triangledown: 'triangledown',\n flag: 'flag',\n circle: 'circle',\n arrowup: 'arrowup',\n arrowdown: 'arrowdown',\n labelup: 'labelup',\n labeldown: 'labeldown',\n square: 'square',\n diamond: 'diamond',\n} as const;\n\n/** PineScript `location.*`: where plotshape() / plotchar() draw. */\nexport const location = {\n abovebar: 'abovebar',\n belowbar: 'belowbar',\n top: 'top',\n bottom: 'bottom',\n absolute: 'absolute',\n} as const;\n\n/** PineScript `size.*`: sizes of shapes, characters, labels and table texts. */\nexport const size = {\n auto: 'auto',\n tiny: 'tiny',\n small: 'small',\n normal: 'normal',\n large: 'large',\n huge: 'huge',\n} as const;\n\n/** PineScript `xloc.*`: the x coordinate of drawings (bar index or UNIX time in ms). */\nexport const xloc = {\n bar_index: 'bar_index',\n bar_time: 'bar_time',\n} as const;\n\n/** PineScript `yloc.*`: the y position of labels. */\nexport const yloc = {\n price: 'price',\n abovebar: 'abovebar',\n belowbar: 'belowbar',\n} as const;\n\n/** PineScript `extend.*`: line extension. */\nexport const extend = {\n none: 'none',\n left: 'left',\n right: 'right',\n both: 'both',\n} as const;\n\n/** PineScript `display.*`: where a plot or input is shown. */\nexport const display = {\n none: 'none',\n all: 'all',\n data_window: 'data_window',\n status_line: 'status_line',\n pane: 'pane',\n} as const;\n\n/** PineScript `format.*`: the number format of indicator() and str.tostring(). */\nexport const format = {\n inherit: 'inherit',\n price: 'price',\n volume: 'volume',\n percent: 'percent',\n mintick: 'mintick',\n} as const;\n\n/** PineScript `font.*`: font families of labels, boxes and table cells. */\nexport const font = {\n family_default: 'default',\n family_monospace: 'monospace',\n} as const;\n\n/** PineScript `scale.*`: the price scale of indicator() (`scale` option). */\nexport const scale = {\n right: 'right',\n left: 'left',\n none: 'none',\n} as const;\n\n/** PineScript `order.*`: sort order of array.sort() / array.sort_indices() / matrix.sort(). */\nexport const order = {\n ascending: 'ascending',\n descending: 'descending',\n} as const;\n\n/** PineScript `adjustment.*`: price adjustment of a ticker. */\nexport const adjustment = {\n none: 'none',\n splits: 'splits',\n dividends: 'dividends',\n} as const;\n\nconst CURRENCIES = [\n 'AED', 'ARS', 'AUD', 'BDT', 'BHD', 'BRL', 'BTC', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CZK', 'DKK', 'EGP', 'ETH',\n 'EUR', 'GBP', 'GEL', 'HKD', 'HUF', 'IDR', 'ILS', 'INR', 'ISK', 'JPY', 'KES', 'KRW', 'KWD', 'LKR', 'MAD', 'MXN',\n 'MYR', 'NGN', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'QAR', 'RON', 'RSD', 'RUB', 'SAR', 'SEK', 'SGD', 'THB',\n 'TND', 'TRY', 'TWD', 'USD', 'USDT', 'VES', 'VND', 'ZAR',\n] as const;\n\ntype CurrencyCode = (typeof CURRENCIES)[number];\n\n/** PineScript `currency.*`: currency codes (`strategy(..., { currency })`, `syminfo.currency`); `currency.NONE` is na. */\nexport const currency = {\n ...(Object.fromEntries(CURRENCIES.map((c) => [c, c])) as { readonly [K in CurrencyCode]: K }),\n NONE: 'NONE',\n} as const;\n\n/** PineScript `label.style_*`. */\nexport const labelStyles = {\n style_none: 'none',\n style_xcross: 'xcross',\n style_cross: 'cross',\n style_triangleup: 'triangleup',\n style_triangledown: 'triangledown',\n style_flag: 'flag',\n style_circle: 'circle',\n style_arrowup: 'arrowup',\n style_arrowdown: 'arrowdown',\n style_label_up: 'label_up',\n style_label_down: 'label_down',\n style_label_left: 'label_left',\n style_label_right: 'label_right',\n style_label_lower_left: 'label_lower_left',\n style_label_lower_right: 'label_lower_right',\n style_label_upper_left: 'label_upper_left',\n style_label_upper_right: 'label_upper_right',\n style_label_center: 'label_center',\n style_square: 'square',\n style_diamond: 'diamond',\n style_text_outline: 'text_outline',\n} as const;\n\n/** PineScript `line.style_*` (lines, boxes, polylines). */\nexport const lineStyles = {\n style_solid: 'solid',\n style_dotted: 'dotted',\n style_dashed: 'dashed',\n style_arrow_left: 'arrow_left',\n style_arrow_right: 'arrow_right',\n style_arrow_both: 'arrow_both',\n} as const;\n\n/** PineScript `dayofweek.*`: the values of `dayofweek` (1 = Sunday ... 7 = Saturday). */\nexport const daysOfWeek = {\n sunday: 1,\n monday: 2,\n tuesday: 3,\n wednesday: 4,\n thursday: 5,\n friday: 6,\n saturday: 7,\n} as const;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUO,MAAM,QAAQ;AAAA,EACnB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,SAAS;AACX;AAGO,MAAM,WAAW;AAAA,EACtB,UAAU;AAAA,EACV,UAAU;AAAA,EACV,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,UAAU;AACZ;AAGO,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AACR;AAGO,MAAM,OAAO;AAAA,EAClB,WAAW;AAAA,EACX,UAAU;AACZ;AAGO,MAAM,OAAO;AAAA,EAClB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AACZ;AAGO,MAAM,SAAS;AAAA,EACpB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,MAAM;AACR;A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,YAAY,WAAW,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;AAAA,EACpD,MAAM;AACR;AAGO,MAAM,cAAc;AAAA,EACzB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,wBAAwB;AAAA,EACxB,yBAAyB;AAAA,EACzB,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,oBAAoB;AACtB;AAGO,MAAM,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAAA,EACd,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,kBAAkB;AACpB;AAGO,MAAM,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AACZ;",
6
+ "names": []
7
+ }
@@ -0,0 +1,25 @@
1
+ /** PineScript parameters of the drawing constructors, in their positional order (coordinates, then chart points). */
2
+ export declare const DRAWING_PARAMETERS: Record<string, {
3
+ coords: readonly string[];
4
+ point?: readonly string[];
5
+ }>;
6
+ /** A plain object (an object literal): named arguments, not a Series, an array or a class instance. */
7
+ export declare const isPlainObject: (v: unknown) => v is Record<string, unknown>;
8
+ /** The error of an unknown named argument, with the closest names and the list of the arguments. */
9
+ export declare function unknownArgument(name: string, key: string, list: readonly string[]): TypeError;
10
+ /**
11
+ * The positional arguments of a call to a function of PineScript parameters `list`, whose last argument may be an
12
+ * object of named arguments (`request.security(sym, "D", () => close, { lookahead: barmerge.lookahead_on })`, or every
13
+ * argument by name). An unknown name throws with the closest names; a name given by position too throws.
14
+ */
15
+ export declare function namedArguments(name: string, list: readonly string[], args: readonly unknown[]): unknown[];
16
+ /** The positional arguments of a call whose last argument may be named arguments. */
17
+ export declare function positionalArguments(name: string, args: readonly unknown[]): unknown[];
18
+ /** The value of each Series argument on the current bar (inside a bar loop); throws outside a loop. */
19
+ export declare function barValues(name: string, args: unknown[], currentBar: number): unknown[];
20
+ /**
21
+ * Wraps the functions of a drawing namespace (`label`, `line`, `box`, `table`, `polyline`, `linefill`): named
22
+ * arguments for the constructors and `table.cell`, Series arguments read on the current bar for every function.
23
+ */
24
+ export declare function drawingNamespace<T extends Record<string, unknown>>(namespace: string, members: T, currentBar: () => number): T;
25
+ //# sourceMappingURL=drawing-args.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawing-args.d.ts","sourceRoot":"","sources":["../../../src/script/drawing-args.ts"],"names":[],"mappings":"AAaA,qHAAqH;AACrH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAgCvG,CAAC;AAKF,uGAAuG;AACvG,eAAO,MAAM,aAAa,GAAI,GAAG,OAAO,KAAG,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAEgB,CAAC;AA+BvF,oGAAoG;AACpG,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAM7F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CAczG;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,EAAE,CA2BrF;AAED,uGAAuG;AACvG,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,EAAE,CAYtF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,MAAM,MAAM,GAAG,CAAC,CAc9H"}
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var drawing_args_exports = {};
20
+ __export(drawing_args_exports, {
21
+ DRAWING_PARAMETERS: () => DRAWING_PARAMETERS,
22
+ barValues: () => barValues,
23
+ drawingNamespace: () => drawingNamespace,
24
+ isPlainObject: () => isPlainObject,
25
+ namedArguments: () => namedArguments,
26
+ positionalArguments: () => positionalArguments,
27
+ unknownArgument: () => unknownArgument
28
+ });
29
+ module.exports = __toCommonJS(drawing_args_exports);
30
+ var import_series = require("../runtime/series.js");
31
+ const DRAWING_PARAMETERS = {
32
+ "label.new": {
33
+ coords: ["x", "y", "text", "xloc", "yloc", "color", "style", "textcolor", "size", "textalign", "tooltip", "text_font_family", "force_overlay", "text_formatting"],
34
+ point: ["point", "text", "xloc", "yloc", "color", "style", "textcolor", "size", "textalign", "tooltip", "text_font_family", "force_overlay", "text_formatting"]
35
+ },
36
+ "line.new": {
37
+ coords: ["x1", "y1", "x2", "y2", "xloc", "extend", "color", "style", "width", "force_overlay"],
38
+ point: ["first_point", "second_point", "xloc", "extend", "color", "style", "width", "force_overlay"]
39
+ },
40
+ "box.new": {
41
+ coords: [
42
+ "left",
43
+ "top",
44
+ "right",
45
+ "bottom",
46
+ "border_color",
47
+ "border_width",
48
+ "border_style",
49
+ "extend",
50
+ "xloc",
51
+ "bgcolor",
52
+ "text",
53
+ "text_size",
54
+ "text_color",
55
+ "text_halign",
56
+ "text_valign",
57
+ "text_wrap",
58
+ "text_font_family",
59
+ "force_overlay",
60
+ "text_formatting"
61
+ ],
62
+ point: [
63
+ "top_left",
64
+ "bottom_right",
65
+ "border_color",
66
+ "border_width",
67
+ "border_style",
68
+ "extend",
69
+ "xloc",
70
+ "bgcolor",
71
+ "text",
72
+ "text_size",
73
+ "text_color",
74
+ "text_halign",
75
+ "text_valign",
76
+ "text_wrap",
77
+ "text_font_family",
78
+ "force_overlay",
79
+ "text_formatting"
80
+ ]
81
+ },
82
+ "table.new": {
83
+ coords: ["position", "columns", "rows", "bgcolor", "frame_color", "frame_width", "border_color", "border_width", "force_overlay"]
84
+ },
85
+ "table.cell": {
86
+ coords: [
87
+ "table_id",
88
+ "column",
89
+ "row",
90
+ "text",
91
+ "width",
92
+ "height",
93
+ "text_color",
94
+ "text_halign",
95
+ "text_valign",
96
+ "text_size",
97
+ "bgcolor",
98
+ "tooltip",
99
+ "text_font_family",
100
+ "text_formatting"
101
+ ]
102
+ },
103
+ "polyline.new": {
104
+ coords: ["points", "curved", "closed", "xloc", "line_color", "fill_color", "line_style", "line_width", "force_overlay"]
105
+ },
106
+ "linefill.new": { coords: ["line1", "line2", "color"] }
107
+ };
108
+ const OBJECT_PARAMETERS = /* @__PURE__ */ new Set(["point", "first_point", "second_point", "top_left", "bottom_right", "table_id", "line1", "line2", "points"]);
109
+ const isPlainObject = (v) => typeof v === "object" && v !== null && !Array.isArray(v) && !(v instanceof import_series.Series) && (Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);
110
+ const isChartPoint = (v) => {
111
+ const keys = Object.keys(v);
112
+ return keys.length > 0 && keys.every((k) => k === "index" || k === "time" || k === "price");
113
+ };
114
+ function closest(name, names) {
115
+ const n = name.toLowerCase();
116
+ const dist = (a, b) => {
117
+ const row = Array.from({ length: b.length + 1 }, (_, j) => j);
118
+ for (let i = 1; i <= a.length; i++) {
119
+ let diag = row[0];
120
+ row[0] = i;
121
+ for (let j = 1; j <= b.length; j++) {
122
+ const up = row[j];
123
+ row[j] = Math.min(up + 1, row[j - 1] + 1, diag + (a[i - 1] === b[j - 1] ? 0 : 1));
124
+ diag = up;
125
+ }
126
+ }
127
+ return row[b.length];
128
+ };
129
+ return names.map((k) => ({ k, d: dist(n, k) })).filter(({ k, d }) => d <= Math.max(2, Math.floor(name.length / 3)) || k.includes(n) || n.includes(k)).sort((a, b) => a.d - b.d).slice(0, 3).map(({ k }) => k);
130
+ }
131
+ function unknownArgument(name, key, list) {
132
+ const near = closest(key, list);
133
+ return new TypeError(
134
+ `${name}(): unknown argument "${key}".` + (near.length ? ` Did you mean ${near.join(", ")}?` : "") + ` The arguments are: ${list.join(", ")}.`
135
+ );
136
+ }
137
+ function namedArguments(name, list, args) {
138
+ const last = args[args.length - 1];
139
+ if (!isPlainObject(last)) return [...args];
140
+ const positional = args.slice(0, -1);
141
+ const out = [...positional];
142
+ for (const [key, value] of Object.entries(last)) {
143
+ const index = list.indexOf(key);
144
+ if (index < 0) throw unknownArgument(name, key, list);
145
+ if (index < positional.length && positional[index] !== void 0) {
146
+ throw new TypeError(`${name}(): "${key}" is given twice (by position and by name).`);
147
+ }
148
+ out[index] = value;
149
+ }
150
+ return out;
151
+ }
152
+ function positionalArguments(name, args) {
153
+ const params = DRAWING_PARAMETERS[name];
154
+ if (!params) return [...args];
155
+ const last = args[args.length - 1];
156
+ if (!isPlainObject(last) || isChartPoint(last)) return [...args];
157
+ const at = args.length - 1;
158
+ const firstArg = args[0];
159
+ const positionalList = params.point !== void 0 && typeof firstArg === "object" && firstArg !== null && !(firstArg instanceof import_series.Series) && at > 0 ? params.point : params.coords;
160
+ if (at > 0 && OBJECT_PARAMETERS.has(positionalList[at] ?? "")) return [...args];
161
+ const positional = args.slice(0, -1);
162
+ const first = positional.length ? positional[0] : last.point ?? last.first_point ?? last.top_left;
163
+ const usesPoint = params.point !== void 0 && typeof first === "object" && first !== null && !(first instanceof import_series.Series);
164
+ const list = usesPoint ? params.point : params.coords;
165
+ const out = [...positional];
166
+ for (const [key, value] of Object.entries(last)) {
167
+ const index = list.indexOf(key);
168
+ if (index < 0) throw unknownArgument(name, key, list);
169
+ if (index < positional.length && positional[index] !== void 0) {
170
+ throw new TypeError(`${name}(): "${key}" is given twice (by position and by name).`);
171
+ }
172
+ out[index] = value;
173
+ }
174
+ return out;
175
+ }
176
+ function barValues(name, args, currentBar) {
177
+ return args.map((a, k) => {
178
+ if (!(a instanceof import_series.Series)) return a;
179
+ if (currentBar < 0) {
180
+ throw new TypeError(
181
+ `${name}(): argument ${k + 1} is a Series, a drawing takes one value: call ${name}() inside eachBar() (e.g. label.new(c.i, c.high, ...)) or pass a number.`
182
+ );
183
+ }
184
+ const v = a.toArray()[currentBar];
185
+ return v === void 0 ? NaN : v;
186
+ });
187
+ }
188
+ function drawingNamespace(namespace, members, currentBar) {
189
+ const out = {};
190
+ for (const [key, value] of Object.entries(members)) {
191
+ if (typeof value !== "function") {
192
+ out[key] = value;
193
+ continue;
194
+ }
195
+ const name = `${namespace}.${key}`;
196
+ const fn = value;
197
+ out[key] = function(...args) {
198
+ return fn.apply(this, barValues(name, positionalArguments(name, args), currentBar()));
199
+ };
200
+ }
201
+ return out;
202
+ }
203
+ //# sourceMappingURL=drawing-args.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/script/drawing-args.ts"],
4
+ "sourcesContent": ["/**\n * @fileoverview Arguments of the drawing functions of the script API, as PineScript writes them:\n *\n * - **Named arguments**: a last argument that is an object of PineScript parameter names, e.g.\n * `label.new(c.i, c.high, \"A\", { style: label.style_label_down, textcolor: color.white })`, or every argument by\n * name: `line.new({ x1, y1, x2, y2, extend: extend.right })`. An unknown name throws with the closest names.\n * - **Series arguments**: inside a bar loop a Series argument (`bar_index`, `high`, `ta.sma(...)`) is its value on the\n * current bar, as PineScript reads a series in a call; outside a loop it throws (a drawing takes one value).\n *\n * @module script/drawing-args\n */\nimport { Series } from '../runtime/series.js';\n\n/** PineScript parameters of the drawing constructors, in their positional order (coordinates, then chart points). */\nexport const DRAWING_PARAMETERS: Record<string, { coords: readonly string[]; point?: readonly string[] }> = {\n 'label.new': {\n coords: ['x', 'y', 'text', 'xloc', 'yloc', 'color', 'style', 'textcolor', 'size', 'textalign', 'tooltip', 'text_font_family', 'force_overlay', 'text_formatting'],\n point: ['point', 'text', 'xloc', 'yloc', 'color', 'style', 'textcolor', 'size', 'textalign', 'tooltip', 'text_font_family', 'force_overlay', 'text_formatting'],\n },\n 'line.new': {\n coords: ['x1', 'y1', 'x2', 'y2', 'xloc', 'extend', 'color', 'style', 'width', 'force_overlay'],\n point: ['first_point', 'second_point', 'xloc', 'extend', 'color', 'style', 'width', 'force_overlay'],\n },\n 'box.new': {\n coords: [\n 'left', 'top', 'right', 'bottom', 'border_color', 'border_width', 'border_style', 'extend', 'xloc', 'bgcolor', 'text',\n 'text_size', 'text_color', 'text_halign', 'text_valign', 'text_wrap', 'text_font_family', 'force_overlay', 'text_formatting',\n ],\n point: [\n 'top_left', 'bottom_right', 'border_color', 'border_width', 'border_style', 'extend', 'xloc', 'bgcolor', 'text',\n 'text_size', 'text_color', 'text_halign', 'text_valign', 'text_wrap', 'text_font_family', 'force_overlay', 'text_formatting',\n ],\n },\n 'table.new': {\n coords: ['position', 'columns', 'rows', 'bgcolor', 'frame_color', 'frame_width', 'border_color', 'border_width', 'force_overlay'],\n },\n 'table.cell': {\n coords: [\n 'table_id', 'column', 'row', 'text', 'width', 'height', 'text_color', 'text_halign', 'text_valign', 'text_size', 'bgcolor',\n 'tooltip', 'text_font_family', 'text_formatting',\n ],\n },\n 'polyline.new': {\n coords: ['points', 'curved', 'closed', 'xloc', 'line_color', 'fill_color', 'line_style', 'line_width', 'force_overlay'],\n },\n 'linefill.new': { coords: ['line1', 'line2', 'color'] },\n};\n\n/** Parameters that take an object: a plain object there is the argument, not named arguments. */\nconst OBJECT_PARAMETERS = new Set(['point', 'first_point', 'second_point', 'top_left', 'bottom_right', 'table_id', 'line1', 'line2', 'points']);\n\n/** A plain object (an object literal): named arguments, not a Series, an array or a class instance. */\nexport const isPlainObject = (v: unknown): v is Record<string, unknown> =>\n typeof v === 'object' && v !== null && !Array.isArray(v) && !(v instanceof Series) &&\n (Object.getPrototypeOf(v) === Object.prototype || Object.getPrototypeOf(v) === null);\n\n/** A chart point (`chart.point.*`): its keys are index / time / price. */\nconst isChartPoint = (v: Record<string, unknown>): boolean => {\n const keys = Object.keys(v);\n return keys.length > 0 && keys.every((k) => k === 'index' || k === 'time' || k === 'price');\n};\n\nfunction closest(name: string, names: readonly string[]): string[] {\n const n = name.toLowerCase();\n const dist = (a: string, b: string): number => {\n const row = Array.from({ length: b.length + 1 }, (_, j) => j);\n for (let i = 1; i <= a.length; i++) {\n let diag = row[0]!;\n row[0] = i;\n for (let j = 1; j <= b.length; j++) {\n const up = row[j]!;\n row[j] = Math.min(up + 1, row[j - 1]! + 1, diag + (a[i - 1] === b[j - 1] ? 0 : 1));\n diag = up;\n }\n }\n return row[b.length]!;\n };\n return names\n .map((k) => ({ k, d: dist(n, k) }))\n .filter(({ k, d }) => d <= Math.max(2, Math.floor(name.length / 3)) || k.includes(n) || n.includes(k))\n .sort((a, b) => a.d - b.d)\n .slice(0, 3)\n .map(({ k }) => k);\n}\n\n/** The error of an unknown named argument, with the closest names and the list of the arguments. */\nexport function unknownArgument(name: string, key: string, list: readonly string[]): TypeError {\n const near = closest(key, list);\n return new TypeError(\n `${name}(): unknown argument \"${key}\".` + (near.length ? ` Did you mean ${near.join(', ')}?` : '') +\n ` The arguments are: ${list.join(', ')}.`\n );\n}\n\n/**\n * The positional arguments of a call to a function of PineScript parameters `list`, whose last argument may be an\n * object of named arguments (`request.security(sym, \"D\", () => close, { lookahead: barmerge.lookahead_on })`, or every\n * argument by name). An unknown name throws with the closest names; a name given by position too throws.\n */\nexport function namedArguments(name: string, list: readonly string[], args: readonly unknown[]): unknown[] {\n const last = args[args.length - 1];\n if (!isPlainObject(last)) return [...args];\n const positional = args.slice(0, -1);\n const out = [...positional];\n for (const [key, value] of Object.entries(last)) {\n const index = list.indexOf(key);\n if (index < 0) throw unknownArgument(name, key, list);\n if (index < positional.length && positional[index] !== undefined) {\n throw new TypeError(`${name}(): \"${key}\" is given twice (by position and by name).`);\n }\n out[index] = value;\n }\n return out;\n}\n\n/** The positional arguments of a call whose last argument may be named arguments. */\nexport function positionalArguments(name: string, args: readonly unknown[]): unknown[] {\n const params = DRAWING_PARAMETERS[name];\n if (!params) return [...args];\n const last = args[args.length - 1];\n if (!isPlainObject(last) || isChartPoint(last)) return [...args];\n // an object at a parameter that takes one (a chart point, a drawing, the points) is that argument\n const at = args.length - 1;\n const firstArg = args[0];\n const positionalList =\n params.point !== undefined && typeof firstArg === 'object' && firstArg !== null && !(firstArg instanceof Series) && at > 0\n ? params.point\n : params.coords;\n if (at > 0 && OBJECT_PARAMETERS.has(positionalList[at] ?? '')) return [...args];\n const positional = args.slice(0, -1);\n const first = positional.length ? positional[0] : last.point ?? last.first_point ?? last.top_left;\n const usesPoint = params.point !== undefined && typeof first === 'object' && first !== null && !(first instanceof Series);\n const list = usesPoint ? params.point! : params.coords;\n const out = [...positional];\n for (const [key, value] of Object.entries(last)) {\n const index = list.indexOf(key);\n if (index < 0) throw unknownArgument(name, key, list);\n if (index < positional.length && positional[index] !== undefined) {\n throw new TypeError(`${name}(): \"${key}\" is given twice (by position and by name).`);\n }\n out[index] = value;\n }\n return out;\n}\n\n/** The value of each Series argument on the current bar (inside a bar loop); throws outside a loop. */\nexport function barValues(name: string, args: unknown[], currentBar: number): unknown[] {\n return args.map((a, k) => {\n if (!(a instanceof Series)) return a;\n if (currentBar < 0) {\n throw new TypeError(\n `${name}(): argument ${k + 1} is a Series, a drawing takes one value: call ${name}() inside eachBar() ` +\n '(e.g. label.new(c.i, c.high, ...)) or pass a number.'\n );\n }\n const v = a.toArray()[currentBar];\n return v === undefined ? NaN : v;\n });\n}\n\n/**\n * Wraps the functions of a drawing namespace (`label`, `line`, `box`, `table`, `polyline`, `linefill`): named\n * arguments for the constructors and `table.cell`, Series arguments read on the current bar for every function.\n */\nexport function drawingNamespace<T extends Record<string, unknown>>(namespace: string, members: T, currentBar: () => number): T {\n const out: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(members)) {\n if (typeof value !== 'function') {\n out[key] = value;\n continue;\n }\n const name = `${namespace}.${key}`;\n const fn = value as (...args: unknown[]) => unknown;\n out[key] = function (this: unknown, ...args: unknown[]) {\n return fn.apply(this, barValues(name, positionalArguments(name, args), currentBar()));\n };\n }\n return out as T;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,oBAAuB;AAGhB,MAAM,qBAA+F;AAAA,EAC1G,aAAa;AAAA,IACX,QAAQ,CAAC,KAAK,KAAK,QAAQ,QAAQ,QAAQ,SAAS,SAAS,aAAa,QAAQ,aAAa,WAAW,oBAAoB,iBAAiB,iBAAiB;AAAA,IAChK,OAAO,CAAC,SAAS,QAAQ,QAAQ,QAAQ,SAAS,SAAS,aAAa,QAA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AAU;AAChC,WAAO,MAAM,SAAY,MAAM;AAAA,EACjC,CAAC;AACH;AAMO,SAAS,iBAAoD,WAAmB,SAAY,YAA6B;AAC9H,QAAM,MAA+B,CAAC;AACtC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,OAAO,GAAG;AAClD,QAAI,OAAO,UAAU,YAAY;AAC/B,UAAI,GAAG,IAAI;AACX;AAAA,IACF;AACA,UAAM,OAAO,GAAG,SAAS,IAAI,GAAG;AAChC,UAAM,KAAK;AACX,QAAI,GAAG,IAAI,YAA4B,MAAiB;AACtD,aAAO,GAAG,MAAM,MAAM,UAAU,MAAM,oBAAoB,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC;AAAA,IACtF;AAAA,EACF;AACA,SAAO;AACT;",
6
+ "names": []
7
+ }
@@ -0,0 +1,127 @@
1
+ /**
2
+ * @fileoverview Type declarations of the script globals, for type-checking a script source (plain JavaScript)
3
+ * before it runs. A script body uses every value export of `oakscriptjs/script` but `executeScript` (the host
4
+ * entry) as a global; these declarations give each global its type, so the TypeScript checker reports the
5
+ * mistakes of a script with their line: `close - open` (operators on a Series), a misspelt name (`ta.smaa`), a
6
+ * wrong argument or option, a bad shape or style string.
7
+ *
8
+ * In a project that runs scripts, a `tsconfig.json` next to the scripts, then `npx tsc -p .`:
9
+ *
10
+ * ```json
11
+ * {
12
+ * "compilerOptions": {
13
+ * "allowJs": true, "checkJs": true, "noEmit": true, "strict": true, "noImplicitAny": false,
14
+ * "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "moduleDetection": "force",
15
+ * "lib": ["ES2022"], "types": ["oakscriptjs/script/globals"]
16
+ * },
17
+ * "include": ["*.js"]
18
+ * }
19
+ * ```
20
+ *
21
+ * - `lib` leaves out `DOM`: its `open`, `close` and `alert` are other globals.
22
+ * - `moduleDetection: "force"`: each script has its own top-level names (a script has no import or export).
23
+ * - `noImplicitAny: false`: the parameters of a script's own functions have no types (plain JavaScript).
24
+ *
25
+ * @module script/globals
26
+ */
27
+ import type * as S from './index.js';
28
+ declare global {
29
+ const executeIntrabar: typeof S.executeIntrabar;
30
+ const varip: typeof S.varip;
31
+ const indicator: typeof S.indicator;
32
+ const fixnan: typeof S.fixnan;
33
+ const fill: typeof S.fill;
34
+ const plotshape: typeof S.plotshape;
35
+ const plotchar: typeof S.plotchar;
36
+ const plotarrow: typeof S.plotarrow;
37
+ const bgcolor: typeof S.bgcolor;
38
+ const barcolor: typeof S.barcolor;
39
+ const plotcandle: typeof S.plotcandle;
40
+ const plotbar: typeof S.plotbar;
41
+ const eachBar: typeof S.eachBar;
42
+ const timestamp: typeof S.timestamp;
43
+ const inSession: typeof S.inSession;
44
+ const seriesOf: typeof S.seriesOf;
45
+ const alertcondition: typeof S.alertcondition;
46
+ const holdDrawing: typeof S.holdDrawing;
47
+ const releaseDrawing: typeof S.releaseDrawing;
48
+ const varDrawing: typeof S.varDrawing;
49
+ const StrategyRecorder: typeof S.StrategyRecorder;
50
+ const input: typeof S.input;
51
+ const open: typeof S.open;
52
+ const high: typeof S.high;
53
+ const low: typeof S.low;
54
+ const close: typeof S.close;
55
+ const volume: typeof S.volume;
56
+ const hl2: typeof S.hl2;
57
+ const hlc3: typeof S.hlc3;
58
+ const ohlc4: typeof S.ohlc4;
59
+ const hlcc4: typeof S.hlcc4;
60
+ const ta: typeof S.ta;
61
+ const color: typeof S.color;
62
+ const DEFAULT_OUTPUT_TITLES: typeof S.DEFAULT_OUTPUT_TITLES;
63
+ const plot: typeof S.plot;
64
+ const hline: typeof S.hline;
65
+ const DEFAULT_CANDLE_COLORS: typeof S.DEFAULT_CANDLE_COLORS;
66
+ const strategy: typeof S.strategy;
67
+ const MissingSymbolDataError: typeof S.MissingSymbolDataError;
68
+ const timeframe: typeof S.timeframe;
69
+ const syminfo: typeof S.syminfo;
70
+ const year: typeof S.year;
71
+ const month: typeof S.month;
72
+ const weekofyear: typeof S.weekofyear;
73
+ const dayofmonth: typeof S.dayofmonth;
74
+ const dayofweek: typeof S.dayofweek;
75
+ const hour: typeof S.hour;
76
+ const minute: typeof S.minute;
77
+ const second: typeof S.second;
78
+ const str: typeof S.str;
79
+ const timenow: typeof S.timenow;
80
+ const time: typeof S.time;
81
+ const time_close: typeof S.time_close;
82
+ const time_tradingday: typeof S.time_tradingday;
83
+ const barstate: typeof S.barstate;
84
+ const session: typeof S.session;
85
+ const barmerge: typeof S.barmerge;
86
+ const ticker: typeof S.ticker;
87
+ const request: typeof S.request;
88
+ const line: typeof S.line;
89
+ const label: typeof S.label;
90
+ const box: typeof S.box;
91
+ const linefill: typeof S.linefill;
92
+ const polyline: typeof S.polyline;
93
+ const table: typeof S.table;
94
+ const position: typeof S.position;
95
+ const text: typeof S.text;
96
+ const chart: typeof S.chart;
97
+ const alert: typeof S.alert;
98
+ const Series: typeof S.Series;
99
+ const BarData: typeof S.BarData;
100
+ const na: typeof S.na;
101
+ const nz: typeof S.nz;
102
+ const STRATEGY_DEFAULTS: typeof S.STRATEGY_DEFAULTS;
103
+ const math: typeof S.math;
104
+ const bar_index: typeof S.bar_index;
105
+ const last_bar_index: typeof S.last_bar_index;
106
+ const shape: typeof S.shape;
107
+ const location: typeof S.location;
108
+ const size: typeof S.size;
109
+ const xloc: typeof S.xloc;
110
+ const yloc: typeof S.yloc;
111
+ const extend: typeof S.extend;
112
+ const display: typeof S.display;
113
+ const format: typeof S.format;
114
+ const font: typeof S.font;
115
+ const scale: typeof S.scale;
116
+ const order: typeof S.order;
117
+ const currency: typeof S.currency;
118
+ const adjustment: typeof S.adjustment;
119
+ const compare: typeof S.compare;
120
+ const isInputActive: typeof S.isInputActive;
121
+ /** A Series of the script (`close`, the result of `ta.*`...), for JSDoc types: `@type {Series}`. */
122
+ type Series = S.Series;
123
+ /** The bar handed to an `eachBar()` callback, for JSDoc types. */
124
+ type BarContext = S.BarContext;
125
+ }
126
+ export {};
127
+ //# sourceMappingURL=globals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"globals.d.ts","sourceRoot":"","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