Decorators are a feature of TypeScript that are becoming more and more common in many major libraries. This lesson walks you through what decorators are and how to create your own. Nomarl way to decorate a object : const Person = {name: 'John'}; func…
Libraries such as RxJS use generics heavily in their definition files to describe how types flow through different interfaces and function calls. We can provide our own type information when we create Observables to enable all of the auto-complete &…
Spring Cloud - Getting Started Example, 转载自:https://www.logicbig.com/tutorials/spring-framework/spring-cloud/hello-world.html Following is a quick-start example of Spring Cloud. We are going to develop very simple microservices using Spring Cloud, Sp…
Decorators are a powerful feature of TypeScript that allow for efficient and readable abstractions when used correctly. In this lesson we will look at how we can use decorators to initialize properties of a class to promises that will make GET reques…
We’ve used @Watch, @Inject and more decorators from vue-property-decorator. In this lesson however we will guide you through creating your own decorators in order to add common functionality to your Vue components using TypeScript. Import: import {cr…
Vue 2.2 introduced a simple dependency injection system, allowing you to use provide and inject in your component options. This lesson shows you how to use them using the @Inject and @Provide decorators in tandem! When you want to provide some servic…
To using decorate, we can modifiy tsconfig.json: { "compilerOptions": { ... "experimentalDecorators": true, ... } } So for example we want to build a '@LogMethod' decorator, which arroding to the system logging level to decide whether…