[ ] We should create .d.ts files for display/script parameters:
// Sample.d.ts
declare namespace webMI {
var query: {
// All the parameters from Sample.json, with type and description:
/** The param description */
parameter: string
}
}
... so they can be used in the source scripts:
// Sample.ts
/// <reference path="./Sample.d.ts" />
// TypeScript compiler will complain about webMI.query.parameter being a string here:
const test: number = webMI.query.parameter * 13;
[ ] As webMI.query.* is always a string, regardless of the type specified in parameters we could also cast them to the right type. This would be pretty simple with a virtual module, e.g. @atscm/cast-params that updates the types:
We need better TypeScript support:
[ ] We need to support TypeScript in display/script source files (POC: https://github.com/atSCM/ts-demo)
... so they can be used in the source scripts:
webMI.query.*
is always a string, regardless of the type specified in parameters we could also cast them to the right type. This would be pretty simple with a virtual module, e.g.@atscm/cast-params
that updates the types:Of course, we could do this for non-ts sources as well