✌️
Too many ideas, not enough time
Pinned Loading
-
auto-unsubscribe.decorator.ts
auto-unsubscribe.decorator.ts 1import { Subscription } from 'rxjs';
23/**
4* Allows to auto unsubscribe from Observables.
5*
-
Allow to coerce boolean input, this ...
Allow to coerce boolean input, this decorator can Be applied on property or setter 1export function CoerceBoolean() {
2return function(target: any, key: string, propertyDescriptor?: PropertyDescriptor): void {
3if (!!propertyDescriptor && !!propertyDescriptor.set) {
4const original = propertyDescriptor.set;
5 -
testing-create-component.ts
testing-create-component.ts 1import { Type } from '@angular/core';
2import { ComponentFixture, TestBed, TestModuleMetadata } from '@angular/core/testing';
34const isTestModuleMetadata = (val: unknown): val is TestModuleMetadata =>
5(val as any).declarations || (val as any).imports || (val as any).providers;
-
git-aliases
git-aliases 1git config --list | grep alias
2alias.undo=reset --soft HEAD^
3alias.new=checkout -b
4alias.co=checkout
5alias.st=status
-
required-inputs.decorator.ts
required-inputs.decorator.ts 1export function RequiredInputs(...inputs: string[]) {
2return function (constructor: any) {
3const original = constructor.prototype.ngOnInit;
45constructor.prototype.ngOnInit = function () {
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.