@pinia-orm/normalizr-edge 1.8.1-28575962.0696a1a → 1.8.1-28576022.11ee966

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.
Files changed (2) hide show
  1. package/index.d.ts +19 -19
  2. package/package.json +5 -4
package/index.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  declare namespace schema {
2
- export type StrategyFunction<T> = (value: any, parent: any, key: string) => T;
3
- export type SchemaFunction = (value: any, parent: any, key: string) => string;
4
- export type MergeFunction = (entityA: any, entityB: any) => any;
2
+ export type StrategyFunction<T> = (value: any, parent: any, key: string) => T
3
+ export type SchemaFunction = (value: any, parent: any, key: string) => string
4
+ export type MergeFunction = (entityA: any, entityB: any) => any
5
5
 
6
6
  export class Array<T = any> {
7
- constructor(definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
8
- define(definition: Schema): void
7
+ constructor (definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
8
+ define (definition: Schema): void
9
9
  }
10
10
 
11
11
  export interface EntityOptions<T = any> {
@@ -15,26 +15,26 @@ declare namespace schema {
15
15
  }
16
16
 
17
17
  export class Entity<T = any> {
18
- constructor(key: string | symbol, definition?: Schema, options?: EntityOptions<T>)
19
- define(definition: Schema): void
18
+ constructor (key: string | symbol, definition?: Schema, options?: EntityOptions<T>)
19
+ define (definition: Schema): void
20
20
  key: string
21
21
  getId: SchemaFunction
22
22
  _processStrategy: StrategyFunction<T>
23
23
  }
24
24
 
25
25
  export class Object<T = any> {
26
- constructor(definition: SchemaObject<T>)
27
- define(definition: Schema): void
26
+ constructor (definition: SchemaObject<T>)
27
+ define (definition: Schema): void
28
28
  }
29
29
 
30
30
  export class Union<T = any> {
31
- constructor(definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
32
- define(definition: Schema): void
31
+ constructor (definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
32
+ define (definition: Schema): void
33
33
  }
34
34
 
35
35
  export class Values<T = any> {
36
- constructor(definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
37
- define(definition: Schema): void
36
+ constructor (definition: Schema<T>, schemaAttribute?: string | SchemaFunction)
37
+ define (definition: Schema): void
38
38
  }
39
39
  }
40
40
 
@@ -44,10 +44,10 @@ export type Schema<T = any> =
44
44
  | schema.Union<T>
45
45
  | schema.Values<T>
46
46
  | SchemaObject<T>
47
- | SchemaArray<T>;
47
+ | SchemaArray<T>
48
48
 
49
- export type SchemaValueFunction<T> = (t: T) => Schema<T>;
50
- export type SchemaValue<T> = Schema<T> | SchemaValueFunction<T>;
49
+ export type SchemaValueFunction<T> = (t: T) => Schema<T>
50
+ export type SchemaValue<T> = Schema<T> | SchemaValueFunction<T>
51
51
 
52
52
  export interface SchemaObject<T> {
53
53
  [key: string]: SchemaValue<T>
@@ -55,9 +55,9 @@ export interface SchemaObject<T> {
55
55
 
56
56
  export interface SchemaArray<T> extends Array<Schema<T>> {}
57
57
 
58
- export type NormalizedSchema<E, R> = { entities: E, result: R };
58
+ export type NormalizedSchema<E, R> = { entities: E, result: R }
59
59
 
60
- export function normalize<T = any, E = { [key:string]: { [key:string]: T } | undefined}, R = any>(
60
+ export function normalize<T = any, E = { [key: string]: { [key: string]: T } | undefined }, R = any> (
61
61
  data: any,
62
62
  schema: Schema<T>
63
- ): NormalizedSchema<E, R>;
63
+ ): NormalizedSchema<E, R>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinia-orm/normalizr-edge",
3
- "version": "1.8.1-28575962.0696a1a",
3
+ "version": "1.8.1-28576022.11ee966",
4
4
  "description": "Normalizes JSON according to schema for Redux and Flux applications",
5
5
  "bugs": {
6
6
  "url": "https://github.com/CodeDredd/pinia-orm/issues"
@@ -45,9 +45,10 @@
45
45
  ],
46
46
  "license": "MIT",
47
47
  "devDependencies": {
48
+ "@nuxt/eslint-config": "^0.3.10",
48
49
  "@nuxtjs/eslint-config-typescript": "^12.1.0",
49
50
  "@size-limit/preset-small-lib": "^11.0.0",
50
- "eslint": "^9.0.0",
51
+ "eslint": "^9.1.1",
51
52
  "immutable": "^4.3.4",
52
53
  "size-limit": "^11.0.0",
53
54
  "typescript": "^5.2.2",
@@ -66,7 +67,7 @@
66
67
  "size": "size-limit",
67
68
  "flow": "flow",
68
69
  "flow:ci": "flow check",
69
- "lint": "eslint . --ext .js",
70
- "lint:fix": "eslint . --fix --ext .js"
70
+ "lint": "eslint . --cache",
71
+ "lint:fix": "eslint . --cache --fix"
71
72
  }
72
73
  }