Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hellos3b opened this issue May 25, 2021 · 1 comment
Open

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

hellos3b opened this issue May 25, 2021 · 1 comment

Comments

@hellos3b
Copy link

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

@amaury1093
Copy link
Member

Thanks for the issue!

I recently renamed "raw" to "µg/m³" here. In your case, a search & replace should do the trick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants