In this tutorial we are building a full-stack TypeScript application. I will show you not only the front-end, but also the back-end part. We will also see how to connect those two layers.
On the front-end we are using Vue.js, specifically the upcoming version 3. On the back-end we are using Node.js. In this application we use a single programming language, TypeScript, in those two layers.
Computed properties in Vue.js are used to declaratively describe a value that depends on other values. They are only updated when a reactive source updates. In Vue.js 3 you use the computed
function helper that takes a getter function and returns an immutable reactive ref object for the returned value from the getter.
In TypeScript, a union type describes a value that can be one of several types. We use the vertical bar (|) to separate each type, so number | string | boolean
is the type of a value that can be a number, a string, or a boolean. Union types can also combine string literals to represent a restricted set of string values as we did in this lesson to describe the possible values for the filter variable.
#typescript #vue #vue.js #vue.js 3