Is your feature request related to a problem? Please describe.
It is tupical scenario when some value can be of different types eg string | null. OK, tinyBase doesnt support null or undefined. That is why i'm using 0 for nullish data. But, i can't specify string | number type in schema:
export const persistentStateStore = createStore()
.setValuesSchema({
currentJournalDirectory: { type: "string" },
selectedCurrency: { type: "string" },
})
.setValues({});
Describe the solution you'd like
currentJournalDirectory: { type: ["string", "number"] }, or provide more native support for typings like: createStore<MySchemaType>() Ideally Zod integration, but that's another story
Describe alternatives you've considered
IDK, use empty string but this would create mess in my data
Is your feature request related to a problem? Please describe.
It is tupical scenario when some value can be of different types eg
string | null. OK, tinyBase doesnt supportnullorundefined. That is why i'm using0for nullish data. But, i can't specifystring | numbertype in schema:Describe the solution you'd like
currentJournalDirectory: { type: ["string", "number"] },or provide more native support for typings like:createStore<MySchemaType>()Ideally Zod integration, but that's another storyDescribe alternatives you've considered
IDK, use empty string but this would create mess in my data