Hacker News new | ask | show | jobs
by tarasglek 1332 days ago
Author here.

I just got access to OpenAI codex. I used edit function and asked it to modify the JS hello world, to add typescript annotations.

This is the git commit following that gpt conversation :)

    -export async function onRequest(context) {
    +export async function onRequest(context: {
    +  request: Request;
    +  env: { [key: string]: string };
    +  params: { [key: string]: string };
    +  waitUntil: (promise: Promise<any>) => void;
    +  next: () => Promise<void>;
    +  data: { [key: string]: any };
    +}) {
Not as minimal as the code I posted, but it got me over the stumbling block.
1 comments

lol, I was 50% sure that you were being sarcastic about using GPT-3, hehe

But if anyone is edgy enough to use AI as a shortcut, I guess it would be the guy who did telemetry ingestion on a t2.micro :D

Regards Jonas,