import type { AtomsMap } from './partToAtoms.types'; type ImpossibleCustomNames = 'mass' | 'charge' | 'mf' | 'atoms' | 'unsaturation' | 'parts'; type AllowedCustomNames = Exclude | undefined; type GetEM = GIO extends GetInfoOptions ? em extends undefined ? 'monoisotopicMass' : em : never; type GetMSEM = GIO extends GetInfoOptions ? msem extends undefined ? 'observedMonoisotopicMass' : msem : never; type CustomNameFields = Record, number> & Record, number | undefined>; export type MFInfo = { /** * Molecular weight of the molecule formula */ mass: number; /** * Charge of the molecule formula */ charge: number; mf: string; /** * Object containing the atom and the number of atoms * This object will take only the atom label and will not take into account isotopic enrichments */ atoms: AtomsMap; /** * Theoretical number of isotopologues not taking into account the abundance of isotopes */ nbIsotopologues: number; /** * Double bond equivalent (DBE) or unsaturation index (UI) * This value can be undefined if some not supported atoms are present */ unsaturation?: number; } & CustomNameFields; export type MFInfoWithParts = Omit, 'unsaturation'> & { parts: Array>; unsaturation: number; } & CustomNameFields; /** * final options type for the `getInfo` function * * @example * ```ts * const options: GetInfoOptions<'em', 'msem'> = {emFieldName: 'em', msemFieldName: 'msem'}; * const info = getInfo(parts, options); * * // info.em should exists * // info.parts[0].msem should exists * ``` */ export interface GetInfoOptions { customUnsaturations?: object; emFieldName?: EM; msemFieldName?: MSEM; } /** * Guard type to check if the provided options are allowed * @example * ```ts * function getInfo(options?: GIO): MFInfo | MFInfoWithParts;` * ``` */ export type GetInfoOptionsAllowed = GetInfoOptions; export {}; //# sourceMappingURL=getInfo.types.d.ts.map