This repository has been archived by the owner on Sep 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove type assertions from logger (#384)
fix(log): remove type assertions extract common team styles out of team ones extract `getTeamSubscriptions`, which is type-safe
- Loading branch information
Showing
5 changed files
with
45 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import type { teamStyles } from '../teamStyles'; | ||
import type { commonStyle, teamStyles } from '../teamStyles'; | ||
|
||
export type Teams<K extends string> = Record<K, Record<string, string>>; | ||
export type LogCall = (team: TeamName, ...args: unknown[]) => void; | ||
export type TeamSubscription = (arg: TeamName) => void; | ||
export type TeamStyle = keyof typeof teamStyles; | ||
export type TeamName = Exclude<TeamStyle, 'common'>; | ||
export type TeamStyle = TeamName | keyof typeof commonStyle; | ||
export type TeamName = keyof typeof teamStyles; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters