Skip to content

Commit

Permalink
fix: improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jul 30, 2024
1 parent 7b80dcf commit 8a723cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import type { Arrayable, Awaitable } from '@antfu/utils'
import type { ImportxOptions, SupportedLoader } from 'importx'
import type { ImportxOptions as ImportxOptionsFull, SupportedLoader } from 'importx'

export const defaultExtensions = ['mts', 'cts', 'ts', 'mjs', 'cjs', 'js', 'json', '']

export type BuiltinParsers = 'require' | 'json' | 'import'

export type CustomParser<T> = (filepath: string) => Awaitable<T | undefined>

export type ImportxOptions = Partial<Omit<ImportxOptionsFull, 'parentURL'>>

export interface LoadConfigSource<T = any> {
files: Arrayable<string>

Expand Down

0 comments on commit 8a723cc

Please sign in to comment.