Skip to content

Commit 0de32d9

Browse files
committed
chore: update lint finding
1 parent e5d7f46 commit 0de32d9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/loader.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export function TypeScriptLoader(options?: JitiOptions): LoaderAsync {
1111
const loader: Jiti = createJiti("", { interopDefault: true, ...options });
1212
return async (path: string, _content: string): Promise<LoaderResult> => {
1313
try {
14+
// Because the import resolved as `unknown`, in the union of `unknown & { default?: unknown }`
15+
// `unknown` is the loosest type, however, we know it's an imported module possibly with a
16+
// default export set.
17+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
1418
const result = (await loader.import(path)) as { default?: unknown };
1519

1620
// `default` is used when exporting using export default, some modules

0 commit comments

Comments
 (0)