Skip to content

Fixes type returned by index function #11

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

Closed
wants to merge 1 commit into from

Conversation

jonathan-beebe
Copy link

Description

I believe this fixes issue #7. I have been in conversation with the Firebase support team about this. Below is a super simple example of the issue I sent them.

Code sample

Before the following code would throw an error error TS2339: Property 'cleanup' does not exist on type 'FeaturesList'.

import * as functionsTest from 'firebase-functions-test'
const test = functionsTest()
test.cleanup()

Now with the new type TestFeatureList the cleanup function exists on the return type of functionsTest() and the code compiles and runs as expected.


export interface TestFeatureList extends FeaturesList {
cleanup();
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not super excited about the name TestFeatureList. I created it more as a proof of concept for the fix.

@laurenzlong
Copy link
Contributor

Thanks for the proof of concept! I made #14 inspired by your PR. Closing this one in lieu of that one.

laurenzlong added a commit that referenced this pull request Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants