Skip to content

Commit 3bd94ba

Browse files
authored
TypeScript (#31)
* Rewrite code place sources in /lib for compatibility Signed-off-by: Sergey Volkov <[email protected]> * Replace tests with transpiled Signed-off-by: Sergey Volkov <[email protected]> * Update path to lib in tests Signed-off-by: Sergey Volkov <[email protected]> * Update package.json Signed-off-by: Sergey Volkov <[email protected]> * lint: disable no-explicit-any Signed-off-by: Sergey Volkov <[email protected]> * lint: disable ban-ts-comment Signed-off-by: Sergey Volkov <[email protected]> * lint: remove unused variable Signed-off-by: Sergey Volkov <[email protected]> * Move Tracker from trackjdwp.ts to separate file Signed-off-by: Sergey Volkov <[email protected]> * Rewrite `grunt keycode` task Signed-off-by: Sergey Volkov <[email protected]> * Keep declarations alongside with the code use "files" in package.json instead of .npmignore Signed-off-by: Sergey Volkov <[email protected]> * Fix cli Signed-off-by: Sergey Volkov <[email protected]> * Replace some types with "any" Signed-off-by: Sergey Volkov <[email protected]> * lint: ignore generated declarations Signed-off-by: Sergey Volkov <[email protected]> * Add @types/node-forge as dependency Auth.parsePublicKey returns value based on PulicKey class from node-forge Signed-off-by: Sergey Volkov <[email protected]> * Point to declaration file Signed-off-by: Sergey Volkov <[email protected]>
1 parent 3fbd79a commit 3bd94ba

File tree

241 files changed

+9138
-7175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

241 files changed

+9138
-7175
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test/**/*.js
2+
*.js
3+
/lib/**/*.d.ts

.eslintrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"extends": [
3+
"plugin:@typescript-eslint/recommended",
4+
"plugin:prettier/recommended",
5+
"prettier",
6+
"prettier/@typescript-eslint"
7+
],
8+
"plugins": [
9+
"progress",
10+
"@typescript-eslint",
11+
"prettier"
12+
],
13+
"parserOptions": {
14+
"ecmaVersion": 2020,
15+
"sourceType": "module"
16+
},
17+
"rules": {
18+
"progress/activate": 1
19+
},
20+
"overrides": [
21+
]
22+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/node_modules/
2-
/lib/
2+
/lib/**/*.js
3+
/lib/**/*.d.ts
34
/temp/
45
/index.js
6+
/index.d.ts
57
/*.tgz
68
package-lock.json

.npmignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "all",
4+
"singleQuote": true,
5+
"printWidth": 120,
6+
"tabWidth": 2
7+
}

index.coffee

Lines changed: 0 additions & 1 deletion
This file was deleted.

index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import Adb from './lib/adb';
2+
3+
export = Adb;

lib/Callback.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export type Callback<T> = (err: Error | null, result?: T) => void;

lib/ClientOptions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { TcpNetConnectOpts } from 'net';
2+
export interface ClientOptions extends TcpNetConnectOpts {
3+
bin?: string;
4+
}

lib/CpuStats.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export interface CpuStats {
2+
user: number;
3+
nice: number;
4+
system: number;
5+
idle: number;
6+
iowait: number;
7+
irq: number;
8+
softirq: number;
9+
steal: number;
10+
guest: number;
11+
guestnice: number;
12+
total: number;
13+
}
14+
15+
export interface Loads {
16+
[index: string]: CpuStats;
17+
}

0 commit comments

Comments
 (0)