{"id":27472,"library":"ts-expose-internals-conditionally","title":"ts-expose-internals-conditionally","description":"A type augmentation package that conditionally exposes TypeScript compiler internal types when the consuming project's tsconfig.json includes 'ts-expose-internals' in the `customConditions` field. Version 1.0.0-empty.0 is an empty placeholder, effectively doing nothing; there is no stable release with actual functionality. This is a proof-of-concept for conditional type augmentation, not for production use. The package ships with TypeScript type definitions and targets developers working on TypeScript compiler internals or tooling that requires access to hidden APIs.","status":"deprecated","version":"1.0.0-empty.0","language":"javascript","source_language":"en","source_url":"ssh://git@github.com/andrewbranch/ts-expose-internals-conditionally","tags":["javascript","typescript","internal types","internals","byots","types"],"install":[{"cmd":"npm install ts-expose-internals-conditionally","lang":"bash","label":"npm"},{"cmd":"yarn add ts-expose-internals-conditionally","lang":"bash","label":"yarn"},{"cmd":"pnpm add ts-expose-internals-conditionally","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency - the package augments the TypeScript compiler module's types","package":"typescript","optional":true}],"imports":[{"note":"This is a side-effect import; it augments the 'typescript' module globally when customConditions includes 'ts-expose-internals'.","wrong":"import * as ts from 'ts-expose-internals-conditionally'","symbol":"ts-expose-internals-conditionally","correct":"import 'ts-expose-internals-conditionally'"}],"quickstart":{"code":"// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"customConditions\": [\"ts-expose-internals\"]\n  }\n}\n\n// any.ts (after importing the package)\nimport 'ts-expose-internals-conditionally';\nimport ts from 'typescript';\n// Now TypeScript's internal types (like `EnumType`) are accessible via `ts`\nconst internalType: ts.EnumType = { /* ... */ };","lang":"typescript","description":"Shows how to enable internal types by setting customConditions and importing the package as side-effect."},"warnings":[{"fix":"Remove this dependency or wait for a future stable release.","message":"Package version 1.0.0-empty.0 is an empty placeholder with no functionality. Upgrade to a non-empty version or use alternative packages like 'ts-expose-internals'.","severity":"deprecated","affected_versions":"<=1.0.0-empty.0"},{"fix":"Ensure tsconfig.json has 'customConditions' array containing 'ts-expose-internals'.","message":"customConditions requires TypeScript 5.0+ and proper configuration in tsconfig.json. Without it, the import has no effect.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Pin your TypeScript version and test after updates.","message":"Exposed internal types are unstable and may change between TypeScript versions, breaking your code.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use only for type definitions; do not rely on runtime exports.","message":"This package only provides type augmentation; the actual TypeScript runtime does not export internals. Code using these types will not compile if you try to access them at runtime.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Consider using @ts-expose-internals or forking TypeScript.","message":"The entire approach of conditionally exposing internals via customConditions is experimental and not officially supported by the TypeScript team.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run npm install ts-expose-internals-conditionally@latest (once stable release exists) or use another package.","cause":"Package not installed or version is empty placeholder with no actual module.","error":"Cannot find module 'ts-expose-internals-conditionally' or its corresponding type declarations."},{"fix":"Add 'customConditions': ['ts-expose-internals'] to compilerOptions in tsconfig.json.","cause":"customConditions in tsconfig.json missing 'ts-expose-internals'.","error":"Module augmentation failed: 'typescript' does not have any internal types."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}