iching-broker-level1/node_modules/import-local/index.d.ts
Christopher Hase 323cea883d
All checks were successful
ci / build (push) Successful in 1m14s
unit tests part 3
2025-03-31 14:27:20 +02:00

17 lines
467 B
TypeScript

/**
Let a globally installed package use a locally installed version of itself if available.
@param filePath - The absolute file path to the main file of the package.
@example
```
import importLocal from 'import-local';
if (importLocal(import.meta.url)) {
console.log('Using local version of this package');
} else {
// Code for both global and local version here…
}
```
*/
export default function importLocal(filePath: string): boolean | undefined | unknown;