Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 112d08f

Browse files
author
Mark Molinaro
authoredJul 30, 2021
feat: allow passing through custom options to resolve
1 parent 866f32f commit 112d08f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const defaultExtensions = [
2626

2727
export const interfaceVersion = 2
2828

29-
export interface TsResolverOptions {
29+
export type TsResolverOptions = SyncOpts & {
3030
alwaysTryTypes?: boolean
3131
/**
3232
* @deprecated use `project` instead
@@ -76,6 +76,7 @@ export function resolve(
7676
let foundNodePath: string | null | undefined
7777
try {
7878
foundNodePath = tsResolve(mappedPath ?? source, {
79+
...options,
7980
extensions: options.extensions ?? defaultExtensions,
8081
basedir: path.dirname(path.resolve(file)),
8182
packageFilter: options.packageFilter ?? packageFilterDefault,

0 commit comments

Comments
 (0)
Please sign in to comment.