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 Aug 18, 2023
1 parent 3c6b365 commit 2ef9465
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/.keepalive

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/productionize.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,21 +82,6 @@ jobs:
id: transform-error-messages
uses: stdlib-js/transform-errors-action@main

# Format error messages:
- name: 'Replace double quotes with single quotes in rewritten format string error messages'
run: |
find . -name "*.js" -exec sed -E -i "s/Error\( format\( \"([a-zA-Z0-9]+)\"/Error\( format\( '\1'/g" {} \;
# Format string literal error messages:
- name: 'Replace double quotes with single quotes in rewritten string literal error messages'
run: |
find . -name "*.js" -exec sed -E -i "s/Error\( format\(\"([a-zA-Z0-9]+)\"\)/Error\( format\( '\1' \)/g" {} \;
# Format code:
- name: 'Replace double quotes with single quotes in inserted `require` calls'
run: |
find . -name "*.js" -exec sed -E -i "s/require\( ?\"@stdlib\/error-tools-fmtprodmsg\" ?\);/require\( '@stdlib\/error-tools-fmtprodmsg' \);/g" {} \;
# Change `@stdlib/string-format` to `@stdlib/error-tools-fmtprodmsg` in package.json if the former is a dependency, otherwise insert it as a dependency:
- name: 'Update dependencies in package.json'
run: |
Expand Down
3 changes: 3 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/// <reference path="../docs/types/index.d.ts" />
import someByRight from '../docs/types/index';
export = someByRight;
5 changes: 5 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions dist/index.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/// <reference types="@stdlib/types"/>

import { Collection } from '@stdlib/types/object';
import { Collection } from '@stdlib/types/array';

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -35,7 +35,7 @@ type Nullary = () => boolean;
* @param value - collection value
* @returns boolean indicating whether an element in a collection passes a test
*/
type Unary = ( value: any ) => boolean;
type Unary<T> = ( value: T ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -44,7 +44,7 @@ type Unary = ( value: any ) => boolean;
* @param index - collection index
* @returns boolean indicating whether an element in a collection passes a test
*/
type Binary = ( value: any, index: number ) => boolean;
type Binary<T> = ( value: T, index: number ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -54,7 +54,7 @@ type Binary = ( value: any, index: number ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
type Ternary<T> = ( value: T, index: number, collection: Collection<T> ) => boolean;

/**
* Checks whether an element in a collection passes a test.
Expand All @@ -64,7 +64,7 @@ type Ternary = ( value: any, index: number, collection: Collection ) => boolean;
* @param collection - input collection
* @returns boolean indicating whether an element in a collection passes a test
*/
type Predicate = Nullary | Unary | Binary | Ternary;
type Predicate<T> = Nullary | Unary<T> | Binary<T> | Ternary<T>;

/**
* Tests whether a collection contains at least `n` elements which pass a test implemented by a predicate function, iterating from right to left.
Expand Down Expand Up @@ -98,7 +98,7 @@ type Predicate = Nullary | Unary | Binary | Ternary;
* var bool = someByRight( arr, 2, isNegative );
* // returns true
*/
declare function someByRight( collection: Collection, n: number, predicate: Predicate, thisArg?: any ): boolean; // tslint-disable-line max-line-length
declare function someByRight<T = unknown>( collection: Collection<T>, n: number, predicate: Predicate<T>, thisArg?: ThisParameterType<Predicate<T>> ): boolean;


// EXPORTS //
Expand Down

0 comments on commit 2ef9465

Please sign in to comment.