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.

basic.d.ts 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /// <reference lib="esnext"/>
  2. // TODO: This can just be `export type Primitive = not object` when the `not` keyword is out.
  3. /**
  4. Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
  5. */
  6. export type Primitive =
  7. | null
  8. | undefined
  9. | string
  10. | number
  11. | boolean
  12. | symbol
  13. | bigint;
  14. // TODO: Remove the `= unknown` sometime in the future when most users are on TS 3.5 as it's now the default
  15. /**
  16. Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
  17. */
  18. export type Class<T = unknown, Arguments extends any[] = any[]> = new(...arguments_: Arguments) => T;
  19. /**
  20. Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
  21. */
  22. export type TypedArray =
  23. | Int8Array
  24. | Uint8Array
  25. | Uint8ClampedArray
  26. | Int16Array
  27. | Uint16Array
  28. | Int32Array
  29. | Uint32Array
  30. | Float32Array
  31. | Float64Array
  32. | BigInt64Array
  33. | BigUint64Array;
  34. /**
  35. Matches a JSON object.
  36. This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
  37. */
  38. export type JsonObject = {[Key in string]?: JsonValue};
  39. /**
  40. Matches a JSON array.
  41. */
  42. export interface JsonArray extends Array<JsonValue> {}
  43. /**
  44. Matches any valid JSON value.
  45. */
  46. export type JsonValue = string | number | boolean | null | JsonObject | JsonArray;
  47. declare global {
  48. interface SymbolConstructor {
  49. readonly observable: symbol;
  50. }
  51. }
  52. /**
  53. Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
  54. */
  55. export interface ObservableLike {
  56. subscribe(observer: (value: unknown) => void): void;
  57. [Symbol.observable](): ObservableLike;
  58. }