Skip to content

Commit 088674f

Browse files
committedDec 5, 2024·
refactor: drop deprecated nodejs utility api
1 parent 42600c0 commit 088674f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

Diff for: ‎lib/decorators/timeout.decorator.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { applyDecorators, SetMetadata } from '@nestjs/common';
2-
import { isString } from 'util';
32
import { SchedulerType } from '../enums/scheduler-type.enum';
43
import {
54
SCHEDULER_NAME,
@@ -22,7 +21,7 @@ export function Timeout(
2221
nameOrTimeout: string | number,
2322
timeout?: number,
2423
): MethodDecorator {
25-
const [name, timeoutValue] = isString(nameOrTimeout)
24+
const [name, timeoutValue] = typeof nameOrTimeout === 'string'
2625
? [nameOrTimeout, timeout]
2726
: [undefined, nameOrTimeout];
2827

0 commit comments

Comments
 (0)
Please sign in to comment.