Variables

@:value(cast "Loose")@:enum@:implinlineread onlyLoose:NullSafetyMode = "Loose"

Loose safety. If an expression is checked != null, then it's considered safe even if it could be modified after the check. E.g.

function example(o:{field:Null<String>}) {
	if(o.field != null) {
		mutate(o);
		var notNullable:String = o.field; //no error
	}
}

function mutate(o:{field:Null<String>}) {
	o.field = null;
}

@:value(cast "Off")@:enum@:implinlineread onlyOff:NullSafetyMode = "Off"

Disable null safety.

@:value(cast "Strict")@:enum@:implinlineread onlyStrict:NullSafetyMode = "Strict"

Full scale null safety.