Get the benefits of types without typing them! 🥳
Instances using Griddo AutoTypes
When we began writing Types with our new brand, Griddo Starter, we realized they were too similar to Schemas. Could we take advantage of this and avoid duplication? Yeeeeeeeah!
If you have a schema, you have a Type. ← Burn it into your heart.
Griddo AutoTypes takes your schema and generates, on the fly, the exact type that fits perfectly into each schema element. This provides you with an unprecedented type-checking and autocompletion experience in Griddo, without the need to manually write types.
Write your schema, use the type. Simple, easy to remember.
1 - Write your schema as always (well, you know, with the tasty types that Griddo provides)
import { Schema } from "@griddo/core";
const schema: Schema.Module = {
// ^ Tasty Griddo type
schemaType: "module",
component: "BasicContent",
displayName: "BasicContent",
...
2 - Use the type generated by AutoTypes
import { BasicContentProps } from "@autotypes"
// ^ Import the Type
function BasicContent (props: BasicContentProps) {
// ^ Use the Type
...
}