@stryke/types 0.9.2 → 0.10.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/dist/file.d.ts CHANGED
@@ -21,3 +21,26 @@ export type FileResult = {
21
21
  * A valid `picomatch` glob pattern, or array of patterns.
22
22
  */
23
23
  export type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;
24
+ export interface FileInputOutput {
25
+ input: string;
26
+ output: string;
27
+ }
28
+ /**
29
+ * An interface got representing an asset files with glob patterns.
30
+ */
31
+ export type AssetGlob = Required<Omit<FileInputOutput, "input">> & Partial<Pick<FileInputOutput, "input">> & {
32
+ /**
33
+ * A glob pattern to match files.
34
+ */
35
+ glob: string;
36
+ /**
37
+ * An array of glob patterns to ignore files.
38
+ */
39
+ ignore?: string[];
40
+ /**
41
+ * Include `.dot` files in normal matches and `globstar` matches. Note that an explicit dot in a portion of the pattern will always match dot files.
42
+ *
43
+ * @defaultValue true
44
+ */
45
+ dot?: boolean;
46
+ };
package/dist/object.d.ts CHANGED
@@ -217,7 +217,7 @@ type UncheckedIndex<T, U extends number | string> = [T] extends [
217
217
  * - Returns `unknown` if `Key` is not a property of `BaseType`, since TypeScript uses structural typing, and it cannot be guaranteed that extra properties unknown to the type system will exist at runtime.
218
218
  * - Returns `undefined` from nullish values, to match the behavior of most deep-key libraries like `lodash`, `dot-prop`, etc.
219
219
  */
220
- type PropertyOf<BaseType, Key extends string, Options extends GetOptions = {}> = BaseType extends Nullish ? undefined : Key extends keyof BaseType ? StrictPropertyOf<BaseType, Key, Options> : BaseType extends readonly [] | readonly [unknown, ...unknown[]] ? unknown : BaseType extends {
220
+ export type PropertyOf<BaseType, Key extends string, Options extends GetOptions = {}> = BaseType extends Nullish ? undefined : Key extends keyof BaseType ? StrictPropertyOf<BaseType, Key, Options> : BaseType extends readonly [] | readonly [unknown, ...unknown[]] ? unknown : BaseType extends {
221
221
  [n: number]: infer Item;
222
222
  length: number;
223
223
  } ? ConsistsOnlyOf<Key, StringDigit> extends true ? Strictify<Item, Options> : unknown : Key extends keyof WithStringKeys<BaseType> ? StrictPropertyOf<WithStringKeys<BaseType>, Key, Options> : unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/types",
3
- "version": "0.9.2",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "description": "A package containing many base TypeScript type definitions that are shared across many projects.",
6
6
  "repository": {
@@ -9,7 +9,7 @@
9
9
  "directory": "packages/types"
10
10
  },
11
11
  "private": false,
12
- "devDependencies": { "@types/node": "^22.14.0" },
12
+ "devDependencies": { "@types/node": "^22.19.0" },
13
13
  "publishConfig": { "access": "public" },
14
14
  "sideEffects": false,
15
15
  "files": ["dist/**/*"],
@@ -292,5 +292,5 @@
292
292
  "main": "./dist/index.cjs",
293
293
  "module": "./dist/index.mjs",
294
294
  "types": "./dist/index.d.ts",
295
- "gitHead": "de2c2a0130fd7d91ac5e94b47ee1addd8dd09a65"
295
+ "gitHead": "906d6304c09a8964297fa784f96377535fca6769"
296
296
  }