Moderne Frontend-Architekturen für Single-Page-Anwendungen

JAX 2020

Oliver Zeigermann / @DJCordhose / embarc GmbH
Nils Hartmann / @nilshartmann

Slides: https://bit.ly/jax-2020-spa

Basics


// variables can have type information
let foo: string;
foo = 'yo';
// Error: Type 'number' is not assignable to type 'string'.
foo = 10;


// types can be inferred (return type)
function sayIt(what: string) {
  return `Saying: ${what}`;
}
const said: string = sayIt(obj);


class Sayer {
  what: string; // mandatory

  constructor(what: string) {
      this.what = what;
  }

  // return type if you want to
  sayIt(): string {
      return `Saying: ${this.what}`;
  }
}
https://www.typescriptlang.org/

Vielen Dank!

Moderne Frontend-Architekturen für Single-Page-Anwendungen, JAX 2020

Bleibt gern in Kontakt

Oliver Zeigermann / @DJCordhose / embarc GmbH
Nils Hartmann / @nilshartmann

Diese Folien: https://bit.ly/jax-2020-spa