Skip to content

Commit

Permalink
fix: dont assign type double, assert it's imported
Browse files Browse the repository at this point in the history
  • Loading branch information
Skn0tt committed Nov 3, 2023
1 parent a296cd3 commit 72f2310
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import type { getNetlifyGlobal } from '@netlify/serverless-functions-api'

export { builder } from './lib/builder.js'
export { purgeCache } from './lib/purge_cache.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<typeof getNetlifyGlobal>
}
6 changes: 6 additions & 0 deletions test/types/Netlify_Global.test-d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { expectAssignable } from 'tsd'

// eslint-disable-next-line import/no-unassigned-import
import '../../src/main.js'

expectAssignable<{ env: unknown }>(Netlify)

0 comments on commit 72f2310

Please sign in to comment.