This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { inject, Injectable } from '@angular/core'; | |
import { NonNullableFormBuilder } from '@angular/forms'; | |
import { ComponentStore, OnStateInit, tapResponse } from '@ngrx/component-store'; | |
import { of } from 'rxjs'; | |
import { switchMap, tap, withLatestFrom } from 'rxjs/operators'; | |
export interface User { | |
id: number; | |
name: string; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Component Store": { | |
"prefix": "a-component-store", | |
"body": [ | |
"import { Injectable } from '@angular/core';", | |
"import { ComponentStore, OnStateInit } from '@ngrx/component-store';", | |
"", | |
"export interface ${1:string}ComponentState {", | |
// status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AST explorer | |
// - https://astexplorer.net/#/gist/55f073408c4a5d50f051a2e40830abff/latest | |
module.exports = { | |
rules: { | |
'no-closed-over-variables': { | |
create: function (context) { | |
const sourceCode = context.getSourceCode(); | |
const manager = sourceCode.scopeManager; | |
const qHookName = 'qHook'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.config({ | |
//use typescript for compilation | |
transpiler: 'typescript', | |
//typescript compiler options | |
typescriptOptions: { | |
emitDecoratorMetadata: true | |
}, | |
//map tells the System loader where to look for things | |
map: { | |
app: "./src", |