-
Notifications
You must be signed in to change notification settings - Fork 1
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 typings for all abstract sql fragments, fixing where necessary #104
Conversation
Change-type: patch
'LessThanOrEqual', | ||
from, | ||
to, | ||
], | ||
...equality, | ||
}, | ||
}; | ||
} satisfies Record<string, NativeFactTypes[string]>; |
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.
Can't this be satisfies NativeFactTypes;
?
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.
It could but that's not accurate to what it is, because it is not itself a NativeFactTypes
but rather a dictionary of fragments of them, so I made the typing in such a way as to try to represent that difference
'ends with': (from: string, to: string) => ['Endswith', from, to], | ||
contains: (from: string, to: string) => ['Contains', from, to], | ||
'starts with': (from, to): StartsWithNode => ['StartsWith', from, to], | ||
'ends with': (from, to): EndsWithNode => ['EndsWith', from, to], |
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.
And one doubt, why did EndsWith required the backwards compactible change having both Endswith
& EndsWith
but StartsWith
doesn't?
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.
Because StartsWith
had previously been done for a translation
Depends on balena-io-modules/abstract-sql-compiler#250