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

accept null or undefined for logical type alias #121

Merged
merged 1 commit into from
Jan 25, 2025

Conversation

jraymakers
Copy link
Contributor

@jraymakers jraymakers commented Jan 25, 2025

Older versions of TypeScript (than 5.1) require that the type of a get accessor be assignable to the type of the corresponding set accessor. Because the type of set accessor for DuckDBLogicalType.alias did not include undefined, it triggered a compiler error for these older TS versions. It's trivial to support these older versions by accepting undefined (or null) and treating it the same as the empty string, which matches the same behavior as the underlying C API function.

See #120

@jraymakers jraymakers merged commit 4bfbb6d into main Jan 25, 2025
5 checks passed
@jraymakers jraymakers deleted the jray/accept-null-or-undef-for-logical-type-alias branch January 25, 2025 18:39
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.

1 participant