Skip to content

Commit

Permalink
Fixed MathArray TS type
Browse files Browse the repository at this point in the history
Fixed type of MathArray to prevent typescript erroring for any n-dimensional array (previously only worked for n<=2)
  • Loading branch information
Amolition authored and Amol Bhuptani committed Dec 6, 2023
1 parent 424735a commit 155d4c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export type NoLiteralType<T> = T extends number
// TODO: introduce generics for MathCollection, MathMatrix, and MathArray
export type MathNumericType = number | BigNumber | Fraction | Complex
export type MathScalarType = MathNumericType | Unit
export type MathArray = MathNumericType[] | MathNumericType[][] // TODO: MathArray can also contain Unit
export type MathArray = MathNumericType[] | MathArray[] // TODO: MathArray can also contain Unit
export type MathCollection = MathArray | Matrix
export type MathType = MathScalarType | MathCollection
export type MathExpression = string | string[] | MathCollection
Expand Down

0 comments on commit 155d4c6

Please sign in to comment.