From a30b7cdf68702265ebf716f1de6fc8c2d070c1c2 Mon Sep 17 00:00:00 2001 From: Aleksandr Bukhalo Date: Sat, 28 Mar 2020 11:47:34 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20add=20telegraf.provider.ts=20into=20.pre?= =?UTF-8?q?ttierignore=20=F0=9F=A4=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .prettierignore | 1 + lib/telegraf.explorer.ts | 3 +-- lib/telegraf.provider.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..5b74740 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +lib/telegraf.provider.ts diff --git a/lib/telegraf.explorer.ts b/lib/telegraf.explorer.ts index 503d68b..036679f 100644 --- a/lib/telegraf.explorer.ts +++ b/lib/telegraf.explorer.ts @@ -2,11 +2,10 @@ import { Injectable, OnModuleInit } from '@nestjs/common'; import { DiscoveryService, ModuleRef } from '@nestjs/core'; import { InstanceWrapper } from '@nestjs/core/injector/instance-wrapper'; import { MetadataScanner } from '@nestjs/core/metadata-scanner'; -import Telegraf from 'telegraf'; import { TelegrafMetadataAccessor } from './telegraf-metadata.accessor'; import { TelegrafProvider } from './telegraf.provider'; import { TELEGRAF_PROVIDER } from './telegraf.constants'; -import { ContextMessageUpdate } from 'telegraf'; +import { Telegraf, ContextMessageUpdate } from 'telegraf'; import { TelegrafActionMetadata, TelegrafCashtagMetadata, diff --git a/lib/telegraf.provider.ts b/lib/telegraf.provider.ts index 80e4851..14d02f1 100644 --- a/lib/telegraf.provider.ts +++ b/lib/telegraf.provider.ts @@ -5,13 +5,13 @@ import { Logger, OnApplicationShutdown, } from '@nestjs/common'; -const Telegraf = require('telegraf'); -import { ContextMessageUpdate } from 'telegraf'; +import { Telegraf, ContextMessageUpdate } from 'telegraf'; import { TELEGRAF_MODULE_OPTIONS } from './telegraf.constants'; import { TelegrafModuleOptions } from './interfaces'; @Injectable() export class TelegrafProvider + // @ts-ignore extends Telegraf implements OnApplicationBootstrap, OnApplicationShutdown { private logger = new Logger('Telegraf');