Skip to content

Instantly share code, notes, and snippets.

View mserranom's full-sized avatar

Miguel Serrano mserranom

  • London
View GitHub Profile

Applying for British Passport

  1. Take an English GESE Grade 5 Exam
  2. Take a life in the UK test
  3. Fill application
  4. Send documentation via Nationality Checking Service
  5. Wait for approval
  6. Go through ceremonies
  7. Apply for British Passport
  8. Request not to lose Spanish nationality
@mserranom
mserranom / typescript_promises_swallows_errors.ts
Last active February 2, 2016 15:43
Different scenarios of ES6 promises and async/await catching and swallowing Errors
"use strict";
function doThrow() {
throw new Error("an error!");
}
function doAsyncSuccess() : Promise<void> {
return new Promise<void>((resolve, reject) => {
setTimeout(() => resolve(), 10);
@mserranom
mserranom / NotificationsStore.ts
Created December 1, 2015 10:29
container-ts example
export class NotificationsStore {
@Inject('repository') // injection by id
documentRepository : DocumentRepository;
private notifications : Array<Notifications>;
@PostConstruct
init() {
// invoked after all injections have been resolved