@stryke/types 0.3.0 → 0.4.0

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 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
- [![Version](https://img.shields.io/badge/version-0.0.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
+ [![Version](https://img.shields.io/badge/version-0.3.1-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/stryke/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
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
@@ -54,21 +54,19 @@ across many projects.
54
54
 
55
55
  ## Table of Contents
56
56
 
57
- - [Stryke - TypeScript Type Definitions](#stryke---typescript-type-definitions)
58
- - [Table of Contents](#table-of-contents)
59
- - [Installing](#installing)
60
- - [Reduced Package Size](#reduced-package-size)
61
- - [Development](#development)
62
- - [Building](#building)
63
- - [Running unit tests](#running-unit-tests)
64
- - [Linting](#linting)
65
- - [Storm Workspaces](#storm-workspaces)
66
- - [Roadmap](#roadmap)
67
- - [Support](#support)
68
- - [License](#license)
69
- - [Changelog](#changelog)
70
- - [Contributing](#contributing)
71
- - [Contributors](#contributors)
57
+ - [Installing](#installing)
58
+ - [Reduced Package Size](#reduced-package-size)
59
+ - [Development](#development)
60
+ - [Building](#building)
61
+ - [Running unit tests](#running-unit-tests)
62
+ - [Linting](#linting)
63
+ - [Storm Workspaces](#storm-workspaces)
64
+ - [Roadmap](#roadmap)
65
+ - [Support](#support)
66
+ - [License](#license)
67
+ - [Changelog](#changelog)
68
+ - [Contributing](#contributing)
69
+ - [Contributors](#contributors)
72
70
 
73
71
  <!-- END doctoc -->
74
72
 
@@ -83,7 +83,7 @@ export interface Abstract<T> {
83
83
  prototype: T;
84
84
  }
85
85
  export interface Clonable<T> {
86
- clone(): T;
86
+ clone: () => T;
87
87
  }
88
88
  export type MaybePromise<T> = T | Promise<T>;
89
89
  export type ReducerFunction<TState, TAction> = (state: TState, action: TAction) => TState;
@@ -126,7 +126,7 @@ interface ExceptOptions {
126
126
  Note that any omitted properties in the resulting type will be present in autocomplete as `undefined`.
127
127
 
128
128
  @defaultValue false
129
- */
129
+ */
130
130
  requireExactProps?: boolean;
131
131
  }
132
132
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Configuration values for specifying a type definition
3
3
  */
4
- export type TypeDefinition = {
4
+ export interface TypeDefinition {
5
5
  /**
6
6
  * The file path to the type definition
7
7
  */
@@ -13,7 +13,7 @@ export type TypeDefinition = {
13
13
  * If no value is provided, we will attempt to infer the type definition from the module's `default` export.
14
14
  */
15
15
  name?: string;
16
- };
16
+ }
17
17
  /**
18
18
  * Configuration parameter for the {@link TypeDefinition} utility type
19
19
  *
@@ -4,9 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.FileStatus = void 0;
7
- const FileStatus = exports.FileStatus = {
8
- INITIALIZED: "initialized",
9
- VALIDATED: "validated",
10
- UPLOADED: "uploaded",
11
- FAILED: "failed"
12
- };
7
+ var FileStatus = exports.FileStatus = (i => (i.INITIALIZED = "initialized", i.VALIDATED = "validated", i.UPLOADED = "uploaded", i.FAILED = "failed", i))(FileStatus || {});
@@ -1,11 +1,10 @@
1
1
  import type { ValidationDetails } from "./validations";
2
- export type FileStatus = "initialized" | "validated" | "uploaded" | "failed";
3
- export declare const FileStatus: {
4
- INITIALIZED: FileStatus;
5
- VALIDATED: FileStatus;
6
- UPLOADED: FileStatus;
7
- FAILED: FileStatus;
8
- };
2
+ export declare enum FileStatus {
3
+ INITIALIZED = "initialized",
4
+ VALIDATED = "validated",
5
+ UPLOADED = "uploaded",
6
+ FAILED = "failed"
7
+ }
9
8
  /**
10
9
  * A type that representing a file object.
11
10
  */
@@ -1 +1 @@
1
- export const FileStatus={INITIALIZED:"initialized",VALIDATED:"validated",UPLOADED:"uploaded",FAILED:"failed"};
1
+ export var FileStatus=(i=>(i.INITIALIZED="initialized",i.VALIDATED="validated",i.UPLOADED="uploaded",i.FAILED="failed",i))(FileStatus||{});
@@ -4,10 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.MessageType = void 0;
7
- const MessageType = exports.MessageType = {
8
- HELP: "help",
9
- ERROR: "error",
10
- WARNING: "warning",
11
- INFO: "info",
12
- SUCCESS: "success"
13
- };
7
+ var MessageType = exports.MessageType = (e => (e.HELP = "help", e.ERROR = "error", e.WARNING = "warning", e.INFO = "info", e.SUCCESS = "success", e))(MessageType || {});
@@ -1,11 +1,10 @@
1
- export type MessageType = "help" | "error" | "warning" | "info" | "success";
2
- export declare const MessageType: {
3
- HELP: MessageType;
4
- ERROR: MessageType;
5
- WARNING: MessageType;
6
- INFO: MessageType;
7
- SUCCESS: MessageType;
8
- };
1
+ export declare enum MessageType {
2
+ HELP = "help",
3
+ ERROR = "error",
4
+ WARNING = "warning",
5
+ INFO = "info",
6
+ SUCCESS = "success"
7
+ }
9
8
  export type MessageDetails<TMessageType extends typeof MessageType.HELP | typeof MessageType.ERROR | typeof MessageType.WARNING | typeof MessageType.INFO | typeof MessageType.SUCCESS = typeof MessageType.HELP | typeof MessageType.ERROR | typeof MessageType.WARNING | typeof MessageType.INFO | typeof MessageType.SUCCESS> = {
10
9
  code: string;
11
10
  message?: string;
@@ -1 +1 @@
1
- export const MessageType={HELP:"help",ERROR:"error",WARNING:"warning",INFO:"info",SUCCESS:"success"};
1
+ export var MessageType=(e=>(e.HELP="help",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.SUCCESS="success",e))(MessageType||{});
@@ -1,4 +1,4 @@
1
- export type BatteryManager = {
1
+ export interface BatteryManager {
2
2
  supported: boolean;
3
3
  loading: boolean;
4
4
  level: number | null;
@@ -7,8 +7,8 @@ export type BatteryManager = {
7
7
  dischargingTime: number | null;
8
8
  addEventListener: (type: string, listener: () => void) => void;
9
9
  removeEventListener: (type: string, listener: () => void) => void;
10
- };
11
- export type NetworkState = {
10
+ }
11
+ export interface NetworkState {
12
12
  online: boolean;
13
13
  downlink: number | null;
14
14
  downlinkMax: number | null;
@@ -16,7 +16,7 @@ export type NetworkState = {
16
16
  rtt: number | null;
17
17
  saveData: boolean | null;
18
18
  type: string | null;
19
- };
19
+ }
20
20
  export declare interface NavigatorNetworkInformation {
21
21
  readonly connection?: NetworkInformation;
22
22
  }
@@ -211,7 +211,7 @@ type WithStringKeys<BaseType> = {
211
211
  };
212
212
  /**
213
213
  Perform a `T[U]` operation if `T` supports indexing.
214
- */
214
+ */
215
215
  type UncheckedIndex<T, U extends number | string> = [T] extends [
216
216
  Record<number | string, any>
217
217
  ] ? T[U] : never;