Skip to content

Commit b0fdab1

Browse files
committed
Add examples
1 parent 9594ba1 commit b0fdab1

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

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

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@
2020

2121
/**
2222
* Module containing array definitions.
23+
*
24+
* @example
25+
*
26+
* import * as array from `@stdlib/types/array`;
27+
*
28+
* const x: array.ArrayLike = [ 1, 2, 3 ];
29+
*
30+
* @example
31+
*
32+
* import { ArrayLike } from `@stdlib/types/array`;
33+
*
34+
* const x: ArrayLike = [ 1, 2, 3 ];
2335
*/
2436
declare module '@stdlib/types/array' {
2537
/**
@@ -45,16 +57,31 @@ declare module '@stdlib/types/array' {
4557

4658
/**
4759
* A numeric array.
60+
*
61+
* @example
62+
*
63+
* const x: NumericArray = [ 1, 2, 3 ];
64+
* const y: NumericArray = new Float64Array( 10 );
4865
*/
4966
type NumericArray = Array<number> | TypedArray;
5067

5168
/**
5269
* A typed array.
70+
*
71+
* @example
72+
*
73+
* const x: TypedArray = new Float64Array( 10 );
74+
* const y: TypedArray = new Uint32Array( 10 );
5375
*/
5476
type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array; // tslint:disable-line:max-line-length
5577

5678
/**
5779
* An integer typed array.
80+
*
81+
* @example
82+
*
83+
* const x: IntegerTypedArray = new Uint32Array( 10 );
84+
* const y: IntegerTypedArray = new Int32Array( 10 );
5885
*/
5986
type IntegerTypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array; // tslint:disable-line:max-line-length
6087
}

0 commit comments

Comments
 (0)