openalgo-script 0.1.0-alpha.0 → 0.2.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 +1249 -0
- package/README.md +288 -255
- package/dist/adapters/charts/alerts.d.ts +70 -0
- package/dist/adapters/charts/alerts.d.ts.map +1 -0
- package/dist/adapters/charts/alerts.js +52 -0
- package/dist/adapters/charts/alerts.js.map +1 -0
- package/dist/adapters/charts/bars.d.ts +39 -0
- package/dist/adapters/charts/bars.d.ts.map +1 -0
- package/dist/adapters/charts/bars.js +32 -0
- package/dist/adapters/charts/bars.js.map +1 -0
- package/dist/adapters/charts/candles.d.ts +40 -0
- package/dist/adapters/charts/candles.d.ts.map +1 -0
- package/dist/adapters/charts/candles.js +85 -0
- package/dist/adapters/charts/candles.js.map +1 -0
- package/dist/adapters/charts/colours.d.ts +47 -0
- package/dist/adapters/charts/colours.d.ts.map +1 -0
- package/dist/adapters/charts/colours.js +80 -0
- package/dist/adapters/charts/colours.js.map +1 -0
- package/dist/adapters/charts/columns.d.ts +37 -0
- package/dist/adapters/charts/columns.d.ts.map +1 -0
- package/dist/adapters/charts/columns.js +56 -0
- package/dist/adapters/charts/columns.js.map +1 -0
- package/dist/adapters/charts/contract.d.ts +278 -0
- package/dist/adapters/charts/contract.d.ts.map +1 -0
- package/dist/adapters/charts/contract.js +2 -0
- package/dist/adapters/charts/contract.js.map +1 -0
- package/dist/adapters/charts/descriptor.d.ts +48 -0
- package/dist/adapters/charts/descriptor.d.ts.map +1 -0
- package/dist/adapters/charts/descriptor.js +111 -0
- package/dist/adapters/charts/descriptor.js.map +1 -0
- package/dist/adapters/charts/drawings.d.ts +43 -0
- package/dist/adapters/charts/drawings.d.ts.map +1 -0
- package/dist/adapters/charts/drawings.js +172 -0
- package/dist/adapters/charts/drawings.js.map +1 -0
- package/dist/adapters/charts/errors.d.ts +28 -0
- package/dist/adapters/charts/errors.d.ts.map +1 -0
- package/dist/adapters/charts/errors.js +21 -0
- package/dist/adapters/charts/errors.js.map +1 -0
- package/dist/adapters/charts/fields.d.ts +33 -0
- package/dist/adapters/charts/fields.d.ts.map +1 -0
- package/dist/adapters/charts/fields.js +51 -0
- package/dist/adapters/charts/fields.js.map +1 -0
- package/dist/adapters/charts/fills.d.ts +23 -0
- package/dist/adapters/charts/fills.d.ts.map +1 -0
- package/dist/adapters/charts/fills.js +48 -0
- package/dist/adapters/charts/fills.js.map +1 -0
- package/dist/adapters/charts/index.d.ts +37 -0
- package/dist/adapters/charts/index.d.ts.map +1 -0
- package/dist/adapters/charts/index.js +33 -0
- package/dist/adapters/charts/index.js.map +1 -0
- package/dist/adapters/charts/levels.d.ts +39 -0
- package/dist/adapters/charts/levels.d.ts.map +1 -0
- package/dist/adapters/charts/levels.js +61 -0
- package/dist/adapters/charts/levels.js.map +1 -0
- package/dist/adapters/charts/markers.d.ts +41 -0
- package/dist/adapters/charts/markers.d.ts.map +1 -0
- package/dist/adapters/charts/markers.js +75 -0
- package/dist/adapters/charts/markers.js.map +1 -0
- package/dist/adapters/charts/paint.d.ts +61 -0
- package/dist/adapters/charts/paint.d.ts.map +1 -0
- package/dist/adapters/charts/paint.js +47 -0
- package/dist/adapters/charts/paint.js.map +1 -0
- package/dist/adapters/charts/plots.d.ts +39 -0
- package/dist/adapters/charts/plots.d.ts.map +1 -0
- package/dist/adapters/charts/plots.js +117 -0
- package/dist/adapters/charts/plots.js.map +1 -0
- package/dist/adapters/charts/produced.d.ts +57 -0
- package/dist/adapters/charts/produced.d.ts.map +1 -0
- package/dist/adapters/charts/produced.js +11 -0
- package/dist/adapters/charts/produced.js.map +1 -0
- package/dist/adapters/charts/requests.d.ts +114 -0
- package/dist/adapters/charts/requests.d.ts.map +1 -0
- package/dist/adapters/charts/requests.js +277 -0
- package/dist/adapters/charts/requests.js.map +1 -0
- package/dist/adapters/charts/run.d.ts +147 -0
- package/dist/adapters/charts/run.d.ts.map +1 -0
- package/dist/adapters/charts/run.js +148 -0
- package/dist/adapters/charts/run.js.map +1 -0
- package/dist/adapters/charts/settings.d.ts +78 -0
- package/dist/adapters/charts/settings.d.ts.map +1 -0
- package/dist/adapters/charts/settings.js +225 -0
- package/dist/adapters/charts/settings.js.map +1 -0
- package/dist/adapters/charts/surfaces.d.ts +204 -0
- package/dist/adapters/charts/surfaces.d.ts.map +1 -0
- package/dist/adapters/charts/surfaces.js +2 -0
- package/dist/adapters/charts/surfaces.js.map +1 -0
- package/dist/adapters/charts/tables.d.ts +65 -0
- package/dist/adapters/charts/tables.d.ts.map +1 -0
- package/dist/adapters/charts/tables.js +84 -0
- package/dist/adapters/charts/tables.js.map +1 -0
- package/dist/core/catalogue/catalogue.generated.d.ts +98 -10
- package/dist/core/catalogue/catalogue.generated.d.ts.map +1 -1
- package/dist/core/catalogue/catalogue.generated.js +17 -9
- package/dist/core/catalogue/catalogue.generated.js.map +1 -1
- package/dist/core/catalogue/values.generated.d.ts +25 -0
- package/dist/core/catalogue/values.generated.d.ts.map +1 -1
- package/dist/core/check/arguments.d.ts +41 -0
- package/dist/core/check/arguments.d.ts.map +1 -0
- package/dist/core/check/arguments.js +84 -0
- package/dist/core/check/arguments.js.map +1 -0
- package/dist/core/check/call-sites.d.ts +22 -0
- package/dist/core/check/call-sites.d.ts.map +1 -0
- package/dist/core/check/call-sites.js +329 -0
- package/dist/core/check/call-sites.js.map +1 -0
- package/dist/core/check/call-warmup.d.ts +37 -0
- package/dist/core/check/call-warmup.d.ts.map +1 -0
- package/dist/core/check/call-warmup.js +97 -0
- package/dist/core/check/call-warmup.js.map +1 -0
- package/dist/core/check/calls.d.ts +33 -0
- package/dist/core/check/calls.d.ts.map +1 -0
- package/dist/core/check/calls.js +348 -0
- package/dist/core/check/calls.js.map +1 -0
- package/dist/core/check/check.d.ts +23 -0
- package/dist/core/check/check.d.ts.map +1 -0
- package/dist/core/check/check.js +163 -0
- package/dist/core/check/check.js.map +1 -0
- package/dist/core/check/checked.d.ts +198 -0
- package/dist/core/check/checked.d.ts.map +1 -0
- package/dist/core/check/checked.js +19 -0
- package/dist/core/check/checked.js.map +1 -0
- package/dist/core/check/checker.d.ts +182 -0
- package/dist/core/check/checker.d.ts.map +1 -0
- package/dist/core/check/checker.js +280 -0
- package/dist/core/check/checker.js.map +1 -0
- package/dist/core/check/conditional.d.ts +35 -0
- package/dist/core/check/conditional.d.ts.map +1 -0
- package/dist/core/check/conditional.js +100 -0
- package/dist/core/check/conditional.js.map +1 -0
- package/dist/core/check/constant.d.ts +47 -0
- package/dist/core/check/constant.d.ts.map +1 -0
- package/dist/core/check/constant.js +101 -0
- package/dist/core/check/constant.js.map +1 -0
- package/dist/core/check/declaration.d.ts +33 -0
- package/dist/core/check/declaration.d.ts.map +1 -0
- package/dist/core/check/declaration.js +181 -0
- package/dist/core/check/declaration.js.map +1 -0
- package/dist/core/check/expressions.d.ts +36 -0
- package/dist/core/check/expressions.d.ts.map +1 -0
- package/dist/core/check/expressions.js +398 -0
- package/dist/core/check/expressions.js.map +1 -0
- package/dist/core/check/functions.d.ts +31 -0
- package/dist/core/check/functions.d.ts.map +1 -0
- package/dist/core/check/functions.js +238 -0
- package/dist/core/check/functions.js.map +1 -0
- package/dist/core/check/handles.d.ts +48 -0
- package/dist/core/check/handles.d.ts.map +1 -0
- package/dist/core/check/handles.js +43 -0
- package/dist/core/check/handles.js.map +1 -0
- package/dist/core/check/index.d.ts +30 -0
- package/dist/core/check/index.d.ts.map +1 -0
- package/dist/core/check/index.js +26 -0
- package/dist/core/check/index.js.map +1 -0
- package/dist/core/check/library-bars.d.ts +7 -0
- package/dist/core/check/library-bars.d.ts.map +1 -0
- package/dist/core/check/library-bars.js +181 -0
- package/dist/core/check/library-bars.js.map +1 -0
- package/dist/core/check/library-orders.d.ts +5 -0
- package/dist/core/check/library-orders.d.ts.map +1 -0
- package/dist/core/check/library-orders.js +250 -0
- package/dist/core/check/library-orders.js.map +1 -0
- package/dist/core/check/library-output.d.ts +7 -0
- package/dist/core/check/library-output.d.ts.map +1 -0
- package/dist/core/check/library-output.js +195 -0
- package/dist/core/check/library-output.js.map +1 -0
- package/dist/core/check/library-series.d.ts +3 -0
- package/dist/core/check/library-series.d.ts.map +1 -0
- package/dist/core/check/library-series.js +415 -0
- package/dist/core/check/library-series.js.map +1 -0
- package/dist/core/check/library.d.ts +204 -0
- package/dist/core/check/library.d.ts.map +1 -0
- package/dist/core/check/library.js +198 -0
- package/dist/core/check/library.js.map +1 -0
- package/dist/core/check/literals.d.ts +19 -0
- package/dist/core/check/literals.d.ts.map +1 -0
- package/dist/core/check/literals.js +22 -0
- package/dist/core/check/literals.js.map +1 -0
- package/dist/core/check/outputs.d.ts +31 -0
- package/dist/core/check/outputs.d.ts.map +1 -0
- package/dist/core/check/outputs.js +113 -0
- package/dist/core/check/outputs.js.map +1 -0
- package/dist/core/check/statements.d.ts +25 -0
- package/dist/core/check/statements.d.ts.map +1 -0
- package/dist/core/check/statements.js +377 -0
- package/dist/core/check/statements.js.map +1 -0
- package/dist/core/check/suggest.d.ts +25 -0
- package/dist/core/check/suggest.d.ts.map +1 -0
- package/dist/core/check/suggest.js +61 -0
- package/dist/core/check/suggest.js.map +1 -0
- package/dist/core/check/surface.d.ts +38 -0
- package/dist/core/check/surface.d.ts.map +1 -0
- package/dist/core/check/surface.js +100 -0
- package/dist/core/check/surface.js.map +1 -0
- package/dist/core/check/tags.d.ts +4 -0
- package/dist/core/check/tags.d.ts.map +1 -0
- package/dist/core/check/tags.js +54 -0
- package/dist/core/check/tags.js.map +1 -0
- package/dist/core/check/types.d.ts +153 -0
- package/dist/core/check/types.d.ts.map +1 -0
- package/dist/core/check/types.js +221 -0
- package/dist/core/check/types.js.map +1 -0
- package/dist/core/check/warmup.d.ts +73 -0
- package/dist/core/check/warmup.d.ts.map +1 -0
- package/dist/core/check/warmup.js +62 -0
- package/dist/core/check/warmup.js.map +1 -0
- package/dist/core/diagnostics/collector.d.ts +12 -0
- package/dist/core/diagnostics/collector.d.ts.map +1 -1
- package/dist/core/diagnostics/collector.js +27 -1
- package/dist/core/diagnostics/collector.js.map +1 -1
- package/dist/core/emit/calls.d.ts +38 -0
- package/dist/core/emit/calls.d.ts.map +1 -0
- package/dist/core/emit/calls.js +347 -0
- package/dist/core/emit/calls.js.map +1 -0
- package/dist/core/emit/canonical.d.ts +39 -0
- package/dist/core/emit/canonical.d.ts.map +1 -0
- package/dist/core/emit/canonical.js +71 -0
- package/dist/core/emit/canonical.js.map +1 -0
- package/dist/core/emit/channels.d.ts +28 -0
- package/dist/core/emit/channels.d.ts.map +1 -0
- package/dist/core/emit/channels.js +110 -0
- package/dist/core/emit/channels.js.map +1 -0
- package/dist/core/emit/code.d.ts +75 -0
- package/dist/core/emit/code.d.ts.map +1 -0
- package/dist/core/emit/code.js +104 -0
- package/dist/core/emit/code.js.map +1 -0
- package/dist/core/emit/colours.d.ts +35 -0
- package/dist/core/emit/colours.d.ts.map +1 -0
- package/dist/core/emit/colours.js +50 -0
- package/dist/core/emit/colours.js.map +1 -0
- package/dist/core/emit/context.d.ts +271 -0
- package/dist/core/emit/context.d.ts.map +1 -0
- package/dist/core/emit/context.js +358 -0
- package/dist/core/emit/context.js.map +1 -0
- package/dist/core/emit/defaults.d.ts +45 -0
- package/dist/core/emit/defaults.d.ts.map +1 -0
- package/dist/core/emit/defaults.js +116 -0
- package/dist/core/emit/defaults.js.map +1 -0
- package/dist/core/emit/emit.d.ts +13 -0
- package/dist/core/emit/emit.d.ts.map +1 -0
- package/dist/core/emit/emit.js +281 -0
- package/dist/core/emit/emit.js.map +1 -0
- package/dist/core/emit/events.d.ts +21 -0
- package/dist/core/emit/events.d.ts.map +1 -0
- package/dist/core/emit/events.js +112 -0
- package/dist/core/emit/events.js.map +1 -0
- package/dist/core/emit/expressions.d.ts +23 -0
- package/dist/core/emit/expressions.d.ts.map +1 -0
- package/dist/core/emit/expressions.js +253 -0
- package/dist/core/emit/expressions.js.map +1 -0
- package/dist/core/emit/functions.d.ts +30 -0
- package/dist/core/emit/functions.d.ts.map +1 -0
- package/dist/core/emit/functions.js +171 -0
- package/dist/core/emit/functions.js.map +1 -0
- package/dist/core/emit/gaps.d.ts +34 -0
- package/dist/core/emit/gaps.d.ts.map +1 -0
- package/dist/core/emit/gaps.js +16 -0
- package/dist/core/emit/gaps.js.map +1 -0
- package/dist/core/emit/index.d.ts +29 -0
- package/dist/core/emit/index.d.ts.map +1 -0
- package/dist/core/emit/index.js +23 -0
- package/dist/core/emit/index.js.map +1 -0
- package/dist/core/emit/inputs.d.ts +47 -0
- package/dist/core/emit/inputs.d.ts.map +1 -0
- package/dist/core/emit/inputs.js +150 -0
- package/dist/core/emit/inputs.js.map +1 -0
- package/dist/core/emit/layout.d.ts +73 -0
- package/dist/core/emit/layout.d.ts.map +1 -0
- package/dist/core/emit/layout.js +126 -0
- package/dist/core/emit/layout.js.map +1 -0
- package/dist/core/emit/meta.d.ts +14 -0
- package/dist/core/emit/meta.d.ts.map +1 -0
- package/dist/core/emit/meta.js +68 -0
- package/dist/core/emit/meta.js.map +1 -0
- package/dist/core/emit/opcodes.d.ts +28 -0
- package/dist/core/emit/opcodes.d.ts.map +1 -0
- package/dist/core/emit/opcodes.js +137 -0
- package/dist/core/emit/opcodes.js.map +1 -0
- package/dist/core/emit/outputs.d.ts +67 -0
- package/dist/core/emit/outputs.d.ts.map +1 -0
- package/dist/core/emit/outputs.js +293 -0
- package/dist/core/emit/outputs.js.map +1 -0
- package/dist/core/emit/pool.d.ts +33 -0
- package/dist/core/emit/pool.d.ts.map +1 -0
- package/dist/core/emit/pool.js +79 -0
- package/dist/core/emit/pool.js.map +1 -0
- package/dist/core/emit/program.d.ts +333 -0
- package/dist/core/emit/program.d.ts.map +1 -0
- package/dist/core/emit/program.js +15 -0
- package/dist/core/emit/program.js.map +1 -0
- package/dist/core/emit/registers.d.ts +35 -0
- package/dist/core/emit/registers.d.ts.map +1 -0
- package/dist/core/emit/registers.js +170 -0
- package/dist/core/emit/registers.js.map +1 -0
- package/dist/core/emit/request-scope.d.ts +36 -0
- package/dist/core/emit/request-scope.d.ts.map +1 -0
- package/dist/core/emit/request-scope.js +41 -0
- package/dist/core/emit/request-scope.js.map +1 -0
- package/dist/core/emit/requests.d.ts +69 -0
- package/dist/core/emit/requests.d.ts.map +1 -0
- package/dist/core/emit/requests.js +230 -0
- package/dist/core/emit/requests.js.map +1 -0
- package/dist/core/emit/requires.d.ts +4 -0
- package/dist/core/emit/requires.d.ts.map +1 -0
- package/dist/core/emit/requires.js +71 -0
- package/dist/core/emit/requires.js.map +1 -0
- package/dist/core/emit/sha256.d.ts +24 -0
- package/dist/core/emit/sha256.d.ts.map +1 -0
- package/dist/core/emit/sha256.js +109 -0
- package/dist/core/emit/sha256.js.map +1 -0
- package/dist/core/emit/statements.d.ts +20 -0
- package/dist/core/emit/statements.d.ts.map +1 -0
- package/dist/core/emit/statements.js +393 -0
- package/dist/core/emit/statements.js.map +1 -0
- package/dist/core/emit/values.d.ts +80 -0
- package/dist/core/emit/values.d.ts.map +1 -0
- package/dist/core/emit/values.js +242 -0
- package/dist/core/emit/values.js.map +1 -0
- package/dist/core/engine/alerts.d.ts +66 -0
- package/dist/core/engine/alerts.d.ts.map +1 -0
- package/dist/core/engine/alerts.js +119 -0
- package/dist/core/engine/alerts.js.map +1 -0
- package/dist/core/engine/arithmetic.d.ts +82 -0
- package/dist/core/engine/arithmetic.d.ts.map +1 -0
- package/dist/core/engine/arithmetic.js +141 -0
- package/dist/core/engine/arithmetic.js.map +1 -0
- package/dist/core/engine/bars.d.ts +95 -0
- package/dist/core/engine/bars.d.ts.map +1 -0
- package/dist/core/engine/bars.js +133 -0
- package/dist/core/engine/bars.js.map +1 -0
- package/dist/core/engine/budget.d.ts +162 -0
- package/dist/core/engine/budget.d.ts.map +1 -0
- package/dist/core/engine/budget.js +188 -0
- package/dist/core/engine/budget.js.map +1 -0
- package/dist/core/engine/channels.d.ts +106 -0
- package/dist/core/engine/channels.d.ts.map +1 -0
- package/dist/core/engine/channels.js +99 -0
- package/dist/core/engine/channels.js.map +1 -0
- package/dist/core/engine/drawings.d.ts +64 -0
- package/dist/core/engine/drawings.d.ts.map +1 -0
- package/dist/core/engine/drawings.js +67 -0
- package/dist/core/engine/drawings.js.map +1 -0
- package/dist/core/engine/engine.d.ts +140 -0
- package/dist/core/engine/engine.d.ts.map +1 -0
- package/dist/core/engine/engine.js +405 -0
- package/dist/core/engine/engine.js.map +1 -0
- package/dist/core/engine/errors.d.ts +64 -0
- package/dist/core/engine/errors.d.ts.map +1 -0
- package/dist/core/engine/errors.js +63 -0
- package/dist/core/engine/errors.js.map +1 -0
- package/dist/core/engine/frames.d.ts +48 -0
- package/dist/core/engine/frames.d.ts.map +1 -0
- package/dist/core/engine/frames.js +41 -0
- package/dist/core/engine/frames.js.map +1 -0
- package/dist/core/engine/grids.d.ts +25 -0
- package/dist/core/engine/grids.d.ts.map +1 -0
- package/dist/core/engine/grids.js +77 -0
- package/dist/core/engine/grids.js.map +1 -0
- package/dist/core/engine/guard.d.ts +4 -0
- package/dist/core/engine/guard.d.ts.map +1 -0
- package/dist/core/engine/guard.js +46 -0
- package/dist/core/engine/guard.js.map +1 -0
- package/dist/core/engine/host.d.ts +219 -0
- package/dist/core/engine/host.d.ts.map +1 -0
- package/dist/core/engine/host.js +38 -0
- package/dist/core/engine/host.js.map +1 -0
- package/dist/core/engine/index.d.ts +49 -0
- package/dist/core/engine/index.d.ts.map +1 -0
- package/dist/core/engine/index.js +33 -0
- package/dist/core/engine/index.js.map +1 -0
- package/dist/core/engine/inputs.d.ts +77 -0
- package/dist/core/engine/inputs.d.ts.map +1 -0
- package/dist/core/engine/inputs.js +205 -0
- package/dist/core/engine/inputs.js.map +1 -0
- package/dist/core/engine/ledger/call.d.ts +63 -0
- package/dist/core/engine/ledger/call.d.ts.map +1 -0
- package/dist/core/engine/ledger/call.js +136 -0
- package/dist/core/engine/ledger/call.js.map +1 -0
- package/dist/core/engine/ledger/closable.d.ts +155 -0
- package/dist/core/engine/ledger/closable.d.ts.map +1 -0
- package/dist/core/engine/ledger/closable.js +173 -0
- package/dist/core/engine/ledger/closable.js.map +1 -0
- package/dist/core/engine/ledger/holdings.d.ts +194 -0
- package/dist/core/engine/ledger/holdings.d.ts.map +1 -0
- package/dist/core/engine/ledger/holdings.js +237 -0
- package/dist/core/engine/ledger/holdings.js.map +1 -0
- package/dist/core/engine/ledger/index.d.ts +19 -0
- package/dist/core/engine/ledger/index.d.ts.map +1 -0
- package/dist/core/engine/ledger/index.js +2 -0
- package/dist/core/engine/ledger/index.js.map +1 -0
- package/dist/core/engine/ledger/intent.d.ts +106 -0
- package/dist/core/engine/ledger/intent.d.ts.map +1 -0
- package/dist/core/engine/ledger/intent.js +21 -0
- package/dist/core/engine/ledger/intent.js.map +1 -0
- package/dist/core/engine/ledger/ledger.d.ts +143 -0
- package/dist/core/engine/ledger/ledger.d.ts.map +1 -0
- package/dist/core/engine/ledger/ledger.js +237 -0
- package/dist/core/engine/ledger/ledger.js.map +1 -0
- package/dist/core/engine/ledger/place.d.ts +75 -0
- package/dist/core/engine/ledger/place.d.ts.map +1 -0
- package/dist/core/engine/ledger/place.js +174 -0
- package/dist/core/engine/ledger/place.js.map +1 -0
- package/dist/core/engine/ledger/positions.d.ts +68 -0
- package/dist/core/engine/ledger/positions.d.ts.map +1 -0
- package/dist/core/engine/ledger/positions.js +114 -0
- package/dist/core/engine/ledger/positions.js.map +1 -0
- package/dist/core/engine/ledger/refuse.d.ts +43 -0
- package/dist/core/engine/ledger/refuse.d.ts.map +1 -0
- package/dist/core/engine/ledger/refuse.js +329 -0
- package/dist/core/engine/ledger/refuse.js.map +1 -0
- package/dist/core/engine/ledger/row.d.ts +176 -0
- package/dist/core/engine/ledger/row.d.ts.map +1 -0
- package/dist/core/engine/ledger/row.js +169 -0
- package/dist/core/engine/ledger/row.js.map +1 -0
- package/dist/core/engine/ledger/sizing.d.ts +142 -0
- package/dist/core/engine/ledger/sizing.d.ts.map +1 -0
- package/dist/core/engine/ledger/sizing.js +223 -0
- package/dist/core/engine/ledger/sizing.js.map +1 -0
- package/dist/core/engine/library/arrays.d.ts +14 -0
- package/dist/core/engine/library/arrays.d.ts.map +1 -0
- package/dist/core/engine/library/arrays.js +285 -0
- package/dist/core/engine/library/arrays.js.map +1 -0
- package/dist/core/engine/library/averages.d.ts +9 -0
- package/dist/core/engine/library/averages.d.ts.map +1 -0
- package/dist/core/engine/library/averages.js +41 -0
- package/dist/core/engine/library/averages.js.map +1 -0
- package/dist/core/engine/library/binding.d.ts +230 -0
- package/dist/core/engine/library/binding.d.ts.map +1 -0
- package/dist/core/engine/library/binding.js +109 -0
- package/dist/core/engine/library/binding.js.map +1 -0
- package/dist/core/engine/library/chart.d.ts +3 -0
- package/dist/core/engine/library/chart.d.ts.map +1 -0
- package/dist/core/engine/library/chart.js +83 -0
- package/dist/core/engine/library/chart.js.map +1 -0
- package/dist/core/engine/library/colours.d.ts +26 -0
- package/dist/core/engine/library/colours.d.ts.map +1 -0
- package/dist/core/engine/library/colours.js +81 -0
- package/dist/core/engine/library/colours.js.map +1 -0
- package/dist/core/engine/library/dates.d.ts +3 -0
- package/dist/core/engine/library/dates.d.ts.map +1 -0
- package/dist/core/engine/library/dates.js +75 -0
- package/dist/core/engine/library/dates.js.map +1 -0
- package/dist/core/engine/library/index.d.ts +13 -0
- package/dist/core/engine/library/index.d.ts.map +1 -0
- package/dist/core/engine/library/index.js +86 -0
- package/dist/core/engine/library/index.js.map +1 -0
- package/dist/core/engine/library/maths.d.ts +3 -0
- package/dist/core/engine/library/maths.d.ts.map +1 -0
- package/dist/core/engine/library/maths.js +89 -0
- package/dist/core/engine/library/maths.js.map +1 -0
- package/dist/core/engine/library/objects.d.ts +3 -0
- package/dist/core/engine/library/objects.d.ts.map +1 -0
- package/dist/core/engine/library/objects.js +199 -0
- package/dist/core/engine/library/objects.js.map +1 -0
- package/dist/core/engine/library/oscillators.d.ts +3 -0
- package/dist/core/engine/library/oscillators.d.ts.map +1 -0
- package/dist/core/engine/library/oscillators.js +29 -0
- package/dist/core/engine/library/oscillators.js.map +1 -0
- package/dist/core/engine/library/ranges.d.ts +3 -0
- package/dist/core/engine/library/ranges.d.ts.map +1 -0
- package/dist/core/engine/library/ranges.js +23 -0
- package/dist/core/engine/library/ranges.js.map +1 -0
- package/dist/core/engine/library/series.d.ts +3 -0
- package/dist/core/engine/library/series.d.ts.map +1 -0
- package/dist/core/engine/library/series.js +46 -0
- package/dist/core/engine/library/series.js.map +1 -0
- package/dist/core/engine/library/state.d.ts +35 -0
- package/dist/core/engine/library/state.d.ts.map +1 -0
- package/dist/core/engine/library/state.js +19 -0
- package/dist/core/engine/library/state.js.map +1 -0
- package/dist/core/engine/library/studies.d.ts +3 -0
- package/dist/core/engine/library/studies.d.ts.map +1 -0
- package/dist/core/engine/library/studies.js +35 -0
- package/dist/core/engine/library/studies.js.map +1 -0
- package/dist/core/engine/library/text.d.ts +6 -0
- package/dist/core/engine/library/text.d.ts.map +1 -0
- package/dist/core/engine/library/text.js +280 -0
- package/dist/core/engine/library/text.js.map +1 -0
- package/dist/core/engine/library/trend.d.ts +3 -0
- package/dist/core/engine/library/trend.d.ts.map +1 -0
- package/dist/core/engine/library/trend.js +29 -0
- package/dist/core/engine/library/trend.js.map +1 -0
- package/dist/core/engine/library/volume.d.ts +3 -0
- package/dist/core/engine/library/volume.d.ts.map +1 -0
- package/dist/core/engine/library/volume.js +51 -0
- package/dist/core/engine/library/volume.js.map +1 -0
- package/dist/core/engine/load.d.ts +45 -0
- package/dist/core/engine/load.d.ts.map +1 -0
- package/dist/core/engine/load.js +60 -0
- package/dist/core/engine/load.js.map +1 -0
- package/dist/core/engine/machine.d.ts +107 -0
- package/dist/core/engine/machine.d.ts.map +1 -0
- package/dist/core/engine/machine.js +337 -0
- package/dist/core/engine/machine.js.map +1 -0
- package/dist/core/engine/memory.d.ts +60 -0
- package/dist/core/engine/memory.d.ts.map +1 -0
- package/dist/core/engine/memory.js +92 -0
- package/dist/core/engine/memory.js.map +1 -0
- package/dist/core/engine/operations.d.ts +62 -0
- package/dist/core/engine/operations.d.ts.map +1 -0
- package/dist/core/engine/operations.js +149 -0
- package/dist/core/engine/operations.js.map +1 -0
- package/dist/core/engine/orders.d.ts +56 -0
- package/dist/core/engine/orders.d.ts.map +1 -0
- package/dist/core/engine/orders.js +83 -0
- package/dist/core/engine/orders.js.map +1 -0
- package/dist/core/engine/registers.d.ts +50 -0
- package/dist/core/engine/registers.d.ts.map +1 -0
- package/dist/core/engine/registers.js +85 -0
- package/dist/core/engine/registers.js.map +1 -0
- package/dist/core/engine/request-body.d.ts +138 -0
- package/dist/core/engine/request-body.d.ts.map +1 -0
- package/dist/core/engine/request-body.js +227 -0
- package/dist/core/engine/request-body.js.map +1 -0
- package/dist/core/engine/request-plan.d.ts +79 -0
- package/dist/core/engine/request-plan.d.ts.map +1 -0
- package/dist/core/engine/request-plan.js +228 -0
- package/dist/core/engine/request-plan.js.map +1 -0
- package/dist/core/engine/requests.d.ts +105 -0
- package/dist/core/engine/requests.d.ts.map +1 -0
- package/dist/core/engine/requests.js +260 -0
- package/dist/core/engine/requests.js.map +1 -0
- package/dist/core/engine/results.d.ts +40 -0
- package/dist/core/engine/results.d.ts.map +1 -0
- package/dist/core/engine/results.js +2 -0
- package/dist/core/engine/results.js.map +1 -0
- package/dist/core/engine/series.d.ts +61 -0
- package/dist/core/engine/series.d.ts.map +1 -0
- package/dist/core/engine/series.js +41 -0
- package/dist/core/engine/series.js.map +1 -0
- package/dist/core/engine/session/hours.d.ts +49 -0
- package/dist/core/engine/session/hours.d.ts.map +1 -0
- package/dist/core/engine/session/hours.js +31 -0
- package/dist/core/engine/session/hours.js.map +1 -0
- package/dist/core/engine/session/index.d.ts +17 -0
- package/dist/core/engine/session/index.d.ts.map +1 -0
- package/dist/core/engine/session/index.js +3 -0
- package/dist/core/engine/session/index.js.map +1 -0
- package/dist/core/engine/session/record.d.ts +56 -0
- package/dist/core/engine/session/record.d.ts.map +1 -0
- package/dist/core/engine/session/record.js +165 -0
- package/dist/core/engine/session/record.js.map +1 -0
- package/dist/core/engine/session/spec.d.ts +19 -0
- package/dist/core/engine/session/spec.d.ts.map +1 -0
- package/dist/core/engine/session/spec.js +31 -0
- package/dist/core/engine/session/spec.js.map +1 -0
- package/dist/core/engine/timeframe.d.ts +59 -0
- package/dist/core/engine/timeframe.d.ts.map +1 -0
- package/dist/core/engine/timeframe.js +140 -0
- package/dist/core/engine/timeframe.js.map +1 -0
- package/dist/core/engine/types.d.ts +15 -0
- package/dist/core/engine/types.d.ts.map +1 -0
- package/dist/core/engine/types.js +2 -0
- package/dist/core/engine/types.js.map +1 -0
- package/dist/core/engine/values/heap.d.ts +134 -0
- package/dist/core/engine/values/heap.d.ts.map +1 -0
- package/dist/core/engine/values/heap.js +230 -0
- package/dist/core/engine/values/heap.js.map +1 -0
- package/dist/core/engine/values/index.d.ts +13 -0
- package/dist/core/engine/values/index.d.ts.map +1 -0
- package/dist/core/engine/values/index.js +3 -0
- package/dist/core/engine/values/index.js.map +1 -0
- package/dist/core/engine/values/value.d.ts +82 -0
- package/dist/core/engine/values/value.d.ts.map +1 -0
- package/dist/core/engine/values/value.js +134 -0
- package/dist/core/engine/values/value.js.map +1 -0
- package/dist/core/engine/verify-budgets.d.ts +35 -0
- package/dist/core/engine/verify-budgets.d.ts.map +1 -0
- package/dist/core/engine/verify-budgets.js +172 -0
- package/dist/core/engine/verify-budgets.js.map +1 -0
- package/dist/core/engine/verify-code.d.ts +32 -0
- package/dist/core/engine/verify-code.d.ts.map +1 -0
- package/dist/core/engine/verify-code.js +278 -0
- package/dist/core/engine/verify-code.js.map +1 -0
- package/dist/core/engine/verify-requests.d.ts +44 -0
- package/dist/core/engine/verify-requests.d.ts.map +1 -0
- package/dist/core/engine/verify-requests.js +220 -0
- package/dist/core/engine/verify-requests.js.map +1 -0
- package/dist/core/engine/verify-shape.d.ts +46 -0
- package/dist/core/engine/verify-shape.d.ts.map +1 -0
- package/dist/core/engine/verify-shape.js +147 -0
- package/dist/core/engine/verify-shape.js.map +1 -0
- package/dist/core/engine/verify-tables.d.ts +19 -0
- package/dist/core/engine/verify-tables.d.ts.map +1 -0
- package/dist/core/engine/verify-tables.js +171 -0
- package/dist/core/engine/verify-tables.js.map +1 -0
- package/dist/core/engine/verify.d.ts +19 -0
- package/dist/core/engine/verify.d.ts.map +1 -0
- package/dist/core/engine/verify.js +309 -0
- package/dist/core/engine/verify.js.map +1 -0
- package/dist/core/index.d.ts +62 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +49 -6
- package/dist/core/index.js.map +1 -1
- package/dist/core/parse/expressions.js +1 -1
- package/dist/core/parse/expressions.js.map +1 -1
- package/dist/core/parse/names.d.ts +7 -1
- package/dist/core/parse/names.d.ts.map +1 -1
- package/dist/core/parse/names.js +28 -2
- package/dist/core/parse/names.js.map +1 -1
- package/dist/core/stdlib/averages/exponential.d.ts +51 -0
- package/dist/core/stdlib/averages/exponential.d.ts.map +1 -0
- package/dist/core/stdlib/averages/exponential.js +72 -0
- package/dist/core/stdlib/averages/exponential.js.map +1 -0
- package/dist/core/stdlib/averages/index.d.ts +7 -0
- package/dist/core/stdlib/averages/index.d.ts.map +1 -0
- package/dist/core/stdlib/averages/index.js +5 -0
- package/dist/core/stdlib/averages/index.js.map +1 -0
- package/dist/core/stdlib/averages/select.d.ts +35 -0
- package/dist/core/stdlib/averages/select.d.ts.map +1 -0
- package/dist/core/stdlib/averages/select.js +43 -0
- package/dist/core/stdlib/averages/select.js.map +1 -0
- package/dist/core/stdlib/averages/shaped.d.ts +61 -0
- package/dist/core/stdlib/averages/shaped.d.ts.map +1 -0
- package/dist/core/stdlib/averages/shaped.js +126 -0
- package/dist/core/stdlib/averages/shaped.js.map +1 -0
- package/dist/core/stdlib/averages/simple.d.ts +58 -0
- package/dist/core/stdlib/averages/simple.d.ts.map +1 -0
- package/dist/core/stdlib/averages/simple.js +92 -0
- package/dist/core/stdlib/averages/simple.js.map +1 -0
- package/dist/core/stdlib/calendar/civil.d.ts +56 -0
- package/dist/core/stdlib/calendar/civil.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/civil.js +70 -0
- package/dist/core/stdlib/calendar/civil.js.map +1 -0
- package/dist/core/stdlib/calendar/fields.d.ts +36 -0
- package/dist/core/stdlib/calendar/fields.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/fields.js +93 -0
- package/dist/core/stdlib/calendar/fields.js.map +1 -0
- package/dist/core/stdlib/calendar/format.d.ts +19 -0
- package/dist/core/stdlib/calendar/format.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/format.js +51 -0
- package/dist/core/stdlib/calendar/format.js.map +1 -0
- package/dist/core/stdlib/calendar/index.d.ts +7 -0
- package/dist/core/stdlib/calendar/index.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/index.js +5 -0
- package/dist/core/stdlib/calendar/index.js.map +1 -0
- package/dist/core/stdlib/calendar/zone.d.ts +53 -0
- package/dist/core/stdlib/calendar/zone.d.ts.map +1 -0
- package/dist/core/stdlib/calendar/zone.js +138 -0
- package/dist/core/stdlib/calendar/zone.js.map +1 -0
- package/dist/core/stdlib/index.d.ts +57 -0
- package/dist/core/stdlib/index.d.ts.map +1 -0
- package/dist/core/stdlib/index.js +51 -0
- package/dist/core/stdlib/index.js.map +1 -0
- package/dist/core/stdlib/maths/arithmetic.d.ts +38 -0
- package/dist/core/stdlib/maths/arithmetic.d.ts.map +1 -0
- package/dist/core/stdlib/maths/arithmetic.js +66 -0
- package/dist/core/stdlib/maths/arithmetic.js.map +1 -0
- package/dist/core/stdlib/maths/elementary.d.ts +65 -0
- package/dist/core/stdlib/maths/elementary.d.ts.map +1 -0
- package/dist/core/stdlib/maths/elementary.js +93 -0
- package/dist/core/stdlib/maths/elementary.js.map +1 -0
- package/dist/core/stdlib/maths/index.d.ts +4 -0
- package/dist/core/stdlib/maths/index.d.ts.map +1 -0
- package/dist/core/stdlib/maths/index.js +4 -0
- package/dist/core/stdlib/maths/index.js.map +1 -0
- package/dist/core/stdlib/maths/rounding.d.ts +43 -0
- package/dist/core/stdlib/maths/rounding.d.ts.map +1 -0
- package/dist/core/stdlib/maths/rounding.js +62 -0
- package/dist/core/stdlib/maths/rounding.js.map +1 -0
- package/dist/core/stdlib/momentum/convergence.d.ts +36 -0
- package/dist/core/stdlib/momentum/convergence.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/convergence.js +48 -0
- package/dist/core/stdlib/momentum/convergence.js.map +1 -0
- package/dist/core/stdlib/momentum/index.d.ts +6 -0
- package/dist/core/stdlib/momentum/index.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/index.js +6 -0
- package/dist/core/stdlib/momentum/index.js.map +1 -0
- package/dist/core/stdlib/momentum/pressure.d.ts +43 -0
- package/dist/core/stdlib/momentum/pressure.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/pressure.js +103 -0
- package/dist/core/stdlib/momentum/pressure.js.map +1 -0
- package/dist/core/stdlib/momentum/rates.d.ts +74 -0
- package/dist/core/stdlib/momentum/rates.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/rates.js +134 -0
- package/dist/core/stdlib/momentum/rates.js.map +1 -0
- package/dist/core/stdlib/momentum/rsi.d.ts +21 -0
- package/dist/core/stdlib/momentum/rsi.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/rsi.js +30 -0
- package/dist/core/stdlib/momentum/rsi.js.map +1 -0
- package/dist/core/stdlib/momentum/stochastic.d.ts +44 -0
- package/dist/core/stdlib/momentum/stochastic.d.ts.map +1 -0
- package/dist/core/stdlib/momentum/stochastic.js +97 -0
- package/dist/core/stdlib/momentum/stochastic.js.map +1 -0
- package/dist/core/stdlib/series/changes.d.ts +59 -0
- package/dist/core/stdlib/series/changes.d.ts.map +1 -0
- package/dist/core/stdlib/series/changes.js +129 -0
- package/dist/core/stdlib/series/changes.js.map +1 -0
- package/dist/core/stdlib/series/conditions.d.ts +34 -0
- package/dist/core/stdlib/series/conditions.d.ts.map +1 -0
- package/dist/core/stdlib/series/conditions.js +52 -0
- package/dist/core/stdlib/series/conditions.js.map +1 -0
- package/dist/core/stdlib/series/extremes.d.ts +29 -0
- package/dist/core/stdlib/series/extremes.d.ts.map +1 -0
- package/dist/core/stdlib/series/extremes.js +62 -0
- package/dist/core/stdlib/series/extremes.js.map +1 -0
- package/dist/core/stdlib/series/index.d.ts +9 -0
- package/dist/core/stdlib/series/index.d.ts.map +1 -0
- package/dist/core/stdlib/series/index.js +7 -0
- package/dist/core/stdlib/series/index.js.map +1 -0
- package/dist/core/stdlib/series/pivots.d.ts +25 -0
- package/dist/core/stdlib/series/pivots.d.ts.map +1 -0
- package/dist/core/stdlib/series/pivots.js +42 -0
- package/dist/core/stdlib/series/pivots.js.map +1 -0
- package/dist/core/stdlib/series/statistics.d.ts +64 -0
- package/dist/core/stdlib/series/statistics.d.ts.map +1 -0
- package/dist/core/stdlib/series/statistics.js +148 -0
- package/dist/core/stdlib/series/statistics.js.map +1 -0
- package/dist/core/stdlib/series/totals.d.ts +68 -0
- package/dist/core/stdlib/series/totals.d.ts.map +1 -0
- package/dist/core/stdlib/series/totals.js +115 -0
- package/dist/core/stdlib/series/totals.js.map +1 -0
- package/dist/core/stdlib/trend/directional.d.ts +69 -0
- package/dist/core/stdlib/trend/directional.d.ts.map +1 -0
- package/dist/core/stdlib/trend/directional.js +151 -0
- package/dist/core/stdlib/trend/directional.js.map +1 -0
- package/dist/core/stdlib/trend/index.d.ts +4 -0
- package/dist/core/stdlib/trend/index.d.ts.map +1 -0
- package/dist/core/stdlib/trend/index.js +4 -0
- package/dist/core/stdlib/trend/index.js.map +1 -0
- package/dist/core/stdlib/trend/psar.d.ts +33 -0
- package/dist/core/stdlib/trend/psar.d.ts.map +1 -0
- package/dist/core/stdlib/trend/psar.js +86 -0
- package/dist/core/stdlib/trend/psar.js.map +1 -0
- package/dist/core/stdlib/trend/supertrend.d.ts +30 -0
- package/dist/core/stdlib/trend/supertrend.d.ts.map +1 -0
- package/dist/core/stdlib/trend/supertrend.js +65 -0
- package/dist/core/stdlib/trend/supertrend.js.map +1 -0
- package/dist/core/stdlib/values/bar.d.ts +39 -0
- package/dist/core/stdlib/values/bar.d.ts.map +1 -0
- package/dist/core/stdlib/values/bar.js +33 -0
- package/dist/core/stdlib/values/bar.js.map +1 -0
- package/dist/core/stdlib/values/index.d.ts +11 -0
- package/dist/core/stdlib/values/index.d.ts.map +1 -0
- package/dist/core/stdlib/values/index.js +6 -0
- package/dist/core/stdlib/values/index.js.map +1 -0
- package/dist/core/stdlib/values/lookback.d.ts +83 -0
- package/dist/core/stdlib/values/lookback.d.ts.map +1 -0
- package/dist/core/stdlib/values/lookback.js +134 -0
- package/dist/core/stdlib/values/lookback.js.map +1 -0
- package/dist/core/stdlib/values/region.d.ts +55 -0
- package/dist/core/stdlib/values/region.d.ts.map +1 -0
- package/dist/core/stdlib/values/region.js +73 -0
- package/dist/core/stdlib/values/region.js.map +1 -0
- package/dist/core/stdlib/values/tail.d.ts +44 -0
- package/dist/core/stdlib/values/tail.d.ts.map +1 -0
- package/dist/core/stdlib/values/tail.js +23 -0
- package/dist/core/stdlib/values/tail.js.map +1 -0
- package/dist/core/stdlib/values/value.d.ts +64 -0
- package/dist/core/stdlib/values/value.d.ts.map +1 -0
- package/dist/core/stdlib/values/value.js +61 -0
- package/dist/core/stdlib/values/value.js.map +1 -0
- package/dist/core/stdlib/volatility/bands.d.ts +50 -0
- package/dist/core/stdlib/volatility/bands.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/bands.js +101 -0
- package/dist/core/stdlib/volatility/bands.js.map +1 -0
- package/dist/core/stdlib/volatility/deviation.d.ts +43 -0
- package/dist/core/stdlib/volatility/deviation.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/deviation.js +75 -0
- package/dist/core/stdlib/volatility/deviation.js.map +1 -0
- package/dist/core/stdlib/volatility/index.d.ts +6 -0
- package/dist/core/stdlib/volatility/index.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/index.js +5 -0
- package/dist/core/stdlib/volatility/index.js.map +1 -0
- package/dist/core/stdlib/volatility/measures.d.ts +48 -0
- package/dist/core/stdlib/volatility/measures.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/measures.js +73 -0
- package/dist/core/stdlib/volatility/measures.js.map +1 -0
- package/dist/core/stdlib/volatility/range.d.ts +69 -0
- package/dist/core/stdlib/volatility/range.d.ts.map +1 -0
- package/dist/core/stdlib/volatility/range.js +86 -0
- package/dist/core/stdlib/volatility/range.js.map +1 -0
- package/dist/core/stdlib/volume/accumulation.d.ts +61 -0
- package/dist/core/stdlib/volume/accumulation.d.ts.map +1 -0
- package/dist/core/stdlib/volume/accumulation.js +127 -0
- package/dist/core/stdlib/volume/accumulation.js.map +1 -0
- package/dist/core/stdlib/volume/flow.d.ts +60 -0
- package/dist/core/stdlib/volume/flow.d.ts.map +1 -0
- package/dist/core/stdlib/volume/flow.js +125 -0
- package/dist/core/stdlib/volume/flow.js.map +1 -0
- package/dist/core/stdlib/volume/index.d.ts +5 -0
- package/dist/core/stdlib/volume/index.d.ts.map +1 -0
- package/dist/core/stdlib/volume/index.js +4 -0
- package/dist/core/stdlib/volume/index.js.map +1 -0
- package/dist/core/stdlib/volume/weighted.d.ts +52 -0
- package/dist/core/stdlib/volume/weighted.d.ts.map +1 -0
- package/dist/core/stdlib/volume/weighted.js +64 -0
- package/dist/core/stdlib/volume/weighted.js.map +1 -0
- package/dist/core/version/index.d.ts +2 -0
- package/dist/core/version/index.d.ts.map +1 -0
- package/dist/core/version/index.js +2 -0
- package/dist/core/version/index.js.map +1 -0
- package/dist/core/version/version.generated.d.ts +10 -0
- package/dist/core/version/version.generated.d.ts.map +1 -0
- package/dist/core/version/version.generated.js +14 -0
- package/dist/core/version/version.generated.js.map +1 -0
- package/package.json +88 -52
- package/spec/errors.json +3403 -3204
- package/src/adapters/charts/alerts.ts +116 -0
- package/src/adapters/charts/bars.ts +63 -0
- package/src/adapters/charts/candles.ts +137 -0
- package/src/adapters/charts/colours.ts +113 -0
- package/src/adapters/charts/columns.ts +99 -0
- package/src/adapters/charts/contract.ts +320 -0
- package/src/adapters/charts/descriptor.ts +199 -0
- package/src/adapters/charts/drawings.ts +213 -0
- package/src/adapters/charts/errors.ts +45 -0
- package/src/adapters/charts/fields.ts +74 -0
- package/src/adapters/charts/fills.ts +71 -0
- package/src/adapters/charts/index.ts +78 -0
- package/src/adapters/charts/levels.ts +92 -0
- package/src/adapters/charts/markers.ts +119 -0
- package/src/adapters/charts/paint.ts +101 -0
- package/src/adapters/charts/plots.ts +185 -0
- package/src/adapters/charts/produced.ts +68 -0
- package/src/adapters/charts/requests.ts +357 -0
- package/src/adapters/charts/run.ts +327 -0
- package/src/adapters/charts/settings.ts +273 -0
- package/src/adapters/charts/surfaces.ts +238 -0
- package/src/adapters/charts/tables.ts +155 -0
- package/src/core/catalogue/catalogue.generated.ts +17 -9
- package/src/core/catalogue/values.generated.ts +8 -0
- package/src/core/check/arguments.ts +126 -0
- package/src/core/check/call-sites.ts +385 -0
- package/src/core/check/call-warmup.ts +121 -0
- package/src/core/check/calls.ts +412 -0
- package/src/core/check/check.ts +183 -0
- package/src/core/check/checked.ts +228 -0
- package/src/core/check/checker.ts +393 -0
- package/src/core/check/conditional.ts +143 -0
- package/src/core/check/constant.ts +127 -0
- package/src/core/check/declaration.ts +230 -0
- package/src/core/check/expressions.ts +471 -0
- package/src/core/check/functions.ts +283 -0
- package/src/core/check/handles.ts +75 -0
- package/src/core/check/index.ts +67 -0
- package/src/core/check/library-bars.ts +194 -0
- package/src/core/check/library-orders.ts +290 -0
- package/src/core/check/library-output.ts +241 -0
- package/src/core/check/library-series.ts +457 -0
- package/src/core/check/library.ts +374 -0
- package/src/core/check/literals.ts +35 -0
- package/src/core/check/outputs.ts +152 -0
- package/src/core/check/statements.ts +465 -0
- package/src/core/check/suggest.ts +63 -0
- package/src/core/check/surface.ts +115 -0
- package/src/core/check/tags.ts +94 -0
- package/src/core/check/types.ts +260 -0
- package/src/core/check/warmup.ts +100 -0
- package/src/core/diagnostics/collector.ts +27 -1
- package/src/core/emit/calls.ts +415 -0
- package/src/core/emit/canonical.ts +81 -0
- package/src/core/emit/channels.ts +144 -0
- package/src/core/emit/code.ts +155 -0
- package/src/core/emit/colours.ts +75 -0
- package/src/core/emit/context.ts +461 -0
- package/src/core/emit/defaults.ts +150 -0
- package/src/core/emit/emit.ts +313 -0
- package/src/core/emit/events.ts +141 -0
- package/src/core/emit/expressions.ts +292 -0
- package/src/core/emit/functions.ts +195 -0
- package/src/core/emit/gaps.ts +44 -0
- package/src/core/emit/index.ts +74 -0
- package/src/core/emit/inputs.ts +179 -0
- package/src/core/emit/layout.ts +165 -0
- package/src/core/emit/meta.ts +104 -0
- package/src/core/emit/opcodes.ts +160 -0
- package/src/core/emit/outputs.ts +357 -0
- package/src/core/emit/pool.ts +102 -0
- package/src/core/emit/program.ts +385 -0
- package/src/core/emit/registers.ts +179 -0
- package/src/core/emit/request-scope.ts +52 -0
- package/src/core/emit/requests.ts +258 -0
- package/src/core/emit/requires.ts +91 -0
- package/src/core/emit/sha256.ts +119 -0
- package/src/core/emit/statements.ts +438 -0
- package/src/core/emit/values.ts +284 -0
- package/src/core/engine/alerts.ts +152 -0
- package/src/core/engine/arithmetic.ts +165 -0
- package/src/core/engine/bars.ts +224 -0
- package/src/core/engine/budget.ts +284 -0
- package/src/core/engine/channels.ts +171 -0
- package/src/core/engine/drawings.ts +127 -0
- package/src/core/engine/engine.ts +498 -0
- package/src/core/engine/errors.ts +100 -0
- package/src/core/engine/frames.ts +85 -0
- package/src/core/engine/grids.ts +98 -0
- package/src/core/engine/guard.ts +71 -0
- package/src/core/engine/host.ts +251 -0
- package/src/core/engine/index.ts +93 -0
- package/src/core/engine/inputs.ts +263 -0
- package/src/core/engine/ledger/call.ts +218 -0
- package/src/core/engine/ledger/closable.ts +269 -0
- package/src/core/engine/ledger/holdings.ts +354 -0
- package/src/core/engine/ledger/index.ts +28 -0
- package/src/core/engine/ledger/intent.ts +112 -0
- package/src/core/engine/ledger/ledger.ts +314 -0
- package/src/core/engine/ledger/place.ts +277 -0
- package/src/core/engine/ledger/positions.ts +123 -0
- package/src/core/engine/ledger/refuse.ts +378 -0
- package/src/core/engine/ledger/row.ts +318 -0
- package/src/core/engine/ledger/sizing.ts +292 -0
- package/src/core/engine/library/arrays.ts +316 -0
- package/src/core/engine/library/averages.ts +97 -0
- package/src/core/engine/library/binding.ts +325 -0
- package/src/core/engine/library/chart.ts +115 -0
- package/src/core/engine/library/colours.ts +111 -0
- package/src/core/engine/library/dates.ts +109 -0
- package/src/core/engine/library/index.ts +103 -0
- package/src/core/engine/library/maths.ts +134 -0
- package/src/core/engine/library/objects.ts +265 -0
- package/src/core/engine/library/oscillators.ts +124 -0
- package/src/core/engine/library/ranges.ts +51 -0
- package/src/core/engine/library/series.ts +236 -0
- package/src/core/engine/library/state.ts +47 -0
- package/src/core/engine/library/studies.ts +150 -0
- package/src/core/engine/library/text.ts +303 -0
- package/src/core/engine/library/trend.ts +79 -0
- package/src/core/engine/library/volume.ts +101 -0
- package/src/core/engine/load.ts +104 -0
- package/src/core/engine/machine.ts +446 -0
- package/src/core/engine/memory.ts +129 -0
- package/src/core/engine/operations.ts +171 -0
- package/src/core/engine/orders.ts +121 -0
- package/src/core/engine/registers.ts +104 -0
- package/src/core/engine/request-body.ts +328 -0
- package/src/core/engine/request-plan.ts +270 -0
- package/src/core/engine/requests.ts +382 -0
- package/src/core/engine/results.ts +41 -0
- package/src/core/engine/series.ts +82 -0
- package/src/core/engine/session/hours.ts +86 -0
- package/src/core/engine/session/index.ts +17 -0
- package/src/core/engine/session/record.ts +191 -0
- package/src/core/engine/session/spec.ts +45 -0
- package/src/core/engine/timeframe.ts +161 -0
- package/src/core/engine/types.ts +47 -0
- package/src/core/engine/values/heap.ts +295 -0
- package/src/core/engine/values/index.ts +34 -0
- package/src/core/engine/values/value.ts +158 -0
- package/src/core/engine/verify-budgets.ts +202 -0
- package/src/core/engine/verify-code.ts +332 -0
- package/src/core/engine/verify-requests.ts +255 -0
- package/src/core/engine/verify-shape.ts +164 -0
- package/src/core/engine/verify-tables.ts +176 -0
- package/src/core/engine/verify.ts +341 -0
- package/src/core/index.ts +129 -6
- package/src/core/parse/expressions.ts +1 -1
- package/src/core/parse/functions.ts +109 -109
- package/src/core/parse/names.ts +29 -2
- package/src/core/parse/switches.ts +105 -105
- package/src/core/stdlib/averages/exponential.ts +119 -0
- package/src/core/stdlib/averages/index.ts +45 -0
- package/src/core/stdlib/averages/select.ts +71 -0
- package/src/core/stdlib/averages/shaped.ts +161 -0
- package/src/core/stdlib/averages/simple.ts +139 -0
- package/src/core/stdlib/calendar/civil.ts +89 -0
- package/src/core/stdlib/calendar/fields.ts +124 -0
- package/src/core/stdlib/calendar/format.ts +71 -0
- package/src/core/stdlib/calendar/index.ts +15 -0
- package/src/core/stdlib/calendar/zone.ts +161 -0
- package/src/core/stdlib/index.ts +400 -0
- package/src/core/stdlib/maths/arithmetic.ts +74 -0
- package/src/core/stdlib/maths/elementary.ts +124 -0
- package/src/core/stdlib/maths/index.ts +43 -0
- package/src/core/stdlib/maths/rounding.ts +78 -0
- package/src/core/stdlib/momentum/convergence.ts +82 -0
- package/src/core/stdlib/momentum/index.ts +47 -0
- package/src/core/stdlib/momentum/pressure.ts +141 -0
- package/src/core/stdlib/momentum/rates.ts +188 -0
- package/src/core/stdlib/momentum/rsi.ts +49 -0
- package/src/core/stdlib/momentum/stochastic.ts +147 -0
- package/src/core/stdlib/series/changes.ts +177 -0
- package/src/core/stdlib/series/conditions.ts +74 -0
- package/src/core/stdlib/series/extremes.ts +92 -0
- package/src/core/stdlib/series/index.ts +83 -0
- package/src/core/stdlib/series/pivots.ts +63 -0
- package/src/core/stdlib/series/statistics.ts +207 -0
- package/src/core/stdlib/series/totals.ts +164 -0
- package/src/core/stdlib/trend/directional.ts +196 -0
- package/src/core/stdlib/trend/index.ts +13 -0
- package/src/core/stdlib/trend/psar.ts +131 -0
- package/src/core/stdlib/trend/supertrend.ts +100 -0
- package/src/core/stdlib/values/bar.ts +54 -0
- package/src/core/stdlib/values/index.ts +14 -0
- package/src/core/stdlib/values/lookback.ts +198 -0
- package/src/core/stdlib/values/region.ts +86 -0
- package/src/core/stdlib/values/tail.ts +58 -0
- package/src/core/stdlib/values/value.ts +82 -0
- package/src/core/stdlib/volatility/bands.ts +178 -0
- package/src/core/stdlib/volatility/deviation.ts +111 -0
- package/src/core/stdlib/volatility/index.ts +48 -0
- package/src/core/stdlib/volatility/measures.ts +96 -0
- package/src/core/stdlib/volatility/range.ts +143 -0
- package/src/core/stdlib/volume/accumulation.ts +152 -0
- package/src/core/stdlib/volume/flow.ts +173 -0
- package/src/core/stdlib/volume/index.ts +43 -0
- package/src/core/stdlib/volume/weighted.ts +101 -0
- package/src/core/version/index.ts +1 -0
- package/src/core/version/version.generated.ts +15 -0
|
@@ -53,8 +53,8 @@ export const ENTRIES = {
|
|
|
53
53
|
OS1029: { code: "OS1029", title: "A name written against a number", severity: "error", stage: "lex", since: 1, autofix: false, message: "{written} is neither a number nor a name: the number literal ends at {number}, and a name cannot begin with a digit.", fix: "Write the value in a form the language has: a decimal literal, or 0x and hexadecimal digits. There is no binary form and no octal form, and an underscore separates digit groups only where a digit follows it. Where a number and a name were meant as two things, put an operator between them.", placeholders: ["written", "number"] },
|
|
54
54
|
OS2001: { code: "OS2001", title: "Name is not defined here", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is not defined at this point in the file.", fix: "Assign {name} above this line, move this line below its assignment, or correct the spelling to {suggestion}.", placeholders: ["name", "suggestion"] },
|
|
55
55
|
OS2002: { code: "OS2002", title: "The name already exists in an enclosing scope", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is already declared at line {line}, so a second one cannot be declared here.", fix: "Rename this one, or drop the inner declaration and let the assignment update the {name} at line {line}.", placeholders: ["name", "line"] },
|
|
56
|
-
OS2003: { code: "OS2003", title: "Types do not match", severity: "error", stage: "check", since: 1, autofix: false, message: "{leftType} and {rightType} do not mix here.", fix: "Convert explicitly: text(x) for a string,
|
|
57
|
-
OS2004: { code: "OS2004", title: "This value has no history", severity: "error", stage: "check", since: 1, autofix: false, message: "{expr} has no history, so [] cannot read a past value of it.", fix: "
|
|
56
|
+
OS2003: { code: "OS2003", title: "Types do not match", severity: "error", stage: "check", since: 1, autofix: false, message: "{leftType} and {rightType} do not mix here.", fix: "Convert explicitly: text(x) for a string, or text(x, decimals) to fix the decimals. Where no conversion applies, write the value in the type the line needs, or give the second value a name of its own. A plot, fill or level handle converts to nothing: leave it named at the top level, pass it to fill(), and use draw.line() or draw.box() where the script needs something it can keep.", placeholders: ["leftType", "rightType"] },
|
|
57
|
+
OS2004: { code: "OS2004", title: "This value has no history", severity: "error", stage: "check", since: 1, autofix: false, message: "{expr} has no history, so [] cannot read a past value of it.", fix: "If the value is a per-bar number computed inside a block or left as a temporary, assign it at the top level of the file and read the history of that top level name. If it is a declaration handle, a runtime object or a library fact that is not a series, no name gives it a history: assign what you want to look back at to a top level name of its own, and read that.", placeholders: ["expr"] },
|
|
58
58
|
OS2005: { code: "OS2005", title: "Recursive call", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} calls itself: {cycle}.", fix: "Rewrite it as a loop, or split the work into two functions that do not call each other.", placeholders: ["name", "cycle"] },
|
|
59
59
|
OS2006: { code: "OS2006", title: "Assignment to a loop variable", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is this loop's variable and cannot be assigned inside the body.", fix: "Use break to leave early, or keep a separate name for the value the body changes.", placeholders: ["name"] },
|
|
60
60
|
OS2007: { code: "OS2007", title: "The file has no declaration", severity: "error", stage: "check", since: 1, autofix: false, message: "A file needs one study() or strategy() declaration before any other statement.", fix: "Add study(\"Name\") as the first statement, or strategy(\"Name\") if the file places orders.", placeholders: [] },
|
|
@@ -62,7 +62,7 @@ export const ENTRIES = {
|
|
|
62
62
|
OS2009: { code: "OS2009", title: "Unknown member of a namespace", severity: "error", stage: "check", since: 1, autofix: false, message: "{namespace} has no member named {member}.", fix: "Use one of {namespace}'s members; {suggestion} is the closest match to what was written.", placeholders: ["namespace", "member", "suggestion"] },
|
|
63
63
|
OS2010: { code: "OS2010", title: "This name is not a function", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is {type}, not a function, so it cannot be called.", fix: "Remove the argument list to read the value, or call the function that was meant: {suggestion}.", placeholders: ["name", "type", "suggestion"] },
|
|
64
64
|
OS2011: { code: "OS2011", title: "A condition must be a bool", severity: "error", stage: "check", since: 1, autofix: false, message: "This condition is {type}; a condition must be bool or none.", fix: "Write the test out: {name} > 0 for a count, isNone({name}) for absence, {name} != \"\" for a string.", placeholders: ["type", "name"] },
|
|
65
|
-
OS2012: { code: "OS2012", title: "The two arms of the ternary have different types", severity: "error", stage: "check", since: 1, autofix: false, message: "The arms of this ? : are {leftType} and {rightType}.", fix: "Make both arms the same type with text() or
|
|
65
|
+
OS2012: { code: "OS2012", title: "The two arms of the ternary have different types", severity: "error", stage: "check", since: 1, autofix: false, message: "The arms of this ? : are {leftType} and {rightType}.", fix: "Make both arms the same type with text() or toNumber(), or use none for the empty arm.", placeholders: ["leftType", "rightType"] },
|
|
66
66
|
OS2013: { code: "OS2013", title: "An array literal mixes types", severity: "error", stage: "check", since: 1, autofix: false, message: "This array holds {firstType} at index 0 and {otherType} at index {index}.", fix: "Make every element {firstType}, or keep two arrays and index them together.", placeholders: ["firstType", "otherType", "index"] },
|
|
67
67
|
OS2014: { code: "OS2014", title: "A function cannot be used as a value", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is a function, and version 1 has no function values.", fix: "Call {name} with its arguments and use the value it returns.", placeholders: ["name"] },
|
|
68
68
|
OS2015: { code: "OS2015", title: "The element type of this empty array is unknown", severity: "error", stage: "check", since: 1, autofix: false, message: "An empty array literal needs its element type from an annotation or from a first use.", fix: "Annotate the declaration, var hits: array<number> = [], or put the first element in with push(), unshift(), insert() or set() and let the type be read from that call.", placeholders: [] },
|
|
@@ -70,6 +70,7 @@ export const ENTRIES = {
|
|
|
70
70
|
OS2017: { code: "OS2017", title: "A function with this name is already declared", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is already declared as a function at line {line}.", fix: "Rename one of them, or give the one function a default argument that covers both uses.", placeholders: ["name", "line"] },
|
|
71
71
|
OS2018: { code: "OS2018", title: "Duplicate parameter name", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} appears twice in this parameter list.", fix: "Rename the second parameter, so every name in the list appears once.", placeholders: ["name"] },
|
|
72
72
|
OS2019: { code: "OS2019", title: "This type cannot be an array element", severity: "error", stage: "check", since: 1, autofix: false, message: "array<{type}> is not a type: {type} cannot be an array element.", fix: "Use an element type an array holds: number, string, bool, color, line, label, box, polyline or table. A plot cannot be kept anywhere, so declare each plot at the top level and give it its own name.", placeholders: ["type"] },
|
|
73
|
+
OS2020: { code: "OS2020", title: "Name is planned, not implemented", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is planned and is not implemented in this version.", fix: "Compute what {name} would give from names the library implements today, or take the line out until a version implements it. Do not reach for the nearest name that compiles: a neighbour computes something else, and a plot that quietly changes meaning is worse than one that refuses to compile.", placeholders: ["name"] },
|
|
73
74
|
OS3001: { code: "OS3001", title: "Wrong number of arguments", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} takes {expected} arguments and {found} were given.", fix: "Pass the arguments the signature names: {signature}.", placeholders: ["name", "expected", "found", "signature"] },
|
|
74
75
|
OS3002: { code: "OS3002", title: "Unknown named argument", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} has no argument called {argument}.", fix: "Use one of {names}; {suggestion} is the closest to what was written.", placeholders: ["name", "argument", "names", "suggestion"] },
|
|
75
76
|
OS3003: { code: "OS3003", title: "This option must be a constant", severity: "error", stage: "check", since: 1, autofix: false, message: "{option} is read once, before the first bar, so it cannot depend on bar data.", fix: "Use a literal, or make it tunable with an input(): {option} = input(2, \"{option}\").", placeholders: ["option"] },
|
|
@@ -80,7 +81,7 @@ export const ENTRIES = {
|
|
|
80
81
|
OS3008: { code: "OS3008", title: "The value is not valid for this parameter", severity: "error", stage: "check", since: 1, autofix: false, message: "{argument} accepts {values}; {found} is not one of them.", fix: "Use one of {values}; {suggestion} is the closest to what was written.", placeholders: ["argument", "values", "found", "suggestion"] },
|
|
81
82
|
OS3009: { code: "OS3009", title: "This option needs another option to be set", severity: "error", stage: "check", since: 1, autofix: false, message: "{option} = {value} requires {required}.", fix: "Set {required} in the declaration, or choose a value of {option} that stands on its own.", placeholders: ["option", "value", "required"] },
|
|
82
83
|
OS3010: { code: "OS3010", title: "Two arguments that cannot both be given", severity: "error", stage: "check", since: 1, autofix: false, message: "{first} and {second} set the same thing two ways.", fix: "Keep one of the two: an absolute price or a distance from the entry, one colour for the whole band or a colour for each side, and on a leg described as a future neither right nor strikeOffset.", placeholders: ["first", "second"] },
|
|
83
|
-
OS3011: { code: "OS3011", title: "Argument has the wrong type", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} was given.", fix: "Convert the value with text(),
|
|
84
|
+
OS3011: { code: "OS3011", title: "Argument has the wrong type", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} was given.", fix: "Convert the value with text(), toNumber() or toBool(), or pass an expression of type {expected}.", placeholders: ["name", "argument", "expected", "found"] },
|
|
84
85
|
OS3012: { code: "OS3012", title: "A required argument is missing", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} requires {argument}, which has no default.", fix: "Pass {argument} at the call site, as the example shows: {example}.", placeholders: ["name", "argument", "example"] },
|
|
85
86
|
OS3013: { code: "OS3013", title: "Argument given twice", severity: "error", stage: "check", since: 1, autofix: false, message: "{argument} is given twice at this call site.", fix: "Delete one of the two, keeping the value that was meant.", placeholders: ["argument"] },
|
|
86
87
|
OS3014: { code: "OS3014", title: "limits() is in the wrong place", severity: "error", stage: "check", since: 1, autofix: false, message: "limits() appears at most once, immediately after the declaration; this one is at line {line}.", fix: "Move the limits() line directly under study(...) or strategy(...), and merge two calls into one.", placeholders: ["line"] },
|
|
@@ -90,6 +91,10 @@ export const ENTRIES = {
|
|
|
90
91
|
OS3018: { code: "OS3018", title: "The default is not in the options list", severity: "error", stage: "check", since: 1, autofix: false, message: "This input's default {default} is not one of options {values}.", fix: "Add {default} to options, or make the default one of the listed values.", placeholders: ["default", "values"] },
|
|
91
92
|
OS3019: { code: "OS3019", title: "A declaration handle in an object argument", severity: "error", stage: "check", since: 1, autofix: false, message: "{name}'s {argument} is {expected}; {found} is a declaration handle, which has no value at run time.", fix: "Pass an object the script created with draw.line(), draw.box() or draw.label(), and change a plot's own appearance through the arguments of the plot call instead.", placeholders: ["name", "argument", "expected", "found"] },
|
|
92
93
|
OS3020: { code: "OS3020", title: "fill needs two declared plots", severity: "error", stage: "check", since: 1, autofix: false, message: "fill's {argument} is {found}; it takes a plot declared by plot() or plotCandles().", fix: "Plot both edges at the top level, name each one, and pass the two names to fill().", placeholders: ["argument", "found"] },
|
|
94
|
+
OS3021: { code: "OS3021", title: "An input written in place has no title", severity: "error", stage: "check", since: 1, autofix: false, message: "An input() assigned to no name is named by its title, and this one has no title written as a string literal.", fix: "Give it a title written as a string literal: input(2, \"Precision\").", placeholders: [] },
|
|
95
|
+
OS3022: { code: "OS3022", title: "Two inputs share a settings key", severity: "error", stage: "check", since: 1, autofix: false, message: "This input is keyed by its title {name}, which is already the name of the input at line {line}.", fix: "Give this one a title of its own, or rename the input at line {line}.", placeholders: ["name", "line"] },
|
|
96
|
+
OS3023: { code: "OS3023", title: "An order names a leg this file does not declare", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} was given a {argument}, and this file declares none.", fix: "Leave {argument} out. A file that declares no leg has exactly one, and every order acts on it.", placeholders: ["name", "argument"] },
|
|
97
|
+
OS3024: { code: "OS3024", title: "An input written in place has an empty title", severity: "error", stage: "check", since: 1, autofix: false, message: "An input() assigned to no name is named by its title, and this one's title is empty.", fix: "Give the title something to say: input(2, \"Precision\").", placeholders: [] },
|
|
93
98
|
OS4001: { code: "OS4001", title: "History index is not usable", severity: "error", stage: "runtime", since: 1, autofix: false, message: "[{index}] is not a whole number of bars at or above zero.", fix: "Wrap the index in floor() or round(), and clamp a computed index with max(0, n).", placeholders: ["index"] },
|
|
94
99
|
OS4002: { code: "OS4002", title: "History index is deeper than the retained depth", severity: "error", stage: "runtime", since: 1, autofix: false, message: "[{index}] reaches past the retained depth of {depth} bars.", fix: "Raise the depth in one place: limits(history = {suggested}).", placeholders: ["index", "depth", "suggested"] },
|
|
95
100
|
OS4003: { code: "OS4003", title: "A whole number was required here", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{name}'s {argument} was {found} on this bar; a whole number was required.", fix: "Round the value before passing it: floor() towards zero, round() to nearest.", placeholders: ["name", "argument", "found"] },
|
|
@@ -106,12 +111,13 @@ export const ENTRIES = {
|
|
|
106
111
|
OS5001: { code: "OS5001", title: "Loop budget exhausted", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This bar used its {budget} loop iterations, and the loop at line {line} was still running.", fix: "Fix the exit condition, or raise the budget in one line: limits(loops = {suggested}).", placeholders: ["budget", "line", "suggested"] },
|
|
107
112
|
OS5002: { code: "OS5002", title: "The array is too large", severity: "error", stage: "runtime", since: 1, autofix: false, message: "An array holds at most {max} elements; {name} reached {size}.", fix: "Drop the oldest element as you append: if size(arr) > 500, shift(arr).", placeholders: ["max", "name", "size"] },
|
|
108
113
|
OS5003: { code: "OS5003", title: "The host refused this limits() value", severity: "error", stage: "host", since: 1, autofix: false, message: "This host allows {option} up to {max}; the file asks for {found}.", fix: "Lower {option} to {max} or below, or run the file on a host that allows more.", placeholders: ["option", "max", "found"] },
|
|
109
|
-
OS5004: { code: "OS5004", title: "The program needs more state regions than the engine allows", severity: "error", stage: "
|
|
114
|
+
OS5004: { code: "OS5004", title: "The program needs more state regions than the engine allows", severity: "error", stage: "host", since: 1, autofix: false, message: "This program needs {found} state regions and the engine allows {max}; {first} calls {second} on several paths.", fix: "Call the inner function once at the top level, give its result a name, and pass that name down.", placeholders: ["found", "max", "first", "second"] },
|
|
110
115
|
OS5005: { code: "OS5005", title: "Nesting is too deep", severity: "error", stage: "parse", since: 1, autofix: false, message: "{construct} is nested {found} deep and the ceiling is {max}.", fix: "Flatten it: give the inner expression a name at the top level and use the name.", placeholders: ["construct", "found", "max"] },
|
|
111
116
|
OS5006: { code: "OS5006", title: "Too many outstanding data requests", severity: "error", stage: "host", since: 1, autofix: false, message: "This file makes {found} data requests and the host allows {max}.", fix: "Keep one request per symbol and timeframe, reuse the name it assigns, and delete the requests whose results are unused.", placeholders: ["found", "max"] },
|
|
112
117
|
OS5007: { code: "OS5007", title: "The bar took too long", severity: "error", stage: "host", since: 1, autofix: false, message: "Bar {bar} ran for {ms} ms and the host allows {max} ms.", fix: "Keep a running value in a var and update it per bar instead of recomputing over the whole history.", placeholders: ["bar", "ms", "max"] },
|
|
113
118
|
OS5008: { code: "OS5008", title: "The string is too long", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A string holds at most {max} characters; this one reached {found}.", fix: "Keep the pieces in an array, trim it to the rows you display, and join only those.", placeholders: ["max", "found"] },
|
|
114
|
-
OS5009: { code: "OS5009", title: "The program is too large", severity: "error", stage: "
|
|
119
|
+
OS5009: { code: "OS5009", title: "The program is too large", severity: "error", stage: "host", since: 1, autofix: false, message: "This file compiles to {found} instructions and the ceiling is {max}.", fix: "Move the repeated block into a fn and call it, and delete branches the script no longer uses.", placeholders: ["found", "max"] },
|
|
120
|
+
OS5010: { code: "OS5010", title: "Too many drawing objects", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A script holds at most {max} drawing objects; this one would be number {found}.", fix: "Delete each object when it stops being wanted, and bound the set: keep the objects in an array, and when it is longer than you want, delete the oldest object and remove the element.", placeholders: ["max", "found"] },
|
|
115
121
|
OS6001: { code: "OS6001", title: "Unknown timeframe", severity: "error", stage: "check", since: 1, autofix: false, message: "{value} is not a timeframe.", fix: "Write a count and a unit, or a bare number of minutes: \"5m\", \"1h\", \"1D\", \"1W\", \"60\".", placeholders: ["value"] },
|
|
116
122
|
OS6002: { code: "OS6002", title: "The requested timeframe is lower than the chart's", severity: "error", stage: "host", since: 1, autofix: false, message: "The chart is {chart} and the request asks for {requested}.", fix: "Request {chart} or higher, or change the chart's interval to the lower one and fold upwards instead.", placeholders: ["chart", "requested"] },
|
|
117
123
|
OS6003: { code: "OS6003", title: "A per-bar name inside a request expression", severity: "error", stage: "check", since: 1, autofix: false, message: "{name} is computed on this chart's bars, so it has no meaning on the requested ones.", fix: "Move the calculation inside the request expression, or pass a constant: a literal or an input().", placeholders: ["name"] },
|
|
@@ -127,7 +133,7 @@ export const ENTRIES = {
|
|
|
127
133
|
OS6013: { code: "OS6013", title: "The request changed after the first bar", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This request asked for {first} on bar 0 and for {found} on bar {bar}.", fix: "Compute the symbol and the timeframe from literals or inputs, not from bar data.", placeholders: ["first", "found", "bar"] },
|
|
128
134
|
OS6014: { code: "OS6014", title: "The feed does not offer this timeframe", severity: "error", stage: "host", since: 1, autofix: false, message: "The host has no {timeframe} data for {symbol}; it offers {available}.", fix: "Request one of {available}, or derive the interval you want from a lower one the host does serve.", placeholders: ["timeframe", "symbol", "available"] },
|
|
129
135
|
OS6015: { code: "OS6015", title: "The requested timeframe does not fold into the chart's", severity: "error", stage: "host", since: 1, autofix: false, message: "{requested} is not a whole multiple of {chart}.", fix: "Request a multiple of {chart}, for example {suggestion}.", placeholders: ["requested", "chart", "suggestion"] },
|
|
130
|
-
OS6016: { code: "OS6016", title: "The compiled format version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, message: "This program is in compiled format {found} and this engine implements
|
|
136
|
+
OS6016: { code: "OS6016", title: "The compiled format version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, message: "This program is in compiled format {found} and this engine implements format {max}; a different major number is a different format, whether it is higher or lower.", fix: "Run the program on an engine that implements format {found}, or recompile the source with a compiler that emits format {max}.", placeholders: ["found", "max"] },
|
|
131
137
|
OS6017: { code: "OS6017", title: "The program's language version is not one this engine implements", severity: "error", stage: "host", since: 1, autofix: false, message: "This program was compiled from language version {found}, and this engine implements {versions}.", fix: "Upgrade the engine to one that implements language version {found}, or recompile the source against a version it has.", placeholders: ["found", "versions"] },
|
|
132
138
|
OS6018: { code: "OS6018", title: "The compiled program is malformed", severity: "error", stage: "host", since: 1, autofix: false, message: "The program failed verification at {location}: {reason}.", fix: "Recompile the script from its source; a program that fails verification came from a broken compiler or was edited after it was written, and neither is repairable by hand.", placeholders: ["location", "reason"] },
|
|
133
139
|
OS6019: { code: "OS6019", title: "A host setting fails the input's validation", severity: "error", stage: "host", since: 1, autofix: false, message: "The host supplied {value} for {key}, and {validation}.", fix: "Correct the value in the settings dialog, or widen the input's own min, max or options so the value is allowed.", placeholders: ["value", "key", "validation"] },
|
|
@@ -139,13 +145,15 @@ export const ENTRIES = {
|
|
|
139
145
|
OS7006: { code: "OS7006", title: "Price is not on a tick", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{symbol} ticks at {tick}, and {price} does not fall on one.", fix: "Round to the tick before passing the price: round(price / chart.tickSize) * chart.tickSize.", placeholders: ["symbol", "tick", "price"] },
|
|
140
146
|
OS7007: { code: "OS7007", title: "A resting order has no price", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A {type} order needs {argument}, and none was given.", fix: "Pass {argument}, or leave the type as market and let the order fill at the next price.", placeholders: ["type", "argument"] },
|
|
141
147
|
OS7008: { code: "OS7008", title: "The entry was refused by pyramiding", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This strategy allows {max} entries in one direction and already holds {found}.", fix: "Raise pyramiding in the declaration, or test pos.size before entering again.", placeholders: ["max", "found"] },
|
|
142
|
-
OS7009: { code: "OS7009", title: "Unknown order tag", severity: "error", stage: "runtime", since: 1, autofix: false, message: "There is no working order tagged {tag}.", fix: "Use the tag the order was placed with,
|
|
148
|
+
OS7009: { code: "OS7009", title: "Unknown order tag", severity: "error", stage: "runtime", since: 1, autofix: false, message: "There is no working order tagged {tag}.", fix: "Use the tag the order was placed with, or cancelAll() where the script means every order it has working.", placeholders: ["tag"] },
|
|
143
149
|
OS7010: { code: "OS7010", title: "A bracket price is on the wrong side of the entry", severity: "error", stage: "runtime", since: 1, autofix: false, message: "A {side} entry at {entry} cannot take a {leg} at {price}.", fix: "Put the stop below a long entry and the limit above it, and swap the two for a short.", placeholders: ["side", "entry", "leg", "price"] },
|
|
144
150
|
OS7011: { code: "OS7011", title: "The order needs more capital than the strategy has", severity: "error", stage: "runtime", since: 1, autofix: false, message: "This order needs {required} and the strategy has {available}.", fix: "Size from equity with qtyType = \"equityPercent\", or test pos.equity before entering.", placeholders: ["required", "available"] },
|
|
145
151
|
OS7012: { code: "OS7012", title: "The instrument is outside its session", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{symbol} is outside its trading session at {time}.", fix: "Guard entries with session.isOpen, and set closeOnSessionEnd = true to flatten at the close.", placeholders: ["symbol", "time"] },
|
|
146
152
|
OS7013: { code: "OS7013", title: "Two opposite orders on one bar", severity: "error", stage: "runtime", since: 1, autofix: false, message: "{first} and {second} were both placed on bar {bar}.", fix: "Make the conditions exclusive with else if, or place the exit on this bar and the entry on the next.", placeholders: ["first", "second", "bar"] },
|
|
147
153
|
OS7014: { code: "OS7014", title: "The destination rejected the order", severity: "error", stage: "host", since: 1, autofix: false, message: "The order destination rejected {name}: {reason}.", fix: "Act on {reason}: it comes from the destination, not from the script, and the same order will be rejected again until the account or the order changes.", placeholders: ["name", "reason"] },
|
|
148
154
|
OS7015: { code: "OS7015", title: "The strategy has no order destination", severity: "error", stage: "host", since: 1, autofix: false, message: "This strategy placed an order and the host supplied no destination.", fix: "Connect a destination in the host, or run the file as a study(): replace buy() with signal(\"BUY\").", placeholders: [] },
|
|
155
|
+
OS7016: { code: "OS7016", title: "A close names a tag nothing places", severity: "error", stage: "check", since: 1, autofix: false, message: "No order in this file is placed with the tag {tag}.", fix: "Use the tag the entry was placed with, or leave the tag out to flatten the whole leg.", placeholders: ["tag"] },
|
|
156
|
+
OS7017: { code: "OS7017", title: "A close states more than it is closing", severity: "error", stage: "runtime", since: 1, autofix: false, message: "close was given a quantity of {qty}, and {part} has {held} left to close.", fix: "Leave the quantity out and close() flattens what is left, or size the part from pos.size and keep the quantity at or under {held}.", placeholders: ["qty", "part", "held"] },
|
|
149
157
|
OS8001: { code: "OS8001", title: "A stateful call inside a branch", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} advances only on the bars where this branch runs, and is absent on the rest.", fix: "Compute it unconditionally at the top level and use the result inside the branch.", placeholders: ["name"] },
|
|
150
158
|
OS8002: { code: "OS8002", title: "A higher timeframe read with onUnconfirmed", severity: "warning", stage: "check", since: 1, autofix: false, message: "This file sets onUnconfirmed = true and reads {timeframe}; together they repaint.", fix: "Drop onUnconfirmed = true, or guard every use of the read with bar.isConfirmed.", placeholders: ["timeframe"] },
|
|
151
159
|
OS8003: { code: "OS8003", title: "No version declaration", severity: "warning", stage: "check", since: 1, autofix: true, message: "This file declares no language version; it was compiled as version {version}.", fix: "Add version {version} as the first line of the file.", placeholders: ["version"] },
|
|
@@ -153,7 +161,7 @@ export const ENTRIES = {
|
|
|
153
161
|
OS8005: { code: "OS8005", title: "A lookahead read", severity: "warning", stage: "check", since: 1, autofix: false, message: "This read uses {mode}, so the study shows values the bar it is drawn on could not have known.", fix: "Drop the mode to take the default, which never repaints, unless the study is deliberately a study of what the higher bar went on to do.", placeholders: ["mode"] },
|
|
154
162
|
OS8006: { code: "OS8006", title: "A session average on a session-length bar", severity: "warning", stage: "check", since: 1, autofix: false, message: "A session anchored average resets each session, and each bar of {interval} is a whole session, so it equals its source.", fix: "Use an intraday interval for a session anchored average, or plot the source directly and delete the call.", placeholders: ["interval"] },
|
|
155
163
|
OS8007: { code: "OS8007", title: "A plot sets the price pane's own formatting", severity: "warning", stage: "check", since: 1, autofix: false, message: "{title} sets {option} while drawing over the price pane, which reformats the instrument's own axis.", fix: "Set precision and format in the declaration, for the whole study, or drop them from a plot drawn over the price pane.", placeholders: ["title", "option"] },
|
|
156
|
-
OS8008: { code: "OS8008", title: "An alert with no id", severity: "warning", stage: "check", since: 1, autofix: false, message: "This alert has no id, so its identity is derived from its position at line {line}.", fix: "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").", placeholders: ["line"] },
|
|
164
|
+
OS8008: { code: "OS8008", title: "An alert with no fixed id", severity: "warning", stage: "check", since: 1, autofix: false, message: "This alert has no fixed id, so its identity is derived from its position at line {line}.", fix: "Give the alert a stable id of your own: alert(\"text\", id = \"emaCross\").", placeholders: ["line"] },
|
|
157
165
|
OS8009: { code: "OS8009", title: "This plot can never draw", severity: "warning", stage: "check", since: 1, autofix: false, message: "{title} plots a value that is absent on every bar.", fix: "Plot the value that was meant, or delete the plot and its settings row.", placeholders: ["title"] },
|
|
158
166
|
OS8010: { code: "OS8010", title: "A name is never read", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} is assigned at line {line} and never read.", fix: "Use the value, or delete the line.", placeholders: ["name", "line"] },
|
|
159
167
|
OS8011: { code: "OS8011", title: "live var makes live and backtest differ", severity: "warning", stage: "check", since: 1, autofix: false, message: "{name} is a live var, so it keeps its value across the updates of the moving bar.", fix: "Use var unless counting intrabar updates is the actual intent; keep live var only for that.", placeholders: ["name"] },
|
|
@@ -62,6 +62,7 @@ export interface DiagnosticValues {
|
|
|
62
62
|
readonly OS2017: { readonly name: PlaceholderValue; readonly line: PlaceholderValue };
|
|
63
63
|
readonly OS2018: { readonly name: PlaceholderValue };
|
|
64
64
|
readonly OS2019: { readonly type: PlaceholderValue };
|
|
65
|
+
readonly OS2020: { readonly name: PlaceholderValue };
|
|
65
66
|
readonly OS3001: { readonly name: PlaceholderValue; readonly expected: PlaceholderValue; readonly found: PlaceholderValue; readonly signature: PlaceholderValue };
|
|
66
67
|
readonly OS3002: { readonly name: PlaceholderValue; readonly argument: PlaceholderValue; readonly names: PlaceholderValue; readonly suggestion: PlaceholderValue };
|
|
67
68
|
readonly OS3003: { readonly option: PlaceholderValue };
|
|
@@ -82,6 +83,10 @@ export interface DiagnosticValues {
|
|
|
82
83
|
readonly OS3018: { readonly default: PlaceholderValue; readonly values: PlaceholderValue };
|
|
83
84
|
readonly OS3019: { readonly name: PlaceholderValue; readonly argument: PlaceholderValue; readonly expected: PlaceholderValue; readonly found: PlaceholderValue };
|
|
84
85
|
readonly OS3020: { readonly argument: PlaceholderValue; readonly found: PlaceholderValue };
|
|
86
|
+
readonly OS3021: Record<string, never>;
|
|
87
|
+
readonly OS3022: { readonly name: PlaceholderValue; readonly line: PlaceholderValue };
|
|
88
|
+
readonly OS3023: { readonly name: PlaceholderValue; readonly argument: PlaceholderValue };
|
|
89
|
+
readonly OS3024: Record<string, never>;
|
|
85
90
|
readonly OS4001: { readonly index: PlaceholderValue };
|
|
86
91
|
readonly OS4002: { readonly index: PlaceholderValue; readonly depth: PlaceholderValue; readonly suggested: PlaceholderValue };
|
|
87
92
|
readonly OS4003: { readonly name: PlaceholderValue; readonly argument: PlaceholderValue; readonly found: PlaceholderValue };
|
|
@@ -104,6 +109,7 @@ export interface DiagnosticValues {
|
|
|
104
109
|
readonly OS5007: { readonly bar: PlaceholderValue; readonly ms: PlaceholderValue; readonly max: PlaceholderValue };
|
|
105
110
|
readonly OS5008: { readonly max: PlaceholderValue; readonly found: PlaceholderValue };
|
|
106
111
|
readonly OS5009: { readonly found: PlaceholderValue; readonly max: PlaceholderValue };
|
|
112
|
+
readonly OS5010: { readonly max: PlaceholderValue; readonly found: PlaceholderValue };
|
|
107
113
|
readonly OS6001: { readonly value: PlaceholderValue };
|
|
108
114
|
readonly OS6002: { readonly chart: PlaceholderValue; readonly requested: PlaceholderValue };
|
|
109
115
|
readonly OS6003: { readonly name: PlaceholderValue };
|
|
@@ -138,6 +144,8 @@ export interface DiagnosticValues {
|
|
|
138
144
|
readonly OS7013: { readonly first: PlaceholderValue; readonly second: PlaceholderValue; readonly bar: PlaceholderValue };
|
|
139
145
|
readonly OS7014: { readonly name: PlaceholderValue; readonly reason: PlaceholderValue };
|
|
140
146
|
readonly OS7015: Record<string, never>;
|
|
147
|
+
readonly OS7016: { readonly tag: PlaceholderValue };
|
|
148
|
+
readonly OS7017: { readonly qty: PlaceholderValue; readonly part: PlaceholderValue; readonly held: PlaceholderValue };
|
|
141
149
|
readonly OS8001: { readonly name: PlaceholderValue };
|
|
142
150
|
readonly OS8002: { readonly timeframe: PlaceholderValue };
|
|
143
151
|
readonly OS8003: { readonly version: PlaceholderValue };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matching what was written at a call site against what the callee takes.
|
|
3
|
+
*
|
|
4
|
+
* This is the half of call checking that knows nothing about types: which
|
|
5
|
+
* argument fills which parameter, and what is missing, doubled or unknown.
|
|
6
|
+
* `language.md` 11.2 is the whole rule, and it is the same rule for a library
|
|
7
|
+
* call and for a user function, which is why this takes a parameter list rather
|
|
8
|
+
* than either kind of callee.
|
|
9
|
+
*
|
|
10
|
+
* Six codes live here, and each of them names the call, so the reader is told
|
|
11
|
+
* which of the three calls on the line the caret is about.
|
|
12
|
+
*/
|
|
13
|
+
import type { Argument } from '../ast/index.js';
|
|
14
|
+
import type { Span } from '../span/index.js';
|
|
15
|
+
import type { Checker } from './checker.js';
|
|
16
|
+
import { closestName } from './suggest.js';
|
|
17
|
+
|
|
18
|
+
/** What a parameter list looks like to this file, whatever declared it. */
|
|
19
|
+
export interface ParameterShape {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly optional: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The parameters in declaration order, holding the argument that filled each.
|
|
26
|
+
*
|
|
27
|
+
* A hole is a parameter the call left to its default. The generator reads this
|
|
28
|
+
* rather than the written order, so it never matches a label a second time.
|
|
29
|
+
*/
|
|
30
|
+
export type Binding = readonly (Argument | undefined)[];
|
|
31
|
+
|
|
32
|
+
/** `ema(src, len)`, with a `?` on the parameters that carry a default. */
|
|
33
|
+
export function signatureText(name: string, parameters: readonly ParameterShape[]): string {
|
|
34
|
+
const written = parameters.map((one) => (one.optional ? `${one.name}?` : one.name));
|
|
35
|
+
return `${name}(${written.join(', ')})`;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** `2`, or `2 to 5` where some parameters have defaults. */
|
|
39
|
+
export function arityText(parameters: readonly ParameterShape[]): string {
|
|
40
|
+
const required = parameters.filter((one) => !one.optional).length;
|
|
41
|
+
return required === parameters.length ? `${required}` : `${required} to ${parameters.length}`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** A call with the required parameters written in, for OS3012's example slot. */
|
|
45
|
+
function exampleCall(name: string, parameters: readonly ParameterShape[]): string {
|
|
46
|
+
const required = parameters.filter((one) => !one.optional).map((one) => one.name);
|
|
47
|
+
return `${name}(${required.join(', ')})`;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Fills the parameter list from the arguments as written.
|
|
52
|
+
*
|
|
53
|
+
* Positional arguments fill from the left and named ones fill by label, which
|
|
54
|
+
* is the order `language.md` 11.2 allows. A positional argument after a named
|
|
55
|
+
* one is OS3005 and is reported once rather than once per argument: the mistake
|
|
56
|
+
* is the boundary, not each argument past it.
|
|
57
|
+
*/
|
|
58
|
+
export function bindArguments(
|
|
59
|
+
checker: Checker,
|
|
60
|
+
span: Span,
|
|
61
|
+
args: readonly Argument[],
|
|
62
|
+
name: string,
|
|
63
|
+
parameters: readonly ParameterShape[],
|
|
64
|
+
): Binding {
|
|
65
|
+
const filled: (Argument | undefined)[] = parameters.map(() => undefined);
|
|
66
|
+
const names = parameters.map((one) => one.name);
|
|
67
|
+
let next = 0;
|
|
68
|
+
let seenNamed = false;
|
|
69
|
+
let extra = 0;
|
|
70
|
+
let reportedOrder = false;
|
|
71
|
+
|
|
72
|
+
for (const argument of args) {
|
|
73
|
+
if (argument.label === undefined) {
|
|
74
|
+
if (seenNamed && !reportedOrder) {
|
|
75
|
+
checker.report('OS3005', argument.span, {});
|
|
76
|
+
reportedOrder = true;
|
|
77
|
+
}
|
|
78
|
+
if (next >= parameters.length) {
|
|
79
|
+
extra += 1;
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
filled[next] = argument;
|
|
83
|
+
next += 1;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
seenNamed = true;
|
|
88
|
+
const label = argument.label.text;
|
|
89
|
+
const index = names.indexOf(label);
|
|
90
|
+
if (index < 0) {
|
|
91
|
+
checker.report('OS3002', argument.label.span, {
|
|
92
|
+
name,
|
|
93
|
+
argument: label,
|
|
94
|
+
names: names.join(', '),
|
|
95
|
+
suggestion: closestName(label, names),
|
|
96
|
+
});
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
if (filled[index] !== undefined) {
|
|
100
|
+
checker.report('OS3013', argument.span, { argument: label });
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
filled[index] = argument;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if (extra > 0) {
|
|
107
|
+
checker.report('OS3001', span, {
|
|
108
|
+
name,
|
|
109
|
+
expected: arityText(parameters),
|
|
110
|
+
found: args.length,
|
|
111
|
+
signature: signatureText(name, parameters),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
for (let i = 0; i < parameters.length; i += 1) {
|
|
116
|
+
const parameter = parameters[i];
|
|
117
|
+
if (parameter === undefined || parameter.optional || filled[i] !== undefined) continue;
|
|
118
|
+
checker.report('OS3012', span, {
|
|
119
|
+
name,
|
|
120
|
+
argument: parameter.name,
|
|
121
|
+
example: exampleCall(name, parameters),
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return filled;
|
|
126
|
+
}
|