{"id":19584834,"url":"https://github.com/flex-development/tsconfig-utils","last_synced_at":"2026-02-11T20:11:06.676Z","repository":{"id":65768731,"uuid":"596822523","full_name":"flex-development/tsconfig-utils","owner":"flex-development","description":"Utilities for working with tsconfig files","archived":false,"fork":false,"pushed_at":"2024-04-23T04:02:30.000Z","size":2925,"stargazers_count":2,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-04T10:37:12.740Z","etag":null,"topics":["programmatic","tsconfig","tsconfig-paths","typescript","typescript-compiler","typescript-compiler-api"],"latest_commit_sha":null,"homepage":"https://github.com/flex-development/tsconfig-utils","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flex-development.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/funding.yml","license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["flex-development"]}},"created_at":"2023-02-03T01:55:31.000Z","updated_at":"2023-10-18T03:33:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"7e507148-0e6f-42d4-887b-034875f8c4ca","html_url":"https://github.com/flex-development/tsconfig-utils","commit_stats":{"total_commits":120,"total_committers":2,"mean_commits":60.0,"dds":"0.33333333333333337","last_synced_commit":"dae8062ee7e91207df8f07ad5738630bd871e6b4"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Ftsconfig-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Ftsconfig-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Ftsconfig-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flex-development%2Ftsconfig-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flex-development","download_url":"https://codeload.github.com/flex-development/tsconfig-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069554,"owners_count":17250454,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["programmatic","tsconfig","tsconfig-paths","typescript","typescript-compiler","typescript-compiler-api"],"created_at":"2024-11-11T07:50:02.897Z","updated_at":"2026-02-11T20:11:06.651Z","avatar_url":"https://github.com/flex-development.png","language":"TypeScript","readme":"# tsconfig-utils\n\n[![github release](https://img.shields.io/github/v/release/flex-development/tsconfig-utils.svg?include_prereleases\\\u0026sort=semver)](https://github.com/flex-development/tsconfig-utils/releases/latest)\n[![npm](https://img.shields.io/npm/v/@flex-development/tsconfig-utils.svg)](https://npmjs.com/package/@flex-development/tsconfig-utils)\n[![npm downloads](https://img.shields.io/npm/dm/@flex-development/tsconfig-utils.svg)](https://www.npmcharts.com/compare/@flex-development/tsconfig-utils?interval=30)\n[![install size](https://packagephobia.now.sh/badge?p=@flex-development/tsconfig-utils)](https://packagephobia.now.sh/result?p=@flex-development/tsconfig-utils)\n[![codecov](https://codecov.io/gh/flex-development/tsconfig-utils/graph/badge.svg?token=c7gDtTlaw3)](https://codecov.io/gh/flex-development/tsconfig-utils)\n[![module type: esm](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)\n[![license](https://img.shields.io/github/license/flex-development/tsconfig-utils.svg)](LICENSE.md)\n[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits\\\u0026logoColor=ffffff)](https://conventionalcommits.org)\n[![typescript](https://img.shields.io/badge/-typescript-3178c6?logo=typescript\\\u0026logoColor=ffffff)](https://typescriptlang.org)\n[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat\\\u0026logo=vitest\\\u0026logoColor=ffffff)](https://vitest.dev)\n[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat\\\u0026logo=yarn\\\u0026logoColor=ffffff)](https://yarnpkg.com)\n\nUtilities for working with [`tsconfig`][tsconfig] files\n\n## Contents\n\n- [What is this?](#what-is-this)\n- [When should I use this?](#when-should-i-use-this)\n- [Install](#install)\n- [Use](#use)\n- [API](#api)\n  - [`createGetCanonicalFileName([useCaseSensitiveFileNames])`](#creategetcanonicalfilenameusecasesensitivefilenames)\n  - [`createModuleResolutionHost([options])`](#createmoduleresolutionhostoptions)\n  - [`createParseConfigHost([options])`](#createparseconfighostoptions)\n  - [`isResolvedTsconfig(value)`](#isresolvedtsconfigvalue)\n  - [`isTsconfigHost(value)`](#istsconfighostvalue)\n  - [`loadTsconfig\u003cT\u003e([id][, options])`](#loadtsconfigtid-options)\n  - [`mergeTsconfig\u003cT\u003e(target[, ...tsconfigs])`](#mergetsconfigttarget-tsconfigs)\n  - [`readTsconfig\u003cT\u003e([id][, options])`](#readtsconfigtid-options)\n  - [`resolvePath(specifier[, options])`](#resolvepathspecifier-options)\n- [Types](#types)\n  - [`tsconfig-types`](#tsconfig-types)\n  - [`Awaitable\u003cT\u003e`](#awaitablet)\n  - [`DirectoryExists`](#directoryexists)\n  - [`Dirent`](#dirent)\n  - [`FileExists`](#fileexists)\n  - [`FileSystem`](#filesystem)\n  - [`GetCanonicalFileName`](#getcanonicalfilename)\n  - [`GetCurrentDirectory`](#getcurrentdirectory)\n  - [`GetDirectories`](#getdirectories)\n  - [`HostReadFile`](#hostreadfile)\n  - [`IsDirectory`](#isdirectory)\n  - [`IsFile`](#isfile)\n  - [`IsSymbolicLink`](#issymboliclink)\n  - [`List\u003c[T]\u003e`](#listt)\n  - [`LoadTsconfigOptions`](#loadtsconfigoptions)\n  - [`ModuleResolutionHostOptions`](#moduleresolutionhostoptions)\n  - [`ModuleResolutionHost`](#moduleresolutionhost)\n  - [`ParseConfigHostOptions`](#parseconfighostoptions)\n  - [`ParseConfigHost`](#parseconfighost)\n  - [`ReadDirectory`](#readdirectory)\n  - [`ReadFile`](#readfile)\n  - [`ReadTsconfigOptions`](#readtsconfigoptions)\n  - [`ReaddirDirentOptions`](#readdirdirentoptions)\n  - [`ReaddirOptions`](#readdiroptions)\n  - [`Readdir`](#readdir)\n  - [`Realpath`](#realpath)\n  - [`ResolvePathOptions`](#resolvepathoptions)\n  - [`ResolvedTsconfig`](#resolvedtsconfig)\n  - [`Stat`](#stat)\n  - [`Stats`](#stats)\n  - [`TsconfigHost`](#tsconfighost)\n  - [`UseCaseSensitiveFileNamesFn`](#usecasesensitivefilenamesfn)\n  - [`UseCaseSensitiveFileNames`](#usecasesensitivefilenames)\n- [Related](#related)\n- [Contribute](#contribute)\n\n## What is this?\n\nThis package exports utilities for working with [TypeScript configuration files][tsconfig].\n\n## When should I use this?\n\nThis package can be used to merge and load tsconfig files, as well resolve path aliases.\n\n## Install\n\nThis package is [ESM only][esm].\n\nIn Node.js (version 20+) with [yarn][]:\n\n```sh\nyarn add @flex-development/tsconfig-utils\n```\n\n\u003cblockquote\u003e\n  \u003csmall\u003e\n    See \u003ca href='https://yarnpkg.com/protocol/git'\u003eGit - Protocols | Yarn\u003c/a\u003e\n    \u0026nbsp;for details regarding installing from Git.\n  \u003c/small\u003e\n\u003c/blockquote\u003e\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```ts\nimport {\n  createModuleResolutionHost,\n  loadTsconfig,\n  resolvePath\n} from 'https://esm.sh/@flex-development/tsconfig-utils'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n\u003cscript type=\"module\"\u003e\n  import {\n    createModuleResolutionHost,\n    loadTsconfig,\n    resolvePath\n  } from 'https://esm.sh/@flex-development/tsconfig-utils'\n\u003c/script\u003e\n```\n\n## Use\n\n```ts\nimport {\n  loadTsconfig,\n  type ResolvedTsconfig\n} from '@flex-development/tsconfig-utils'\nimport fs from 'node:fs'\n\n/**\n * The resolved tsconfig.\n *\n * @const {ResolvedTsconfig | null} resolved\n */\nconst resolved: ResolvedTsconfig | null = await loadTsconfig(null, {\n  encoding: 'utf8',\n  fs: fs.promises\n})\n\nif (resolved) {\n  console.dir(resolved.tsconfig) // the loaded tsconfig, with bases applied\n  console.dir(resolved.url) // the url of the tsconfig file\n}\n```\n\n## API\n\nThis package exports the following identifiers listed below.\n\nThere is no default export.\n\n### `createGetCanonicalFileName([useCaseSensitiveFileNames])`\n\nCreate a canonical file name function.\n\n#### Parameters\n\n- `useCaseSensitiveFileNames` ([`UseCaseSensitiveFileNames`](#usecasesensitivefilenames))\n  — whether to treat filenames as case sensitive\n\n#### Returns\n\n([`GetCanonicalFileName`](#getcanonicalfilename)) A function that returns a canonical file name given a module id\n\n### `createModuleResolutionHost([options])`\n\nCreate a module resolution host.\n\nThe module resolution host acts a bridge between the TypeScript compiler and the file system.\n\n\u003e 👉 **Note**: The host can have both asynchronous and synchronous methods,\n\u003e but when used with the native TypeScript compiler, all methods must return synchronous values.\n\n#### Parameters\n\n- `options` ([`ModuleResolutionHostOptions`](#moduleresolutionhostoptions) | `null` | `undefined`)\n  — options for host creation\n\n#### Returns\n\n([`ModuleResolutionHost`](#moduleresolutionhost)) The module resolution host\n\n### `createParseConfigHost([options])`\n\nCreate a configuration parser host.\n\nThe parser host provides methods for accessing the file system and resolving module paths.\n\n\u003e 👉 **Note**: The host can have both asynchronous and synchronous methods,\n\u003e but when used with the native TypeScript compiler, all methods must return synchronous values.\n\n#### Parameters\n\n- `options` ([`ParseConfigHostOptions`](#parseconfighostoptions) | `null` | `undefined`)\n  — options for host creation\n\n#### Returns\n\n([`ParseConfigHost`](#parseconfighost)) The parse config host\n\n### `isResolvedTsconfig(value)`\n\nCheck if `value` is a resolved configuration object.\n\n#### Parameters\n\n- `value` (`unknown`)\n  — the value to check\n\n#### Returns\n\n([`value is ResolvedTsconfig`](#resolvedtsconfig)) `true` if `value` is resolved tsconfig object, `false` otherwise\n\n### `isTsconfigHost(value)`\n\nCheck if `value` is an object with a [`Tsconfig`][tt-tsconfig].\n\n#### Parameters\n\n- `value` (`unknown`)\n  — the value to check\n\n#### Returns\n\n([`value is TsconfigHost`](#tsconfighost)) `true` if `value` is tsconfig host object, `false` otherwise\n\n### `loadTsconfig\u003cT\u003e([id][, options])`\n\nLoad a tsconfig file.\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cResolvedTsconfig | null\u003e`](#resolvedtsconfig))\n  — the resolved tsconfig\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid] | `null` | `undefined`)\n  — the module id or specifier of the tsconfig file\n  - **default**: `'tsconfig.json'`\n- `options` ([`LoadTsconfigOptions`](#loadtsconfigoptions) | `null` | `undefined`)\n  — load options\n\n#### Returns\n\n(`T`) The resolved tsconfig, or `null` if tsconfig file is not found\n\n### `mergeTsconfig\u003cT\u003e(target[, ...tsconfigs])`\n\nMerge one or more tsconfig objects into a single [`Tsconfig`][tt-tsconfig].\n\nTsconfig source objects are applied from left to right.\nSubsequent sources overwrite property assignments of previous sources.\n\n\u003e 👉 **Note**: If `target` is a [`TsconfigHost`](#tsconfighost), `target.tsconfig` will be modified.\n\u003e Otherwise, `target` will be modified.\n\n#### Type Parameters\n\n- `T` ([`Tsconfig`][tt-tsconfig])\n  — the merged tsconfig\n\n#### Parameters\n\n- `target` ([`Tsconfig`][tt-tsconfig] | [`TsconfigHost`](#tsconfighost) | `null` | `undefined`)\n  — the target tsconfig or tsconfig host\n- `...tsconfigs` (`readonly (Tsconfig | TsconfigHost | null | undefined)[]`)\n  — the source tsconfig object(s)\n\n#### Returns\n\n(`T`) The merged tsconfig\n\n### `readTsconfig\u003cT\u003e([id][, options])`\n\nRead a tsconfig file.\n\n\u003e 👉 **Note**: Returns a promise if [`getSource`][mlly-getsource]\n\u003e or [`resolveModule`][mlly-resolvemodule] returns a promise.\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cResolvedTsconfig | null\u003e`](#resolvedtsconfig))\n  — the resolved tsconfig\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid] | `null` | `undefined`)\n  — the module id or specifier of the tsconfig file\n  - **default**: `'tsconfig.json'`\n- `options` ([`ReadTsconfigOptions`](#readtsconfigoptions) | `null` | `undefined`)\n  — read options\n\n#### Returns\n\n(`T`) The resolved tsconfig, or `null` if tsconfig file is not found\n\n### `resolvePath(specifier[, options])`\n\nResolve an aliased `specifier`.\n\n#### Parameters\n\n- `specifier` (`string`)\n  — the specifier using an alias\n- `options` ([`ResolvePathOptions`](#resolvepathoptions) | `null` | `undefined`)\n  — alias resolution options\n\n#### Returns\n\n(`string` | `null`) The path alias match or `null` if match is not found\n\n## Types\n\nThis package is fully typed with [TypeScript][].\n\n### `tsconfig-types`\n\nThis package re-exports TypeScript definitions from [`tsconfig-types`][tsconfig-types].\nThis is primarily for the convenience of TypeScript users who do not hoist packages,\nbut may need to `import` definitions used in this package.\n\n### `Awaitable\u003cT\u003e`\n\nCreate a union of `T` and `T` as a promise-like object (`type`).\n\n```ts\ntype Awaitable\u003cT\u003e = PromiseLike\u003cT\u003e | T\n```\n\n#### Type Parameters\n\n- `T` (`any`)\n  — the value\n\n### `DirectoryExists`\n\nCheck if a directory exists (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003cboolean\u003e\u003e(id: ModuleId): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cboolean\u003e`](#awaitablet))\n  — the result of the check\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id to check\n\n#### Returns\n\n(`T`) `true` if directory exists at `id`, `false` otherwise\n\n### `Dirent`\n\nInformation about a directory entry (`interface`).\n\n#### Properties\n\n- `isDirectory` ([`IsDirectory`](#isdirectory))\n  — check if the entry is a directory\n- `isFile` ([`IsFile`](#isfile))\n  — check if the entry is a file\n- `isSymbolicLink` ([`IsSymbolicLink`](#issymboliclink))\n  — check if the entry is a symbolic link\n- `name` (`string`)\n  — the path to the entry, relative to its parent directory\n\n### `FileExists`\n\nCheck if a file exists (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003cboolean\u003e\u003e(id: ModuleId): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cboolean\u003e`](#awaitablet))\n  — the result of the check\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id to check\n\n#### Returns\n\n(`T`) `true` if file exists at `id`, `false` otherwise\n\n### `FileSystem`\n\nThe file system API (`interface`).\n\n#### Properties\n\n- `readFile` ([`ReadFile`](#readfile))\n  — read the entire contents of a file\n- `readdir` ([`Readdir`](#readdir))\n  — read the entire contents of a directory\n- `realpath` ([`Realpath`](#realpath))\n  — compute a canonical pathname by resolving `.`, `..`, and symbolic links\n- `stat` ([`Stat`](#stat))\n  — get information about a file system entry\n\n### `GetCanonicalFileName`\n\nGet the canonical file name for a module id (`type`).\n\n```ts\ntype GetCanonicalFileName = (this: void, id: ModuleId) =\u003e string\n```\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id\n\n#### Returns\n\n(`string`) The canonical file name\n\n### `GetCurrentDirectory`\n\nGet the path to the current working directory (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003cstring\u003e\u003e(): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cstring\u003e`](#awaitablet))\n  — the directory path\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id to check\n\n#### Returns\n\n(`T`) The current working directory path\n\n### `GetDirectories`\n\nGet a list of subdirectories (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003cstring[]\u003e\u003e(parent: ModuleId): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cstring[]\u003e`](#awaitablet))\n  — the list of subdirectory names\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id of the parent directory\n\n#### Returns\n\n(`T`) The list of subdirectory names\n\n### `HostReadFile`\n\nRead the entire contents of a file (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003cstring | undefined\u003e\u003e(id: ModuleId): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003cstring | undefined\u003e`](#awaitablet))\n  — the file contents\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id of the file\n\n#### Returns\n\n(`T`) The file contents, or `undefined` if file does not exist at `id`\n\n### `IsDirectory`\n\nCheck if a file system entry is a directory (`interface`).\n\n#### Extends\n\n- [`mlly.IsDirectory`][mlly-isdirectory]\n\n### `IsFile`\n\nCheck if a file system entry is a file (`interface`).\n\n#### Extends\n\n- [`mlly.IsFile`][mlly-isfile]\n\n### `IsSymbolicLink`\n\nCheck if a file system entry is a symbolic link (`interface`).\n\n#### Signatures\n\n```ts\n(): boolean\n```\n\n#### Returns\n\n(`boolean`) `true` if entry is symbolic link, `false` otherwise\n\n### `List\u003c[T]\u003e`\n\nA list (`type`).\n\n```ts\ntype List\u003cT = unknown\u003e = ReadonlySet\u003cT\u003e | readonly T[]\n```\n\n#### Type Parameters\n\n- `T` (`any`, optional)\n  — the list item type\n\n### `LoadTsconfigOptions`\n\nOptions for loading tsconfig files (`interface`).\n\n#### Extends\n\n- [`ReadTsconfigOptions`](#readtsconfigoptions)\n\n#### Properties\n\n- `relativePaths` ([`List\u003cstring\u003e`](#listt) | `null` | `undefined`)\n  — the list of property paths where the value may be a relative path\n\n### `ModuleResolutionHostOptions`\n\nOptions for creating module resolution hosts (`interface`).\n\n#### Properties\n\n- `encoding?` ([`BufferEncoding`][mlly-bufferencoding])\n  — the encoding to use when reading files\n  - **default**: `'utf8'`\n- `fs?` ([`FileSystem`](#filesystem) | `null` | `undefined`)\n  — the file system api\n- `root?` ([`ModuleId`][mlly-moduleid] | `null` | `undefined`)\n  — the module id of the current working directory\n- `useCaseSensitiveFileNames?` ([`UseCaseSensitiveFileNames`](#usecasesensitivefilenames))\n  — boolean indicating whether filenames should be treated as case sensitive, or a function that returns such a value\n\n### `ModuleResolutionHost`\n\nThe module resolution host API (`interface`).\n\nThe module resolution host acts a bridge between the TypeScript compiler and the file system.\n\n\u003e 👉 **Note**: The host can have both asynchronous and synchronous methods,\n\u003e but when used with the native TypeScript compiler, all methods must return synchronous values.\n\n#### Properties\n\n- `directoryExists` ([`DirectoryExists`](#directoryexists))\n  — check if a directory exists\n- `fileExists` ([`FileExists`](#fileexists))\n  — check if a file exists\n- `getCurrentDirectory` ([`GetCurrentDirectory`](#getcurrentdirectory))\n  — get the path to the current working directory\n- `getDirectories` ([`GetDirectories`](#getdirectories))\n  — get a list of subdirectories\n- `readFile` ([`HostReadFile`](#hostreadfile))\n  — read the entire contents of a file\n- `realpath` ([`Realpath`](#realpath))\n  — compute a canonical pathname by resolving `.`, `..`, and symbolic links\n- `useCaseSensitiveFileNames?` ([`UseCaseSensitiveFileNames`](#usecasesensitivefilenames))\n  — whether to treat filenames as case sensitive\n\n### `ParseConfigHostOptions`\n\nOptions for creating parse config hosts (`interface`).\n\n#### Extends\n\n- [`ModuleResolutionHostOptions`](#moduleresolutionhostoptions)\n\n### `ParseConfigHost`\n\nThe configuration parser host API (`interface`).\n\nThe parser host provides methods for accessing the file system and resolving module paths.\n\n\u003e 👉 **Note**: The host can have both asynchronous and synchronous methods,\n\u003e but when used with the native TypeScript compiler, all methods must return synchronous values.\n\n#### Extends\n\n- [`ModuleResolutionHost`](#moduleresolutionhost)\n\n#### Properties\n\n- `readDirectory` ([`ReadDirectory`](#readdirectory))\n  — read the contents of a directory\n- `useCaseSensitiveFileNames` (`boolean`)\n  — whether to treat filenames as case sensitive\n\n### `ReadDirectory`\n\nRead the contents of a directory (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003creadonly string[]\u003e\u003e(\n  parent: ModuleId,\n  extensions?: List\u003cstring\u003e | null | undefined,\n  exclude?: List\u003cstring\u003e | null | undefined,\n  include?: List\u003cstring\u003e | null | undefined,\n  depth?: number | null | undefined\n): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003creadonly string[]\u003e`](#awaitablet))\n  — the list of matched files\n\n#### Parameters\n\n- `parent` ([`ModuleId`][mlly-moduleid])\n  — the module id of the parent directory\n- `extensions` ([`List\u003cstring\u003e`](#listt) | `null` | `undefined`)\n  — the list of file extensions to filter for\n- `exclude` ([`List\u003cstring\u003e`](#listt) | `null` | `undefined`)\n  — the list of glob patterns matching files to exclude\n- `include` ([`List\u003cstring\u003e`](#listt) | `null` | `undefined`)\n  — the list of glob patterns matching files to include\n- `depth` (`number` | `null` | `undefined`)\n  — the maximum search depth (inclusive)\n\n#### Returns\n\n(`T`) The list of matched files\n\n### `ReadFile`\n\nRead the entire contents of a file (`interface`).\n\n#### Extends\n\n- [`mlly.ReadFile`][mlly-readfile]\n\n### `ReadTsconfigOptions`\n\nOptions for reading tsconfig files (`interface`).\n\n#### Extends\n\n- [`GetSourceOptions`][mlly-getsourceoptions]\n\n#### Properties\n\n- `conditions` ([`List\u003cCondition\u003e`][mlly-condition] | `null` | `undefined`)\n  — the list of export/import conditions\n  - **default**: [`mlly.defaultConditions`][mlly-defaultconditions]\n  \u003e 👉 **note**: should be sorted by priority\n- `cwd` ([`ModuleId`][mlly-moduleid] | `null` | `undefined`)\n  — the url of the current working directory\n  - **default**: [`mlly.cwd()`][mlly-cwd]\n- `mainFields` ([`List\u003cMainField\u003e`][mlly-mainfield] | `null` | `undefined`)\n  — the list of legacy `main` fields\n  - **default**: [`mlly.defaultMainFields`][mlly-defaultmainfields]\n  \u003e 👉 **note**: should be sorted by priority\n- `parent` ([`ModuleId`][mlly-moduleid] | `null` | `undefined`)\n  — the parent module id\n  - **default**: `cwd` | [`mlly.cwd()`][mlly-cwd]\n- `preserveSymlinks` (`boolean` | `null` | `undefined`)\n  — whether to keep symlinks instead of resolving them\n\n### `ReaddirDirentOptions`\n\nOptions for reading the contents of a directory (`interface`).\n\n#### Extends\n\n- [`ReaddirOptions`](#readdiroptions)\n\n#### Properties\n\n- `withFileTypes` (`true`)\n  — whether the result should be a content object list instead of just strings.\\\n  if `true`, the result will be a list of [`Direct`](#dirent) objects, which provide methods\n  like [`isDirectory()`](#isdirectory) and [`isFile()`](#isfile) to get more information about\n  a file system entry without additional [`fs.stat()`](#stat) calls\n\n### `ReaddirOptions`\n\nOptions for reading the contents of a directory (`interface`).\n\n#### Extends\n\n- [`ReaddirOptions`](#readdiroptions)\n\n#### Properties\n\n- `withFileTypes?` (`boolean` | `null` | `undefined`)\n  — whether the result should be a content object list instead of just strings.\\\n  if `true`, the result will be a list of [`Direct`](#dirent) objects, which provide methods\n  like [`isDirectory()`](#isdirectory) and [`isFile()`](#isfile) to get more information about\n  a file system entry without additional [`fs.stat()`](#stat) calls\n\n### `Readdir`\n\nRead the entire contents of a directory (`interface`).\n\n#### Signatures\n\n```ts\n\u003cT extends Awaitable\u003creadonly Dirent[]\u003e\u003e(id: ModuleId, options: ReaddirDirentOptions): T\n```\n\n#### Type Parameters\n\n- `T` ([`Awaitable\u003creadonly Dirent[]\u003e`](#dirent))\n  — the directory contents\n\n#### Parameters\n\n- `id` ([`ModuleId`][mlly-moduleid])\n  — the module id of the file\n- `options` ([`ReaddirDirentOptions`](#readdirdirentoptions))\n  — read options\n\n#### Returns\n\n(`T`) The directory contents\n\n### `Realpath`\n\nCompute a canonical pathname by resolving `.`, `..`, and symbolic links (`interface`).\n\n#### Extends\n\n- [`mlly.Realpath`][mlly-realpath]\n\n### `ResolvePathOptions`\n\nOptions for path alias resolution (`interface`).\n\n#### Extends\n\n- [`ResolveAliasOptions`][mlly-resolvealiasoptions]\n\n#### Properties\n\n- `aliases?` (`null` | `undefined`)\n  — the url of the tsconfig file\n  \u003e 👉 **note**: path aliases are read from the `tsconfig`\n- `tsconfig?` ([`ResolvedTsconfig`](#resolvedtsconfig) | [`Tsconfig`][tt-tsconfig] `null` | `undefined`)\n  — the tsconfig object, or the resolved tsconfig\n\n### `ResolvedTsconfig`\n\nA resolved TypeScript configuration (`interface`).\n\n#### Extends\n\n- [`TsconfigHost`](#tsconfighost)\n\n#### Properties\n\n- `url` (`URL`)\n  — the url of the tsconfig file\n\n### `Stat`\n\nGet information about a file system entry (`interface`).\n\n#### Extends\n\n- [`mlly.Stat`][mlly-stat]\n\n### `Stats`\n\nInformation about a file system entry (`interface`).\n\n#### Properties\n\n- `isDirectory` ([`IsDirectory`](#isdirectory))\n  — check if the entry is a directory\n- `isFile` ([`IsFile`](#isfile))\n  — check if the entry is a file\n\n### `TsconfigHost`\n\nAn object with a TypeScript configuration (`interface`).\n\n#### Properties\n\n- `tsconfig` ([`Tsconfig`][tt-tsconfig])\n  — the tsconfig object\n\n### `UseCaseSensitiveFileNamesFn`\n\nDetermine if file names should be treated as case sensitive (`type`).\n\n```ts\ntype UseCaseSensitiveFileNamesFn = (this: void) =\u003e boolean | null | undefined\n```\n\n#### Returns\n\n(`boolean` | `null` | `undefined`) `true` if file names should be treated as case sensitive\n\n### `UseCaseSensitiveFileNames`\n\nUnion of values used to determine if file names should be treated as case sensitive (`type`).\n\n```ts\ntype UseCaseSensitiveFileNames =\n  | UseCaseSensitiveFileNamesFn\n  | boolean\n  | null\n  | undefined\n```\n\n#### Returns\n\n(`boolean` | `null` | `undefined`) `true` if file names should be treated as case sensitive\n\n## Related\n\n- [`@flex-development/mlly`][mlly]\n  — [ECMAScript module][node-esm] utilities\n- [`@flex-development/tsconfig-types`][tsconfig-types]\n  — [TypeScript][] definitions for `tsconfig.json`\n\n## Contribute\n\nSee [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nThis project has a [code of conduct](./CODE_OF_CONDUCT.md). By interacting with this repository, organization, or\ncommunity you agree to abide by its terms.\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[mlly]: https://github.com/flex-development/mlly\n\n[mlly-bufferencoding]: https://github.com/flex-development/mlly#bufferencoding\n\n[mlly-condition]: https://github.com/flex-development/mlly#condition\n\n[mlly-cwd]: https://github.com/flex-development/mlly#cwd\n\n[mlly-defaultconditions]: https://github.com/flex-development/mlly#defaultconditions\n\n[mlly-defaultmainfields]: https://github.com/flex-development/mlly#defaultmainfields\n\n[mlly-getsourceoptions]: https://github.com/flex-development/mlly#getsourceoptions\n\n[mlly-getsource]: https://github.com/flex-development/mlly#getsourcetid-options\n\n[mlly-isdirectory]: https://github.com/flex-development/mlly#isdirectory\n\n[mlly-isfile]: https://github.com/flex-development/mlly#isfile\n\n[mlly-mainfield]: https://github.com/flex-development/mlly#mainfield\n\n[mlly-moduleid]: https://github.com/flex-development/mlly#moduleid\n\n[mlly-readfile]: https://github.com/flex-development/mlly#readfile\n\n[mlly-realpath]: https://github.com/flex-development/mlly#realpath\n\n[mlly-resolvealiasoptions]: https://github.com/flex-development/mlly#resolvealiasoptions\n\n[mlly-resolvemodule]: https://github.com/flex-development/mlly#resolvemoduletspecifier-parent-options\n\n[mlly-stat]: https://github.com/flex-development/mlly#stat\n\n[node-esm]: https://nodejs.org/api/esm.html\n\n[tsconfig-types]: https://github.com/flex-development/tsconfig-types\n\n[tsconfig]: https://www.typescriptlang.org/tsconfig\n\n[tt-tsconfig]: https://github.com/flex-development/tsconfig-types/blob/main/src/tsconfig.mts\n\n[typescript]: https://www.typescriptlang.org\n\n[yarn]: https://yarnpkg.com\n","funding_links":["https://github.com/sponsors/flex-development"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Ftsconfig-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflex-development%2Ftsconfig-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflex-development%2Ftsconfig-utils/lists"}