const outputs = {
groceries: ['apples', 'bananas', 'oranges'],
unitPrices: [1.5, 2, 1],
total: 4.5,
isPaid: true,
notes: 'Buy organic if possible',
};
type TestSpecs = MatchingSpecs<typeof outputs>;
// expected:
// type TestSpecs = {
// groceries: "array of strings";
// unitPrices: "array of numbers";
// total: "number";
// isPaid: "boolean";
// notes: "string";
// };
Generated using TypeDoc
Infers (as type) the Specs required to generate output of a given type, represented as a SpecTypeOrDict. The inferred strings are based on the TemplateExactMatch part of the SpecValueTemplates for each SpecType.