@sparted/shared-library 1.0.28-dev.0 → 1.0.29

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.
@@ -37,12 +37,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
37
37
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
38
38
  step((generator = generator.apply(thisArg, _arguments || [])).next());
39
39
  });
40
- }
41
-
42
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
43
- var e = new Error(message);
44
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
45
- };
40
+ }
46
41
 
47
42
  exports.__awaiter = __awaiter;
48
43
  exports.__rest = __rest;
@@ -1 +1 @@
1
- {"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"_tslib.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- export type ArrayToMapOptions<InitialValue, ModifiedValue = InitialValue> = {
1
+ export declare type ArrayToMapOptions<InitialValue, ModifiedValue = InitialValue> = {
2
2
  /**
3
3
  * Function to return the key used in the map.
4
4
  */
@@ -1,5 +1,5 @@
1
- export type BaseUrlMapperFunc = (instanceId: string) => string;
2
- export type Transformation = {
1
+ export declare type BaseUrlMapperFunc = (instanceId: string) => string;
2
+ export declare type Transformation = {
3
3
  fit?: 'crop' | 'contain';
4
4
  width?: number;
5
5
  height?: number;
@@ -11,26 +11,26 @@ export type Transformation = {
11
11
  compress?: boolean;
12
12
  output?: 'jpeg' | 'png' | 'webp' | 'image';
13
13
  };
14
- export type CdnParams = {
14
+ export declare type CdnParams = {
15
15
  asThumbnail?: boolean;
16
16
  transformation?: Transformation;
17
17
  };
18
- export type TransformationQueries = (params: Transformation) => string;
19
- type TwicpicsOutputTransformation = ['output', Transformation['output']];
20
- type TwicpicsFitTransformation = ['cover' | 'crop' | 'contain', string] | ['quality', number];
21
- export type TwicpicsTransformation = TwicpicsOutputTransformation | TwicpicsFitTransformation;
22
- export type TwicpicsTransformationChain = TwicpicsTransformation[];
23
- export type GetCdnUrl = (instanceId: string, path: `/${string}`, params?: CdnParams) => string;
24
- export type GetCdnFromS3Url = (url: string, params?: CdnParams) => string;
25
- export type InstanceMapper = (instanceId: string) => string;
26
- export type CdnType = 'twicpics' | 'imgix';
27
- export type CdnConfig<T extends CdnType> = {
18
+ export declare type TransformationQueries = (params: Transformation) => string;
19
+ declare type TwicpicsOutputTransformation = ['output', Transformation['output']];
20
+ declare type TwicpicsFitTransformation = ['cover' | 'crop' | 'contain', string] | ['quality', number];
21
+ export declare type TwicpicsTransformation = TwicpicsOutputTransformation | TwicpicsFitTransformation;
22
+ export declare type TwicpicsTransformationChain = TwicpicsTransformation[];
23
+ export declare type GetCdnUrl = (instanceId: string, path: `/${string}`, params?: CdnParams) => string;
24
+ export declare type GetCdnFromS3Url = (url: string, params?: CdnParams) => string;
25
+ export declare type InstanceMapper = (instanceId: string) => string;
26
+ export declare type CdnType = 'twicpics' | 'imgix';
27
+ export declare type CdnConfig<T extends CdnType> = {
28
28
  type: T;
29
29
  domain: `https://${string}`;
30
30
  instanceMapper: InstanceMapper;
31
31
  cacheVersion?: T extends 'twicpics' ? number : undefined;
32
32
  };
33
- export type Cdn = {
33
+ export declare type Cdn = {
34
34
  getCdnUrl: GetCdnUrl;
35
35
  getCdnFromS3Url: GetCdnFromS3Url;
36
36
  };
@@ -1,4 +1,4 @@
1
- type ExtractInfoFromUrl = (url: string) => {
1
+ declare type ExtractInfoFromUrl = (url: string) => {
2
2
  instanceId: string;
3
3
  path: `/${string}`;
4
4
  } | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { GetCdnFromS3Url, GetCdnUrl } from '../types';
2
- type FactoryConfig = {
2
+ declare type FactoryConfig = {
3
3
  getCdnUrl: GetCdnUrl;
4
4
  };
5
5
  export declare function getCdnFromS3UrlFactory(config: FactoryConfig): GetCdnFromS3Url;
@@ -1,5 +1,5 @@
1
1
  import type { GetCdnUrl, InstanceMapper, TransformationQueries } from '../types';
2
- type FactoryConfig = {
2
+ declare type FactoryConfig = {
3
3
  domain: `https://${string}`;
4
4
  instanceMapper: InstanceMapper;
5
5
  transformationQueries: TransformationQueries;
@@ -5,9 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const twicpicsTransformationChainToString = (transformationChain) => {
6
6
  if (transformationChain.length === 0)
7
7
  return '';
8
- const transformations = transformationChain
9
- .map(([key, value]) => `${key}=${value}`)
10
- .join('/');
8
+ const transformations = transformationChain.map(([key, value]) => `${key}=${value}`).join('/');
11
9
  return `twic=v1/${transformations}`;
12
10
  };
13
11
 
@@ -1 +1 @@
1
- {"version":3,"file":"twicpics-transformations.util.js","sources":["../../../src/cdn/utils/twicpics-transformations.util.ts"],"sourcesContent":["import { TwicpicsTransformationChain } from '../types';\n\nexport const twicpicsTransformationChainToString = (\n transformationChain: TwicpicsTransformationChain,\n): string => {\n if (transformationChain.length === 0) return '';\n\n const transformations = transformationChain\n .map(([key, value]) => `${key}=${value}`)\n .join('/');\n\n return `twic=v1/${transformations}`;\n};\n"],"names":[],"mappings":";;;;AAEa,MAAA,mCAAmC,GAAG,CACjD,mBAAgD,KACtC;AACV,IAAA,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE,CAAC;IAEhD,MAAM,eAAe,GAAG,mBAAmB;AACxC,SAAA,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAG,EAAA,GAAG,CAAI,CAAA,EAAA,KAAK,EAAE,CAAC;SACxC,IAAI,CAAC,GAAG,CAAC,CAAC;IAEb,OAAO,CAAA,QAAA,EAAW,eAAe,CAAA,CAAE,CAAC;AACtC;;;;"}
1
+ {"version":3,"file":"twicpics-transformations.util.js","sources":["../../../src/cdn/utils/twicpics-transformations.util.ts"],"sourcesContent":["import { TwicpicsTransformationChain } from '../types';\n\nexport const twicpicsTransformationChainToString = (transformationChain: TwicpicsTransformationChain): string => {\n if (transformationChain.length === 0) return '';\n\n const transformations = transformationChain.map(([key, value]) => `${key}=${value}`).join('/');\n\n return `twic=v1/${transformations}`;\n};\n"],"names":[],"mappings":";;;;AAEa,MAAA,mCAAmC,GAAG,CAAC,mBAAgD,KAAY;AAC9G,IAAA,IAAI,mBAAmB,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,EAAE,CAAC;IAEhD,MAAM,eAAe,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE/F,OAAO,CAAA,QAAA,EAAW,eAAe,CAAA,CAAE,CAAC;AACtC;;;;"}
@@ -0,0 +1 @@
1
+ export declare const getContrastColor: (bgColor: string, lightColor?: string, darkColor?: string) => string;
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const DEFAULT_LIGHT_COLOR = '#FFFFFF';
6
+ const DEFAULT_DARK_COLOR = '#000000';
7
+ // Based on https://stackoverflow.com/questions/11867545/change-text-color-based-on-brightness-of-the-covered-background-area
8
+ const getContrastColor = (bgColor, lightColor = DEFAULT_LIGHT_COLOR, darkColor = DEFAULT_DARK_COLOR) => {
9
+ const color = bgColor.charAt(0) === '#' ? bgColor.substring(1, 7) : bgColor;
10
+ if (color.length !== 6) {
11
+ throw new Error(`Invalid HEX color "${bgColor}" in sparted mail manager.`);
12
+ }
13
+ const r = parseInt(color.substring(0, 2), 16); // hexToR
14
+ const g = parseInt(color.substring(2, 4), 16); // hexToG
15
+ const b = parseInt(color.substring(4, 6), 16); // hexToB
16
+ // Values from https://www.w3.org/TR/AERT/#color-contrast
17
+ return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? darkColor : lightColor;
18
+ };
19
+
20
+ exports.getContrastColor = getContrastColor;
21
+ //# sourceMappingURL=get-contrast-color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-contrast-color.js","sources":["../../src/color/get-contrast-color.ts"],"sourcesContent":["const DEFAULT_LIGHT_COLOR = '#FFFFFF';\nconst DEFAULT_DARK_COLOR = '#000000';\n\n// Based on https://stackoverflow.com/questions/11867545/change-text-color-based-on-brightness-of-the-covered-background-area\nexport const getContrastColor = (bgColor: string, lightColor: string = DEFAULT_LIGHT_COLOR, darkColor: string = DEFAULT_DARK_COLOR): string => {\n const color = bgColor.charAt(0) === '#' ? bgColor.substring(1, 7) : bgColor;\n\n if (color.length !== 6) {\n throw new Error(`Invalid HEX color \"${bgColor}\" in sparted mail manager.`);\n }\n\n const r = parseInt(color.substring(0, 2), 16); // hexToR\n const g = parseInt(color.substring(2, 4), 16); // hexToG\n const b = parseInt(color.substring(4, 6), 16); // hexToB\n\n // Values from https://www.w3.org/TR/AERT/#color-contrast\n return r * 0.299 + g * 0.587 + b * 0.114 > 186 ? darkColor : lightColor;\n};\n"],"names":[],"mappings":";;;;AAAA,MAAM,mBAAmB,GAAG,SAAS,CAAC;AACtC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAErC;AACO,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAE,UAAA,GAAqB,mBAAmB,EAAE,SAAoB,GAAA,kBAAkB,KAAY;IAC5I,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC;AAE5E,IAAA,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AACtB,QAAA,MAAM,IAAI,KAAK,CAAC,sBAAsB,OAAO,CAAA,0BAAA,CAA4B,CAAC,CAAC;AAC5E,KAAA;AAED,IAAA,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9C,IAAA,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAC9C,IAAA,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;;IAG9C,OAAO,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,KAAK,GAAG,GAAG,GAAG,SAAS,GAAG,UAAU,CAAC;AAC1E;;;;"}
@@ -0,0 +1 @@
1
+ export * from './get-contrast-color';
package/color/index.js ADDED
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var getContrastColor = require('./get-contrast-color.js');
6
+
7
+
8
+
9
+ exports.getContrastColor = getContrastColor.getContrastColor;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
package/fp/run-while.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type RunWhileConfig<T> = {
1
+ export declare type RunWhileConfig<T> = {
2
2
  /**
3
3
  * Return a boolean to keep running the callback or not.
4
4
  */
@@ -17,7 +17,7 @@ export type RunWhileConfig<T> = {
17
17
  */
18
18
  initialValue: T;
19
19
  };
20
- export type RunWhileFn = <T>(config: RunWhileConfig<T>) => {
20
+ export declare type RunWhileFn = <T>(config: RunWhileConfig<T>) => {
21
21
  /**
22
22
  * The callback last result.
23
23
  */
@@ -1,5 +1,5 @@
1
1
  import { SearchObject } from '../types';
2
- export type EncodingConfig = {
2
+ export declare type EncodingConfig = {
3
3
  keyValueDelimiter: string;
4
4
  pairDelimiter: string;
5
5
  };
@@ -1,4 +1,4 @@
1
- export type RequestInitWithTimeout = RequestInit & {
1
+ export declare type RequestInitWithTimeout = RequestInit & {
2
2
  timeout?: number;
3
3
  };
4
4
  /**
package/index.d.ts CHANGED
@@ -12,3 +12,4 @@ export * from './predicates';
12
12
  export * from './promise';
13
13
  export * from './string';
14
14
  export * from './types';
15
+ export * from './color';
package/index.js CHANGED
@@ -37,6 +37,7 @@ var executeWithDelay = require('./promise/execute-with-delay.js');
37
37
  var delay = require('./promise/delay.js');
38
38
  var replaceInTemplate = require('./string/replace-in-template.js');
39
39
  var isStringLengthWithinRange = require('./string/is-string-length-within-range.js');
40
+ var getContrastColor = require('./color/get-contrast-color.js');
40
41
 
41
42
 
42
43
 
@@ -82,4 +83,5 @@ exports.executeWithDelay = executeWithDelay.executeWithDelay;
82
83
  exports.delay = delay.delay;
83
84
  exports.replaceInTemplate = replaceInTemplate.replaceInTemplate;
84
85
  exports.isStringLengthWithinRange = isStringLengthWithinRange.isStringLengthWithinRange;
86
+ exports.getContrastColor = getContrastColor.getContrastColor;
85
87
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,21 +1,21 @@
1
1
  import { LinkedListFormat, LinkedListItem, SimpleLinkedList } from './type';
2
- export type WalkConfig<T extends LinkedListItem, Result> = {
2
+ export declare type WalkConfig<T extends LinkedListItem, Result> = {
3
3
  startId: string | null;
4
4
  items: Record<string, T>;
5
5
  initValue: Result;
6
6
  };
7
- type WalkCallbackResult<R> = {
7
+ declare type WalkCallbackResult<R> = {
8
8
  result: R;
9
9
  control?: {
10
10
  stop?: boolean;
11
11
  };
12
12
  };
13
- export type WalkCallback<Item, Result> = (accumulator: Result, current: Item) => WalkCallbackResult<Result>;
13
+ export declare type WalkCallback<Item, Result> = (accumulator: Result, current: Item) => WalkCallbackResult<Result>;
14
14
  export declare const walkListItemRecord: <T extends LinkedListItem, Result>(callback: WalkCallback<T, Result>, config: WalkConfig<T, Result>) => Result;
15
15
  export declare const findPreviousId: <T extends LinkedListItem>(id: string | null, list: SimpleLinkedList<T>) => string | null;
16
16
  export declare const assertItemCompatibility: <T extends LinkedListItem>(item: T, format: LinkedListFormat | null) => void;
17
17
  export declare const assertPresence: (id: string | null | undefined, items: Record<string, unknown>) => void;
18
- type PositionAssertionConfig = {
18
+ declare type PositionAssertionConfig = {
19
19
  previousId: string | null;
20
20
  list: SimpleLinkedList<LinkedListItem>;
21
21
  };
@@ -1,23 +1,23 @@
1
- export type LinkedListItem = {
1
+ export declare type LinkedListItem = {
2
2
  id: string;
3
3
  nextId: string | null;
4
4
  previousId?: string | null;
5
5
  };
6
- export type SimpleLinkedList<T extends LinkedListItem> = {
6
+ export declare type SimpleLinkedList<T extends LinkedListItem> = {
7
7
  headId: string | null;
8
8
  items: {
9
9
  [id: string]: T;
10
10
  };
11
11
  };
12
- export type ReduceCallback<Item, Result> = (accumulator: Result, current: Item) => Result;
13
- export type ItemPredicate<Item> = (item: Item) => boolean;
14
- export type LinkedListFormat = 'double' | 'single';
15
- export type ManipulationConfig<T extends LinkedListItem> = {
12
+ export declare type ReduceCallback<Item, Result> = (accumulator: Result, current: Item) => Result;
13
+ export declare type ItemPredicate<Item> = (item: Item) => boolean;
14
+ export declare type LinkedListFormat = 'double' | 'single';
15
+ export declare type ManipulationConfig<T extends LinkedListItem> = {
16
16
  format: LinkedListFormat | null;
17
17
  list: SimpleLinkedList<T>;
18
18
  factory: (list: SimpleLinkedList<T>) => LinkedList<T>;
19
19
  };
20
- export type LinkedList<T extends LinkedListItem> = {
20
+ export declare type LinkedList<T extends LinkedListItem> = {
21
21
  readonly head: T | null;
22
22
  readonly items: {
23
23
  [id: string]: T;
@@ -1,2 +1,2 @@
1
- export type RangeArray = [number, number];
1
+ export declare type RangeArray = [number, number];
2
2
  export declare const interpolate: (num: number, inputRange: RangeArray, outputRange: RangeArray) => number;
@@ -1,4 +1,4 @@
1
- export type NumberRange = {
1
+ export declare type NumberRange = {
2
2
  min: number;
3
3
  max: number;
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparted/shared-library",
3
- "version": "1.0.28-dev.0",
3
+ "version": "1.0.29",
4
4
  "repository": "git@github.com:Sparted/shared-library.git",
5
5
  "author": {
6
6
  "name": "Sparted",
@@ -1,4 +1,4 @@
1
- export type ExecutionConfig<Default> = {
1
+ export declare type ExecutionConfig<Default> = {
2
2
  execute: boolean;
3
3
  defaultValue: Default;
4
4
  };
@@ -1,4 +1,4 @@
1
- export type ReplaceConfig = {
1
+ export declare type ReplaceConfig = {
2
2
  delimiter: string | {
3
3
  left: string;
4
4
  right: string;
@@ -1,4 +1,4 @@
1
- export type MonthLocaleLabels = [
1
+ export declare type MonthLocaleLabels = [
2
2
  string,
3
3
  string,
4
4
  string,
@@ -12,7 +12,7 @@ export type MonthLocaleLabels = [
12
12
  string,
13
13
  string
14
14
  ];
15
- export type DiffTemplate = {
15
+ export declare type DiffTemplate = {
16
16
  /**
17
17
  * e.g.: ("%time% %timelabel% blabla")
18
18
  */
@@ -1 +1 @@
1
- export type GenericFunction<TS extends any[], R> = (...args: TS) => R;
1
+ export declare type GenericFunction<TS extends any[], R> = (...args: TS) => R;
@@ -1,8 +1,8 @@
1
- export type Primitive = string | number | boolean;
2
- export type Nullable<T> = T | null;
3
- export type ValueType = Primitive | null | void | Array<any> | ReadonlyArray<any>;
4
- export type ValueOf<T> = T[keyof T];
5
- export type Range = {
1
+ export declare type Primitive = string | number | boolean;
2
+ export declare type Nullable<T> = T | null;
3
+ export declare type ValueType = Primitive | null | void | Array<any> | ReadonlyArray<any>;
4
+ export declare type ValueOf<T> = T[keyof T];
5
+ export declare type Range = {
6
6
  min: number;
7
7
  max: number;
8
8
  };
package/types/object.d.ts CHANGED
@@ -1,30 +1,30 @@
1
1
  import { ValueType } from './general';
2
- export type NonMethodKeys<T> = {
2
+ export declare type NonMethodKeys<T> = {
3
3
  [P in keyof T]: T[P] extends Function ? never : P;
4
4
  }[keyof T];
5
- export type Attributes<T> = {
5
+ export declare type Attributes<T> = {
6
6
  [K in NonMethodKeys<T>]: T[K];
7
7
  };
8
- export type PartialAttributes<T> = {
8
+ export declare type PartialAttributes<T> = {
9
9
  [K in NonMethodKeys<T>]?: T[K];
10
10
  };
11
- export type MethodKeys<T> = {
11
+ export declare type MethodKeys<T> = {
12
12
  [P in keyof T]: T[P] extends Function ? P : never;
13
13
  }[keyof T];
14
- export type Methods<T> = {
14
+ export declare type Methods<T> = {
15
15
  [K in MethodKeys<T>]: T[K];
16
16
  };
17
- export type PartialMethods<T> = {
17
+ export declare type PartialMethods<T> = {
18
18
  [K in MethodKeys<T>]?: T[K];
19
19
  };
20
- export type ClassType<T, Params extends Array<any> = Array<any>> = {
20
+ export declare type ClassType<T, Params extends Array<any> = Array<any>> = {
21
21
  new (...args: Params): T;
22
22
  };
23
- export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
24
- export type DeepPartial<T> = T extends ValueType ? T : {
23
+ export declare type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
24
+ export declare type DeepPartial<T> = T extends ValueType ? T : {
25
25
  [P in keyof T]?: DeepPartial<T[P]>;
26
26
  };
27
- export type Intersection<A, B> = {
27
+ export declare type Intersection<A, B> = {
28
28
  [P in keyof A & keyof B]: A[P] | B[P];
29
29
  };
30
30
  /**
@@ -32,4 +32,4 @@ export type Intersection<A, B> = {
32
32
  * "widen" the type by accident if it is a generic that should be inferred
33
33
  * from elsewhere.
34
34
  */
35
- export type NoInfer<T> = [T][T extends any ? 0 : never];
35
+ export declare type NoInfer<T> = [T][T extends any ? 0 : never];
package/types/search.d.ts CHANGED
@@ -1,20 +1,20 @@
1
- export type SearchSortBy = string;
2
- export type SearchSortOrder = 'asc' | 'desc';
3
- export type SearchSort = {
1
+ export declare type SearchSortBy = string;
2
+ export declare type SearchSortOrder = 'asc' | 'desc';
3
+ export declare type SearchSort = {
4
4
  [by: SearchSortBy]: SearchSortOrder;
5
5
  };
6
- export type SearchQueryProperty = string;
7
- export type SearchQueryValue = string;
8
- export type SearchQuery = {
6
+ export declare type SearchQueryProperty = string;
7
+ export declare type SearchQueryValue = string;
8
+ export declare type SearchQuery = {
9
9
  [property: SearchQueryProperty]: SearchQueryValue;
10
10
  };
11
- export type SearchObject = {
11
+ export declare type SearchObject = {
12
12
  offset: number;
13
13
  limit: number;
14
14
  sort?: Record<string, SearchSortOrder>;
15
15
  query?: SearchQuery;
16
16
  };
17
- export type SearchResponse<T> = {
17
+ export declare type SearchResponse<T> = {
18
18
  items: ReadonlyArray<T>;
19
19
  offset: number;
20
20
  limit: number;