Skip to content

Typescript when trying to use "raw" in convert package #486

@hellos3b

Description

@hellos3b

I'm using data from PurpleAir json, and trying to convert raw 10 minute average PM2.5 value to the USA EPA AQI value

I used to use "raw" in the from parameter:

convert('pm25', 'raw', 'usaEpa', sensorStats.v1)

I just started refactoring some of my code, and am now getting an error: Argument of type '"raw"' is not assignable to parameter of type '"chnMep" | "usaEpa" | "µg/m³" | "ppm" | "particles/cm³" | "ppb"'.

I'm honestly not very versed in pollutants and AQI, I just found this package a while ago while googling how to calculate an AQI. Do you know which string value I should use for this ? Or is it a bug that "raw" doesn't work anymore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions