RxJS. Delay from array
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log); Stackblitz (in console):
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log); Stackblitz (in console):
Функции обратного вызова, обещания, async/await
Начиная с версии rxjs 5.5 операторы вместо цепочки вызовов применяются как параметры функции pipe.
Добавить node в compilerOptions.types ts-конфига
npm set registry https://registry.npmjs.org/ Add dist folder of dependency libs to main tsconfig.json and run command
nx run need:build --with-deps