Skip to content

Commit

Permalink
Merge pull request #1756 from hkjeffchan/patch-1
Browse files Browse the repository at this point in the history
Fix deprecated warning for interval.decorator.ts
  • Loading branch information
kamilmysliwiec authored Sep 16, 2024
2 parents baf7cb8 + ee56e9b commit 745118f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/decorators/interval.decorator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { applyDecorators, SetMetadata } from '@nestjs/common';
import { isString } from 'util';
import { SchedulerType } from '../enums/scheduler-type.enum';
import {
SCHEDULER_NAME,
Expand All @@ -22,7 +21,7 @@ export function Interval(
nameOrTimeout: string | number,
timeout?: number,
): MethodDecorator {
const [name, intervalTimeout] = isString(nameOrTimeout)
const [name, intervalTimeout] = (typeof nameOrTimeout === "string")
? [nameOrTimeout, timeout]
: [undefined, nameOrTimeout];

Expand Down

0 comments on commit 745118f

Please # to comment.