We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 42600c0 + 088674f commit 25a0ca9Copy full SHA for 25a0ca9
lib/decorators/timeout.decorator.ts
@@ -1,5 +1,4 @@
1
import { applyDecorators, SetMetadata } from '@nestjs/common';
2
-import { isString } from 'util';
3
import { SchedulerType } from '../enums/scheduler-type.enum';
4
import {
5
SCHEDULER_NAME,
@@ -22,7 +21,7 @@ export function Timeout(
22
21
nameOrTimeout: string | number,
23
timeout?: number,
24
): MethodDecorator {
25
- const [name, timeoutValue] = isString(nameOrTimeout)
+ const [name, timeoutValue] = typeof nameOrTimeout === 'string'
26
? [nameOrTimeout, timeout]
27
: [undefined, nameOrTimeout];
28
0 commit comments