# @types/pigpio-dht

> TypeScript definitions for pigpio-dht

Latest version **1.1.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/pigpio-dht
pnpm add @types/pigpio-dht
yarn add @types/pigpio-dht
bun add @types/pigpio-dht
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2023-11-07 |
| First published | 2018-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/pigpio-dht
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pigpio-dht
- npm.io page: https://npm.io/package/@types/pigpio-dht

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.1.3 (latest) — 2023-11-07
- 1.1.1 (ts4.3) — 2023-03-20
- 1.1.0 (ts2.0) — 2018-10-01
- 1.1.2 — 2023-10-18

## README

# Installation
> `npm install --save @types/pigpio-dht`

# Summary
This package contains type definitions for pigpio-dht (https://github.com/depuits/pigpio-dht).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pigpio-dht.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pigpio-dht/index.d.ts)
````ts
/// <reference types="node" />

export = dht;

/**
 * Returns a new DHT object for accessing a DHT11 or DHT22/AM2302 via GPIO.
 * @param gpio      an unsigned integer specifying the GPIO number
 * @param type      11 to initialize for reading a DHT11, 22 for DHT22/AM2302
 */
declare function dht(gpio: number, type: number): dht.Dht;

declare namespace dht {
    interface Dht extends NodeJS.EventEmitter {
        /**
         * Starts reading the sensor value. Emits the 'start' event before starting,
         * the 'end' event on end whether or not an error occurred, the 'result'
         * event with a DhtResult on success, and the 'badChecksum' event on a
         * receive failure.
         * @returns false if a read is already underway, true if a new read was started.
         */
        read(): boolean;
    }

    /**
     * Result from a successful sensor read.
     */
    interface DhtResult {
        /** The temperature value in degrees Celsius. */
        temperature: number;

        /** The humidity value in percentage points. */
        humidity: number;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by .

---
_Source: https://npm.io/package/@types/pigpio-dht · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
