Security News
Supply Chain Attack Detected in @solana/web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
@greenlabs/ppx-ts
Advanced tools
ppx_ts
is a ReScript preprocessor, which helps generating helper types to bind to typescript modules.
yarn add -D @greenlabs/ppx_ts
// bsconfig.json
"ppx-flags": [
...,
"@greenlabs/ppx_ts/ppx"
],
@
keyOf
@ppx_ts.keyOf
type t = {
name: string,
age: int
}
// automatically generated
type t_keyOf = Name | Age
// automatically generated
let t_keyToString = key =>
switch key {
| Name => "name"
| Age => "age"
}
setType(t)
module Error = {
type t
}
@ppx_ts.setType(Error.t)
type t = {
name: string,
age: int
}
// automatically generated
type t_setType = {
name: Error.t
age: Error.t
}
toGeneric
@ppx_ts.toGeneric
type t = {
name: string,
age: int
}
// automatically generated
type t_toGeneric<'a> = {
name: 'a
age: 'a
}
partial
@ppx_ts.partial
type t = {
name: string,
age: int
}
// automatically generated
type t_partial = {
name: option<string>,
age: option<int>
}
pick
@ppx_ts.pick(["name"])
type t = {
name: string,
age: int
}
// automatically generated
type t_pick_name = {
name: string,
}
omit
@ppx_ts.omit(["name"])
type t = {
name: string,
age: int
}
// automatically generated
type t_omit_name = {
age: int,
}
opam switch create ppx_ts 4.12.1
opam install . --deps-only --with-test
opam exec -- dune build
cd rescript
(install dependencies)
yarn
(build --watch)
yarn res:clean && yarn res:watch
(run test --watch)
yarn test:watch
FAQs
ReScript PPX helps binding to typescript modules
The npm package @greenlabs/ppx-ts receives a total of 0 weekly downloads. As such, @greenlabs/ppx-ts popularity was classified as not popular.
We found that @greenlabs/ppx-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.