Skip to content
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

Add some type casting so that it compiles on TypeScript 3.5 #82

Merged
merged 1 commit into from
Jun 18, 2019

Conversation

thgreasi
Copy link
Contributor

Resolves: #79
Change-type: patch
Signed-off-by: Thodoris Greasidis thodoris@balena.io

Resolves: #79
Change-type: patch
Signed-off-by: Thodoris Greasidis <thodoris@balena.io>
`'$orderby' objects must have exactly one element, got ${
result.length
} elements`,
`'$orderby' objects must have exactly one element, got ${result.length} elements`,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is from the newer prettier version that is now available.

@@ -897,7 +895,9 @@ abstract class PinejsClientCoreTemplate<
for (const validParam of validParams) {
const value = params[validParam];
if (value != null) {
this[validParam] = value;
(this[validParam] as PinejsClientCoreTemplate<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the parentheses necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, otherwise it's a syntax error.
I assume that prettier would have already changed this if it thought that it should.

@thgreasi thgreasi merged commit 1522281 into master Jun 18, 2019
@thgreasi thgreasi deleted the 79-ts-3.5-compliant branch June 18, 2019 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should be able to build with TypeScript 3.5
3 participants