Skip to content

docs: add tsimportDirectory to README - #9

Draft
DrewImm with Copilot wants to merge 2 commits into
masterfrom
copilot/add-tsimportdirectory-readme
Draft

docs: add tsimportDirectory to README#9
DrewImm with Copilot wants to merge 2 commits into
masterfrom
copilot/add-tsimportdirectory-readme

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown

tsimportDirectory was not documented in the README despite being a public export.

Changes

  • Added "Import Directory" section covering tsimportDirectory usage, including a migration-pattern example and notes on named/null export variants — consistent with how tsimport options are already documented.
import { tsimportDirectory } from 'ts-import-ts';

// Load default export from every file in the directory
const migrations = tsimportDirectory('migrations');
for (const migration of migrations) {
  migration();
}

// Load a named export from each file
const items = tsimportDirectory('my-dir', 'myExport');

// Load all exports from each file
const allItems = tsimportDirectory('my-dir', null);

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add tsimportDirectory to README docs: add tsimportDirectory to README May 31, 2026
Copilot AI requested a review from DrewImm May 31, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tsimportDirectory to readme

2 participants