Olivier Massot 6 månader sedan
förälder
incheckning
93f83565ad
2 ändrade filer med 11 tillägg och 11 borttagningar
  1. 3 3
      types/data.d.ts
  2. 8 8
      types/interfaces.d.ts

+ 3 - 3
types/data.d.ts

@@ -5,17 +5,17 @@ import type {
   Collection as PiniaOrmCollection,
 } from 'pinia-orm'
 
-type AnyJson = Record<string, any>
+type AnyJson = Record<string, unknown>
 
 interface AssociativeArray {
-  [key: string]: any
+  [key: string]: unknown
 }
 
 interface Connector {
   request(
     method: HTTP_METHOD,
     url: string,
-    body: null | any,
+    body: null | unknown,
     params: null | AssociativeArray,
     query: null | AssociativeArray,
   )

+ 8 - 8
types/interfaces.d.ts

@@ -1,7 +1,7 @@
 import type { Store } from 'pinia'
 import type { AnyJson } from '~/types/enum/data'
 import type { ABILITIES, GENDER, TYPE_ALERT } from '~/types/enum/enums'
-import { type ComputedRef, Ref } from '@vue/reactivity'
+import { type _ComputedRef, _Ref } from '@vue/reactivity'
 import type { MenuGroup, MenuItem } from '~/types/layout'
 
 declare module '@vuex-orm/core' {
@@ -17,7 +17,7 @@ interface AbilitiesType {
   /** an array of fields to which user has (or not) access */
   fields?: string[]
   /** an object of conditions which restricts the rule scope */
-  conditions?: any
+  conditions?: Record<string, unknown>
   /** indicates whether rule allows or forbids something */
   inverted?: boolean
   /** message which explains why rule is forbidden */
@@ -29,7 +29,7 @@ interface Alert {
   messages: Array<string>
 }
 
-type AnyStore = Store<any>
+type AnyStore = Store<Record<string, unknown>>
 
 interface EnumChoice {
   value: string
@@ -44,17 +44,17 @@ interface Filter {
 type EnumChoices = Array<EnumChoice>
 
 interface HookProvider {
-  invoke(args: DataProviderArgs): Promise<any>
+  invoke(args: DataProviderArgs): Promise<unknown>
 }
 interface HookPersister {
-  invoke(args: DataPersisterArgs): Promise<any>
+  invoke(args: DataPersisterArgs): Promise<unknown>
 }
 interface HookDeleter {
-  invoke(args: DataDeleterArgs): Promise<any>
+  invoke(args: DataDeleterArgs): Promise<unknown>
 }
 
 interface Processor {
-  process(data: AnyJson): Promise<any>
+  process(data: AnyJson): Promise<unknown>
 }
 
 interface Encoder {
@@ -188,7 +188,7 @@ interface MobytUserStatus {
 interface MercureEntityUpdate {
   iri: string
   operation: 'create' | 'delete' | 'update'
-  data: any
+  data: unknown
 }
 
 interface SseState {