Skip to content

Instantly share code, notes, and snippets.

@vladima
Created May 2, 2016 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vladima/bed70001a29f2f6dce9a706a71a4618e to your computer and use it in GitHub Desktop.
Save vladima/bed70001a29f2f6dce9a706a71a4618e to your computer and use it in GitHub Desktop.
declare function defineCore(name: string, deps: string[], f: (require, exports,...deps: string[]) => void);
function define(name: string, deps: string[], f: (require, exports,...deps: string[]) => void) {
defineCore(name, deps, (require, exports, deps) => {
require(name);
f(require, exports, deps);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment