Skip to content

Instantly share code, notes, and snippets.

View guiebitt's full-sized avatar

Guilherme Eduardo Bittencourt guiebitt

View GitHub Profile
@rpbeukes
rpbeukes / angular-reactive-forms-helper.ts
Last active August 1, 2020 19:03
Angular typesafe reactive forms
import { FormGroup, FormControl, FormBuilder, AbstractControl } from '@angular/forms';
export type FormGroupControlsOf<T> = {
[P in keyof T]: FormControl | FormGroup;
};
export abstract class FormGroupTypeSafe<T> extends FormGroup {
//give the value a custom type s
value: T;
@kohlikohl
kohlikohl / script.js
Last active September 27, 2023 08:41
Fix VSTS code coverage reporting by inlining CSS
let fs = require("fs-jetpack"),
path = require("path"),
inline = require("inline-css");
// This inlines the css of the HTML coverage output as VSTS
// strips all external CSS files
const CODE_COVERAGE_DIRECTORY = "./coverage";
const files = fs.find(CODE_COVERAGE_DIRECTORY, { matching: "*.html" });