Installation
npm install --save @types/node-wifi
Summary
This package contains type definitions for node-wifi (https://github.com/friedrith/node-wifi).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-wifi.
export interface WiFiNetwork {
ssid: string;
bssid?: string;
mac?: string;
channel: number;
frequency: number;
signal_level: number;
quality: number;
security: string;
security_flags: string[];
mode?: string;
}
export interface InitConfig {
debug?: boolean;
iface?: string | null;
}
export interface ConnectionOpts {
ssid: string;
password: string;
}
export interface DeletionOpts {
ssid: string;
}
export function init(options: InitConfig): void;
export function scan(): Promise<WiFiNetwork[]>;
export function scan(cb: (error: Error | null, networks: WiFiNetwork[]) => void): void;
export function connect(opts: ConnectionOpts): Promise<void>;
export function connect(opts: ConnectionOpts, cb: () => void): void;
export function disconnect(): Promise<void>;
export function disconnect(cb: (error: Error | null) => void): void;
export function getCurrentConnections(): Promise<WiFiNetwork[]>;
export function getCurrentConnections(cb: (error: Error | null, currentConnections: WiFiNetwork[]) => void): void;
export function deleteConnection(opts: DeletionOpts, cb: (error: Error | null) => void): void;
export function deleteConnection(opts: DeletionOpts): Promise<void>;
Additional Details
- Last updated: Mon, 23 May 2022 18:01:48 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by hieyou1.