Skip to content

docs: add variable expansion documentation to README#21

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/add-documentation-for-variable-expansion
Draft

docs: add variable expansion documentation to README#21
Copilot wants to merge 2 commits into
masterfrom
copilot/add-documentation-for-variable-expansion

Conversation

Copilot AI commented May 31, 2026

Copy link
Copy Markdown

The README had no documentation for the ${VARIABLE_NAME} variable expansion feature supported by ts-appconfig.

Added a Variable Expansion section to README.md covering:

  • Basic expansion — referencing other variables via ${VAR} in .env or schema defaults
  • Nested expansion — multi-pass resolution (variables referencing variables that are themselves references)
  • Number references — number-typed variables are cast to string on expansion
  • Error casesCircularReferenceError (mutual references) and UndefinedReferenceError (unknown variable name), both thrown at configuration time

Example:

APP_HOST=localhost
APP_PORT=3000
APP_URL=http://${APP_HOST}:${APP_PORT}
# env.APP_URL → "http://localhost:3000"

Copilot AI linked an issue May 31, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add documentation for variable expansion docs: add variable expansion documentation to README May 31, 2026
Copilot AI requested a review from DrewImm May 31, 2026 15:14
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 documentation for variable expansion

2 participants