Fix SelfDescribingJson type regression from #1330 - #1347
Conversation
BundleMonFiles added (6)
Total files change +104.88KB 0% Final result: ✅ View report in BundleMon website ➡️ |
f854c0e to
2a3f71b
Compare
There was a problem hiding this comment.
LGTM! Could you add a test that tracks a self-describing event (and maybe also an entity?) using a type generated by Snowtype so that we can catch any regressions in the future?
For instance you can use something like this:
interface EventSpecification {
id: string
name: string
data_product_id: string
data_product_name: string
}da7730a to
4a2ee3d
Compare
Great idea! That found more issues, so I ended up needing to change way more stuff than I'd hoped. :/ This is probably a good integration test idea, to generate some known data product with the latest version of snowtype to check for regressions. Needs adding a secret to the repo though so I can't do that myself. |
Include some Snowtype-generated code as tests.
4a2ee3d to
0d9f7f2
Compare
Fixes a regression from the change in #1330 where in trying to prohibit arrays as SDJ
datavalues, I accidentally mandated that types have a string index property defined. 😅Instead, allow any object, and just explicitly bar arrays as values. This moves the type error from the type signature to the value assignment, but I don't see a better way for TypeScript to define "accepts objects but not arrays" in type parameter constraints while still having a non-inferred default type for that parameter.