@openfisca/json-model
Version:
Library to handle informations extracted in JSON or YAML format from OpenFisca parameters, variables, etc
32 lines (31 loc) • 1.02 kB
TypeScript
import type { Entity } from "./entities";
import type { VariableValue } from "./variables";
export interface Population extends PopulationWithoutId {
id: string;
}
export interface PopulationWithoutId {
name?: string;
[key: string]: {
[instant: string]: VariableValue | null;
} | string | string[] | undefined;
}
export type Situation = {
[entityKeyPlural: string]: {
[populationId: string]: PopulationWithoutId;
};
} & {
description?: string;
dixieme: number;
/** ID generated from test case filename, without the ".json" extension */
id?: string;
/** Name of variables that this test case illustrates */
linked_variables?: {
[variableName: string]: Array<{
description?: string;
/** optional ID of a situation that must be compared to this situation for this variable */
compare_to?: string;
}>;
};
title?: string;
};
export declare function getPopulationReservedKeys(entity: Entity): Set<string>;