Skip to content

Commit

Permalink
Use type definitions from DefinitelyTyped.
Browse files Browse the repository at this point in the history
  • Loading branch information
fershad authored Jan 8, 2024
2 parents b22bf09 + e53da02 commit 27e2ed4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# CO2.js

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

<img src="https://github.com/thegreenwebfoundation/co2.js/actions/workflows/unittests.yml/badge.svg" />
Expand Down Expand Up @@ -75,6 +77,14 @@ You can also build the CO2.js library from the source code. To do this:
- `dist/esm` - An ES Modules compatible build.
- `dist/iife` - An Immediately Invoked Function Expression (IIFE) version of the library.

## TypeScript support

Type definitions for CO2.js are [published in the DefinitelyTyped project](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/tgwf__co2), and are [available on NPM](https://www.npmjs.com/package/@types/tgwf__co2) at `@types/tgwf__co2`.

If you want to use type definitions in your project, they should be installed as a devDependency.

`npm install --dev @types/tgwf__co2`

## Marginal and average emissions intensity data

CO2.js includes yearly average grid intensity data from [Ember](https://ember-climate.org/data/data-explorer/), as well as marginal intensity data from the [UNFCCC](https://unfccc.int/) (United Nations Framework Convention on Climate Change). You can find the data in JSON and CommonJS Module format in the `data/output` folder.
Expand Down
2 changes: 0 additions & 2 deletions index.d.ts

This file was deleted.

0 comments on commit 27e2ed4

Please sign in to comment.