[RFC]: improve type declarations for @stdlib/ndarray/array
#1088
Labels
Accepted
RFC feature request which has been accepted.
difficulty: 2
May require some initial design or R&D, but should be straightforward to resolve and/or implement.
Enhancement
Issue or pull request for enhancing existing functionality.
priority: High
High priority concern or feature request.
RFC
Request for comments. Feature requests and proposed changes.
TypeScript
Issue involves or relates to TypeScript.
Description
This RFC proposes improving the TypeScript type declarations for
@stdlib/ndarray/array
. Currently, type declarations do not account fordtype
information.Ideally, we'd improve declarations such that
dtype
option value, we return anndarray
of the corresponding type (e.g., ifdtype = 'float64'
, then return afloat64ndarray
, etc).dtype
option value, we use thebuffer
argument/option to infer a corresponding outputndarray
dtype.Supporting the above is likely to require extensive use of function overloads in a manner to what we've done elsewhere in the project when a dtype can effect output results.
Related Issues
No.
Questions
No.
Other
No.
Checklist
RFC:
.The text was updated successfully, but these errors were encountered: