See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
import { ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Input, Type, ViewContainerRef } from '@angular/core'; | |
import { Subscription } from 'rxjs'; | |
@Directive({ | |
selector: '[lazyComp]' | |
}) | |
export class LazyCompDirective { | |
private _inputs; | |
private _outputs; | |
private subscription = new Subscription(); |
See how a minor change to your commit message style can make a difference.
Tip
Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs
// Файл "tsconfig.json": | |
// - устанавливает корневой каталог проекта TypeScript; | |
// - выполняет настройку параметров компиляции; | |
// - устанавливает файлы проекта. | |
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта. | |
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта. | |
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга. | |
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути. | |
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию. | |
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json". |
Create React apps with no build configuration.
Thanks to create-react-app. It's saves a lot of my time. I remember several months ago I had to setup a lot just for a react app, webpack, babel, test environment and so on... Fortunately, everything becomes easy now. Though you have many choices of start boiler plate, you worth trying this.
If you are build a SPA with react, you probably use react-router
.
/** | |
* A new instance of deferred is constructed by calling `new DeferredPromse<T>()`. | |
* The purpose of the deferred object is to expose the associated Promise | |
* instance APIs that can be used for signaling the successful | |
* or unsuccessful completion, as well as the state of the task. | |
* @export | |
* @class DeferredPromise | |
* @implements {Promise<T>} | |
* @template T | |
* @example |
import axios from "axios"; | |
const singleton = Symbol(); | |
const singletonEnforcer = Symbol(); | |
function readCookie(name) { | |
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)')); | |
return (match ? decodeURIComponent(match[3]) : null); | |
} |
/* | |
I needed a way to restore the actual files from a Sourcemap. This is the easiest way I could come up with. | |
To use, replace the content of map with your actual sourcemap -- however, be careful to check the paths, as this script might overwrite anything in its way. | |
*/ | |
/* | |
MIT License | |
Copyright (c) 2016 Simon Ruf |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent