@aeriajs/types 0.0.121 → 0.0.122

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.
@@ -6,7 +6,7 @@ export declare const errorSchema: <const TError extends Property>(error: TError)
6
6
  readonly _tag: {
7
7
  readonly const: "Error";
8
8
  };
9
- readonly error: Property;
9
+ readonly error: TError;
10
10
  readonly result: {
11
11
  readonly const: undefined;
12
12
  };
@@ -21,7 +21,7 @@ export declare const resultSchema: <const TResult extends Property>(result: TRes
21
21
  readonly error: {
22
22
  readonly const: undefined;
23
23
  };
24
- readonly result: Property;
24
+ readonly result: TResult;
25
25
  };
26
26
  };
27
27
  export declare const endpointErrorSchema: <const THTTPStatus extends (typeof HTTPStatus)[keyof typeof HTTPStatus][], const TCode extends string[]>(error: {
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.genericEndpointErrorSchema = exports.endpointErrorSchema = exports.resultSchema = exports.errorSchema = void 0;
4
4
  const errorSchema = (error) => {
5
- return {
5
+ const schema = {
6
6
  type: 'object',
7
7
  properties: {
8
8
  _tag: {
@@ -14,10 +14,11 @@ const errorSchema = (error) => {
14
14
  },
15
15
  },
16
16
  };
17
+ return schema;
17
18
  };
18
19
  exports.errorSchema = errorSchema;
19
20
  const resultSchema = (result) => {
20
- return {
21
+ const schema = {
21
22
  type: 'object',
22
23
  properties: {
23
24
  _tag: {
@@ -29,6 +30,7 @@ const resultSchema = (result) => {
29
30
  result,
30
31
  },
31
32
  };
33
+ return schema;
32
34
  };
33
35
  exports.resultSchema = resultSchema;
34
36
  const endpointErrorSchema = (error) => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  export const errorSchema = (error) => {
3
- return {
3
+ const schema = {
4
4
  type: "object",
5
5
  properties: {
6
6
  _tag: {
@@ -12,9 +12,10 @@ export const errorSchema = (error) => {
12
12
  }
13
13
  }
14
14
  };
15
+ return schema;
15
16
  };
16
17
  export const resultSchema = (result) => {
17
- return {
18
+ const schema = {
18
19
  type: "object",
19
20
  properties: {
20
21
  _tag: {
@@ -26,6 +27,7 @@ export const resultSchema = (result) => {
26
27
  result
27
28
  }
28
29
  };
30
+ return schema;
29
31
  };
30
32
  export const endpointErrorSchema = (error) => {
31
33
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/types",
3
- "version": "0.0.121",
3
+ "version": "0.0.122",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",