Commit 864e6f5c authored by nanahira's avatar nanahira

use defaultConfig as type

parent 9007f8f4
Pipeline #16875 passed with stages
in 3 minutes and 41 seconds
import yaml from 'yaml'; import yaml from 'yaml';
import * as fs from 'fs'; import * as fs from 'fs';
export interface Config { const defaultConfig = {
host: string;
port: number;
}
const defaultConfig: Config = {
host: '::', host: '::',
port: 3000, port: 3000,
}; };
export type Config = typeof defaultConfig;
export async function loadConfig(): Promise<Config> { export async function loadConfig(): Promise<Config> {
let readConfig: Partial<Config> = {}; let readConfig: Partial<Config> = {};
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment