-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Type: bugSomething isn't workingSomething isn't working
Description
Describe the bug, including details regarding any error messages, version, and platform.
Several Generics have any set as default value instead of defaulting to the type from which they extend, like the following example:
Field<T extends DataType = any>Unfortunately this effectively removes all type guarantees when properties that inherit the type are passed down. Example (playground link):
import type {Field, DataType} from "apache-arrow";
"not a type" satisfies Field["type"]; // Does not error
"not a type" satisfies Field<DataType>["type"]; // ErrorsThe generics should instead define their base type as default type:
Field<T extends DataType = DataType>Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: bugSomething isn't workingSomething isn't working