forked from LaconicNetwork/cosmos-explorer
feat: format code
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import { createI18n } from 'vue-i18n'
|
||||
import { createI18n } from 'vue-i18n';
|
||||
|
||||
const messages = Object.fromEntries(
|
||||
Object.entries(
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
import.meta.glob<{ default: any }>('./locales/*.json', { eager: true }))
|
||||
.map(([key, value]) => [key.slice(10, -5), value.default]),
|
||||
)
|
||||
import.meta.glob<{ default: any }>('./locales/*.json', { eager: true })
|
||||
).map(([key, value]) => [key.slice(10, -5), value.default])
|
||||
);
|
||||
|
||||
export default createI18n({
|
||||
legacy: false,
|
||||
locale: localStorage.getItem('lang') || 'en',
|
||||
fallbackLocale: 'en',
|
||||
messages,
|
||||
})
|
||||
});
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { CosmosRestClient } from '@/libs/client'
|
||||
import 'pinia'
|
||||
import type { Ref } from 'vue'
|
||||
import type { CosmosRestClient } from '@/libs/client';
|
||||
import 'pinia';
|
||||
import type { Ref } from 'vue';
|
||||
|
||||
declare module 'pinia' {
|
||||
export interface PiniaCustomProperties {
|
||||
// by using a setter we can allow both strings and refs
|
||||
set rpc(value: CosmosRestClient | Ref<CosmosRestClient>)
|
||||
get rpc(): CosmosRestClient
|
||||
set rpc(value: CosmosRestClient | Ref<CosmosRestClient>);
|
||||
get rpc(): CosmosRestClient;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user