Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
ts-expose-internals
Advanced tools
Readme
Expose TypeScript internal types by simply adding a development dependency.
Add aliased dependency to package.json (use the same version as your typescript version)
{
"devDependencies": {
"typescript": "^5.1.3",
// Note: The package is 'ts-expose-internals', but we are aliasing within the @types scope to make TS adopt it globally
"@types/ts-expose-internals": "npm:ts-expose-internals@5.1.3"
}
}
Run npm install
/ yarn install
All internal types are now available within the primary typescript module
// This namespace is flagged @internal and is omitted from published types, but now we can access it!
import { JsDoc } from 'typescript'
The code within this repo runs on a schedule of once per day via GitHub Actions.
It checks for new TypeScript release tags, and if there are any, it clones the source code for that release and builds the internal types. After, it performs a bit of transformation magic and publishes the package to NPM.
New types are added to the 'typescript' module via the Module Augmentation technique.
Thanks to basarat for his work on byots, which served as the inspiration!
FAQs
Augment the TypeScript compiler module's types to expose hidden internal types
The npm package ts-expose-internals receives a total of 485 weekly downloads. As such, ts-expose-internals popularity was classified as not popular.
We found that ts-expose-internals demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.