UNPKG

@vim-crouwel/cfpc

Version:

TypeScript library for calculating CO2 emissions from food, energy, and transportation

20 lines (19 loc) 716 B
import type { TransportationCategory } from "../types/transportation"; /** * Calculate CO2 emissions for transportation * @param mode - Transportation mode (car, bus, train, etc.) * @param km - Distance in kilometers * @returns CO2 emissions in kg */ export declare function co2PerKm(mode: keyof TransportationCategory, km: number): number; /** * Get data source for a specific transportation mode * @param mode - Transportation mode * @returns Data source reference */ export declare function dataSource(mode: keyof TransportationCategory): string; /** * Get all available transportation modes * @returns Array of transportation mode names */ export declare function getTransportationModes(): string[];