openalgo-script 0.2.0 → 0.4.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.
- package/CHANGELOG.md +269 -0
- package/README.md +65 -31
- package/dist/adapters/charts/surfaces.d.ts +17 -0
- package/dist/adapters/charts/surfaces.d.ts.map +1 -1
- package/dist/adapters/charts/tables.js +82 -0
- package/dist/adapters/charts/tables.js.map +1 -1
- package/dist/adapters/codemirror/commands.d.ts +14 -0
- package/dist/adapters/codemirror/commands.d.ts.map +1 -0
- package/dist/adapters/codemirror/commands.js +52 -0
- package/dist/adapters/codemirror/commands.js.map +1 -0
- package/dist/adapters/codemirror/completion.d.ts +15 -0
- package/dist/adapters/codemirror/completion.d.ts.map +1 -0
- package/dist/adapters/codemirror/completion.js +64 -0
- package/dist/adapters/codemirror/completion.js.map +1 -0
- package/dist/adapters/codemirror/contract.d.ts +156 -0
- package/dist/adapters/codemirror/contract.d.ts.map +1 -0
- package/dist/adapters/codemirror/contract.js +42 -0
- package/dist/adapters/codemirror/contract.js.map +1 -0
- package/dist/adapters/codemirror/index.d.ts +43 -0
- package/dist/adapters/codemirror/index.d.ts.map +1 -0
- package/dist/adapters/codemirror/index.js +8 -0
- package/dist/adapters/codemirror/index.js.map +1 -0
- package/dist/adapters/codemirror/lint.d.ts +17 -0
- package/dist/adapters/codemirror/lint.d.ts.map +1 -0
- package/dist/adapters/codemirror/lint.js +62 -0
- package/dist/adapters/codemirror/lint.js.map +1 -0
- package/dist/adapters/codemirror/positions.d.ts +16 -0
- package/dist/adapters/codemirror/positions.d.ts.map +1 -0
- package/dist/adapters/codemirror/positions.js +65 -0
- package/dist/adapters/codemirror/positions.js.map +1 -0
- package/dist/adapters/codemirror/stream.d.ts +23 -0
- package/dist/adapters/codemirror/stream.d.ts.map +1 -0
- package/dist/adapters/codemirror/stream.js +70 -0
- package/dist/adapters/codemirror/stream.js.map +1 -0
- package/dist/adapters/codemirror/tokens.d.ts +44 -0
- package/dist/adapters/codemirror/tokens.d.ts.map +1 -0
- package/dist/adapters/codemirror/tokens.js +34 -0
- package/dist/adapters/codemirror/tokens.js.map +1 -0
- package/dist/adapters/codemirror/tooltips.d.ts +35 -0
- package/dist/adapters/codemirror/tooltips.d.ts.map +1 -0
- package/dist/adapters/codemirror/tooltips.js +108 -0
- package/dist/adapters/codemirror/tooltips.js.map +1 -0
- package/dist/core/accounting/charges.d.ts +136 -0
- package/dist/core/accounting/charges.d.ts.map +1 -0
- package/dist/core/accounting/charges.js +362 -0
- package/dist/core/accounting/charges.js.map +1 -0
- package/dist/core/accounting/equity.d.ts +158 -0
- package/dist/core/accounting/equity.d.ts.map +1 -0
- package/dist/core/accounting/equity.js +155 -0
- package/dist/core/accounting/equity.js.map +1 -0
- package/dist/core/accounting/index.d.ts +44 -0
- package/dist/core/accounting/index.d.ts.map +1 -0
- package/dist/core/accounting/index.js +36 -0
- package/dist/core/accounting/index.js.map +1 -0
- package/dist/core/accounting/markers.d.ts +43 -0
- package/dist/core/accounting/markers.d.ts.map +1 -0
- package/dist/core/accounting/markers.js +64 -0
- package/dist/core/accounting/markers.js.map +1 -0
- package/dist/core/accounting/monthly.d.ts +52 -0
- package/dist/core/accounting/monthly.d.ts.map +1 -0
- package/dist/core/accounting/monthly.js +99 -0
- package/dist/core/accounting/monthly.js.map +1 -0
- package/dist/core/accounting/report.d.ts +38 -0
- package/dist/core/accounting/report.d.ts.map +1 -0
- package/dist/core/accounting/report.js +63 -0
- package/dist/core/accounting/report.js.map +1 -0
- package/dist/core/accounting/shapes.d.ts +70 -0
- package/dist/core/accounting/shapes.d.ts.map +1 -0
- package/dist/core/accounting/shapes.js +21 -0
- package/dist/core/accounting/shapes.js.map +1 -0
- package/dist/core/accounting/statistics.d.ts +75 -0
- package/dist/core/accounting/statistics.d.ts.map +1 -0
- package/dist/core/accounting/statistics.js +246 -0
- package/dist/core/accounting/statistics.js.map +1 -0
- package/dist/core/accounting/trades.d.ts +118 -0
- package/dist/core/accounting/trades.d.ts.map +1 -0
- package/dist/core/accounting/trades.js +186 -0
- package/dist/core/accounting/trades.js.map +1 -0
- package/dist/core/backtest/compare.d.ts +38 -0
- package/dist/core/backtest/compare.d.ts.map +1 -0
- package/dist/core/backtest/compare.js +189 -0
- package/dist/core/backtest/compare.js.map +1 -0
- package/dist/core/backtest/declaration.d.ts +52 -0
- package/dist/core/backtest/declaration.d.ts.map +1 -0
- package/dist/core/backtest/declaration.js +48 -0
- package/dist/core/backtest/declaration.js.map +1 -0
- package/dist/core/backtest/drive.d.ts +29 -0
- package/dist/core/backtest/drive.d.ts.map +1 -0
- package/dist/core/backtest/drive.js +262 -0
- package/dist/core/backtest/drive.js.map +1 -0
- package/dist/core/backtest/index.d.ts +46 -0
- package/dist/core/backtest/index.d.ts.map +1 -0
- package/dist/core/backtest/index.js +36 -0
- package/dist/core/backtest/index.js.map +1 -0
- package/dist/core/backtest/range.d.ts +84 -0
- package/dist/core/backtest/range.d.ts.map +1 -0
- package/dist/core/backtest/range.js +90 -0
- package/dist/core/backtest/range.js.map +1 -0
- package/dist/core/backtest/record.d.ts +238 -0
- package/dist/core/backtest/record.d.ts.map +1 -0
- package/dist/core/backtest/record.js +176 -0
- package/dist/core/backtest/record.js.map +1 -0
- package/dist/core/backtest/replay.d.ts +48 -0
- package/dist/core/backtest/replay.d.ts.map +1 -0
- package/dist/core/backtest/replay.js +127 -0
- package/dist/core/backtest/replay.js.map +1 -0
- package/dist/core/backtest/resting.d.ts +62 -0
- package/dist/core/backtest/resting.d.ts.map +1 -0
- package/dist/core/backtest/resting.js +59 -0
- package/dist/core/backtest/resting.js.map +1 -0
- package/dist/core/backtest/settings.d.ts +117 -0
- package/dist/core/backtest/settings.d.ts.map +1 -0
- package/dist/core/backtest/settings.js +207 -0
- package/dist/core/backtest/settings.js.map +1 -0
- package/dist/core/backtest/simulate.d.ts +146 -0
- package/dist/core/backtest/simulate.d.ts.map +1 -0
- package/dist/core/backtest/simulate.js +217 -0
- package/dist/core/backtest/simulate.js.map +1 -0
- package/dist/core/catalogue/catalogue.generated.d.ts +66 -0
- package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
- package/dist/core/catalogue/catalogue.generated.js +6 -0
- package/dist/core/catalogue/catalogue.generated.js.map +1 -1
- package/dist/core/catalogue/values.generated.d.ts +24 -0
- package/dist/core/catalogue/values.generated.d.ts.map +1 -1
- package/dist/core/check/index.d.ts +2 -1
- package/dist/core/check/index.d.ts.map +1 -1
- package/dist/core/check/index.js +1 -1
- package/dist/core/check/index.js.map +1 -1
- package/dist/core/check/library-prose.generated.d.ts +16 -0
- package/dist/core/check/library-prose.generated.d.ts.map +1 -0
- package/dist/core/check/library-prose.generated.js +353 -0
- package/dist/core/check/library-prose.generated.js.map +1 -0
- package/dist/core/check/surface.d.ts +24 -0
- package/dist/core/check/surface.d.ts.map +1 -1
- package/dist/core/check/surface.js +29 -0
- package/dist/core/check/surface.js.map +1 -1
- package/dist/core/emit/defaults.d.ts +35 -16
- package/dist/core/emit/defaults.d.ts.map +1 -1
- package/dist/core/emit/defaults.js +66 -0
- package/dist/core/emit/defaults.js.map +1 -1
- package/dist/core/emit/index.d.ts +2 -0
- package/dist/core/emit/index.d.ts.map +1 -1
- package/dist/core/emit/index.js +2 -0
- package/dist/core/emit/index.js.map +1 -1
- package/dist/core/engine/index.d.ts +1 -1
- package/dist/core/engine/index.d.ts.map +1 -1
- package/dist/core/engine/index.js +1 -1
- package/dist/core/engine/index.js.map +1 -1
- package/dist/core/engine/load.d.ts +15 -1
- package/dist/core/engine/load.d.ts.map +1 -1
- package/dist/core/engine/load.js +1 -0
- package/dist/core/engine/load.js.map +1 -1
- package/dist/core/index.d.ts +37 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +17 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/version/version.generated.d.ts +1 -1
- package/dist/core/version/version.generated.js +1 -1
- package/dist/editor/complete.d.ts +40 -0
- package/dist/editor/complete.d.ts.map +1 -0
- package/dist/editor/complete.js +206 -0
- package/dist/editor/complete.js.map +1 -0
- package/dist/editor/diagnose.d.ts +18 -0
- package/dist/editor/diagnose.d.ts.map +1 -0
- package/dist/editor/diagnose.js +70 -0
- package/dist/editor/diagnose.js.map +1 -0
- package/dist/editor/format.d.ts +11 -0
- package/dist/editor/format.d.ts.map +1 -0
- package/dist/editor/format.js +50 -0
- package/dist/editor/format.js.map +1 -0
- package/dist/editor/highlight.d.ts +28 -0
- package/dist/editor/highlight.d.ts.map +1 -0
- package/dist/editor/highlight.js +65 -0
- package/dist/editor/highlight.js.map +1 -0
- package/dist/editor/hover.d.ts +40 -0
- package/dist/editor/hover.d.ts.map +1 -0
- package/dist/editor/hover.js +147 -0
- package/dist/editor/hover.js.map +1 -0
- package/dist/editor/index.d.ts +60 -0
- package/dist/editor/index.d.ts.map +1 -0
- package/dist/editor/index.js +7 -0
- package/dist/editor/index.js.map +1 -0
- package/dist/editor/kinds.d.ts +27 -0
- package/dist/editor/kinds.d.ts.map +1 -0
- package/dist/editor/kinds.js +118 -0
- package/dist/editor/kinds.js.map +1 -0
- package/dist/editor/layout.d.ts +47 -0
- package/dist/editor/layout.d.ts.map +1 -0
- package/dist/editor/layout.js +135 -0
- package/dist/editor/layout.js.map +1 -0
- package/dist/editor/manifest.d.ts +47 -0
- package/dist/editor/manifest.d.ts.map +1 -0
- package/dist/editor/manifest.js +93 -0
- package/dist/editor/manifest.js.map +1 -0
- package/dist/editor/reading.d.ts +41 -0
- package/dist/editor/reading.d.ts.map +1 -0
- package/dist/editor/reading.js +51 -0
- package/dist/editor/reading.js.map +1 -0
- package/dist/editor/scan.d.ts +26 -0
- package/dist/editor/scan.d.ts.map +1 -0
- package/dist/editor/scan.js +139 -0
- package/dist/editor/scan.js.map +1 -0
- package/dist/editor/scope.d.ts +19 -0
- package/dist/editor/scope.d.ts.map +1 -0
- package/dist/editor/scope.js +99 -0
- package/dist/editor/scope.js.map +1 -0
- package/dist/editor/signature.d.ts +38 -0
- package/dist/editor/signature.d.ts.map +1 -0
- package/dist/editor/signature.js +112 -0
- package/dist/editor/signature.js.map +1 -0
- package/dist/editor/site.d.ts +46 -0
- package/dist/editor/site.d.ts.map +1 -0
- package/dist/editor/site.js +184 -0
- package/dist/editor/site.js.map +1 -0
- package/dist/editor/spacing.d.ts +29 -0
- package/dist/editor/spacing.d.ts.map +1 -0
- package/dist/editor/spacing.js +116 -0
- package/dist/editor/spacing.js.map +1 -0
- package/package.json +30 -3
- package/spec/errors.json +140 -0
- package/src/adapters/charts/surfaces.ts +17 -0
- package/src/adapters/charts/tables.ts +88 -0
- package/src/adapters/codemirror/commands.ts +53 -0
- package/src/adapters/codemirror/completion.ts +74 -0
- package/src/adapters/codemirror/contract.ts +156 -0
- package/src/adapters/codemirror/index.ts +66 -0
- package/src/adapters/codemirror/lint.ts +66 -0
- package/src/adapters/codemirror/positions.ts +79 -0
- package/src/adapters/codemirror/stream.ts +87 -0
- package/src/adapters/codemirror/tokens.ts +64 -0
- package/src/adapters/codemirror/tooltips.ts +113 -0
- package/src/core/accounting/charges.ts +452 -0
- package/src/core/accounting/equity.ts +276 -0
- package/src/core/accounting/index.ts +49 -0
- package/src/core/accounting/markers.ts +95 -0
- package/src/core/accounting/monthly.ts +137 -0
- package/src/core/accounting/report.ts +89 -0
- package/src/core/accounting/shapes.ts +73 -0
- package/src/core/accounting/statistics.ts +350 -0
- package/src/core/accounting/trades.ts +313 -0
- package/src/core/backtest/compare.ts +244 -0
- package/src/core/backtest/declaration.ts +97 -0
- package/src/core/backtest/drive.ts +364 -0
- package/src/core/backtest/index.ts +52 -0
- package/src/core/backtest/range.ts +137 -0
- package/src/core/backtest/record.ts +341 -0
- package/src/core/backtest/replay.ts +158 -0
- package/src/core/backtest/resting.ts +125 -0
- package/src/core/backtest/settings.ts +280 -0
- package/src/core/backtest/simulate.ts +304 -0
- package/src/core/catalogue/catalogue.generated.ts +6 -0
- package/src/core/catalogue/values.generated.ts +6 -0
- package/src/core/check/index.ts +3 -0
- package/src/core/check/library-prose.generated.ts +367 -0
- package/src/core/check/surface.ts +34 -0
- package/src/core/emit/defaults.ts +70 -0
- package/src/core/emit/index.ts +2 -0
- package/src/core/engine/index.ts +1 -1
- package/src/core/engine/load.ts +16 -2
- package/src/core/index.ts +85 -1
- package/src/core/version/version.generated.ts +1 -1
- package/src/editor/complete.ts +266 -0
- package/src/editor/diagnose.ts +71 -0
- package/src/editor/format.ts +85 -0
- package/src/editor/highlight.ts +110 -0
- package/src/editor/hover.ts +199 -0
- package/src/editor/index.ts +65 -0
- package/src/editor/kinds.ts +157 -0
- package/src/editor/layout.ts +189 -0
- package/src/editor/manifest.ts +119 -0
- package/src/editor/reading.ts +69 -0
- package/src/editor/scan.ts +162 -0
- package/src/editor/scope.ts +122 -0
- package/src/editor/signature.ts +150 -0
- package/src/editor/site.ts +233 -0
- package/src/editor/spacing.ts +132 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.d.ts","sourceRoot":"","sources":["../../../src/core/check/surface.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAErE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAavC,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAoC,CAAC;AAWtF,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,YAAY,EAAE,CAEpE;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED,mFAAmF;AACnF,wBAAgB,YAAY,IAAI,SAAS,MAAM,EAAE,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B,YAAY,IAAI,SAAS,MAAM,EAAE,CAEhD;AAED,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAK9D;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAElD;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAGpD;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAI/D;AAED,gFAAgF;AAChF,wBAAgB,cAAc,IAAI,SAAS,MAAM,EAAE,CAElD"}
|
|
@@ -16,6 +16,7 @@ import { BAR_ENTRIES, COLOUR_NAMES } from './library-bars.js';
|
|
|
16
16
|
import { ORDER_ENTRIES, ORDER_NAMES } from './library-orders.js';
|
|
17
17
|
import { OUTPUT_ENTRIES, REQUEST_NAMES, TOP_LEVEL_NAMES } from './library-output.js';
|
|
18
18
|
import { SERIES_ENTRIES } from './library-series.js';
|
|
19
|
+
import { LIBRARY_PROSE } from './library-prose.generated.js';
|
|
19
20
|
import { indexOf } from './library.js';
|
|
20
21
|
export { BAR_SERIES, COLOUR_NAMES } from './library-bars.js';
|
|
21
22
|
export { ORDER_NAMES } from './library-orders.js';
|
|
@@ -97,4 +98,32 @@ export function isRequestName(name) {
|
|
|
97
98
|
export function isTopLevelOnly(name) {
|
|
98
99
|
return TOP_LEVEL_NAMES.includes(name);
|
|
99
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* What the specification says about a name, or nothing where it says nothing.
|
|
103
|
+
*
|
|
104
|
+
* Two cells of the name's own row in the specification: the line on what it is
|
|
105
|
+
* for, and the first bar it can produce a value for. Read from `stdlib.md`'s own
|
|
106
|
+
* tables at build time, by `scripts/generate-library-prose.mjs`, and never
|
|
107
|
+
* written down here. A description typed into this repository twice is a
|
|
108
|
+
* description that disagrees with itself the first time either copy is edited,
|
|
109
|
+
* and the copy an editor shows a writer is the one nobody proofreads.
|
|
110
|
+
*
|
|
111
|
+
* **What comes back is one line per name, not one per signature.** A name with
|
|
112
|
+
* several signatures is described by the first row the specification states for
|
|
113
|
+
* it, because the map is keyed by name; `close` is the case to have in mind,
|
|
114
|
+
* where the row is the bar series rather than the order function.
|
|
115
|
+
*
|
|
116
|
+
* Nothing comes back for the nineteen named colours. `stdlib.md` 11.1 lists
|
|
117
|
+
* them in a block rather than in a table and says their channel values are the
|
|
118
|
+
* description, which `namedColour` answers.
|
|
119
|
+
*/
|
|
120
|
+
export function proseFor(name) {
|
|
121
|
+
return Object.prototype.hasOwnProperty.call(LIBRARY_PROSE, name)
|
|
122
|
+
? LIBRARY_PROSE[name]
|
|
123
|
+
: undefined;
|
|
124
|
+
}
|
|
125
|
+
/** Every name the specification describes, for the check that the two agree. */
|
|
126
|
+
export function describedNames() {
|
|
127
|
+
return Object.keys(LIBRARY_PROSE);
|
|
128
|
+
}
|
|
100
129
|
//# sourceMappingURL=surface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surface.js","sourceRoot":"","sources":["../../../src/core/check/surface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAA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AU,cAAc,CAAC,IAAY;IACzC,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACxC,CAAC;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC;QAC9D,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC;QACrB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The effective value of every declaration option a script left out.
|
|
3
|
-
*
|
|
4
|
-
* `compiled-program.md` 2.3 is unusually firm about this: every field of
|
|
5
|
-
* `meta`, of `meta.strategy` and of every declaration in `outputs` is written
|
|
6
|
-
* with the value that option resolved to, defaults included, rather than
|
|
7
|
-
* omitted or written as null. So an engine never needs a table of defaults, and
|
|
8
|
-
* a default that changes in a later language version cannot silently change an
|
|
9
|
-
* old program, because the old program carries the old value in writing.
|
|
10
|
-
*
|
|
11
|
-
* That is also why this file exists and why it is only this. These are the
|
|
12
|
-
* defaults of `language.md` 13.2 and 13.3 and of `stdlib.md` 14.2, 14.3, 16 and
|
|
13
|
-
* 10.7, transcribed once. Nothing here is a runtime argument default: those
|
|
14
|
-
* belong to the library manifest, and `calls.ts` says what happens where the
|
|
15
|
-
* two are confused.
|
|
16
|
-
*/
|
|
17
1
|
import type { Value } from './values.js';
|
|
18
2
|
/** `language.md` 13.2. `title` is required and `short` falls back to it. */
|
|
19
3
|
export declare const STUDY_DEFAULTS: Readonly<Record<string, Value>>;
|
|
@@ -42,4 +26,39 @@ export declare const ALERT_DEFAULTS: Readonly<Record<string, Value>>;
|
|
|
42
26
|
export declare const INPUT_DEFAULTS: Readonly<Record<string, Value>>;
|
|
43
27
|
/** `language.md` 10.7 and 7.4, carried by `limits` whether or not it was written. */
|
|
44
28
|
export declare const LOOP_BUDGET = 2000000;
|
|
29
|
+
/**
|
|
30
|
+
* Which map holds each declaration call's defaults.
|
|
31
|
+
*
|
|
32
|
+
* The association is made at the call sites in `outputs.ts`, `events.ts` and
|
|
33
|
+
* `inputs.ts`, where each map is read for the call it belongs to, and there was
|
|
34
|
+
* nothing to read it off in one place. `scripts/check-defaults.mjs` therefore
|
|
35
|
+
* carried a copy of it, and so would anything else that wanted to know what a
|
|
36
|
+
* `plot` written without a `width` is given. It is written once here instead,
|
|
37
|
+
* and that check holds it to the surface: a declaration call with optional
|
|
38
|
+
* parameters and no map fails, and a key in a map that is not a parameter of
|
|
39
|
+
* its call fails.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DECLARATION_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Value>>>>;
|
|
42
|
+
/**
|
|
43
|
+
* What a declaration call's omitted argument resolves to, spelled as a default.
|
|
44
|
+
*
|
|
45
|
+
* A `plot` or a `level` carries no default in the library manifest, because its
|
|
46
|
+
* optional arguments become fields of a declaration rather than arguments an
|
|
47
|
+
* engine is passed (`compiled-program.md` 2.3), and this file is where their
|
|
48
|
+
* values are. So a reader of the manifest alone sees `width?: number` with no
|
|
49
|
+
* value beside it while the compiler writes 1.5, and anything that showed a
|
|
50
|
+
* writer the manifest's answer would be showing them nothing where the compiler
|
|
51
|
+
* has something.
|
|
52
|
+
*
|
|
53
|
+
* This is the one answer to that question. `scripts/check-defaults.mjs` compares
|
|
54
|
+
* what it returns against what `stdlib.md` prints, so a tooltip built on it
|
|
55
|
+
* cannot state a default the compiler does not apply: the two are the same text
|
|
56
|
+
* from the same table, or the build fails.
|
|
57
|
+
*
|
|
58
|
+
* Nothing comes back for a parameter whose value is absence, because absence is
|
|
59
|
+
* not a default a writer can be shown: the specification states `none` for some
|
|
60
|
+
* of those and words in place of a value for others, and which is which is
|
|
61
|
+
* recorded in `spec/default-exceptions.json` rather than invented here.
|
|
62
|
+
*/
|
|
63
|
+
export declare function declarationDefaultText(call: string, parameter: string): string | undefined;
|
|
45
64
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/core/emit/defaults.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../../src/core/emit/defaults.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAsBzC,4EAA4E;AAC5E,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAQ1D,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAY7D,CAAC;AAEF,oDAAoD;AACpD,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAY7C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CASzD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAuB,CAAC;AAEtD,8EAA8E;AAC9E,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAK3D,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAMzD,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAK1D,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAK1D,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAI3D,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAI1D,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAG1D,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,WAAW,UAAY,CAAC;AAErC;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAS1F,CAAC;AASF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgB1F"}
|
|
@@ -113,4 +113,70 @@ export const INPUT_DEFAULTS = {
|
|
|
113
113
|
};
|
|
114
114
|
/** `language.md` 10.7 and 7.4, carried by `limits` whether or not it was written. */
|
|
115
115
|
export const LOOP_BUDGET = 2_000_000;
|
|
116
|
+
/**
|
|
117
|
+
* Which map holds each declaration call's defaults.
|
|
118
|
+
*
|
|
119
|
+
* The association is made at the call sites in `outputs.ts`, `events.ts` and
|
|
120
|
+
* `inputs.ts`, where each map is read for the call it belongs to, and there was
|
|
121
|
+
* nothing to read it off in one place. `scripts/check-defaults.mjs` therefore
|
|
122
|
+
* carried a copy of it, and so would anything else that wanted to know what a
|
|
123
|
+
* `plot` written without a `width` is given. It is written once here instead,
|
|
124
|
+
* and that check holds it to the surface: a declaration call with optional
|
|
125
|
+
* parameters and no map fails, and a key in a map that is not a parameter of
|
|
126
|
+
* its call fails.
|
|
127
|
+
*/
|
|
128
|
+
export const DECLARATION_DEFAULTS = {
|
|
129
|
+
plot: PLOT_DEFAULTS,
|
|
130
|
+
plotCandles: CANDLE_DEFAULTS,
|
|
131
|
+
fill: FILL_DEFAULTS,
|
|
132
|
+
level: LEVEL_DEFAULTS,
|
|
133
|
+
table: TABLE_DEFAULTS,
|
|
134
|
+
signal: MARKER_DEFAULTS,
|
|
135
|
+
alert: ALERT_DEFAULTS,
|
|
136
|
+
input: INPUT_DEFAULTS,
|
|
137
|
+
};
|
|
138
|
+
/** A colour as the specification's tables print one, so the two compare. */
|
|
139
|
+
function hexOf(colour) {
|
|
140
|
+
const byte = (channel) => Math.round(channel).toString(16).padStart(2, '0');
|
|
141
|
+
return `#${byte(colour[0])}${byte(colour[1])}${byte(colour[2])}${byte(colour[3] * 255)}`;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* What a declaration call's omitted argument resolves to, spelled as a default.
|
|
145
|
+
*
|
|
146
|
+
* A `plot` or a `level` carries no default in the library manifest, because its
|
|
147
|
+
* optional arguments become fields of a declaration rather than arguments an
|
|
148
|
+
* engine is passed (`compiled-program.md` 2.3), and this file is where their
|
|
149
|
+
* values are. So a reader of the manifest alone sees `width?: number` with no
|
|
150
|
+
* value beside it while the compiler writes 1.5, and anything that showed a
|
|
151
|
+
* writer the manifest's answer would be showing them nothing where the compiler
|
|
152
|
+
* has something.
|
|
153
|
+
*
|
|
154
|
+
* This is the one answer to that question. `scripts/check-defaults.mjs` compares
|
|
155
|
+
* what it returns against what `stdlib.md` prints, so a tooltip built on it
|
|
156
|
+
* cannot state a default the compiler does not apply: the two are the same text
|
|
157
|
+
* from the same table, or the build fails.
|
|
158
|
+
*
|
|
159
|
+
* Nothing comes back for a parameter whose value is absence, because absence is
|
|
160
|
+
* not a default a writer can be shown: the specification states `none` for some
|
|
161
|
+
* of those and words in place of a value for others, and which is which is
|
|
162
|
+
* recorded in `spec/default-exceptions.json` rather than invented here.
|
|
163
|
+
*/
|
|
164
|
+
export function declarationDefaultText(call, parameter) {
|
|
165
|
+
const value = DECLARATION_DEFAULTS[call]?.[parameter];
|
|
166
|
+
if (value === undefined)
|
|
167
|
+
return undefined;
|
|
168
|
+
switch (value.kind) {
|
|
169
|
+
case 'absent':
|
|
170
|
+
return 'none';
|
|
171
|
+
case 'bool':
|
|
172
|
+
case 'number':
|
|
173
|
+
return String(value.value);
|
|
174
|
+
case 'string':
|
|
175
|
+
return JSON.stringify(value.value);
|
|
176
|
+
case 'colour':
|
|
177
|
+
return hexOf(value.value);
|
|
178
|
+
default:
|
|
179
|
+
return `a ${value.kind}`;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
116
182
|
//# sourceMappingURL=defaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/core/emit/defaults.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../../src/core/emit/defaults.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,MAAM,MAAM,GAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAEzC,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,MAAM,CAAC,KAAa;IAC3B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC;AAED,SAAS,IAAI,CAAC,KAAc;IAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACjC,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC1B,MAAM,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAChC,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAClE,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CAAC,SAAS,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC;QAChB,KAAK,MAAM,CAAC;QACZ,KAAK,QAAQ;YACX,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7B,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrC,KAAK,QAAQ;YACX,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC5B;YACE,OAAO,KAAK,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;AACH,CAAC"}
|
|
@@ -16,6 +16,8 @@ export { emit } from './emit.js';
|
|
|
16
16
|
export type { EmitResult } from './emit.js';
|
|
17
17
|
export type { EmitOptions } from './context.js';
|
|
18
18
|
export { DECLARATION_CALLS, arityOf, effectOf } from './context.js';
|
|
19
|
+
export { declarationDefaultText } from './defaults.js';
|
|
20
|
+
export { namedColour } from './colours.js';
|
|
19
21
|
export { BAR_FACTS, BAR_FIELDS } from './registers.js';
|
|
20
22
|
export { REQUEST_CALLS, REQUEST_STATUS_CALLS } from './requests.js';
|
|
21
23
|
export type { Gap } from './gaps.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/emit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,SAAS,EA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AAY,EACZ,WAAW,EACX,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,cAAc,CAAC"}
|
package/dist/core/emit/index.js
CHANGED
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
*/
|
|
15
15
|
export { emit } from './emit.js';
|
|
16
16
|
export { DECLARATION_CALLS, arityOf, effectOf } from './context.js';
|
|
17
|
+
export { declarationDefaultText } from './defaults.js';
|
|
18
|
+
export { namedColour } from './colours.js';
|
|
17
19
|
export { BAR_FACTS, BAR_FIELDS } from './registers.js';
|
|
18
20
|
export { REQUEST_CALLS, REQUEST_STATUS_CALLS } from './requests.js';
|
|
19
21
|
export { canonicalise, canonicalNumber, canonicalString, programHash, sourceHash } from './canonical.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/emit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG7F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/emit/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACzG,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG7F,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -39,7 +39,7 @@ export type { SessionFacts, SessionHours } from './session/index.js';
|
|
|
39
39
|
export type { Timeframe, TimeframeUnit } from './timeframe.js';
|
|
40
40
|
export { bucketKeyOf, isIntraday, minutesOf, nominalMinutes, parseTimeframe } from './timeframe.js';
|
|
41
41
|
export type { ResolvedInput, SettingCheck, TimeResolver } from './inputs.js';
|
|
42
|
-
export { checkSetting, constantValue, utcTime } from './inputs.js';
|
|
42
|
+
export { checkSetting, constantValue, fieldValue, utcTime } from './inputs.js';
|
|
43
43
|
export { LANGUAGE_VERSIONS, capabilitiesFor, verify } from './verify.js';
|
|
44
44
|
export type { VerifyOptions, VerifyResult } from './verify.js';
|
|
45
45
|
export type { ArrayObject, ColourValue, DrawingObject, GridCell, HeapObject, Reference, TableObject, Value, } from './values/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","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EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAErE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpG,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACzE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE/D,YAAY,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,QAAQ,EACR,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElF,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -26,7 +26,7 @@ export { load } from './load.js';
|
|
|
26
26
|
export { BAR_FIELDS, barField, isBarField } from './bars.js';
|
|
27
27
|
export { DEFAULT_LIMITS, stepBound } from './budget.js';
|
|
28
28
|
export { bucketKeyOf, isIntraday, minutesOf, nominalMinutes, parseTimeframe } from './timeframe.js';
|
|
29
|
-
export { checkSetting, constantValue, utcTime } from './inputs.js';
|
|
29
|
+
export { checkSetting, constantValue, fieldValue, utcTime } from './inputs.js';
|
|
30
30
|
export { LANGUAGE_VERSIONS, capabilitiesFor, verify } from './verify.js';
|
|
31
31
|
export { isAbsent, isColour, isRef, tagOf, valuesEqual } from './values/index.js';
|
|
32
32
|
export { COLOUR_NAMES, manifestEntries, manifestEntry, namedColour, spell } from './library/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/engine/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkCxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGpG,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/engine/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAQjC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG7D,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAkCxD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGpG,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAazE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGlF,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -14,7 +14,7 @@ import type { SourceFile } from '../source/index.js';
|
|
|
14
14
|
import type { Clock, EngineLimits } from './budget.js';
|
|
15
15
|
import { Engine } from './engine.js';
|
|
16
16
|
import type { EngineHost } from './host.js';
|
|
17
|
-
import type { TimeResolver } from './inputs.js';
|
|
17
|
+
import type { ResolvedInput, TimeResolver } from './inputs.js';
|
|
18
18
|
export interface LoadOptions {
|
|
19
19
|
/** The host's settings, keyed by input `key`. */
|
|
20
20
|
readonly settings?: Readonly<Record<string, unknown>>;
|
|
@@ -27,9 +27,23 @@ export interface LoadOptions {
|
|
|
27
27
|
/** How a `"time"` input's stored wall clock string becomes a timestamp. */
|
|
28
28
|
readonly time?: TimeResolver;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A loaded program, and the settings it was loaded under.
|
|
32
|
+
*
|
|
33
|
+
* The resolved inputs come back beside the engine because a declaration field
|
|
34
|
+
* may be written by an input (`compiled-program.md` 2.3), and a caller outside
|
|
35
|
+
* the engine reads some of those fields: what a run was carried out with is the
|
|
36
|
+
* declaration's capital, its commission and the bar a fill is priced at, and
|
|
37
|
+
* the backtest driver is what reports them. Resolving an input a second time
|
|
38
|
+
* out there would be the same rule written in two files, and the first host
|
|
39
|
+
* setting either of them read differently would be a report nobody could
|
|
40
|
+
* explain. So the resolution happens once, here, and what it produced is handed
|
|
41
|
+
* over rather than kept.
|
|
42
|
+
*/
|
|
30
43
|
export type LoadResult = {
|
|
31
44
|
readonly ok: true;
|
|
32
45
|
readonly engine: Engine;
|
|
46
|
+
readonly inputs: readonly ResolvedInput[];
|
|
33
47
|
} | {
|
|
34
48
|
readonly ok: false;
|
|
35
49
|
readonly diagnostic: Diagnostic;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/core/engine/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/core/engine/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5C,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK/D,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,CAAC,EAA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CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC9E,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC;IAEtE,OAAO;QACL,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC;QACpF,MAAM,EAAE,QAAQ,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC"}
|
package/dist/core/index.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export type { Argument, ArithmeticOperator, ArrayLiteral, ArrayType, Assignment,
|
|
|
36
36
|
export { ARITHMETIC_OPERATORS, ASSIGNMENT_OPERATORS, COMPARISON_OPERATORS, EQUALITY_OPERATORS, LOGICAL_OPERATORS, OBJECT_TYPE_NAMES, UNARY_OPERATORS, VALUE_TYPE_NAMES, binaryPrecedence, childrenOf, isExpression, isObjectTypeName, isStatement, isTypeAnnotation, isValueTypeName, makeNode, nodeAtOffset, pathAtOffset, typeAnnotationText, walk, withoutGrouping, } from './ast/index.js';
|
|
37
37
|
export { lex } from './lex/index.js';
|
|
38
38
|
export { parse, parseTokens } from './parse/index.js';
|
|
39
|
-
export type { Binding, BindingKind, CheckedCall, CheckedDeclaration, CheckedFunction, CheckedInput, CheckedOutput, CheckedRequest, CheckedScript, HandleKind, InputKind, LibraryEntry, LibraryParameter, ObjectKind, RequestMode, Storage, Type, ValueKind, WarmupRule, Warmup, } from './check/index.js';
|
|
40
|
-
export { BAR_ZERO, HANDLE_KINDS, NAMESPACES, OBJECT_KINDS, STRATEGY_NAMESPACES, VALUE_KINDS, accepts, allOf, arrayOf, atBar, atLeastBar, check, delayed, earlier, elementOf, isLibraryName, isNamespace, isNever, isSeries, join, later, libraryEntries, libraryNames, membersOf, sameType, seriesOf, typeText, } from './check/index.js';
|
|
39
|
+
export type { Binding, BindingKind, CheckedCall, CheckedDeclaration, CheckedFunction, CheckedInput, CheckedOutput, CheckedRequest, CheckedScript, HandleKind, InputKind, LibraryEntry, LibraryParameter, LibraryProse, ObjectKind, RequestMode, Storage, Type, ValueKind, WarmupRule, Warmup, } from './check/index.js';
|
|
40
|
+
export { BAR_ZERO, HANDLE_KINDS, NAMESPACES, OBJECT_KINDS, STRATEGY_NAMESPACES, VALUE_KINDS, accepts, allOf, arrayOf, atBar, atLeastBar, check, delayed, describedNames, earlier, elementOf, isLibraryName, isNamespace, isNever, isSeries, join, later, libraryEntries, libraryNames, membersOf, sameType, seriesOf, proseFor, typeText, } from './check/index.js';
|
|
41
41
|
export { REQUEST_NAMES } from './check/index.js';
|
|
42
42
|
export { COMPILED_FORMAT_VERSION, VERSION } from './version/index.js';
|
|
43
43
|
/**
|
|
@@ -53,8 +53,19 @@ export { COMPILED_FORMAT_VERSION, VERSION } from './version/index.js';
|
|
|
53
53
|
*/
|
|
54
54
|
export { emit } from './emit/index.js';
|
|
55
55
|
export type { EmitOptions, EmitResult } from './emit/index.js';
|
|
56
|
-
export type { CompiledProgram } from './emit/index.js';
|
|
56
|
+
export type { Colour, CompiledProgram } from './emit/index.js';
|
|
57
57
|
export { canonicalise, programHash, sourceHash } from './emit/index.js';
|
|
58
|
+
/**
|
|
59
|
+
* Two answers the emitter holds that a tool built on the language needs.
|
|
60
|
+
*
|
|
61
|
+
* A declaration call's defaults and the channels a colour name denotes are both
|
|
62
|
+
* facts the compiler applies and neither is in the library manifest, so a tier
|
|
63
|
+
* above this one that read the manifest alone would show a writer nothing where
|
|
64
|
+
* the compiler has a value. They are here rather than reached for behind the
|
|
65
|
+
* emitter's door, and `scripts/check-defaults.mjs` holds the first of them to
|
|
66
|
+
* what `stdlib.md` prints.
|
|
67
|
+
*/
|
|
68
|
+
export { DECLARATION_CALLS, declarationDefaultText, namedColour } from './emit/index.js';
|
|
58
69
|
/**
|
|
59
70
|
* The engine: a program in, one bar at a time, values out.
|
|
60
71
|
*
|
|
@@ -81,4 +92,27 @@ export { isAbsent } from './engine/index.js';
|
|
|
81
92
|
export type { Value } from './engine/index.js';
|
|
82
93
|
export { LANGUAGE_VERSIONS, capabilitiesFor, verify } from './engine/index.js';
|
|
83
94
|
export type { VerifyOptions, VerifyResult } from './engine/index.js';
|
|
95
|
+
/**
|
|
96
|
+
* The money, and the run it is folded from (`stdlib.md` 17.1, 17.7).
|
|
97
|
+
*
|
|
98
|
+
* Two modules rather than one, and the line between them is the design. The
|
|
99
|
+
* accounting shapes are arithmetic over portable data and know nothing about an
|
|
100
|
+
* engine, so a stored record can be reported again with no engine present and
|
|
101
|
+
* the engine can one day call the same arithmetic with no second implementation
|
|
102
|
+
* to disagree with. The backtest shapes are what one run was carried out under
|
|
103
|
+
* and what it produced, and a record of one is a conformance case a second
|
|
104
|
+
* engine can be handed whole.
|
|
105
|
+
*
|
|
106
|
+
* They are here rather than behind an entry point of their own because they are
|
|
107
|
+
* the same layer: a host that compiles and runs a program is the host that
|
|
108
|
+
* reports what it did.
|
|
109
|
+
*/
|
|
110
|
+
export type { BarMark, ChargeBase, ChargeBreakdown, ChargeLine, ChargeSchedule, ChargeSide, Contract, EquityPoint, Money, MonthlyReturn, RecordedFill, Report, Summary, Trade, TradeMarker, } from './accounting/index.js';
|
|
111
|
+
export { chargeFor, scheduleFromDeclaration, scheduleProblem } from './accounting/index.js';
|
|
112
|
+
export { markersOf, monthlyOver, reportOf } from './accounting/index.js';
|
|
113
|
+
export { tradesOf } from './accounting/index.js';
|
|
114
|
+
export { equityOver, summaryOf } from './accounting/index.js';
|
|
115
|
+
export { DEFAULT_FILL, EXACT, WHOLE_RANGE, RECORD_VERSION, backtest, barsHash, checkSettings, compareRuns, recordFromJson, recordToJson, recordOf, replay, rerun, runBytes, settingsFor, windowFor, } from './backtest/index.js';
|
|
116
|
+
export type { BacktestResult, ReplayResult, ReportWindow } from './backtest/index.js';
|
|
117
|
+
export type { BacktestSettings, BarsInRecord, DateRange, FillPolicy, RecordedBar, RecordedDiagnostic, RecordedFrame, RecordedOrder, RunComparison, RunRecord, Tolerance, } from './backtest/index.js';
|
|
84
118
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhF,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEhE,YAAY,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,KAAK,GACN,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAExE,YAAY,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,WAAW,EACX,eAAe,EACf,WAAW,EACX,WAAW,EACX,KAAK,EACL,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,m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,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,YAAY,EACV,OAAO,EACP,UAAU,EACV,eAAe,EACf,UAAU,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,WAAW,EACX,KAAK,EACL,aAAa,EACb,YAAY,EACZ,MAAM,EACN,OAAO,EACP,KAAK,EACL,WAAW,GACZ,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAS,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACtF,YAAY,EACV,gBAAgB,EAChB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,qBAAqB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -30,7 +30,7 @@ export { PUNCTUATORS, RESERVED_WORDS } from './tokens/index.js';
|
|
|
30
30
|
export { ARITHMETIC_OPERATORS, ASSIGNMENT_OPERATORS, COMPARISON_OPERATORS, EQUALITY_OPERATORS, LOGICAL_OPERATORS, OBJECT_TYPE_NAMES, UNARY_OPERATORS, VALUE_TYPE_NAMES, binaryPrecedence, childrenOf, isExpression, isObjectTypeName, isStatement, isTypeAnnotation, isValueTypeName, makeNode, nodeAtOffset, pathAtOffset, typeAnnotationText, walk, withoutGrouping, } from './ast/index.js';
|
|
31
31
|
export { lex } from './lex/index.js';
|
|
32
32
|
export { parse, parseTokens } from './parse/index.js';
|
|
33
|
-
export { BAR_ZERO, HANDLE_KINDS, NAMESPACES, OBJECT_KINDS, STRATEGY_NAMESPACES, VALUE_KINDS, accepts, allOf, arrayOf, atBar, atLeastBar, check, delayed, earlier, elementOf, isLibraryName, isNamespace, isNever, isSeries, join, later, libraryEntries, libraryNames, membersOf, sameType, seriesOf, typeText, } from './check/index.js';
|
|
33
|
+
export { BAR_ZERO, HANDLE_KINDS, NAMESPACES, OBJECT_KINDS, STRATEGY_NAMESPACES, VALUE_KINDS, accepts, allOf, arrayOf, atBar, atLeastBar, check, delayed, describedNames, earlier, elementOf, isLibraryName, isNamespace, isNever, isSeries, join, later, libraryEntries, libraryNames, membersOf, sameType, seriesOf, proseFor, typeText, } from './check/index.js';
|
|
34
34
|
export { REQUEST_NAMES } from './check/index.js';
|
|
35
35
|
export { COMPILED_FORMAT_VERSION, VERSION } from './version/index.js';
|
|
36
36
|
/**
|
|
@@ -46,6 +46,17 @@ export { COMPILED_FORMAT_VERSION, VERSION } from './version/index.js';
|
|
|
46
46
|
*/
|
|
47
47
|
export { emit } from './emit/index.js';
|
|
48
48
|
export { canonicalise, programHash, sourceHash } from './emit/index.js';
|
|
49
|
+
/**
|
|
50
|
+
* Two answers the emitter holds that a tool built on the language needs.
|
|
51
|
+
*
|
|
52
|
+
* A declaration call's defaults and the channels a colour name denotes are both
|
|
53
|
+
* facts the compiler applies and neither is in the library manifest, so a tier
|
|
54
|
+
* above this one that read the manifest alone would show a writer nothing where
|
|
55
|
+
* the compiler has a value. They are here rather than reached for behind the
|
|
56
|
+
* emitter's door, and `scripts/check-defaults.mjs` holds the first of them to
|
|
57
|
+
* what `stdlib.md` prints.
|
|
58
|
+
*/
|
|
59
|
+
export { DECLARATION_CALLS, declarationDefaultText, namedColour } from './emit/index.js';
|
|
49
60
|
/**
|
|
50
61
|
* The engine: a program in, one bar at a time, values out.
|
|
51
62
|
*
|
|
@@ -62,4 +73,9 @@ export { load } from './engine/index.js';
|
|
|
62
73
|
export { DEFAULT_LIMITS } from './engine/index.js';
|
|
63
74
|
export { isAbsent } from './engine/index.js';
|
|
64
75
|
export { LANGUAGE_VERSIONS, capabilitiesFor, verify } from './engine/index.js';
|
|
76
|
+
export { chargeFor, scheduleFromDeclaration, scheduleProblem } from './accounting/index.js';
|
|
77
|
+
export { markersOf, monthlyOver, reportOf } from './accounting/index.js';
|
|
78
|
+
export { tradesOf } from './accounting/index.js';
|
|
79
|
+
export { equityOver, summaryOf } from './accounting/index.js';
|
|
80
|
+
export { DEFAULT_FILL, EXACT, WHOLE_RANGE, RECORD_VERSION, backtest, barsHash, checkSettings, compareRuns, recordFromJson, recordToJson, recordOf, replay, rerun, runBytes, settingsFor, windowFor, } from './backtest/index.js';
|
|
65
81
|
//# sourceMappingURL=index.js.map
|
package/dist/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAUhE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAE/E,OAAO,EAA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AE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAmC/E,OAAO,EAAE,SAAS,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,KAAK,EACL,WAAW,EACX,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAW,EACX,SAAS,GACV,MAAM,qBAAqB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// VERSION comes from package.json and COMPILED_FORMAT_VERSION from
|
|
4
4
|
// spec/compiled-program.md, so neither can drift from the thing it names.
|
|
5
5
|
/** This build's package version. The release refuses to publish unless the tag, the manifest and this agree. */
|
|
6
|
-
export const VERSION = "0.
|
|
6
|
+
export const VERSION = "0.4.0";
|
|
7
7
|
/**
|
|
8
8
|
* The compiled program format this compiler emits.
|
|
9
9
|
*
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Span } from '../core/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* What a completion is, which decides the icon a host puts beside it.
|
|
4
|
+
*
|
|
5
|
+
* `value` is a library name read without brackets, `close` and `aqua` among
|
|
6
|
+
* them; `function` is one that is called. The two are the manifest's own
|
|
7
|
+
* `callable`, not a guess from the spelling.
|
|
8
|
+
*/
|
|
9
|
+
export type CompletionKind = 'function' | 'value' | 'namespace' | 'member' | 'variable' | 'argument';
|
|
10
|
+
export interface Completion {
|
|
11
|
+
/** What the row reads as: the name, or the parameter for a named argument. */
|
|
12
|
+
readonly label: string;
|
|
13
|
+
/**
|
|
14
|
+
* What a host puts into the text, which is not always the label.
|
|
15
|
+
*
|
|
16
|
+
* A named argument is written `len = `, so accepting the row leaves the caret
|
|
17
|
+
* where the value goes rather than beside a label with no equals sign.
|
|
18
|
+
*/
|
|
19
|
+
readonly insert: string;
|
|
20
|
+
readonly kind: CompletionKind;
|
|
21
|
+
/** The signature or the type, spelled by the manifest and the checker. */
|
|
22
|
+
readonly detail: string;
|
|
23
|
+
/** The line the specification gives it, where it gives one. */
|
|
24
|
+
readonly summary: string | undefined;
|
|
25
|
+
/** Named in the library and not implemented in this version: OS2020. */
|
|
26
|
+
readonly planned: boolean;
|
|
27
|
+
/** The catalogue's OS2020 message for this name, on a planned row and no other. */
|
|
28
|
+
readonly refusal: string | undefined;
|
|
29
|
+
/** The text the row replaces, which is the word being typed or nothing. */
|
|
30
|
+
readonly replace: Span;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Everything that may be written at an offset, most useful first.
|
|
34
|
+
*
|
|
35
|
+
* Rows are filtered by the word already typed, which is compared exactly:
|
|
36
|
+
* `language.md` makes names case sensitive, so `EM` is not a start of `ema` and
|
|
37
|
+
* offering it would be offering a name that does not compile.
|
|
38
|
+
*/
|
|
39
|
+
export declare function complete(source: string, offset: number): readonly Completion[];
|
|
40
|
+
//# sourceMappingURL=complete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete.d.ts","sourceRoot":"","sources":["../../src/editor/complete.ts"],"names":[],"mappings":"AAkDA,OAAO,KAAK,EAAyB,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAMpE;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,OAAO,GACP,WAAW,GACX,QAAQ,GACR,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,WAAW,UAAU;IACzB,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,0EAA0E;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,wEAAwE;IACxE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,2EAA2E;IAC3E,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;CACxB;AA8FD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,UAAU,EAAE,CAwE9E"}
|