chore(facade): add enum index lookup support

This commit is contained in:
Matias Niemelä
2016-03-08 16:38:50 -08:00
committed by Alex Eagle
parent 8e3e45097a
commit b691da26af
3 changed files with 27 additions and 2 deletions

View File

@ -195,6 +195,10 @@ export function deserializeEnum(val, values: Map<number, any>): any {
return val;
}
export function resolveEnumToken(enumValue, val): string {
return enumValue[val];
}
export class StringWrapper {
static fromCharCode(code: number): string { return String.fromCharCode(code); }
@ -468,4 +472,4 @@ export function isPrimitive(obj: any): boolean {
export function hasConstructor(value: Object, type: Type): boolean {
return value.constructor === type;
}
}