From 271a255cc69bbdf75036c9932544b2820aa865e8 Mon Sep 17 00:00:00 2001 From: Lukas Holzer Date: Fri, 6 Oct 2023 09:46:22 +0200 Subject: [PATCH] fix: fixes the ambient declarations on import (#429) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🎉 Thanks for sending this pull request! 🎉 Please make sure the title is clear and descriptive. If you are fixing a typo or documentation, please skip these instructions. Otherwise please fill in the sections below. **Which problem is this pull request solving?** Example: I'm always frustrated when [...] **List other issues or pull requests related to this problem** Example: This fixes #5012 **Describe the solution you've chosen** Example: I've fixed this by [...] **Describe alternatives you've considered** Example: Another solution would be [...] **Checklist** Please add a `x` inside each checkbox: - [ ] I have read the [contribution guidelines](../blob/master/CONTRIBUTING.md). - [ ] The status checks are successful (continuous integration). Those can be seen below. --- src/main.ts | 7 +++++++ types/index.d.ts | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 types/index.d.ts diff --git a/src/main.ts b/src/main.ts index 4638cd73..803d20e2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,11 @@ +import type { getNetlifyGlobal } from '@netlify/serverless-functions-api' + export { builder } from './lib/builder.js' export { schedule } from './lib/schedule.js' export { stream } from './lib/stream.js' export * from './function/index.js' + +// Ambient type declarations +declare global { + const Netlify: ReturnType +} diff --git a/types/index.d.ts b/types/index.d.ts deleted file mode 100644 index 622ed037..00000000 --- a/types/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { getNetlifyGlobal } from '@netlify/serverless-functions-api' - -// Ambient type declarations -declare global { - const Netlify: ReturnType -}