Type Alias SecureLightSwitch

SecureLightSwitch: {
    appSecret: string;
    secure?: true;
} | {
    appSecret?: never;
    secure: false;
}

This switch allows TypeScript to cry if appSecret is not provided when secure is true.