mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add new Grist login page
Summary: Adds a new Grist login page to the login app, and replaces the server-side Cognito Google Sign-In flow with Google's own OAuth flow. Test Plan: Browser and server tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3332
This commit is contained in:
@@ -921,3 +921,12 @@ export function getDistinctValues<T>(values: readonly T[], count: number = Infin
|
||||
}
|
||||
return distinct;
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that variable `name` has a non-nullish `value`.
|
||||
*/
|
||||
export function assertIsDefined<T>(name: string, value: T): asserts value is NonNullable<T> {
|
||||
if (value === undefined || value === null) {
|
||||
throw new Error(`Expected '${name}' to be defined, but received ${value}`);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user