mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Added definition files for BluetoothClassicSerial Cordova plugin
This commit is contained in:
committed by
Wouter
parent
f01ba112a9
commit
4bb70f46ce
+63
@@ -0,0 +1,63 @@
|
||||
let BluetoothClassicSerial: BluetoothClassicSerial =
|
||||
window.BluetoothClassicSerial;
|
||||
|
||||
BluetoothClassicSerial.connect(
|
||||
"",
|
||||
[""]
|
||||
);
|
||||
BluetoothClassicSerial.connect(
|
||||
"",
|
||||
[""],
|
||||
results => {}
|
||||
);
|
||||
BluetoothClassicSerial.connect(
|
||||
"",
|
||||
[""],
|
||||
results => {},
|
||||
error => {}
|
||||
);
|
||||
BluetoothClassicSerial.connectInsecure("", [""]);
|
||||
BluetoothClassicSerial.connectInsecure("", [""], results => {});
|
||||
BluetoothClassicSerial.connectInsecure("", [""], results => {}, error => {});
|
||||
BluetoothClassicSerial.register(() => {});
|
||||
BluetoothClassicSerial.disconnect(results => {});
|
||||
BluetoothClassicSerial.disconnect(results => {}, error => {});
|
||||
BluetoothClassicSerial.write("", "");
|
||||
BluetoothClassicSerial.write("", "", results => {});
|
||||
BluetoothClassicSerial.write("", "", results => {}, error => {});
|
||||
BluetoothClassicSerial.available("");
|
||||
BluetoothClassicSerial.available("", results => {});
|
||||
BluetoothClassicSerial.available("", results => {}, error => {});
|
||||
BluetoothClassicSerial.read("");
|
||||
BluetoothClassicSerial.read("", results => {});
|
||||
BluetoothClassicSerial.read("", results => {}, error => {});
|
||||
BluetoothClassicSerial.readUntil("", "");
|
||||
BluetoothClassicSerial.readUntil("", "", results => {});
|
||||
BluetoothClassicSerial.readUntil("", "", results => {}, error => {});
|
||||
BluetoothClassicSerial.subscribe("", "");
|
||||
BluetoothClassicSerial.subscribe("", "", results => {});
|
||||
BluetoothClassicSerial.subscribe("", "", results => {}, error => {});
|
||||
BluetoothClassicSerial.unsubscribe("");
|
||||
BluetoothClassicSerial.unsubscribe("", results => {});
|
||||
BluetoothClassicSerial.unsubscribe("", results => {}, error => {});
|
||||
BluetoothClassicSerial.subscribeRawData("");
|
||||
BluetoothClassicSerial.subscribeRawData("", results => {});
|
||||
BluetoothClassicSerial.subscribeRawData("", results => {}, error => {});
|
||||
BluetoothClassicSerial.unsubscribeRawData("");
|
||||
BluetoothClassicSerial.unsubscribeRawData("", results => {});
|
||||
BluetoothClassicSerial.unsubscribeRawData("", results => {}, error => {});
|
||||
BluetoothClassicSerial.clear("");
|
||||
BluetoothClassicSerial.clear("", results => {});
|
||||
BluetoothClassicSerial.clear("", results => {}, error => {});
|
||||
BluetoothClassicSerial.list(results => {});
|
||||
BluetoothClassicSerial.list(results => {}, error => {});
|
||||
BluetoothClassicSerial.isConnected(results => {});
|
||||
BluetoothClassicSerial.isConnected(results => {}, error => {});
|
||||
BluetoothClassicSerial.isEnabled(results => {});
|
||||
BluetoothClassicSerial.isEnabled(results => {}, error => {});
|
||||
BluetoothClassicSerial.showBluetoothSettings(results => {});
|
||||
BluetoothClassicSerial.showBluetoothSettings(results => {}, error => {});
|
||||
BluetoothClassicSerial.enable(results => {});
|
||||
BluetoothClassicSerial.enable(results => {}, error => {});
|
||||
BluetoothClassicSerial.discoverUnpaired(results => {});
|
||||
BluetoothClassicSerial.discoverUnpaired(results => {}, error => {});
|
||||
@@ -0,0 +1,105 @@
|
||||
// Type definitions for cordova-plugin-bluetoothClassic-serial 0.9
|
||||
// Project: https://github.com/soltius/BluetoothClassicSerial
|
||||
// Definitions by: Wouter Roosendaal <https://github.com/tuvokki>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Global object bluetoothClassicSerial.
|
||||
*/
|
||||
interface Window {
|
||||
BluetoothClassicSerial: BluetoothClassicSerial;
|
||||
}
|
||||
|
||||
interface BluetoothClassicSerial {
|
||||
connect: (
|
||||
deviceId: string,
|
||||
interfaceArray: [any],
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
connectInsecure: (
|
||||
deviceId: string,
|
||||
interfaceArray: [any],
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
register: (data_cb?: () => any) => void;
|
||||
disconnect: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
write: (
|
||||
interfaceId: string,
|
||||
data: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
available: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
read: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
readUntil: (
|
||||
interfaceId: string,
|
||||
delimiter: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
subscribe: (
|
||||
interfaceId: string,
|
||||
delimiter: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
unsubscribe: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
subscribeRawData: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
unsubscribeRawData: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
clear: (
|
||||
interfaceId: string,
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
list: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
isConnected: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
isEnabled: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
showBluetoothSettings: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
enable: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
discoverUnpaired: (
|
||||
success_cb?: (results: any) => any,
|
||||
fail_cb?: (error: any) => any
|
||||
) => void;
|
||||
}
|
||||
|
||||
declare var bluetoothClassicSerial: BluetoothClassicSerial;
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"cordova-plugin-bluetoothclassic-serial-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user