Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(frontend): add type shims to vue custom globals (#138)

Liu Jib7992532912b
diff --git a/frontend/src/shims-vue-globals.d.ts b/frontend/src/shims-vue-globals.d.ts
new file mode 100644
index 0000000000..a542722aae
--- /dev/null
+++ b/frontend/src/shims-vue-globals.d.ts
@@ -0,0 +1,37 @@
+import type {
+ databaseSlug,
+ dataSourceSlug,
+ environmentName,
+ environmentSlug,
+ humanizeTs,
+ instanceName,
+ instanceSlug,
+ projectName,
+ projectSlug,
+ sizeToFit,
+ urlfy,
+} from "./utils";
+import type { Moment } from "moment";
+import type { isEmpty } from "lodash";
+
+declare module "@vue/runtime-core" {
+ export interface ComponentCustomProperties {
+ window: Window & typeof globalThis;
+ console: Console;
+ moment: Moment;
+ humanizeTs: typeof humanizeTs;
+ isDev: boolean;
+ isRelease: boolean;
+ sizeToFit: typeof sizeToFit;
+ urlfy: typeof urlfy;
+ isEmpty: typeof isEmpty;
+ environmentName: typeof environmentName;
+ environmentSlug: typeof environmentSlug;
+ projectName: typeof projectName;
+ projectSlug: typeof projectSlug;
+ instanceName: typeof instanceName;
+ instanceSlug: typeof instanceSlug;
+ databaseSlug: typeof databaseSlug;
+ dataSourceSlug: typeof dataSourceSlug;
+ }
+}