Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
ts-expose-internals
Advanced tools
Augment the TypeScript compiler module's types to expose hidden internal types
Expose TypeScript internal types by simply adding a development dependency.
Add dependency to package.json (set version to the same as your typescript version)
{
"devDependencies": {
"typescript": "^3.9.6",
"ts-expose-internals": "^3.9.6"
}
}
Run npm install
(for yarn: yarn install
)
Import the package once in your main index.ts
import 'ts-expose-internals'
Note:
You can add this import line in any .ts
file that is included in your project.
It only needs to be added to one file in the project for the types to be recognized.
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'
This repository is deployed on a server which runs scripts/cron.sh
every 12 hours.
The scripts compare our release tags with the TypeScript compiler's tags. If new versions are detected, it builds the compiler source, with internal types included, and publishes a new release with its types.
New types are added to the 'typescript' module via the Module Augmentation technique.
Thanks to bararat 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 832 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 0 open source maintainers 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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.