From 382c478f69f29f848683f0acfb4b74fcefeeb169 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Fri, 25 Oct 2019 21:38:09 +0200 Subject: [PATCH] Fixed some tests which caused tsc compile issues --- github | 2 +- native/serverconnection/exports/exports.d.ts | 2 +- native/serverconnection/test/js/ft.ts | 6 +++--- native/serverconnection/test/js/main.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/github b/github index a1490ab..14645dc 160000 --- a/github +++ b/github @@ -1 +1 @@ -Subproject commit a1490ab0d97f65e27845fec6daf88be8ed6d1014 +Subproject commit 14645dca78396c915ad4ad122d532f24fdfd2969 diff --git a/native/serverconnection/exports/exports.d.ts b/native/serverconnection/exports/exports.d.ts index 120fa78..febe000 100644 --- a/native/serverconnection/exports/exports.d.ts +++ b/native/serverconnection/exports/exports.d.ts @@ -127,8 +127,8 @@ declare module "teaclient_connection" { export function upload_transfer_object_from_buffer(buffer: ArrayBuffer); export function download_transfer_object_from_buffer(target_buffer: ArrayBuffer); - export function spawn_connection(transfer: TransferOptions) : NativeFileTransfer; export function destroy_connection(connection: NativeFileTransfer); + export function spawn_connection(transfer: TransferOptions) : NativeFileTransfer; } export namespace audio { diff --git a/native/serverconnection/test/js/ft.ts b/native/serverconnection/test/js/ft.ts index 4e0087b..ed5af32 100644 --- a/native/serverconnection/test/js/ft.ts +++ b/native/serverconnection/test/js/ft.ts @@ -52,10 +52,10 @@ start_server().catch(error => { console.error("Failed to start FT server (%o)", error); }).then(() => { const target_buffer = new Uint8Array(buffer_size); - const destination = handle.download_transfer_object_from_buffer(target_buffer.buffer); - const source = handle.upload_transfer_object_from_buffer(str2ab("Hello World")); + const destination = handle.ft.download_transfer_object_from_buffer(target_buffer.buffer); + const source = handle.ft.upload_transfer_object_from_buffer(str2ab("Hello World")); - const transfer = handle.spawn_file_connection({ + const transfer = handle.ft.spawn_connection({ client_transfer_id: 0, server_transfer_id: 0, diff --git a/native/serverconnection/test/js/main.ts b/native/serverconnection/test/js/main.ts index 2d89c18..77b263b 100644 --- a/native/serverconnection/test/js/main.ts +++ b/native/serverconnection/test/js/main.ts @@ -10,7 +10,7 @@ const os = require('os'); import * as fs from "fs"; const original_require = require; -require = module => original_require("/home/wolverindev/TeaSpeak-Client/client/native/build/linux_x64/" + module + ".node"); +require = (module => original_require("/home/wolverindev/TeaSpeak-Client/client/native/build/linux_x64/" + module + ".node")) as any; import * as handle from "teaclient_connection"; require = original_require; @@ -41,11 +41,11 @@ if(recorder.get_device() == -1) { if(device.name != "pulse") continue; console.log("Found pulse at %o", device.device_index); - recorder.set_device(device.device_index); + recorder.set_device(device.device_index, () => {}); } } console.log("Device: %o", recorder.get_device()); -recorder.start(); +recorder.start(() => {}); console.log("Started: %o", recorder.started()); const consumer = recorder.create_consumer();