pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551307115


##########
js/src/type.ts:
##########
@@ -333,23 +333,47 @@ export class Decimal extends DataType<Type.Decimal> {
 /** @ignore */
 export type Dates = Type.Date | Type.DateDay | Type.DateMillisecond;
 /** @ignore */
-export interface Date_<T extends Dates = Dates> extends DataType<T> { TArray: 
Int32Array; TValue: Date; ArrayType: TypedArrayConstructor<Int32Array> }
+type DateType = {
+    [Type.Date]: { TArray: Int32Array | BigInt64Array };
+    [Type.DateDay]: { TArray: Int32Array };
+    [Type.DateMillisecond]: { TArray: BigInt64Array };
+};
+/** @ignore */
+export interface Date_<T extends Dates = Dates> extends DataType<T> {
+    TArray: DateType[T]['TArray'];
+    TValue: number;
+}
 /** @ignore */
 export class Date_<T extends Dates = Dates> extends DataType<T> {
     constructor(public readonly unit: DateUnit) {
         super(Type.Date as T);

Review Comment:
   For the record, why is it using `Type.Date` here instead of one of the 
unit-specific ones? This seems to ignore the `unit` argument, but I'm probably 
missing something since I don't know TypeScript :-)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to