Skip to content

Instantly share code, notes, and snippets.

@otodockal
otodockal / config.js
Created March 16, 2016 20:02 — forked from johnlindquist/config.js
angular 2 with sagas and reducers
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",
@otodockal
otodockal / no-closed-over-variables.js
Last active October 11, 2021 06:12
qwik/no-closed-over-variables
// 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';
{
"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
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;
}