Skip to content

Commit 43285ee

Browse files
committed
feat: add interface describing ndarray flags
1 parent 35096cc commit 43285ee

1 file changed

Lines changed: 26 additions & 16 deletions

File tree

lib/node_modules/@stdlib/types/index.d.ts

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,6 +1032,31 @@ declare module '@stdlib/types/ndarray' {
10321032
*/
10331033
type Strides10D = Collection<number>;
10341034

1035+
/**
1036+
* Flags and other meta information (e.g., memory layout of the array).
1037+
*/
1038+
interface Flags<T = unknown> {
1039+
/**
1040+
* Numeric properties.
1041+
*/
1042+
[key: string | symbol | number]: T;
1043+
1044+
/**
1045+
* Boolean indicating if an array is row-major contiguous.
1046+
*/
1047+
ROW_MAJOR_CONTIGUOUS?: boolean;
1048+
1049+
/**
1050+
* Boolean indicating if an array is column-major contiguous.
1051+
*/
1052+
COLUMN_MAJOR_CONTIGUOUS?: boolean;
1053+
1054+
/**
1055+
* Boolean indicating if an array is read-only.
1056+
*/
1057+
READONLY?: boolean;
1058+
}
1059+
10351060
/**
10361061
* Interface describing an ndarray.
10371062
*
@@ -1084,22 +1109,7 @@ declare module '@stdlib/types/ndarray' {
10841109
/**
10851110
* Flags and other meta information (e.g., memory layout of the array).
10861111
*/
1087-
flags: {
1088-
/**
1089-
* Boolean indicating if an array is row-major contiguous.
1090-
*/
1091-
ROW_MAJOR_CONTIGUOUS: boolean;
1092-
1093-
/**
1094-
* Boolean indicating if an array is column-major contiguous.
1095-
*/
1096-
COLUMN_MAJOR_CONTIGUOUS: boolean;
1097-
1098-
/**
1099-
* Boolean indicating if an array is read-only.
1100-
*/
1101-
READONLY?: boolean;
1102-
};
1112+
flags: Flags;
11031113

11041114
/**
11051115
* Number of array elements.

0 commit comments

Comments
 (0)