
Security News
AI Agent Submits PR to Matplotlib, Publishes Angry Blog Post After Rejection
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.
@unsplash/sum-types
Advanced tools
Safe, ergonomic, non-generic sum types in TypeScript.
Documentation: unsplash.github.io/sum-types
[!NOTE] @unsplash/sum-types is no longer actively maintained as we've migrated to the Effect ecosystem.
import * as Sum from "@unsplash/sum-types"
type Weather = Sum.Member<"Sun"> | Sum.Member<"Rain", number>
const Weather = Sum.create<Weather>()
const getRainfall = Weather.match({
Rain: n => `${n}mm`,
Sun: () => "none",
})
const todayWeather = Weather.mk.Rain(5)
getRainfall(todayWeather) // '5mm'
The library is available on the npm registry: @unsplash/sum-types
Note that due to usage of Proxy and Symbol this library only supports ES2015+.
The following bindings are also available:
The library solves a number of problems we've experienced at Unsplash with alternative libraries in this space. Specifically:
The compromise we've made to achieve this is to not support generic sum types.
FAQs
Safe, ergonomic, non-generic sum types in TypeScript.
The npm package @unsplash/sum-types receives a total of 254 weekly downloads. As such, @unsplash/sum-types popularity was classified as not popular.
We found that @unsplash/sum-types 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
After Matplotlib rejected an AI-written PR, the agent fired back with a blog post, igniting debate over AI contributions and maintainer burden.

Security News
HashiCorp disclosed a high-severity RCE in next-mdx-remote affecting versions 4.3.0 to 5.x when compiling untrusted MDX on the server.

Security News
Security researchers report widespread abuse of OpenClaw skills to deliver info-stealing malware, exposing a new supply chain risk as agent ecosystems scale.