mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-03-21 09:23:48 +00:00
ConsoleLogger: Add typing to localeStringOptions
This is necessary as typescript is unable to determine that `year` in this object is of type "numeric" and not string. Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
39f4a2160a
commit
ca064526a7
1 changed files with 2 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
import { Injectable, Optional, Scope } from '@nestjs/common';
|
||||
import { isObject } from '@nestjs/common/utils/shared.utils';
|
||||
import * as clc from 'cli-color';
|
||||
import DateTimeFormatOptions = Intl.DateTimeFormatOptions;
|
||||
|
||||
@Injectable({ scope: Scope.TRANSIENT })
|
||||
export class ConsoleLoggerService {
|
||||
|
@ -85,7 +86,7 @@ export class ConsoleLoggerService {
|
|||
? `${color('Object:')}\n${JSON.stringify(message, null, 2)}\n`
|
||||
: color(message);
|
||||
|
||||
const localeStringOptions = {
|
||||
const localeStringOptions: DateTimeFormatOptions = {
|
||||
year: 'numeric',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
|
|
Loading…
Reference in a new issue