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
/** | |
* Vormt een wrapper om async operaties waarin de staat van de operatie | |
* bijgehouden wordt. | |
*/ | |
export class AsyncContext { | |
bezig = false; | |
mislukt = false; | |
geslaagd = false; |
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
// tslint:disable:align ban-types | |
export type DeepPartial<T> = | |
T extends Array<infer U> ? DeepPartialArray<U> : | |
T extends ReadonlyArray<infer V> ? DeepPartialReadonlyArray<V> : | |
T extends object ? DeepPartialObject<T> : | |
T; | |
export type DeepPartialNoMethods<T> = | |
T extends Array<infer U> ? DeepPartialArrayNoMethods<U> : | |
T extends ReadonlyArray<infer V> ? DeepPartialReadonlyArrayNoMethods<V> : |
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
<template> | |
<router-view></router-view> | |
</template> |
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
<template> | |
<div class="element-wrapper ${invoerFocus ? 'focus' : ''} ${invoerRegels.length >= 10 ? 'vol' : ''}" | |
e2e="wrapper" data-focus.bind="invoerFocus"> | |
<ol class="regelnummers" ref="regelnummers" e2e="regelnummer-wrapper" css="height: ${hoogte + 24}px"> | |
<li repeat.for="i of aantalGetoondeRegels" e2e="regelnummer" | |
data-actief.bind="invoerRegels.length > i && invoerRegels[i].trim() !== ''" | |
class="regelnummer ${invoerRegels.length > i && invoerRegels[i].trim() !== '' ? 'actief' : ''}"></li> | |
</ol> | |
<div class="invoer-wrapper"> | |
<textarea value.bind="invoer" ref="invoerElement" e2e="invoer" |
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 INIT_METHODS = new Map<any, string[]>(); | |
type InitMethodDescriptor = TypedPropertyDescriptor<() => void> | |
| TypedPropertyDescriptor<() => Promise<void>>; | |
export function init(target: any, key: string, _descriptor: InitMethodDescriptor) { | |
if (!INIT_METHODS.has(target)) { | |
INIT_METHODS.set(target, []); | |
} | |
INIT_METHODS.get(target)!.push(key); |
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 {Locator} from "protractor/built/locators"; | |
declare module "protractor/built/locators" { | |
export interface ProtractorBy { | |
marker(marker: string, parentElement?: Node): Locator; | |
} | |
} |
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 function autocast<T>(type: {new (): T}) { | |
return function(target: any, key: string) { | |
makeAutocast(target, key, (newVal: any) => { | |
if (newVal === undefined) { | |
return undefined; | |
} | |
if (newVal instanceof type) { | |
return newVal; | |
} | |
return Object.assign(new type(), newVal); |
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 {autoinject, bindable} from "aurelia-framework"; | |
declare const ga: ( | |
command: "send", | |
type: "event", | |
category?: string, | |
action?: string, | |
label?: string, | |
) => void; |
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
/** | |
* @see https://github.com/domenic/promises-unwrapping/blob/master/docs/states-and-fates.md | |
*/ | |
export class Deferred<T> { | |
public promise: Promise<T>; | |
private fate: "resolved" | "unresolved"; | |
private state: "pending" | "fulfilled" | "rejected"; | |
private _resolve: Function; |
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
<template> | |
<require from="./registration-form"></require> | |
<registration-form></registration-form> | |
</template> |