Compare commits

..

No commits in common. "fefb06613f68cc7bce5d70138d2f6f0bcff4780b" and "eb65701595a38dafd6e881caa3d616f434131e2a" have entirely different histories.

4 changed files with 6 additions and 10 deletions

View File

@ -3,9 +3,9 @@ name: Build and publish
on:
workflow_dispatch: { }
push:
branches:
- master
# push:
# branches:
# - master
jobs:
publish:

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@templates/typescript-types",
"version": "0.2.1",
"version": "0.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@templates/typescript-types",
"version": "0.2.1",
"version": "0.2.0",
"license": "ISC",
"devDependencies": {
"typescript": "^5.1.3"

View File

@ -1,6 +1,6 @@
{
"name": "@js/types",
"version": "0.2.1",
"version": "0.2.0",
"description": "Collection of generic TypeScript type definitions for various utility purposes",
"main": "src/index.d.ts",
"types": "src/index.d.ts",

4
src/functions.d.ts vendored
View File

@ -1,10 +1,6 @@
export type Func<T extends any = any> = (...args: any[]) => T;
export type AsyncFunc<T extends any = any> = (...args: any[]) => PromiseLike<T>;
export type AsyncResult<T extends AsyncFunc> = Awaited<ReturnType<T>>;
export type Params<T extends Func> = T extends (...args: infer P) => any ? P : never;
export type FirstParam<T extends Func> = T extends (first: infer F, ...args: any[]) => any ? F : never;