
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@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.
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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.