Skip to content

Instantly share code, notes, and snippets.

@kurt-liao
Created July 20, 2022 13:21
Show Gist options
  • Save kurt-liao/e2c739a0fbe5a2199c4612a0a4211b36 to your computer and use it in GitHub Desktop.
Save kurt-liao/e2c739a0fbe5a2199c4612a0a4211b36 to your computer and use it in GitHub Desktop.
// usage.mjs
import promise, { output } from "./awaiting.mjs";
export function outputPlusValue(value) { return output + value }
promise.then(() => {
console.log(outputPlusValue(100));
setTimeout(() => console.log(outputPlusValue(100), 1000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment