Skip to content

Update namespace TypeScript declarations #543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/base/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import base = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
base; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/array/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import array = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
array; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
60 changes: 60 additions & 0 deletions lib/node_modules/@stdlib/assert/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,13 @@ import isComposite = require( '@stdlib/assert/is-composite' );
import isConfigurableProperty = require( '@stdlib/assert/is-configurable-property' );
import isConfigurablePropertyIn = require( '@stdlib/assert/is-configurable-property-in' );
import isCubeNumber = require( '@stdlib/assert/is-cube-number' );
import isCurrentYear = require( '@stdlib/assert/is-current-year' );
import IS_DARWIN = require( '@stdlib/assert/is-darwin' );
import isDataProperty = require( '@stdlib/assert/is-data-property' );
import isDataPropertyIn = require( '@stdlib/assert/is-data-property-in' );
import isDataView = require( '@stdlib/assert/is-dataview' );
import isDateObject = require( '@stdlib/assert/is-date-object' );
import isDateObjectArray = require( '@stdlib/assert/is-date-object-array' );
import isDigitString = require( '@stdlib/assert/is-digit-string' );
import IS_DOCKER = require( '@stdlib/assert/is-docker' );
import IS_ELECTRON = require( '@stdlib/assert/is-electron' );
Expand Down Expand Up @@ -244,6 +246,7 @@ import isSameNativeClass = require( '@stdlib/assert/is-same-native-class' );
import isSameType = require( '@stdlib/assert/is-same-type' );
import isSameValue = require( '@stdlib/assert/is-same-value' );
import isSameValueZero = require( '@stdlib/assert/is-same-value-zero' );
import isSemVer = require( '@stdlib/assert/is-semver' );
import isSharedArrayBuffer = require( '@stdlib/assert/is-sharedarraybuffer' );
import isSkewCentrosymmetricMatrix = require( '@stdlib/assert/is-skew-centrosymmetric-matrix' );
import isSkewPersymmetricMatrix = require( '@stdlib/assert/is-skew-persymmetric-matrix' );
Expand Down Expand Up @@ -1615,10 +1618,14 @@ interface Namespace {
* // returns true
*
* @example
* var Boolean = require( `@stdlib/boolean/ctor` );
*
* var bool = ns.isBoolean.isPrimitive( new Boolean( true ) );
* // returns false
*
* @example
* var Boolean = require( `@stdlib/boolean/ctor` );
*
* var bool = ns.isBoolean.isObject( new Boolean( false ) );
* // returns true
*/
Expand All @@ -1643,6 +1650,8 @@ interface Namespace {
* // returns true
*
* @example
* var Boolean = require( `@stdlib/boolean/ctor` );
*
* var bool = ns.isBooleanArray.objects( [ new Boolean( false ), new Boolean( true ) ] );
* // returns true
*/
Expand Down Expand Up @@ -2188,6 +2197,31 @@ interface Namespace {
*/
isCubeNumber: typeof isCubeNumber;

/**
* Tests if a value is either an integer equal to the current year or a `Date` object representing the current year.
*
* @param value - value to test
* @returns boolean indicating whether a provided value is the current year
*
* @example
* var bool = ns.isCurrentYear( new Date() );
* // returns true
*
* @example
* var currentYear = require( `@stdlib/time/current-year` );
* var bool = ns.isCurrentYear( currentYear() );
* // returns true
*
* @example
* var bool = ns.isCurrentYear( 2021 );
* // returns false
*
* @example
* var bool = ns.isCurrentYear( null );
* // returns false
*/
isCurrentYear: typeof isCurrentYear;

/**
* Boolean indicating if the current process is running on Darwin.
*
Expand Down Expand Up @@ -2301,6 +2335,8 @@ interface Namespace {
*/
isDateObject: typeof isDateObject;

isDateObjectArray: typeof isDateObjectArray;

/**
* Tests whether a string contains only numeric digits.
*
Expand Down Expand Up @@ -5428,6 +5464,30 @@ interface Namespace {
*/
isSameValueZero: typeof isSameValueZero;

/**
* Tests if a value is a semantic version string.
*
* @param value - value to test
* @returns boolean indicating whether a provided value is a semantic version string
*
* @example
* var bool = ns.isSemVer( '1.0.0' );
* // returns true
*
* @example
* var bool = ns.isSemVer( '1.0.0-alpha.1' );
* // returns true
*
* @example
* var bool = ns.isSemVer( '0.1' );
* // returns false
*
* @example
* var bool = ns.isSemVer( null );
* // returns false
*/
isSemVer: typeof isSemVer;

/**
* Tests if a value is a `SharedArrayBuffer`.
*
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/assert/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import assert = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
assert; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/assert/tools/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import tools = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
tools; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/bigint/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import bigint = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
bigint; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/base/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import base = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
base; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import blas = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
blas; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/base/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import base = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
base; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/blas/ext/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import ext = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
ext; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
28 changes: 27 additions & 1 deletion lib/node_modules/@stdlib/boolean/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,33 @@ import Boolean = require( '@stdlib/boolean/ctor' );
*/
interface Namespace {
/**
* TODO
* Returns a boolean.
*
* ## Notes
*
* - When invoked without `new`,
*
* - if provided `false`, `null`, `undefined`, `-0`, `0`, `NaN`, or an empty string, the function returns `false`.
* - if provided any other value, including an empty object, an empty array, the string `'false'`, or a `Boolean` object (including a `Boolean` object whose value is `false`), the function returns `true`.
*
* - When invoked with `new`, the constructor returns a `Boolean` object, which is an object wrapper for a primitive boolean value. The value of the returned `Boolean` object follows the same conversion semantics as when the constructor is invoked without `new`.
*
* @param value - input value
* @returns boolean or boolean object
*
* @example
* var b = ns.Boolean( null );
* // returns false
*
* b = ns.Boolean( [] );
* // returns true
*
* b = ns.Boolean( {} );
* // returns true
*
* @example
* var b = new ns.Boolean( false );
* // returns <ns.Boolean>
*/
Boolean: typeof Boolean;
}
Expand Down
12 changes: 6 additions & 6 deletions lib/node_modules/@stdlib/buffer/docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import array2buffer = require( '@stdlib/buffer/from-array' );
import arraybuffer2buffer = require( '@stdlib/buffer/from-arraybuffer' );
import copyBuffer = require( '@stdlib/buffer/from-buffer' );
import string2buffer = require( '@stdlib/buffer/from-string' );
import reviver = require( '@stdlib/buffer/reviver' );
import toJSON = require( '@stdlib/buffer/to-json' );
import reviveBuffer = require( '@stdlib/buffer/reviver' );
import buffer2json = require( '@stdlib/buffer/to-json' );

/**
* Interface describing the `buffer` namespace.
Expand Down Expand Up @@ -157,10 +157,10 @@ interface Namespace {
*
* var str = '{"type":"Buffer","data":[5,3]}';
*
* var buf = parseJSON( str, ns.reviver );
* var buf = parseJSON( str, ns.reviveBuffer );
* // returns <Buffer>[ 5, 3 ]
*/
reviver: typeof reviver;
reviveBuffer: typeof reviveBuffer;

/**
* Returns a JSON representation of a `Buffer`.
Expand All @@ -175,10 +175,10 @@ interface Namespace {
* var buf = array2buffer( [ 1, 2 ] );
* // returns <Buffer>
*
* var json = ns.toJSON( buf );
* var json = ns.buffer2json( buf );
* // returns { 'type': 'Buffer', 'data': [ 1, 2 ] }
*/
toJSON: typeof toJSON;
buffer2json: typeof buffer2json;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/buffer/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import buffer = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
buffer; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/cli/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import cli = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
cli; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/complex/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import complex = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
complex; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
4 changes: 2 additions & 2 deletions lib/node_modules/@stdlib/constants/array/docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import array = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
array; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

/* tslint:disable:no-unused-expression */

import complex128 = require( './index' );
import ns = require( './index' );


// TESTS //

// The exported value is the expected interface...
{
complex128; // $ExpectType Namespace
ns; // $ExpectType Namespace
}
Loading