Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "array/safe-casts/docs/types/index.d"

Index

Interfaces

Functions

Functions

Export assignment safeCasts

  • safeCasts(dtype: DataType): Array<DataType>
  • safeCasts(dtype: string): null
  • safeCasts(dtype?: undefined | string): Table
  • Returns a list of array data types to which a provided array data type can be safely cast.

    Parameters

    Returns Array < DataType >

    list of array data types

    Example

    var list = safeCasts( 'float32' );
    // returns [...]
  • Returns a list of array data types to which a provided array data type can be safely cast.

    Notes

    • If provided an unrecognized array data type, the function returns null.

    Parameters

    • dtype: string

      array data type

    Returns null

    list of array data types

    Example

    var list = safeCasts( 'float' );
    // returns null
  • Returns a list of array data types to which a provided array data type can be safely cast.

    Notes

    • If not provided an array data type, the function returns a casting table.
    • If provided an unrecognized array data type, the function returns null.

    Parameters

    • Optional dtype: undefined | string

      array data type

    Returns Table

    a casting table, a list of array data types, or null

    Example

    var table = safeCasts();
    // returns {...}

    Example

    var list = safeCasts( 'float32' );
    // returns [...]

    Example

    var list = safeCasts( 'float' );
    // returns null