Skip to content

Instantly share code, notes, and snippets.

@gevgeny
Last active October 31, 2019 13:16
Show Gist options
  • Save gevgeny/83df2546d454788ebb2fa797a6d9bbfb to your computer and use it in GitHub Desktop.
Save gevgeny/83df2546d454788ebb2fa797a6d9bbfb to your computer and use it in GitHub Desktop.
function observable(target: any, propertyKey: string): PropertyDecorator {
console.log(`decorate ${propertyKey}`);
// This is property descriptor
return {
get() {},
set() {},
};
}
class State {
@observable foo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment