Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

os.d.ts 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. declare module 'os' {
  2. interface CpuInfo {
  3. model: string;
  4. speed: number;
  5. times: {
  6. user: number;
  7. nice: number;
  8. sys: number;
  9. idle: number;
  10. irq: number;
  11. };
  12. }
  13. interface NetworkInterfaceBase {
  14. address: string;
  15. netmask: string;
  16. mac: string;
  17. internal: boolean;
  18. cidr: string | null;
  19. }
  20. interface NetworkInterfaceInfoIPv4 extends NetworkInterfaceBase {
  21. family: "IPv4";
  22. }
  23. interface NetworkInterfaceInfoIPv6 extends NetworkInterfaceBase {
  24. family: "IPv6";
  25. scopeid: number;
  26. }
  27. interface UserInfo<T> {
  28. username: T;
  29. uid: number;
  30. gid: number;
  31. shell: T;
  32. homedir: T;
  33. }
  34. type NetworkInterfaceInfo = NetworkInterfaceInfoIPv4 | NetworkInterfaceInfoIPv6;
  35. function hostname(): string;
  36. function loadavg(): number[];
  37. function uptime(): number;
  38. function freemem(): number;
  39. function totalmem(): number;
  40. function cpus(): CpuInfo[];
  41. function type(): string;
  42. function release(): string;
  43. function networkInterfaces(): NodeJS.Dict<NetworkInterfaceInfo[]>;
  44. function homedir(): string;
  45. function userInfo(options: { encoding: 'buffer' }): UserInfo<Buffer>;
  46. function userInfo(options?: { encoding: BufferEncoding }): UserInfo<string>;
  47. type SignalConstants = {
  48. [key in NodeJS.Signals]: number;
  49. };
  50. namespace constants {
  51. const UV_UDP_REUSEADDR: number;
  52. namespace signals {}
  53. const signals: SignalConstants;
  54. namespace errno {
  55. const E2BIG: number;
  56. const EACCES: number;
  57. const EADDRINUSE: number;
  58. const EADDRNOTAVAIL: number;
  59. const EAFNOSUPPORT: number;
  60. const EAGAIN: number;
  61. const EALREADY: number;
  62. const EBADF: number;
  63. const EBADMSG: number;
  64. const EBUSY: number;
  65. const ECANCELED: number;
  66. const ECHILD: number;
  67. const ECONNABORTED: number;
  68. const ECONNREFUSED: number;
  69. const ECONNRESET: number;
  70. const EDEADLK: number;
  71. const EDESTADDRREQ: number;
  72. const EDOM: number;
  73. const EDQUOT: number;
  74. const EEXIST: number;
  75. const EFAULT: number;
  76. const EFBIG: number;
  77. const EHOSTUNREACH: number;
  78. const EIDRM: number;
  79. const EILSEQ: number;
  80. const EINPROGRESS: number;
  81. const EINTR: number;
  82. const EINVAL: number;
  83. const EIO: number;
  84. const EISCONN: number;
  85. const EISDIR: number;
  86. const ELOOP: number;
  87. const EMFILE: number;
  88. const EMLINK: number;
  89. const EMSGSIZE: number;
  90. const EMULTIHOP: number;
  91. const ENAMETOOLONG: number;
  92. const ENETDOWN: number;
  93. const ENETRESET: number;
  94. const ENETUNREACH: number;
  95. const ENFILE: number;
  96. const ENOBUFS: number;
  97. const ENODATA: number;
  98. const ENODEV: number;
  99. const ENOENT: number;
  100. const ENOEXEC: number;
  101. const ENOLCK: number;
  102. const ENOLINK: number;
  103. const ENOMEM: number;
  104. const ENOMSG: number;
  105. const ENOPROTOOPT: number;
  106. const ENOSPC: number;
  107. const ENOSR: number;
  108. const ENOSTR: number;
  109. const ENOSYS: number;
  110. const ENOTCONN: number;
  111. const ENOTDIR: number;
  112. const ENOTEMPTY: number;
  113. const ENOTSOCK: number;
  114. const ENOTSUP: number;
  115. const ENOTTY: number;
  116. const ENXIO: number;
  117. const EOPNOTSUPP: number;
  118. const EOVERFLOW: number;
  119. const EPERM: number;
  120. const EPIPE: number;
  121. const EPROTO: number;
  122. const EPROTONOSUPPORT: number;
  123. const EPROTOTYPE: number;
  124. const ERANGE: number;
  125. const EROFS: number;
  126. const ESPIPE: number;
  127. const ESRCH: number;
  128. const ESTALE: number;
  129. const ETIME: number;
  130. const ETIMEDOUT: number;
  131. const ETXTBSY: number;
  132. const EWOULDBLOCK: number;
  133. const EXDEV: number;
  134. const WSAEINTR: number;
  135. const WSAEBADF: number;
  136. const WSAEACCES: number;
  137. const WSAEFAULT: number;
  138. const WSAEINVAL: number;
  139. const WSAEMFILE: number;
  140. const WSAEWOULDBLOCK: number;
  141. const WSAEINPROGRESS: number;
  142. const WSAEALREADY: number;
  143. const WSAENOTSOCK: number;
  144. const WSAEDESTADDRREQ: number;
  145. const WSAEMSGSIZE: number;
  146. const WSAEPROTOTYPE: number;
  147. const WSAENOPROTOOPT: number;
  148. const WSAEPROTONOSUPPORT: number;
  149. const WSAESOCKTNOSUPPORT: number;
  150. const WSAEOPNOTSUPP: number;
  151. const WSAEPFNOSUPPORT: number;
  152. const WSAEAFNOSUPPORT: number;
  153. const WSAEADDRINUSE: number;
  154. const WSAEADDRNOTAVAIL: number;
  155. const WSAENETDOWN: number;
  156. const WSAENETUNREACH: number;
  157. const WSAENETRESET: number;
  158. const WSAECONNABORTED: number;
  159. const WSAECONNRESET: number;
  160. const WSAENOBUFS: number;
  161. const WSAEISCONN: number;
  162. const WSAENOTCONN: number;
  163. const WSAESHUTDOWN: number;
  164. const WSAETOOMANYREFS: number;
  165. const WSAETIMEDOUT: number;
  166. const WSAECONNREFUSED: number;
  167. const WSAELOOP: number;
  168. const WSAENAMETOOLONG: number;
  169. const WSAEHOSTDOWN: number;
  170. const WSAEHOSTUNREACH: number;
  171. const WSAENOTEMPTY: number;
  172. const WSAEPROCLIM: number;
  173. const WSAEUSERS: number;
  174. const WSAEDQUOT: number;
  175. const WSAESTALE: number;
  176. const WSAEREMOTE: number;
  177. const WSASYSNOTREADY: number;
  178. const WSAVERNOTSUPPORTED: number;
  179. const WSANOTINITIALISED: number;
  180. const WSAEDISCON: number;
  181. const WSAENOMORE: number;
  182. const WSAECANCELLED: number;
  183. const WSAEINVALIDPROCTABLE: number;
  184. const WSAEINVALIDPROVIDER: number;
  185. const WSAEPROVIDERFAILEDINIT: number;
  186. const WSASYSCALLFAILURE: number;
  187. const WSASERVICE_NOT_FOUND: number;
  188. const WSATYPE_NOT_FOUND: number;
  189. const WSA_E_NO_MORE: number;
  190. const WSA_E_CANCELLED: number;
  191. const WSAEREFUSED: number;
  192. }
  193. namespace priority {
  194. const PRIORITY_LOW: number;
  195. const PRIORITY_BELOW_NORMAL: number;
  196. const PRIORITY_NORMAL: number;
  197. const PRIORITY_ABOVE_NORMAL: number;
  198. const PRIORITY_HIGH: number;
  199. const PRIORITY_HIGHEST: number;
  200. }
  201. }
  202. function arch(): string;
  203. /**
  204. * Returns a string identifying the kernel version.
  205. * On POSIX systems, the operating system release is determined by calling
  206. * [uname(3)][]. On Windows, `pRtlGetVersion` is used, and if it is not available,
  207. * `GetVersionExW()` will be used. See
  208. * https://en.wikipedia.org/wiki/Uname#Examples for more information.
  209. */
  210. function version(): string;
  211. function platform(): NodeJS.Platform;
  212. function tmpdir(): string;
  213. const EOL: string;
  214. function endianness(): "BE" | "LE";
  215. /**
  216. * Gets the priority of a process.
  217. * Defaults to current process.
  218. */
  219. function getPriority(pid?: number): number;
  220. /**
  221. * Sets the priority of the current process.
  222. * @param priority Must be in range of -20 to 19
  223. */
  224. function setPriority(priority: number): void;
  225. /**
  226. * Sets the priority of the process specified process.
  227. * @param priority Must be in range of -20 to 19
  228. */
  229. function setPriority(pid: number, priority: number): void;
  230. }