This file contains hidden or 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
type FunctionType = (...args: any[]) => any; | |
interface ActionCreatorsMapObject { | |
[action: string]: FunctionType; | |
} | |
export type ActionsUnion<A extends ActionCreatorsMapObject> = ReturnType<A[keyof A]>; |
This file contains hidden or 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 { Injectable, isDevMode, NgModule, Pipe } from "@angular/core"; | |
import { Observable } from "rxjs/Observable"; | |
import { BehaviorSubject } from "rxjs/BehaviorSubject"; | |
export type AvailableFeatures = keyof { "FEATURE_FROM_BACK", "PAID_PLAN": false } | |
export type AvailableFeaturesObj = {[key in AvailableFeatures]: any}; | |
export const Features: AvailableFeaturesObj = { | |
"PAID_PLAN": true, |
This file contains hidden or 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
function add(x, y) { | |
return x + y; | |
} | |
function mul(x, y) { | |
return x * y; | |
} | |
function make(){ |