@stryke/types 0.7.4 â 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/async.d.ts +12 -0
- package/dist/base.d.ts +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ This package is part of Storm Software's **đŠī¸ Stryke** monorepo. Stryke pac
|
|
|
22
22
|
|
|
23
23
|
<h3 align="center">đģ Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
24
24
|
|
|
25
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
26
26
|
|
|
27
27
|
> [!IMPORTANT] This repository, and the apps, libraries, and tools contained
|
|
28
28
|
> within, is still in it's initial development phase. As a result, bugs and
|
|
@@ -51,6 +51,7 @@ across many projects.
|
|
|
51
51
|
|
|
52
52
|
<!-- START doctoc -->
|
|
53
53
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
|
54
|
+
|
|
54
55
|
## Table of Contents
|
|
55
56
|
|
|
56
57
|
- [Installing](#installing)
|
package/dist/async.d.ts
CHANGED
|
@@ -10,6 +10,18 @@ import type { FunctionLike, IsUnknown } from "./base";
|
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
12
|
export type Awaitable<T> = T | PromiseLike<T>;
|
|
13
|
+
/**
|
|
14
|
+
* A type that can be either a value or a function that returns a value.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```
|
|
18
|
+
* import type {Resolvable} from 'type-fest';
|
|
19
|
+
*
|
|
20
|
+
* const foo: Resolvable<string> = 'bar';
|
|
21
|
+
* const bar: Resolvable<string> = () => 'baz';
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export type Resolvable<T> = Awaitable<T> | (() => Awaitable<T>);
|
|
13
25
|
/**
|
|
14
26
|
* Create a function type with a return type of your choice and the same parameters as the given function type.
|
|
15
27
|
*
|
package/dist/base.d.ts
CHANGED
|
@@ -70,10 +70,30 @@ export type Any = boolean | number | bigint | string | null | undefined | void |
|
|
|
70
70
|
* The valid types of the index for an `Indexable` type object
|
|
71
71
|
*/
|
|
72
72
|
export type IndexType = string | number | symbol;
|
|
73
|
+
/**
|
|
74
|
+
* The declaration of a ***dictionary-type*** object with a specific type
|
|
75
|
+
*
|
|
76
|
+
* @see {@link Indexable}
|
|
77
|
+
* @see {@link IndexType}
|
|
78
|
+
* @see {@link Dictionary}
|
|
79
|
+
*/
|
|
80
|
+
export type TypedIndexable<T> = Record<IndexType, T>;
|
|
73
81
|
/**
|
|
74
82
|
* The declaration of a ***dictionary-type*** object
|
|
83
|
+
*
|
|
84
|
+
* @see {@link TypedIndexable}
|
|
85
|
+
* @see {@link IndexType}
|
|
86
|
+
* @see {@link Dictionary}
|
|
87
|
+
*/
|
|
88
|
+
export type Indexable = TypedIndexable<any>;
|
|
89
|
+
/**
|
|
90
|
+
* The declaration of a ***dictionary-type*** object with a specific type
|
|
91
|
+
*
|
|
92
|
+
* @see {@link Indexable}
|
|
93
|
+
* @see {@link IndexType}
|
|
94
|
+
* @see {@link TypedIndexable}
|
|
75
95
|
*/
|
|
76
|
-
export type
|
|
96
|
+
export type Dictionary<T> = Record<string, T>;
|
|
77
97
|
export declare const EMPTY_STRING = "";
|
|
78
98
|
export declare const NEWLINE_STRING = "\r\n";
|
|
79
99
|
export declare const EMPTY_OBJECT: {};
|