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

fix: enhance accuracy of type definitions #379

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

shawnsparks-work
Copy link
Contributor

Issue #, if available:

Description of changes:
Updated type definitions of main package exports to more closely align with what is actually exported and allow common examples to work for consumers using TypeScript.

Examples that used to fail:

import { getCurrentInvoke } from '@vendia/serverless-express';

Simplified example from https://github.com/vendia/serverless-express/blob/mainline/examples/basic-starter-nestjs/src/lambda.ts

import serverlessExpress from '@vendia/serverless-express';
import express from 'express';

exports.handler = (event, context, callback) => {
    const handler = serverlessExpress( { app: express() } );
    return handler(event, context, callback);
};

Checklist

  • Tests have been added and are passing
  • Documentation has been updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@shawnsparks-work
Copy link
Contributor Author

I didn't add any tests because these are only changes to the type definitions and this package doesn't currently have typescript pulled in. I'm open to ideas on how to approach this.

@brett-vendia brett-vendia merged commit 15e11d2 into CodeGenieApp:mainline Mar 3, 2021
@brett-vendia
Copy link
Contributor

Thanks for this!

github-actions bot pushed a commit that referenced this pull request Mar 3, 2021
## [4.3.4](v4.3.3...v4.3.4) (2021-03-03)

### Bug Fixes

* **types:** enhance accuracy of type definitions ([#379](#379)) ([15e11d2](15e11d2))
@github-actions
Copy link

github-actions bot commented Mar 3, 2021

🎉 This PR is included in version 4.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

OneDev0411 added a commit to OneDev0411/serverless-express that referenced this pull request Mar 16, 2023
## [4.3.4](CodeGenieApp/serverless-express@v4.3.3...v4.3.4) (2021-03-03)

### Bug Fixes

* **types:** enhance accuracy of type definitions ([#379](CodeGenieApp/serverless-express#379)) ([15e11d2](CodeGenieApp/serverless-express@15e11d2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants