Skip to content

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

2 participants