Skip to content

Commit 061325b

Browse files
committed
feat: add data type string type definitions
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 39c8178 commit 061325b

File tree

1 file changed

+180
-30
lines changed

1 file changed

+180
-30
lines changed

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

Lines changed: 180 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1444,155 +1444,305 @@ declare module '@stdlib/types/ndarray' {
14441444
import { Layout } from '@stdlib/types/blas';
14451445
import { Remap } from '@stdlib/types/utilities'; // eslint-disable-line no-duplicate-imports
14461446

1447+
/**
1448+
* Data type string.
1449+
*/
1450+
type DataTypeString = NumericDataTypeString | BooleanDataTypeString | 'binary' | 'generic'; // "all"
1451+
1452+
/**
1453+
* Data type string for real-valued ndarrays.
1454+
*/
1455+
type RealDataTypeString = RealFloatingPointDataTypeString | IntegerDataTypeString; // "real"
1456+
1457+
/**
1458+
* Data type string for real-valued ndarrays.
1459+
*/
1460+
type RealAndGenericDataTypeString = RealDataTypeString | 'generic'; // "real_and_generic"
1461+
1462+
/**
1463+
* Data type string for floating-point ndarrays.
1464+
*/
1465+
type RealFloatingPointDataTypeString = 'float64' | 'float32'; // "real_floating_point"
1466+
1467+
/**
1468+
* Data type string for floating-point ndarrays.
1469+
*/
1470+
type RealFloatingPointAndGenericDataTypeString = RealFloatingPointDataTypeString | 'generic'; // "real_floating_point_and_generic"
1471+
1472+
/**
1473+
* Data type string for integer ndarrays.
1474+
*/
1475+
type IntegerDataTypeString = SignedIntegerDataTypeString | UnsignedIntegerDataTypeString; // "integer"
1476+
1477+
/**
1478+
* Data type string for integer ndarrays.
1479+
*/
1480+
type IntegerAndGenericDataTypeString = IntegerDataTypeString | 'generic'; // "integer_and_generic"
1481+
1482+
/**
1483+
* Data type string for signed integer ndarrays.
1484+
*/
1485+
type SignedIntegerDataTypeString = 'int32' | 'int16' | 'int8'; // "signed_integer"
1486+
1487+
/**
1488+
* Data type string for signed integer ndarrays.
1489+
*/
1490+
type SignedIntegerAndGenericDataTypeString = SignedIntegerDataTypeString | 'generic'; // "signed_integer_and_generic"
1491+
1492+
/**
1493+
* Data type string for unsigned integer ndarrays.
1494+
*/
1495+
type UnsignedIntegerDataTypeString = 'uint32' | 'uint16' | 'uint8' | 'uint8c'; // "unsigned_integer"
1496+
1497+
/**
1498+
* Data type string for unsigned integer ndarrays.
1499+
*/
1500+
type UnsignedIntegerAndGenericDataTypeString = UnsignedIntegerDataTypeString | 'generic'; // "unsigned_integer_and_generic"
1501+
1502+
/**
1503+
* Data type string for complex number ndarrays.
1504+
*/
1505+
type ComplexFloatingPointDataTypeString = 'complex64' | 'complex128'; // "complex_floating_point"
1506+
1507+
/**
1508+
* Data type string for complex number ndarrays.
1509+
*/
1510+
type ComplexFloatingPointAndGenericDataTypeString = ComplexFloatingPointDataTypeString | 'generic'; // "complex_floating_point_and_generic"
1511+
1512+
/**
1513+
* Data type string for floating-point real or complex ndarrays.
1514+
*/
1515+
type FloatingPointDataTypeString = RealFloatingPointDataTypeString | ComplexFloatingPointDataTypeString; // "floating_point"
1516+
1517+
/**
1518+
* Data type string for floating-point real or complex ndarrays.
1519+
*/
1520+
type FloatingPointAndGenericDataTypeString = FloatingPointDataTypeString | 'generic'; // "floating_point_and_generic"
1521+
1522+
/**
1523+
* Data type string for real-valued or complex number ndarrays.
1524+
*/
1525+
type NumericDataTypeString = RealDataTypeString | ComplexFloatingPointDataTypeString; // "numeric"
1526+
1527+
/**
1528+
* Data type string for real-valued or complex number ndarrays.
1529+
*/
1530+
type NumericAndGenericDataTypeString = NumericDataTypeString | 'generic'; // "numeric_and_generic"
1531+
1532+
/**
1533+
* Data type string for boolean typed arrays.
1534+
*/
1535+
type BooleanDataTypeString = 'bool'; // "boolean"
1536+
1537+
/**
1538+
* Data type string for boolean and generic ndarrays.
1539+
*/
1540+
type BooleanAndGenericDataTypeString = BooleanDataTypeString | 'generic'; // "boolean_and_generic"
1541+
1542+
/**
1543+
* Data type string for strictly "typed" ndarrays.
1544+
*/
1545+
type TypedDataTypeString = NumericDataTypeString | BooleanDataTypeString; // "typed"
1546+
1547+
/**
1548+
* Data type string for strictly typed and generic ndarrays.
1549+
*/
1550+
type TypedAndGenericDataTypeString = TypedDataTypeString | 'generic'; // "typed_and_generic"
1551+
1552+
/**
1553+
* Data type string for integer index arrays.
1554+
*/
1555+
type IntegerIndexDataTypeString = 'int32'; // "integer_index"
1556+
1557+
/**
1558+
* Data type string for integer index and generic arrays.
1559+
*/
1560+
type IntegerIndexAndGenericDataTypeString = IntegerIndexDataTypeString | 'generic'; // "integer_index_and_generic"
1561+
1562+
/**
1563+
* Data type string for boolean index arrays.
1564+
*/
1565+
type BooleanIndexDataTypeString = BooleanDataTypeString; // "boolean_index"
1566+
1567+
/**
1568+
* Data type string for boolean index and generic arrays.
1569+
*/
1570+
type BooleanIndexAndGenericDataTypeString = BooleanIndexDataTypeString | 'generic'; // "boolean_index_and_generic"
1571+
1572+
/**
1573+
* Data type string for mask index arrays.
1574+
*/
1575+
type MaskIndexDataTypeString = 'uint8'; // "mask_index"
1576+
1577+
/**
1578+
* Data type string for mask index and generic arrays.
1579+
*/
1580+
type MaskIndexAndGenericDataTypeString = MaskIndexDataTypeString | 'generic'; // "mask_index_and_generic"
1581+
1582+
/**
1583+
* Data type string for typed index arrays.
1584+
*/
1585+
type TypedIndexDataTypeString = IntegerIndexDataTypeString | BooleanIndexDataTypeString | MaskIndexDataTypeString; // "typed_index"
1586+
1587+
/**
1588+
* Data type string for typed index and generic arrays.
1589+
*/
1590+
type TypedIndexAndGenericDataTypeString = TypedIndexDataTypeString | 'generic'; // "typed_index_and_generic"
1591+
1592+
/**
1593+
* Data type string for index arrays.
1594+
*/
1595+
type IndexDataTypeString = TypedIndexAndGenericDataTypeString; // "index"
1596+
14471597
/**
14481598
* Data type.
14491599
*/
1450-
type DataType = NumericDataType | BooleanDataType | 'binary' | 'generic'; // "all"
1600+
type DataType = DataTypeString; // "all"
14511601

14521602
/**
14531603
* Data type for real-valued ndarrays.
14541604
*/
1455-
type RealDataType = RealFloatingPointDataType | IntegerDataType; // "real"
1605+
type RealDataType = RealDataTypeString; // "real"
14561606

14571607
/**
14581608
* Data type for real-valued ndarrays.
14591609
*/
1460-
type RealAndGenericDataType = RealDataType | 'generic'; // "real_and_generic"
1610+
type RealAndGenericDataType = RealAndGenericDataTypeString; // "real_and_generic"
14611611

14621612
/**
14631613
* Data type for floating-point ndarrays.
14641614
*/
1465-
type RealFloatingPointDataType = 'float64' | 'float32'; // "real_floating_point"
1615+
type RealFloatingPointDataType = RealFloatingPointDataTypeString; // "real_floating_point"
14661616

14671617
/**
14681618
* Data type for floating-point ndarrays.
14691619
*/
1470-
type RealFloatingPointAndGenericDataType = RealFloatingPointDataType | 'generic'; // "real_floating_point_and_generic"
1620+
type RealFloatingPointAndGenericDataType = RealFloatingPointAndGenericDataTypeString; // "real_floating_point_and_generic"
14711621

14721622
/**
14731623
* Data type for integer ndarrays.
14741624
*/
1475-
type IntegerDataType = SignedIntegerDataType | UnsignedIntegerDataType; // "integer"
1625+
type IntegerDataType = IntegerDataTypeString; // "integer"
14761626

14771627
/**
14781628
* Data type for integer ndarrays.
14791629
*/
1480-
type IntegerAndGenericDataType = IntegerDataType | 'generic'; // "integer_and_generic"
1630+
type IntegerAndGenericDataType = IntegerAndGenericDataTypeString; // "integer_and_generic"
14811631

14821632
/**
14831633
* Data type for signed integer ndarrays.
14841634
*/
1485-
type SignedIntegerDataType = 'int32' | 'int16' | 'int8'; // "signed_integer"
1635+
type SignedIntegerDataType = SignedIntegerDataTypeString; // "signed_integer"
14861636

14871637
/**
14881638
* Data type for signed integer ndarrays.
14891639
*/
1490-
type SignedIntegerAndGenericDataType = SignedIntegerDataType | 'generic'; // "signed_integer_and_generic"
1640+
type SignedIntegerAndGenericDataType = SignedIntegerAndGenericDataTypeString; // "signed_integer_and_generic"
14911641

14921642
/**
14931643
* Data type for unsigned integer ndarrays.
14941644
*/
1495-
type UnsignedIntegerDataType = 'uint32' | 'uint16' | 'uint8' | 'uint8c'; // "unsigned_integer"
1645+
type UnsignedIntegerDataType = UnsignedIntegerDataTypeString; // "unsigned_integer"
14961646

14971647
/**
14981648
* Data type for unsigned integer ndarrays.
14991649
*/
1500-
type UnsignedIntegerAndGenericDataType = UnsignedIntegerDataType | 'generic'; // "unsigned_integer_and_generic"
1650+
type UnsignedIntegerAndGenericDataType = UnsignedIntegerAndGenericDataTypeString; // "unsigned_integer_and_generic"
15011651

15021652
/**
15031653
* Data type for complex number ndarrays.
15041654
*/
1505-
type ComplexFloatingPointDataType = 'complex64' | 'complex128'; // "complex_floating_point"
1655+
type ComplexFloatingPointDataType = ComplexFloatingPointDataTypeString; // "complex_floating_point"
15061656

15071657
/**
15081658
* Data type for complex number ndarrays.
15091659
*/
1510-
type ComplexFloatingPointAndGenericDataType = ComplexFloatingPointDataType | 'generic'; // "complex_floating_point_and_generic"
1660+
type ComplexFloatingPointAndGenericDataType = ComplexFloatingPointAndGenericDataTypeString; // "complex_floating_point_and_generic"
15111661

15121662
/**
15131663
* Data type for floating-point real or complex ndarrays.
15141664
*/
1515-
type FloatingPointDataType = RealFloatingPointDataType | ComplexFloatingPointDataType; // "floating_point"
1665+
type FloatingPointDataType = FloatingPointDataTypeString; // "floating_point"
15161666

15171667
/**
15181668
* Data type for floating-point real or complex ndarrays.
15191669
*/
1520-
type FloatingPointAndGenericDataType = FloatingPointDataType | 'generic'; // "floating_point_and_generic"
1670+
type FloatingPointAndGenericDataType = FloatingPointAndGenericDataTypeString; // "floating_point_and_generic"
15211671

15221672
/**
15231673
* Data type for real-valued or complex number ndarrays.
15241674
*/
1525-
type NumericDataType = RealDataType | ComplexFloatingPointDataType; // "numeric"
1675+
type NumericDataType = NumericDataTypeString; // "numeric"
15261676

15271677
/**
15281678
* Data type for real-valued or complex number ndarrays.
15291679
*/
1530-
type NumericAndGenericDataType = NumericDataType | 'generic'; // "numeric_and_generic"
1680+
type NumericAndGenericDataType = NumericAndGenericDataTypeString; // "numeric_and_generic"
15311681

15321682
/**
15331683
* Data type for boolean typed arrays.
15341684
*/
1535-
type BooleanDataType = 'bool'; // "boolean"
1685+
type BooleanDataType = BooleanDataTypeString; // "boolean"
15361686

15371687
/**
15381688
* Data type for boolean and generic ndarrays.
15391689
*/
1540-
type BooleanAndGenericDataType = BooleanDataType | 'generic'; // "boolean_and_generic"
1690+
type BooleanAndGenericDataType = BooleanAndGenericDataTypeString; // "boolean_and_generic"
15411691

15421692
/**
15431693
* Data type for strictly "typed" ndarrays.
15441694
*/
1545-
type TypedDataType = NumericDataType | BooleanDataType; // "typed"
1695+
type TypedDataType = TypedDataTypeString; // "typed"
15461696

15471697
/**
15481698
* Data type for strictly typed and generic ndarrays.
15491699
*/
1550-
type TypedAndGenericDataType = TypedDataType | 'generic'; // "typed_and_generic"
1700+
type TypedAndGenericDataType = TypedAndGenericDataTypeString; // "typed_and_generic"
15511701

15521702
/**
15531703
* Data type for integer index arrays.
15541704
*/
1555-
type IntegerIndexDataType = 'int32'; // "integer_index"
1705+
type IntegerIndexDataType = IntegerIndexDataTypeString; // "integer_index"
15561706

15571707
/**
15581708
* Data type for integer index and generic arrays.
15591709
*/
1560-
type IntegerIndexAndGenericDataType = IntegerIndexDataType | 'generic'; // "integer_index_and_generic"
1710+
type IntegerIndexAndGenericDataType = IntegerIndexAndGenericDataTypeString; // "integer_index_and_generic"
15611711

15621712
/**
15631713
* Data type for boolean index arrays.
15641714
*/
1565-
type BooleanIndexDataType = BooleanDataType; // "boolean_index"
1715+
type BooleanIndexDataType = BooleanIndexDataTypeString; // "boolean_index"
15661716

15671717
/**
15681718
* Data type for boolean index and generic arrays.
15691719
*/
1570-
type BooleanIndexAndGenericDataType = BooleanIndexDataType | 'generic'; // "boolean_index_and_generic"
1720+
type BooleanIndexAndGenericDataType = BooleanIndexAndGenericDataTypeString; // "boolean_index_and_generic"
15711721

15721722
/**
15731723
* Data type for mask index arrays.
15741724
*/
1575-
type MaskIndexDataType = 'uint8'; // "mask_index"
1725+
type MaskIndexDataType = MaskIndexDataTypeString; // "mask_index"
15761726

15771727
/**
15781728
* Data type for mask index and generic arrays.
15791729
*/
1580-
type MaskIndexAndGenericDataType = MaskIndexDataType | 'generic'; // "mask_index_and_generic"
1730+
type MaskIndexAndGenericDataType = MaskIndexAndGenericDataTypeString; // "mask_index_and_generic"
15811731

15821732
/**
15831733
* Data type for typed index arrays.
15841734
*/
1585-
type TypedIndexDataType = IntegerIndexDataType | BooleanIndexDataType | MaskIndexDataType; // "typed_index"
1735+
type TypedIndexDataType = TypedIndexDataTypeString; // "typed_index"
15861736

15871737
/**
15881738
* Data type for typed index and generic arrays.
15891739
*/
1590-
type TypedIndexAndGenericDataType = TypedIndexDataType | 'generic'; // "typed_index_and_generic"
1740+
type TypedIndexAndGenericDataType = TypedIndexAndGenericDataTypeString; // "typed_index_and_generic"
15911741

15921742
/**
15931743
* Data type for index arrays.
15941744
*/
1595-
type IndexDataType = TypedIndexAndGenericDataType;
1745+
type IndexDataType = IndexDataTypeString; // "index"
15961746

15971747
/**
15981748
* Strict data type "kinds".

0 commit comments

Comments
 (0)