0.0.33 • Published 6 months ago
@types/wake_on_lan v0.0.33
Installation
npm install --save @types/wake_on_lan
Summary
This package contains type definitions for wake_on_lan (https://github.com/agnat/node_wake_on_lan).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/wake_on_lan.
index.d.ts
// Type definitions for wake_on_lan
// Project: https://github.com/agnat/node_wake_on_lan
// Definitions by: Tobias Kahlert <https://github.com/SrTobi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node"/>
declare var wol: wol.Wol;
export = wol;
declare namespace wol {
export interface WakeOptions {
/**
* The ip address to which the packet is send (default: 255.255.255.255)
*/
address?:string | undefined;
/**
* Number of packets to send (default: 3)
*/
num_packets?:number | undefined;
/**
* The interval between packets (default: 100ms)
*/
interval?:number | undefined;
/**
* The port to send to (default: 9)
*/
port?:number | undefined;
}
type ErrorCallback = (Error:any) => void;
export interface Wol {
/**
* Send a sequence of Wake-on-LAN magic packets to the given MAC address.
*
* @param {string} macAddress the mac address of the target device
*/
wake(macAddress:string):void;
/**
* Send a sequence of Wake-on-LAN magic packets to the given MAC address.
*
* @param {string} macAddress the mac address of the target device
* @param {ErrorCallback} callback is called when all packets have been sent or an error occurs.
*/
wake(macAddress:string, callback:ErrorCallback):void;
/**
* Send a sequence of Wake-on-LAN magic packets to the given MAC address.
*
* @param {string} macAddress the mac address of the target device
* @param {WakeOptions} opts additional options to send the packet
* @param {ErrorCallback} callback is called when all packets have been sent or an error occurs.
*/
wake(macAddress:string, opts:WakeOptions, callback?:Function):void;
/**
* Creates a buffer with a magic packet for the given MAC address.
*
* @param {string} macAddress mac address of the target device
* @return {Buffer} the magic packet
*/
createMagicPacket(macAddress:string):Buffer;
}
}
Additional Details
- Last updated: Fri, 09 Jul 2021 02:32:44 GMT
- Dependencies: @types/node
- Global values: none
Credits
These definitions were written by Tobias Kahlert.
0.0.31
8 months ago
0.0.32
7 months ago
0.0.33
6 months ago
0.0.30
3 years ago
0.0.29
3 years ago
0.0.28
4 years ago
0.0.27
8 years ago
0.0.26
8 years ago
0.0.25-alpha
8 years ago
255.255.25-alpha
8 years ago
255.255.24-alpha
8 years ago
255.255.23-alpha
8 years ago
255.255.22-alpha
8 years ago
255.255.21-alpha
8 years ago
255.255.20-alpha
8 years ago
255.255.19-alpha
8 years ago
255.255.14-alpha
8 years ago
255.255.13-alpha
8 years ago