Skip to content

Instantly share code, notes, and snippets.

@pzuraq
Created May 29, 2020 16:55
Show Gist options
  • Save pzuraq/6c2ff5594bf16f9693a7d9131855ee2d to your computer and use it in GitHub Desktop.
Save pzuraq/6c2ff5594bf16f9693a7d9131855ee2d to your computer and use it in GitHub Desktop.
class Example {
// Authoring format, 13 chars
@tracked foo;
// Minified, 7 chars
@t foo;
// Compiled to existing stage 4 code, 121 chars
#data = storageCell();
get foo() {
return this.#data.get();
}
set foo(value) {
this.#data.set(value);
}
// Minified, 60 chars
#d=s();get foo(){return this.#d.g()}set foo(v){this.#d.s(v)}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment