mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
espruino: added type for wifi module for access point (#27544)
* espruino added type for wifi module for access point * espruino added myself to definitions * changed tabsize to 4
This commit is contained in:
@@ -1,2 +1,14 @@
|
||||
import * as wifi from 'Wifi';
|
||||
|
||||
wifi.connect('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => {
|
||||
if (err) throw err;
|
||||
console.log('connected');
|
||||
});
|
||||
|
||||
wifi.startAP('ssid', { password: 'pass', authMode: 'wpa_wpa2' }, err => {
|
||||
if (err) throw err;
|
||||
console.log("created");
|
||||
});
|
||||
|
||||
I2C1.setup({ scl: D4, sda: D0 });
|
||||
Serial2.setup(9600, { rx: D16, tx: D17 });
|
||||
|
||||
Vendored
+6
-4
@@ -1,6 +1,7 @@
|
||||
// Type definitions for Espruino 1.94
|
||||
// Project: http://www.espruino.com/
|
||||
// Definitions by: Stanislav Berkov <https://github.com/stasberkov>
|
||||
// Jurand Niemczycki <https://github.com/createdbyjurand>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
declare interface Object {
|
||||
@@ -9,6 +10,7 @@ declare interface Object {
|
||||
|
||||
declare module "Wifi" {
|
||||
function connect(ssid: string, options: any, callback: (err: any) => any): any;
|
||||
function startAP(ssid: string, options: any, callback: (err: any) => any): any;
|
||||
}
|
||||
|
||||
declare module "InfluxDB" {
|
||||
@@ -391,10 +393,10 @@ declare interface Timer {
|
||||
}
|
||||
|
||||
|
||||
// write(data: any[]): any;
|
||||
// on(event: string, handler: (data: any) => any): any;
|
||||
// setup(boudrate: number, options: any): any;
|
||||
// read(chars?: number): string;
|
||||
// write(data: any[]): any;
|
||||
// on(event: string, handler: (data: any) => any): any;
|
||||
// setup(boudrate: number, options: any): any;
|
||||
// read(chars?: number): string;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user