/** * Complex number type */ export interface Complex { real: number; imaginary: number; } /** * typeguard * * @internal */ export declare const IsComplex: (value: unknown) => value is Complex; /** * @internal */ export declare const ComplexToString: (value: Complex) => string; /** * dimensioned quantity: 3.2 m/s, 2kg, 5m, &c. */ export interface DimensionedQuantity { value: number; unit: string; } /** * typeguard * * @internal */ export declare const IsDimensionedQuantity: (value: unknown) => value is DimensionedQuantity; /** temp until we have a solid type */ export declare const IsFunctionType: (value: unknown) => boolean; /** * this is the list of value types. internally, we use an enum. I don't * want to change that, at least not at the moment, but that presents a * problem for exporting types. * * we'll switch to string types for import/export, although we still support * importing the old numeric enum types for backwards compatibility. * * @internal * */ export declare const ValueTypeList: readonly ["undefined", "formula", "string", "number", "boolean", "object", "function", "error", "complex", "array", "dimensioned_quantity"]; /** * string types for import/export * * @internalRemarks * * temporarily switching to literal, see what happens to API * */ export type SerializedValueType = // typeof ValueTypeList[number]; 'undefined' | 'formula' | 'string' | 'number' | 'boolean' | 'object' | 'function' | 'error' | 'complex' | 'array' | 'dimensioned_quantity'; /** * this enum goes back a long way and is pretty ingrained, so I don't * want to change it (at least not right now). but if we're exporting types, * using enums is a problem. * * what we will do is keep the enum internally but switch the exported type * to a string. the problem then becomes keeping the types matched up * properly. I can't arrive at a good way of doing that automatically. * * old comments: * * undefined is 0 so we can test it as falsy. * * we're passing this type information out to calculators, so it needs * to have known values. DO NOT MODIFY EXISTING INDEXES, or at least be * aware of the implications. definitely do not change undefined => 0. */ export declare enum ValueType { undefined = 0, formula = 1, string = 2, number = 3, boolean = 4, object = 5, function = 6,// why was this inserted in the middle? error = 7, complex = 8, array = 9, dimensioned_quantity = 10 } /** @internal */ export declare const GetValueType: (value: unknown) => ValueType;