Code Monkey home page Code Monkey logo

Comments (7)

lynxSven avatar lynxSven commented on July 18, 2024 1

Is this merge here the issue? #1165
The removal of the callback? Have the same issue with https://github.com/DefinitelyTyped/DefinitelyTyped/blob/7bd4a02ba62ede50a6198bd5b10712ae1a2fe6c8/types/aws-lambda/handler.d.ts#L84 the aws-lambda handler.
Still has a callback but it doesn't match the new schema

from middy.

lmammino avatar lmammino commented on July 18, 2024 1

I might have a possible solution in #1198. Is there any blessed soul willing to review it? :)

from middy.

willfarrell avatar willfarrell commented on July 18, 2024

Thanks for reporting. Would someone like to put a PR together for this fix?

from middy.

sekhavati avatar sekhavati commented on July 18, 2024

Same issue is reproducible with the following basic Lambda using TypeScript 5.3.3:

import { type Handler } from "aws-lambda";
import middy from "@middy/core";

const baseHandler: Handler = async (event) => {
  console.log("Hello world");
};

export const handler = middy(baseHandler); // <== error here as described in issue thread

from middy.

garysassano avatar garysassano commented on July 18, 2024

I could confirm that my issue #1182 is related to this.

After downgrading to @middy/core 5.2.3, TypeScript stopped throwing the error.

from middy.

cmcnicholas avatar cmcnicholas commented on July 18, 2024

This is really frustrating, writing a proxy function just to massage the types between middy and aws lambda here means me updating a few hundred functions across our services.

#1165 (comment)

from middy.

phmasek avatar phmasek commented on July 18, 2024

Thanks for reporting. Would someone like to put a PR together for this fix?

@willfarrell, how would you like that PR to address and resolve this issue?

from middy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.