@beslogic/utils
v1.4.0
Published
Library of utils for javascript/typescript
Maintainers
Readme
@beslogic/utils
Contains javascript class/functions/etc and Typescript types that could be useful in any projects.
Out-of-the-box Module Augmentations
For additional typing convenience and type-safety, we provide some opt-in out-of-the-box TypeScript Module Augmentation for existing types.
To opt-in, simply add import "@beslogic/utils/types/augmentation" or /// <reference types="@beslogic/utils/types/augmentation" /> to any TypeScript (.ts or .d.ts) file included by your TSConfig.
Vite
If using Vite, You should add the following to vite-end.d.ts:
// https://vite.dev/guide/env-and-mode.html#intellisense-for-typescript
/// <reference types="vite/client" />
interface ViteTypeOptions {
// By adding this line, you can make the type of ImportMetaEnv strict to disallow unknown keys.
strictImportMetaEnv: unknown
}
interface ImportMetaEnv {
// Add your .env VITE_* variables here
readonly VITE_API_URL: string
}