Skip to content

Commit

Permalink
style(decorators): refactor interfaceClasses array of @ObjectType
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Mar 11, 2019
1 parent 6604bdb commit 51278f4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/decorators/ObjectType.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getMetadataStorage } from "../metadata/getMetadataStorage";
import { getNameDecoratorParams } from "../helpers/decorators";
import { DescriptionOptions, AbstractClassOptions } from "./types";
import { ClassType } from "../interfaces";

export type ObjectOptions = DescriptionOptions &
AbstractClassOptions & {
Expand All @@ -16,8 +15,7 @@ export function ObjectType(
maybeOptions?: ObjectOptions,
): ClassDecorator {
const { name, options } = getNameDecoratorParams(nameOrOptions, maybeOptions);
const interfaceClasses: ClassType[] | undefined =
options.implements && [].concat(options.implements as any);
const interfaceClasses = options.implements && ([] as Function[]).concat(options.implements);

return target => {
getMetadataStorage().collectObjectMetadata({
Expand Down

0 comments on commit 51278f4

Please sign in to comment.