Skip to content

Instantly share code, notes, and snippets.

View alanhay's full-sized avatar

Alan Hay alanhay

  • Edinburgh, Scotland
View GitHub Profile
@cdroulers
cdroulers / BaseEntity.ts
Last active May 23, 2016 21:53
BaseEntity for blog post about TypeScript and JSON.stringify (http://cdroulers.com/blog/2015/04/22/typescript-properties-and-json-stringify/)
module shared {
"use strict";
export interface IMapOptions {
Properties: { [key: string]: (x: any) => any };
Ignore?: string[];
PropertyNames?: { [key: string]: string };
}
function includeProperty(mapOptions: IMapOptions, prop: string) {