Allow install of ordinary javascript functions #38

Closed
opened 2022-07-30 15:30:27 +00:00 by glen · 0 comments
Owner

In other words, if file foo.mjs has

export function foo(x,y) {
   // do all of your own type checking, etc, here 
   // and return a useful result
}

and file use.mjs has

import math from './pocomath.mjs'
import * as foo from './foo.mjs'
math.install(foo)
const answer = math.equal(math.foo(6,9), 42)

then it ought to Just Work (tm).

In other words, if file foo.mjs has ``` export function foo(x,y) { // do all of your own type checking, etc, here // and return a useful result } ``` and file use.mjs has ``` import math from './pocomath.mjs' import * as foo from './foo.mjs' math.install(foo) const answer = math.equal(math.foo(6,9), 42) ``` then it ought to Just Work (tm).
glen added the
enhancement
label 2022-07-30 15:30:32 +00:00
glen closed this issue 2022-08-02 07:50:14 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: glen/pocomath#38
No description provided.