Blink's Language
Options

Options

Options go at the top of a source file, and allow you to configure the output of Blink.

option [OPTION] = [VALUE]

Casing

Default: Pascal
Options: Pascal, Camel, Snake

Controls the casing with which event/function methods generate.

option Casing = Camel

ServerOutput, ClientOutput, TypesOutput

These options allow you to specify where Blink will generate the respective output files.

option TypesOutput = "../Network/Types.luau"
option ServerOutput = "../Network/Server.luau"
option ClientOutput = "../Network/Client.luau"

Typescript

Default: false

Tells Blink whether to generate TypeScript definition files alongside Luau files.
The generated d.ts files are placed in the same path as your output files.

option Typescript = true

UsePolling

Default: false

Instructs the compiler to automatically output all events with a polling API.

option UsePolling = true

FutureLibrary and PromiseLibrary

In order to use future and promise yield types with functions a path to each library used must be specified

option FutureLibrary = "ReplicatedStorage.Packages.Future"
option PromiseLibrary = "ReplicatedStorage.Packages.Promise"

SyncValidation

Default: false

Controls if Blink will check whether a sync call yielded.

WriteValidations

Default: false

Controls if Blink will check types when writing them (firing an event/invoking a function). Helpful for debugging and during development, but it might result in degraded performance. It is encouraged you disable this option in production.

💡

Blink only checks for builtin primitives. For example if a number was passed. More complicated types like structs, maps and enums cannot be validated.

ManualReplication

Default: false

Controls if Blink will replicate events and functions automatically at the end of every frame.
When set to true automatic replication will be disabled and a StepReplication function will be exposed instead.

RemoteScope

Default: ""

Adds a prefix to the events generated by this Blink instance. For example a value of "PACKAGE" creates events "PACKAGE_BLINK_RELIABLE_REMOTE" and "PACKAGE_BLINK_UNRELIABLE_REMOTE". If the option is not specified, they will just be "BLINK_RELIABLE_REMOTE" and "BLINK_UNRELIABLE_REMOTE".
This is particularly useful if you're using Blink inside of a package, and don't want to interfere with a game's own Blink setup.