O'Reilly logo

TypeScript: Modern JavaScript Development by Ivo Gabe de Wolff, Vilic Vane, Remo H. Jansen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using data types for expressions

Fields of the spreadsheet can contain expressions, that can be calculated. To calculate these values, the input of the user must be converted to a data structure, which can then be used to calculate the result of that field.

Using data types for expressions

These expressions can contain constants, operations, references to other fields or a parenthesized expression:

  • Constants: 0, 42, 10.2, 4e6, 7.5e8
  • Unary expression: -expression, expression!
  • Binary expression: expression + expression, expression / expression
  • References: 3:1 (third column, first row)
  • Parenthesized expression: (expression)

We will create these types in lib/model/expression.ts. First we ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required