Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Move lang.observe and observer implementations to their own file #40

Closed
wants to merge 1 commit into from

Conversation

bryanforbes
Copy link
Member

This moves lang.observe out of lang (as previously discussed) and moves the observer classes into the same file.

target: {}
}

export interface Observer extends Handle {
Copy link
Member

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?

Copy link
Member Author

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';
Copy link
Member

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.)

@kfranqueiro
Copy link
Member

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 getPropertyDescriptor will no longer exist in lang after #31 is merged (and either way, that didn't have some of the logic that ObjectObsever's function of the same name had - see also #40 (comment)).

@eheasley eheasley assigned bryanforbes and unassigned kfranqueiro Jul 10, 2015
});

let b: number;
let length: number;
Copy link
Member

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

@bryanforbes
Copy link
Member Author

Closing for #80.

@dylans dylans added this to the Milestone 2 milestone Jan 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants