tdjson
TypeScript icon, indicating that this package has built-in type declarations

0.0.23 • Public • Published

tdjson

TypeScript types for libtdjson.so

npm Coverage Status

TypeScript code is updated daily automatically from td_api.tl.

Usage

import { Tdjson } from 'tdjson';

class MyTdjson extends Tdjson {
	protected async _request(message: any) {
		// TODO: Call actual libtdjson.so binding here.
		return { '@type': 'ok' };
	}
}

const myTdjson = new MyTdjson();

// All methods typed and autocompleted with documentation 🎉
const proxy = await myTdjson.addProxy({
	server: '127.0.0.1',
	port: 1234,
	enable: true,
	type: {
		'@type': 'proxyTypeSocks5',
		username: 'username',
		password: 'password',
	},
});

Package Sidebar

Install

npm i tdjson

Weekly Downloads

57

Version

0.0.23

License

GPL-3.0

Unpacked Size

2.8 MB

Total Files

23

Last publish

Collaborators

  • futpib