Skip to content

Commit

Permalink
2023-09-11T16:10:56.021Z
Browse files Browse the repository at this point in the history
  • Loading branch information
mattpocock committed Sep 11, 2023
1 parent b3d82ca commit 9d43713
Show file tree
Hide file tree
Showing 233 changed files with 179 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

// How do we make sure Group stays in sync with programModeEnumMap?
type Group = unknown;

type test = Expect<Equal<Group, "group">>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

// How do we make sure Group stays in sync with programModeEnumMap?
type Group = ProgramModeMap["GROUP"];

type test = Expect<Equal<Group, "group">>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

// How do we make sure PlannedPrograms stays in sync with programModeEnumMap?
type PlannedPrograms = unknown;

type test = Expect<
Equal<PlannedPrograms, "planned1on1" | "plannedSelfDirected">
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

type PlannedPrograms = ProgramModeMap[
| "PLANNED_ONE_ON_ONE"
| "PLANNED_SELF_DIRECTED"];

type test = Expect<
Equal<PlannedPrograms, "planned1on1" | "plannedSelfDirected">
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

type AllPrograms = unknown;

type test = Expect<
Equal<
AllPrograms,
| "group"
| "announcement"
| "1on1"
| "selfDirected"
| "planned1on1"
| "plannedSelfDirected"
>
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type ProgramModeMap = typeof programModeEnumMap;

type AllPrograms = ProgramModeMap[keyof ProgramModeMap];

type test = Expect<
Equal<
AllPrograms,
| "group"
| "announcement"
| "1on1"
| "selfDirected"
| "planned1on1"
| "plannedSelfDirected"
>
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const programModeEnumMap = {
GROUP: "group",
ANNOUNCEMENT: "announcement",
ONE_ON_ONE: "1on1",
SELF_DIRECTED: "selfDirected",
PLANNED_ONE_ON_ONE: "planned1on1",
PLANNED_SELF_DIRECTED: "plannedSelfDirected",
} as const;

type AllPrograms = (typeof programModeEnumMap)[keyof typeof programModeEnumMap];

type test = Expect<
Equal<
AllPrograms,
| "group"
| "announcement"
| "1on1"
| "selfDirected"
| "planned1on1"
| "plannedSelfDirected"
>
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const programModes = [
"group",
"announcement",
"1on1",
"selfDirected",
"planned1on1",
"plannedSelfDirected",
] as const;

type AllPrograms = (typeof programModes)[keyof typeof programModes];

type test = Expect<
Equal<
AllPrograms,
| "group"
| "announcement"
| "1on1"
| "selfDirected"
| "planned1on1"
| "plannedSelfDirected"
>
>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
export const programModes = [
"group",
"announcement",
"1on1",
"selfDirected",
"planned1on1",
"plannedSelfDirected",
] as const;

type AllPrograms = (typeof programModes)[number];

type test = Expect<
Equal<
AllPrograms,
| "group"
| "announcement"
| "1on1"
| "selfDirected"
| "planned1on1"
| "plannedSelfDirected"
>
>;
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit 9d43713

Please sign in to comment.