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
export declare namespace SystemID { | |
/** | |
* System short public ID, e.g A10005, B00040 | |
*/ | |
export type Short = string & { | |
__brand: 'system-short-id'; | |
}; | |
/** | |
* UUID V4 |
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
new Promise(resolve => { | |
throw new Error(0) return 1 | |
}) | |
.then(console.log) | |
.catch(e => { | |
console.log(e) return 2; | |
}) | |
.then(console.log) |
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
const a = [1, 2, 3, 4, 5]; | |
// Implement this | |
a.multiply() | |
console.log(a) // [1, 2, 3, 4, 5, 1, 4, 9, 16, 25] |
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 React, {ComponentType} from 'react'; | |
// Lib | |
declare function withDataResolving<TAppState, TReturnState, R1 = any>(injectSelectors: [(appState: TAppState) => R1], strategy: (data: R1) => TReturnState): <TProps extends {}>(Component: ComponentType<TProps>) => (props: TProps & TReturnState) => ComponentType<Exclude<TProps, TReturnState>>; | |
declare function withDataResolving<TAppState, TReturnState, R1 = any, R2 = any>(injectSelectors: [(appState: TAppState) => R1, (appState: TAppState) => R2], strategy: (data: R1, data2: R2) => TReturnState): <TProps extends {}>(Component: ComponentType<TProps>) => (props: TProps & TReturnState) => ComponentType<Exclude<TProps, TReturnState>>; | |
declare function withDataResolving<TAppState, TReturnState, R1 = any, R2 = any, R3 = any>(injectSelectors: [(appState: TAppState) => R1, (appState: TAppState) => R2, (appState: TAppState) => R3], strategy: (data: R1, data2: R2, data3: R3) => TReturnState): <TProps extends {}>(Component: ComponentType<TProps>) => (props: TProps & TRe |
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
export const SystemSelectorV2: SystemsSelectorV2 = { | |
getSystemsForTableView: createSelector(getSystemsDomain, (domain) => | |
Object.values(domain.systemsByID).map((normalizedSystem) => { | |
const baseData: SystemModel.SystemsTableRowData = { | |
id: normalizedSystem.id, | |
systemID: normalizedSystem.systemIdentifier, | |
address: normalizedSystem.address, | |
systemType: normalizedSystem.type, | |
customer: null, | |
installer: null, |
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
/** | |
* Create a class/service, possibly don't export it so it's not confused with it's instance | |
*/ | |
class SettingsRoute { | |
/** | |
* Expose public routes | |
* Can be also as getter functions - possible even better! | |
*/ | |
public MAIN = `${this.baseUrl}settings`; | |
public SECURITY = `${this.baseUrl}settings/security`; |
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 React from 'react'; | |
import { DependencyContainer, ProvidersMap } from 'some-react-di'; | |
const providers = new ProvidersMap([SomeService, {token: AnotherService, provide: new MockService()}]); | |
providers.bind('string-token').to('some-value'); | |
export const App = () => | |
( | |
<DependencyContainer providersMap={providers}> | |
<SomeContainerComponentA /> |
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
{ | |
"name": "my-razzle-app", | |
"version": "0.0.0", | |
"lockfileVersion": 1, | |
"requires": true, | |
"dependencies": { | |
"@babel/code-frame": { | |
"version": "7.0.0-beta.44", | |
"resolved": "http://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz", | |
"integrity": "sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g==", |
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
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | |
# yarn lockfile v1 | |
"@babel/[email protected]": | |
version "7.0.0-beta.44" | |
resolved "http://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9" | |
dependencies: | |
"@babel/highlight" "7.0.0-beta.44" |
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 createRandomId from 'utilities/helpers/createRandomId'; | |
<template> | |
<div class="input"> | |
<div class="input__field-container" > | |
<label | |
:for="thisId" class="input__label" | |
:class="required ? 'input__label--required' : '' ">{{label}}</label> | |
<input |
NewerOlder