flowGraphInteger.d.ts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * @experimental
  3. * Class that represents an integer value.
  4. */
  5. export declare class FlowGraphInteger {
  6. /**
  7. * The value of the integer. Its type
  8. * is a javascript number. Shouldn't be
  9. * directly modified - it is populated by
  10. * the constructor.
  11. */
  12. readonly value: number;
  13. constructor(value: number);
  14. /**
  15. * Converts a float to an integer.
  16. * @param n the float to convert
  17. * @returns the result of n | 0 - converting it to a int
  18. */
  19. private _toInt;
  20. /**
  21. * Adds two integers together.
  22. * @param other the other integer to add
  23. * @returns a FlowGraphInteger with the result of the addition
  24. */
  25. add(other: FlowGraphInteger): FlowGraphInteger;
  26. /**
  27. * Subtracts two integers.
  28. * @param other the other integer to subtract
  29. * @returns a FlowGraphInteger with the result of the subtraction
  30. */
  31. subtract(other: FlowGraphInteger): FlowGraphInteger;
  32. /**
  33. * Multiplies two integers.
  34. * @param other the other integer to multiply
  35. * @returns a FlowGraphInteger with the result of the multiplication
  36. */
  37. multiply(other: FlowGraphInteger): FlowGraphInteger;
  38. /**
  39. * Divides two integers.
  40. * @param other the other integer to divide
  41. * @returns a FlowGraphInteger with the result of the division
  42. */
  43. divide(other: FlowGraphInteger): FlowGraphInteger;
  44. /**
  45. * The class name of this type.
  46. * @returns
  47. */
  48. getClassName(): string;
  49. /**
  50. * Compares two integers for equality.
  51. * @param other the other integer to compare
  52. * @returns
  53. */
  54. equals(other: FlowGraphInteger): boolean;
  55. static ClassName: string;
  56. /**
  57. * Parses a FlowGraphInteger from a serialization object.
  58. * @param serializationObject
  59. * @returns
  60. */
  61. static Parse(serializationObject: any): FlowGraphInteger;
  62. }