Any var in this document (either before or after compilation) can be replaced by let if useLet: true
is specified.
const [type] [name] = [value];
will be compiled to:
const [name]: [type] = [value];
[type] [name] = [value];
will be compiled to:
var [name]: [type] = [value];
[type] [name]([param with type]) {
doSomething();
}
will be compiled to:
function [name]([param with type]): [type] {
doSomething();
}
[type] [name]([param with type]) => doSomething();
will be compiled to:
const [name]: ([param with type]) => [type] = ([param without type]) => doSomething();
var [type] [name]([param with type]) {
doSomething();
}
will be compiled to:
var [name] = function([param with type]): [type] {
doSomething();
}
var [type] [name]([param with type]) => doSomething();
will be compiled to:
var [name]: ([param with type]) => [type] = ([param without type]) => doSomething();
var function [name]([param with type]) {
doSomething();
}
will be compiled to:
var [name] = function([param with type]) {
doSomething();
}
var arrow [name]([param with type]) => doSomething();
will be compiled to:
var [name] = ([param without type]) => doSomething();
var class [name]...
will be compiled to:
var [name] = class [name]...