Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
babel-plugin-typescript-to-flow
Advanced tools
Babel plugin to convert TypeScript code into Flow
If you are looking for converting .d.ts
files to Flow definitions - be sure check flowgen first.
Most convenient - via tsflow
utility, which currently is part of flowts.
Installation:
npm install babel-plugin-typescript-to-flow
Plugin options:
{
// should be true when source code is from `d.ts` file
isAmbientContext: boolean
}
While main goal of this repository is to do the opposite (to help migrate from Flow to TypeScript), in many cases it is preferable to do so gradually.
Especially when having multiple other projects depending on support for Flow.
To do so there is a need to generate Flow type definitions from TypeScript .d.ts
files.
Why not flowgen:
However, flowgen does wonderful job converting the definitions files. There are probably cases where it currently does better job comparing to this plugin.
The focus is on converting .d.ts
files.
However, it is not limited to only definition files, and a lot of features already are supported.
Still work in progress. Some features are missing.
For the test cases that might be not covered - check test
folder, there are some skipped test cases, to be implemented.
FAQs
Babel plugin to convert TypeScript into Flow
We found that babel-plugin-typescript-to-flow demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.