-
Notifications
You must be signed in to change notification settings - Fork 62
Move lang.observe and observer implementations to their own file #40
Conversation
target: {} | ||
} | ||
|
||
export interface Observer extends Handle { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on moving these interfaces up since they're currently used above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to preserve alphabetical order, which means ES5
and ES7
need to move before KwArgs
...
@@ -0,0 +1,330 @@ | |||
import has from './has'; | |||
import { Handle, Hash } from './interfaces'; | |||
import { getPropertyDescriptor, isIdentical } from './lang'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ObjectObserver.ts
used to have its own version of getPropertyDescriptor
which also included default behavior if no descriptor yet existed. The version in lang
doesn't have that behavior. Is this change intentional or should this be preserving the behavior of getPropertyDescriptor
as it existed in ObjectObserver
?
(Incidentally, #31 was going to remove getPropertyDescriptor
from lang anyway, so I'd probably opt to keep the internal function in this module.)
I was hoping to merge this along with #31, but I still have a couple of questions for @bryanforbes on this. I don't think it should conflict too much - the main thing is that |
}); | ||
|
||
let b: number; | ||
let length: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b
and length
are unused
Closing for #80. |
This moves
lang.observe
out of lang (as previously discussed) and moves the observer classes into the same file.