PICO-8 Transformer
- Disallows LuaLibs
- Disallows classes
- Disallows iifes
if (x = 0)
- Disallows non-tuple return methods
for loops
/// | |
/// Performs right-to-left function composition. | |
/// | |
/// @param {Function[]} ...functions The pipeline of functions to send values through. | |
/// @returns The head of this pipeline. | |
var compose = function() { | |
var functions = []; | |
for (var i = 0; i < argument_count; ++i) { | |
array_push(functions, argument[i]); | |
} |
var assert_is_callable = function(actual) { | |
if is_callable(actual) return; | |
show_error($"Expected callable. Got {actual}", true); | |
}; | |
var assert_is_array = function(actual) { | |
if is_array(actual) return; | |
show_error($"Expected callable. Got {actual}", true); |
declare function create<T>(this: void): PriorityQueue<T>; | |
interface PriorityQueue<T> { | |
empty(): boolean; | |
size(): number; | |
/** | |
* Swim up on the tree and fix the order heap property. | |
*/ | |
swim(): void; | |
put(v: T, priority: number): void; |
declare function inspect(this: void, value: any): string; | |
declare namespace inspect { | |
const prop: string; | |
} | |
export = inspect; |
PICO-8 Transformer
if (x = 0)
for loops
LÖVE 2D allows Effects to be added to the audio that is playing. Each effect is added with a name which can be used to obtain the audio effect later.
love.audio.setEffect("myEffect", {...});
love.audio.getEffect("myEffect");
To aid TypeScript, an EffectRegistry interface has been provided to keep track of the audio effects planned to be set.
// Works on 0.17.0 | |
/** | |
* @tupleReturn | |
* @luaIterator | |
*/ | |
declare function pairs(object: object): Iterable<[string, any]>; | |
declare const print: any; |