-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: preserve all class members #845
core: preserve all class members #845
Conversation
Also might be worth mentioning that in order for this to work moving foward all our classes would have to follow the pattern.. function Class() {
if (!(this instanceof Class)) {
return new Class();
}
} |
It looks good to me! Can we maybe wrap consistent instantiation stuff into one method? (Example to follow) |
if (this.config_) { | ||
options = util.extendGlobalConfig(this.config_, options); | ||
} | ||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -96,15 +96,10 @@ var SCOPES = ['https://www.googleapis.com/auth/bigquery']; | |||
*/ | |||
function BigQuery(options) { | |||
if (!(this instanceof BigQuery)) { | |||
options = util.normalizeArguments(this, options); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
added tests
core: preserve all class members
Woo! Bravo on this solution :) |
Regenerated the library using [gapic-generator-typescript](https://github.com/googleapis/gapic-generator-typescript) v1.2.1.
Closes #844
Unit tests need to be updated to accommodate this change, but I wanted to get some feedback before I attempted to tackle that.
I ran the system tests locally and only received a single failure for an after all hook (might be unrelated) -- so this implementation should work.
// @stephenplusplus