From 9d559ee531d1704a7cc75e7d57aa3a1b426178e8 Mon Sep 17 00:00:00 2001 From: Victor Korzunin Date: Sun, 10 Jan 2021 17:15:24 +0500 Subject: [PATCH] fix(serverless): fix serverless typings --- package.json | 2 +- src/index.ts | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 152b9ddb..22577b97 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/jest": "^26.0.14", "@types/node": "^12.12.38", "@types/ramda": "^0.27.6", - "@types/serverless": "^1.78.12", + "@types/serverless": "^1.78.18", "@typescript-eslint/eslint-plugin": "^4.2.0", "@typescript-eslint/parser": "^4.2.0", "eslint": "^7.9.0", diff --git a/src/index.ts b/src/index.ts index 780be9cd..9499f21b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,7 +5,6 @@ import * as path from 'path'; import { mergeRight } from 'ramda'; import * as Serverless from 'serverless'; import * as Plugin from 'serverless/classes/Plugin'; -import * as Service from 'serverless/classes/Service'; import * as chokidar from 'chokidar'; import { extractFileNames } from './helper'; @@ -14,12 +13,6 @@ import { packExternalModules } from './pack-externals'; const SERVERLESS_FOLDER = '.serverless'; const BUILD_FOLDER = '.build'; -interface ServiceExtended extends Service { - service?: string; - package?: Serverless.Package; - functions?: Record; -} - interface OptionsExtended extends Serverless.Options { verbose?: boolean; } @@ -51,7 +44,7 @@ const DEFAULT_BUILD_OPTIONS: Partial = { export class EsbuildPlugin implements Plugin { private originalServicePath: string; - serverless: Serverless & { service: ServiceExtended }; + serverless: Serverless; options: OptionsExtended; hooks: Plugin.Hooks; buildOptions: Configuration;