Skip to content

Commit 72f2310

Browse files
committed
fix: dont assign type double, assert it's imported
1 parent a296cd3 commit 72f2310

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/main.ts

-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
import type { getNetlifyGlobal } from '@netlify/serverless-functions-api'
2-
31
export { builder } from './lib/builder.js'
42
export { purgeCache } from './lib/purge_cache.js'
53
export { schedule } from './lib/schedule.js'
64
export { stream } from './lib/stream.js'
75
export * from './function/index.js'
8-
9-
// Ambient type declarations
10-
declare global {
11-
const Netlify: ReturnType<typeof getNetlifyGlobal>
12-
}

test/types/Netlify_Global.test-d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expectAssignable } from 'tsd'
2+
3+
// eslint-disable-next-line import/no-unassigned-import
4+
import '../../src/main.js'
5+
6+
expectAssignable<{ env: unknown }>(Netlify)

0 commit comments

Comments
 (0)