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

feat: bring typescript (WIP) #63

Closed
wants to merge 8 commits into from
Closed

feat: bring typescript (WIP) #63

wants to merge 8 commits into from

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Jan 20, 2024

WIP

Comment on lines +23 to +30
// src/index.ts
exports.handler = async (event, context) => {
console.log("Welcome to TypeScript", event);
return {
status: 200,
body: JSON.stringify({ message: "Hello, TypeScript" }),
};
};
Copy link
Contributor

@Chriscbr Chriscbr Jan 22, 2024

Choose a reason for hiding this comment

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

Can we add types to this example?

As a user I'd want some kind of information or disclaimer about what the signature of the function should be and whether it's enforced by the Wing library or not, since it might mean the same function I write in TypeScript for a typescript.FunctionHandler can't be reused in a typescript.QueueHandler automatically, or something like that.

typescript/README.md Show resolved Hide resolved
@@ -0,0 +1 @@
export type Handler = (context: any, event: any) => Promise<any>;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This will be generated with types based on lifting

Copy link

Hi,

This PR has not seen activity in 20 days. Therefore, we are marking the PR as stale for now. It will be closed after 7 days.
If you need help with the PR, do not hesitate to reach out in the winglang community slack at winglang.slack.com.
Feel free to re-open this PR when it is still relevant and ready to be worked on again.
Thanks!

@github-actions github-actions bot added the Stale label Feb 14, 2024
@github-actions github-actions bot removed the Stale label Feb 20, 2024
@eladb eladb closed this Mar 1, 2024
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.

4 participants