Skip to main content

Added new Flyyer Variable: V.Nullable

ยท One min read
Patricio Lopez Juri

Hello creators ๐Ÿ‘‹

We just updated @flyyer/variables to add V.Nullable type. This is an addition to the current V.Optional type.

The main difference of V.Nullable and V.Optional is that V.Nullable will always appear in Flyyer UI (dashboard), while optional values are hidden behind a flag for advanced users.

This new nullable variable is combinable with optional allowing to define nullable optional values:

import { Variable as V, Static, Validator } from "@flyyer/variables";
export const schema = V.Object({  price: V.Nullable(V.Number()),  logo: V.Optional(V.Image()),  font: V.Optional(V.Nullable(V.Font())),});const validator = new Validator(schema);
type Variables = Static<typeof schema>;// Variables.price is `number | null`// Variables.logo is `string | undefined`// Variables.font is `string | undefined | null`

To upgrade your Flyyer decks run:

yarn add @flyyer/variables@latest

Remember to join our Discord channel to discuss new features: https://flyyer.io/discord