Browse Source

added typing

develop
ray-1337 3 years ago
parent
commit
d8b6fd6d89
  1. 29
      index.d.ts

29
index.d.ts

@ -0,0 +1,29 @@
declare const nodeUfw: {
name: string;
version: string;
disable: Promise<Boolean>;
enable: Promise<Boolean>;
status: (raw?: boolean) => Promise<string | Array<ParsedStatus>>;
allow: {
port: (port: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
address: (address: string, port?: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
};
deny: {
port: (port: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
address: (address: string, port?: number, protocol?: "udp" | "tcp") => Promise<Boolean>;
};
};
interface ParsedStatus {
to: string;
action: string;
from: string;
};
export default nodeUfw;
Loading…
Cancel
Save