Skip to content

Instantly share code, notes, and snippets.

View jocafi's full-sized avatar

Jocca jocafi

  • IT Freelancer
  • Brazil / Germany
View GitHub Profile
@jocafi
jocafi / type-helper.ts
Created November 13, 2018 19:59
The class TypeHelper was implemented to overcome some weakness of enum structures in TypeScript.
/**
* Created by Joao Araujo (jocafi) on November 2018
*
* The class TypeHelper was implemented to overcome some weakness of enum structures in TypeScript.
*
* <h2>How to use it?</h2>
*
* 1) Declare all the keys like the example below:
*
* public static STATUS_ID = "STATUS_ID";
@jocafi
jocafi / util.service.ts
Last active January 7, 2019 10:13
DeepCopy in TypeScript
import { Injectable } from "@angular/core";
/**
* Created by Joao Araujo (jocafi) on November 2018
*
* UtilService implements some util methods which can be used along the App development.
*
*/
@Injectable()
export class UtilService {
@nrobinaubertin
nrobinaubertin / app.component.ts
Created January 17, 2017 13:36
Exemple of ngb-date-parser-formatter implementation (ng-bootstrap)
import { NgbDatepickerConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
import { NgbDateFRParserFormatter } from "./ngb-date-fr-parser-formatter"
@Component({
providers: [{provide: NgbDateParserFormatter, useClass: NgbDateFRParserFormatter}]
})
export class AppComponent {}