From 62f56766f157efaa06db43c50e9e3b08ec8d682b Mon Sep 17 00:00:00 2001 From: Chris Wilkinson Date: Wed, 20 Dec 2023 10:18:33 +0000 Subject: [PATCH] Make types more explicit --- src/Config.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Config.ts b/src/Config.ts index 834f826..88913f6 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -3,17 +3,17 @@ import { RedisConfig } from './Redis.js' import { SlackChannelConfig } from './Router.js' import { SlackApiConfig } from './Slack.js' -const slackApiConfig = Config.nested( - Config.map(Config.string('ACCESS_TOKEN'), accessToken => ({ accessToken }) satisfies SlackApiConfig), +const slackApiConfig: Config.Config = Config.nested( + Config.map(Config.string('ACCESS_TOKEN'), accessToken => ({ accessToken })), 'SLACK', ) -const slackChannelConfig = Config.nested( - Config.map(Config.string('CHANNEL_ID'), id => ({ id }) satisfies SlackChannelConfig), +const slackChannelConfig: Config.Config = Config.nested( + Config.map(Config.string('CHANNEL_ID'), id => ({ id })), 'SLACK', ) -const redisConfig = Config.nested( +const redisConfig: Config.Config = Config.nested( Config.all({ url: Config.mapAttempt(Config.string('URL'), url => new URL(url)), family: Config.integer('IP_VERSION').pipe(Config.withDefault(4)),