Skip to content

Commit

Permalink
Make types more explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilkybarkid committed Dec 20, 2023
1 parent 924957a commit 62f5676
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<SlackApiConfig> = 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<SlackChannelConfig> = Config.nested(
Config.map(Config.string('CHANNEL_ID'), id => ({ id })),
'SLACK',
)

const redisConfig = Config.nested(
const redisConfig: Config.Config<RedisConfig> = Config.nested(
Config.all({
url: Config.mapAttempt(Config.string('URL'), url => new URL(url)),
family: Config.integer('IP_VERSION').pipe(Config.withDefault(4)),
Expand Down

0 comments on commit 62f5676

Please sign in to comment.