
Security News
Google’s OSV Fix Just Added 500+ New Advisories — All Thanks to One Small Policy Change
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
@crbroughton/ts-test-utils
Advanced tools
A collection of helper TypeScript types to test other TypeScript types. This collection so far includes:
To install ts-test-utils
with Bun, run the following command:
bun i -D @crbroughton/ts-test-utils
You can use these types to test other types:
// This should return true
type Result = Expect<Equals<{ id: number }, { id: number }>>
For testing types that are expected to not equal each-other, you can
add the //@ts-expect-error
comment to tell the TypeScript compiler
that a false
return is expected, and that a match is not expected:
// @ts-expect-error - Object / Record failing the equality checker
type ResultRecord = Expect<Equals<{ id: number }, { id: string }>>
You can combine these types with existing types. As an example, here is the 'Equals' type being used to check a functions return type:
function myFunction() {
return {
id: 1,
name: 'Craig',
}
}
type Result = Expect<Equals<ReturnType<typeof myFunction>, { id: number, name: string }>>
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init
in bun v1.1.3. Bun is a fast all-in-one JavaScript runtime.
0.7.0
FAQs
A collection of testing helper types
The npm package @crbroughton/ts-test-utils receives a total of 1 weekly downloads. As such, @crbroughton/ts-test-utils popularity was classified as not popular.
We found that @crbroughton/ts-test-utils 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
A data handling bug in OSV.dev caused disputed CVEs to disappear from vulnerability feeds until a recent fix restored over 500 advisories.
Research
/Security News
175 malicious npm packages (26k+ downloads) used unpkg CDN to host redirect scripts for a credential-phishing campaign targeting 135+ organizations worldwide.
Security News
Python 3.14 adds template strings, deferred annotations, and subinterpreters, plus free-threaded mode, an experimental JIT, and Sigstore verification.