Typings for steam-client

This commit is contained in:
Edward Sammut Alessi
2018-03-21 14:30:39 +01:00
parent 3d5138fc4b
commit 428c746291
4 changed files with 3451 additions and 0 deletions

3390
types/steam-client/index.d.ts vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,38 @@
import Steam = require("steam-client");
const steamClient = new Steam.CMClient(Steam.EConnectionProtocol.TCP);
steamClient.connect();
steamClient.connect(Steam.servers[0]);
steamClient.connect(Steam.servers[0], true);
steamClient.disconnect();
steamClient.on<'connected'>('connected', (serverLoad) => {
steamClient.logOn({
account_name: serverLoad,
password: "password"
});
});
Steam.servers.forEach((server) => server.host);
steamClient.on<'logOnResponse'>('logOnResponse', (details) => {
return details.eresult + details.webapi_authenticate_user_nonce;
});
steamClient.send({
msg: Steam.EMsg.ClientGetFinalPrice,
proto: {
eresult: Steam.EResult.AdministratorOK
}
}, new Buffer("lol"), (header, body) => {
return header.msg + body.reverse().toString();
});
steamClient.bind("127.0.0.1", 80);
if (steamClient.loggedOn) {
console.log(steamClient.steamID);
console.log(steamClient.remoteAddress);
}

View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"steam-client-tests.ts"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }