Prior to this change, the return type of Paper.group() was specified as "any" which was not very helpful. In my code I was declaring the variable i was storing the group in as "Element" which seemed to make sense at first, but then I later realized that operations like myGroup.line (to add a line in the group) were resulting in type errors. The "group" type has a line method but the "Element" type does not.
Looking in to the source code a bit more I found that groups are instantiated as Elements but then use the following code (in the Element construcor) to copy methods from the Paper prototype, which I believe makes the group type essentially equal to a "Paper":
```
if (this.type in {g: 1, mask: 1, pattern: 1, symbol: 1}) {
for (var method in Paper.prototype) if (Paper.prototype[has](method)) {
this[method] = Paper.prototype[method];
}
}
```
I'm not exactly familiar with this syntax though; it's not clear to me what ```Paper.prototype[has](method)``` exactly means or whether this means that a group object only inherits a subset of the methods from Paper, and therefore there should be some other type in the Type Definition file which corresponds to groups, masks, patterns and symbols.
Perhaps the Paper.mask and Paper.ptrn should be changed to return Paper as well? I'm not familiar with those so I didn't touch them in the type def file.
* findNodeHandle also accepts base react-native components
We're also able to pass in base react-native components like View, TextView, etc. to findNodeHandle
* Added static tests for findNodeHandle definition
* Removed trailing whitespace
* Okay NOW all trailing white-space is removed
Add tests to show that it can be imported as well as used globally.
The change required lots of refactoring. The merged interface-classes
are gone since their constructors were not supposed to be used anyway.
And everything moved into the BraintreeWeb namespace, which was renamed
to just `braintree`.