[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert FirebaseError to TypeScript #1521

Merged
merged 16 commits into from
Jul 23, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Describe complex typings so it is more understandable
  • Loading branch information
merlinnot committed Jul 23, 2019
commit b1bbe9b95279a7fa89dccb5fb3e4a87faf22cc2c
11 changes: 10 additions & 1 deletion src/test/error.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@ describe("error", () => {
});

it("should persist all options", () => {
const allOptions: Required<ConstructorParameters<typeof FirebaseError>[1]> = {
/**
* All possible options that might be provided to `FirebaseError`.
*/
type FirebaseErrorOptions = ConstructorParameters<typeof FirebaseError>[1];

/*
* The following `Required` ensures all options are defined, so the test
* covers all properties.
*/
const allOptions: Required<FirebaseErrorOptions> = {
children: ["test-child-1", "test-child-2"],
context: "test-context",
exit: 123,
Expand Down