Rewrite type definitions.
This commit is contained in:
parent
fbd8de8b03
commit
e266e9dd7b
|
@ -1,36 +1,8 @@
|
||||||
import type {html} from 'htm/preact';
|
// Export something so TypeScript doesn't see this file as an ambient module.
|
||||||
|
export {};
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
// See Vite documentation for `import.meta.env` usage.
|
const $browser: "chromium" | "firefox";
|
||||||
// https://vitejs.dev/guide/env-and-mode.html
|
|
||||||
|
|
||||||
interface ImportMeta {
|
|
||||||
readonly env: ImportMetaEnv;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImportMetaEnv {
|
|
||||||
readonly BASE_URL: string;
|
|
||||||
readonly DEV: boolean;
|
|
||||||
readonly MODE: string;
|
|
||||||
readonly PROD: boolean;
|
|
||||||
readonly VITE_BROWSER: 'chromium' | 'firefox';
|
|
||||||
}
|
|
||||||
|
|
||||||
type HtmComponent = ReturnType<typeof html>;
|
|
||||||
|
|
||||||
namespace Queue {
|
|
||||||
type Item = {
|
|
||||||
added: Date;
|
|
||||||
id: number;
|
|
||||||
sortIndex: number;
|
|
||||||
text: string;
|
|
||||||
url: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
type MoveDirection = 'up' | 'down';
|
|
||||||
}
|
|
||||||
|
|
||||||
const $browser: 'chromium' | 'firefox';
|
|
||||||
const $dev: boolean;
|
const $dev: boolean;
|
||||||
const $test: boolean;
|
const $test: boolean;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue