bananass
Version:
Baekjoon Framework for JavaScript.🍌
38 lines (29 loc) • 1.28 kB
JavaScript
/**
* @fileoverview `ConfigObjectBrowser` type struct.
*/
// --------------------------------------------------------------------------------
// Import
// --------------------------------------------------------------------------------
import { boolean, enums, object, optional } from 'superstruct';
// --------------------------------------------------------------------------------
// Typedefs
// --------------------------------------------------------------------------------
/**
* @import { ConfigObjectBrowser } from '../../types.js';
* @import { Struct } from 'superstruct';
*/
// --------------------------------------------------------------------------------
// Type Struct
// --------------------------------------------------------------------------------
/**
* `ConfigObjectBrowser` type struct.
* @type {Struct<ConfigObjectBrowser>}
*/ // @ts-expect-error -- TODO: migrate to `zod`
const ConfigObjectBrowser = object({
browser: optional(enums(['chrome', 'edge', 'firefox', 'brave', 'default'])),
secret: optional(boolean()),
});
// --------------------------------------------------------------------------------
// Export
// --------------------------------------------------------------------------------
export default ConfigObjectBrowser;