type-fest
type-fest copied to clipboard
`JsonObject` not limit object keys type
typescript: 5.1.6
type JsonObject
not limit Object key type like symbol
const a = {[Symbol(1)]: 1}
function test(v: JsonObject) {}
// issue
test(a) // no ts error, should throw ts error
type b = typeof a extends JsonObject ? true : false // true, should be false
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
found this: https://github.com/microsoft/TypeScript/issues/53265 https://github.com/microsoft/TypeScript/issues/44794
have any way to fix it in type-fast?