
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
dts-from-json
Advanced tools
Command line utility to emit TypeScript type declaration files for JSON files
Command line utility to emit TypeScript type declaration files for JSON files powered by
npm install -g dts-from-json
dts-from-json <json-file>
You can pass a local path or URL as <json-file>.
The types are printed in stdout, to save to a file simply pipe to output to a file:
dts-from-json <json-file> > <dts-dir>
dts-from-json demo/json/senators.json
dts-from-json https://raw.githubusercontent.com/Biuni/PokemonGO-Pokedex/master/pokedex.json
dts-from-json demo/json/senators.json > demo/types/senators.d.ts
dts-from-json demo/json/senators.json --root Senators
dts-from-json ./demo/json/senators.json --root Senators --types true
npx dts-from-json <json-file>
The default root type is the CamelCase version of the json file name. For example, if your file is called nobe-prize.d.ts the root type will be NobelPrice by default.
$ dts-from-json <json-file> --root Senators
type instead of interface $ dts-from-json <json-file> --types
{
"meta": {
// ...
},
"objects": [
// ...
]
}
It will be translated into:
interface Meta {
// ...
}
interface Object { // <-- Collision with Object type
// ...
}
interface RootObject {
meta: Meta;
objects: Object[];
}
This will lead to problems with the already defined Object type.
FAQs
Command line utility to emit TypeScript type declaration files for JSON files
We found that dts-from-json demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.

Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.

Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.