diff --git a/src/index.ts b/src/index.ts index ae4d5c3..161e34d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -18,20 +18,10 @@ export function Enum(...values: any[]): object { export type Enum = T[keyof T]; export namespace Enum { - function hasOwnProperty(obj: object, prop: string): boolean { - return Object.prototype.hasOwnProperty.call(obj, prop); - } - export function keys< T extends { [_: string]: any } >(e: T): Array { - const result: string[] = []; - for (const prop in e) { - if (hasOwnProperty(e, prop)) { - result.push(prop); - } - } - return result as Array; + return Object.keys(e) as Array; } export function values<