A number or numeric string already confirmed by isPubChemCID.
The CID as a branded number.
if (isPubChemCID(raw)) product.pubchemId = toPubChemCID(raw);
toPubChemCID("11413"); // 11413
export function toPubChemCID(value: number | string): PubChemCID {
return Number(value) as PubChemCID;
}
Normalizes a value already validated by isPubChemCID into the branded PubChemCID number, coercing a numeric string to its number form. The assertion is unavoidable and lives here as the single sanctioned construction point: a nominal brand can't be minted from
Number()without one.