A Shanzhai step which converts a JSON value to TypeScript source code for ambient declarations.
Use ConvertJsonToTypeScriptStep
to convert an object containing constants into
a set of TypeScript type declarations. For example, returning the following
from a trigger's event handler:
new ConvertJsonToTypeScriptStep(
`A description of the operation being performed`,
new ConstantInput({
theFirstDeclaration: 3,
theSecondDeclaration: {
anObjectContaining: [
`an`,
`array`,
],
}
})
);
To produce the following output:
declare const theFirstDeclaration: 3;
declare const theSecondDeclaration: {
readonly anObjectContaining: readonly [
`an`,
`array`,
],
};
The values are not included; these should be injected during minification.
This package has no runtime dependencies.
This package has no runtime peer dependencies (it does not expect any other packages to be installed alongside itself).