Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Jan 26, 2024
1 parent 0f0c280 commit 7df7833
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Copyright (c) 2016-2023 The Stdlib Authors.
Copyright (c) 2016-2024 The Stdlib Authors.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ npm install @stdlib/array-base-resolve-getter

Alternatively,

- To load the package in a website via a `script` tag without installation and bundlers, use the [ES Module][es-module] available on the [`esm` branch][esm-url].
- If you are using Deno, visit the [`deno` branch][deno-url].
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [`umd` branch][umd-url].
- To load the package in a website via a `script` tag without installation and bundlers, use the [ES Module][es-module] available on the [`esm`][esm-url] branch (see [README][esm-readme]).
- If you are using Deno, visit the [`deno`][deno-url] branch (see [README][deno-readme] for usage intructions).
- For use in Observable, or in browser/node environments, use the [Universal Module Definition (UMD)][umd] build available on the [`umd`][umd-url] branch (see [README][umd-readme]).

The [branches.md][branches-url] file summarizes the available branches and displays a diagram illustrating their relationships.

To view installation and usage instructions specific to each branch build, be sure to explicitly navigate to the respective README files on each branch, as linked to above.

</section>

<section class="usage">
Expand Down Expand Up @@ -240,8 +242,11 @@ Copyright &copy; 2016-2024. The Stdlib [Authors][stdlib-authors].
[es-module]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

[deno-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/deno
[deno-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/deno/README.md
[umd-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/umd
[umd-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/umd/README.md
[esm-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/esm
[esm-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/esm/README.md
[branches-url]: https://github.com/stdlib-js/array-base-resolve-getter/blob/main/branches.md

[stdlib-license]: https://raw.githubusercontent.com/stdlib-js/array-base-resolve-getter/main/LICENSE
Expand Down
11 changes: 7 additions & 4 deletions branches.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ This repository has the following branches:

- **main**: default branch generated from the [stdlib project][stdlib-url], where all development takes place.
- **production**: [production build][production-url] of the package (e.g., reformatted error messages to reduce bundle sizes and thus the number of bytes transmitted over a network).
- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers.
- **deno**: [Deno][deno-url] branch for use in Deno.
- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments.
- **esm**: [ES Module][esm-url] branch for use via a `script` tag without the need for installation and bundlers (see [README][esm-readme]).
- **deno**: [Deno][deno-url] branch for use in Deno (see [README][deno-readme]).
- **umd**: [UMD][umd-url] branch for use in Observable, or in dual browser/Node.js environments (see [README][umd-readme]).

The following diagram illustrates the relationships among the above branches:

Expand All @@ -49,5 +49,8 @@ C -->|bundle| F[umd];
[stdlib-url]: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/resolve-getter
[production-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/production
[deno-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/deno
[deno-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/deno/README.md
[umd-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/umd
[esm-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/esm
[umd-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/umd/README.md
[esm-url]: https://github.com/stdlib-js/array-base-resolve-getter/tree/esm
[esm-readme]: https://github.com/stdlib-js/array-base-resolve-getter/blob/esm/README.md
18 changes: 9 additions & 9 deletions docs/types/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import resolveGetter = require( './index' );
resolveGetter( new Complex64Array( 0 ) ); // $ExpectType GetComplex64
resolveGetter( new AccessorArray( [ 1, 2, 3 ] ) ); // $ExpectType GetAccessorArrayLike<number>
resolveGetter<any>( [] ); // $ExpectType GetGeneric<any>
resolveGetter<number>( [] ); // $ExpectType GetArrayLike<number>
resolveGetter<number>( [] ); // $ExpectType GetGeneric<number>
}

// The compiler throws an error if the function is provided a first argument which is not an array-like object...
Expand Down Expand Up @@ -102,11 +102,11 @@ import resolveGetter = require( './index' );

const x11 = new Complex128Array( [ 1, 2, 3, 4 ] );
const get11 = resolveGetter( x11 );
get11( x11, 0 ); // $ExpectType Complex128 | void
get11( x11, 0 ); // $ExpectType void | Complex128

const x12 = new Complex64Array( [ 1, 2, 3, 4 ] );
const get12 = resolveGetter( x12 );
get12( x12, 0 ); // $ExpectType Complex64 | void
get12( x12, 0 ); // $ExpectType void | Complex64

const x13 = new AccessorArray( [ 1, 2, 3, 4 ] );
const get13 = resolveGetter( x13 );
Expand Down Expand Up @@ -293,12 +293,12 @@ import resolveGetter = require( './index' );
get12( new Complex64Array( [ 1, 2, 3, 4 ] ), null ); // $ExpectError
get12( new Complex64Array( [ 1, 2, 3, 4 ] ), {} ); // $ExpectError

const get13 = resolveGetter( new new AccessorArray( [ 1, 2, 3, 4 ] ) );
get13( new new AccessorArray( [ 1, 2, 3, 4 ] ), '5' ); // $ExpectError
get13( new new AccessorArray( [ 1, 2, 3, 4 ] ), true ); // $ExpectError
get13( new new AccessorArray( [ 1, 2, 3, 4 ] ), false ); // $ExpectError
get13( new new AccessorArray( [ 1, 2, 3, 4 ] ), null ); // $ExpectError
get13( new new AccessorArray( [ 1, 2, 3, 4 ] ), {} ); // $ExpectError
const get13 = resolveGetter( new AccessorArray( [ 1, 2, 3, 4 ] ) );
get13( new AccessorArray( [ 1, 2, 3, 4 ] ), '5' ); // $ExpectError
get13( new AccessorArray( [ 1, 2, 3, 4 ] ), true ); // $ExpectError
get13( new AccessorArray( [ 1, 2, 3, 4 ] ), false ); // $ExpectError
get13( new AccessorArray( [ 1, 2, 3, 4 ] ), null ); // $ExpectError
get13( new AccessorArray( [ 1, 2, 3, 4 ] ), {} ); // $ExpectError
}

// The compiler throws an error if the returned function is provided an unsupported number of arguments...
Expand Down

0 comments on commit 7df7833

Please sign in to comment.