import type { JsonValue, PackageJson } from "type-fest"
function fn(j: JsonValue) {
console.log(j)
}
const pj: PackageJson = {}
fn(pj)
$ ts --noEmit
# (no error)
$ ts --noEmit
src/index.ts(8,4): error TS2345: Argument of type 'PackageJson' is not assignable to parameter of type 'JsonValue'.
Type 'PackageJson' is not assignable to type 'JsonObject'.
Index signature for type 'string' is missing in type 'PackageJson'.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too