April 11, 2024, 10:03 p.m. | naugtur

DEV Community dev.to

How can I have one implementation of some complex logic that can call out to sync or async hooks where the async one needs to be properly awaited each time?


I told ChatGPT to teach me that. Below is our (heavily/extensively/drastically/substantially/profoundly redacted and fixed) chat log.



in javascript, I have a function that's accepting a hook as input, runs a few synchronous operations, calls the hook and runs a few synchronous operations on the results. You can represent the operations …

async asynchronous call chatgpt gpt hooks implementation javascript llm logic programming

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Lead GNSS Data Scientist

@ Lurra Systems | Melbourne

Senior Machine Learning Engineer (MLOps)

@ Promaton | Remote, Europe

Business Intelligence Manager

@ Sanofi | Budapest

Principal Engineer, Data (Hybrid)

@ Homebase | Toronto, Ontario, Canada