Skip to content

Commit

Permalink
feat: allow passing through custom options to resolve (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Molinaro committed Jul 30, 2021
1 parent 866f32f commit 34c94c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Expand Up @@ -26,7 +26,7 @@ const defaultExtensions = [

export const interfaceVersion = 2

export interface TsResolverOptions {
export type TsResolverOptions = SyncOpts & {
alwaysTryTypes?: boolean
/**
* @deprecated use `project` instead
Expand Down Expand Up @@ -76,6 +76,7 @@ export function resolve(
let foundNodePath: string | null | undefined
try {
foundNodePath = tsResolve(mappedPath ?? source, {
...options,
extensions: options.extensions ?? defaultExtensions,
basedir: path.dirname(path.resolve(file)),
packageFilter: options.packageFilter ?? packageFilterDefault,
Expand Down

0 comments on commit 34c94c8

Please sign in to comment.