Skip to content

Files

Latest commit

Dec 12, 2018
63cf4c9 · Dec 12, 2018

History

History
35 lines (23 loc) · 414 Bytes

File metadata and controls

35 lines (23 loc) · 414 Bytes
class X {
	@deco #x
}

PrivateName

WeakMap + Brand checking

get(instance)
set(instance, value)

Can be proxied!

You can trap all private states of all instances

Symbol

You can only get the private state when you have the instance

Too powerful!

Security issue

Vue, MobX

  • Need to decorate all responsive properties
  • Need to filter all properties of all instances

Performance?