Move the TODO's up

This commit is contained in:
Jos de Jong 2023-09-14 19:32:30 +02:00
parent a4f5af3ea5
commit 1c48e57ea1
1 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,9 @@
* infer TypeScript interfaces from that using infer in template literal types.
*/
// TODO: get generics working
// TODO: how to pass config?
const create = createFactory<{
number: number
bigint: bigint
@ -12,12 +15,11 @@ const create = createFactory<{
any: any
}>()
// These are our string based interfaces, which we can use both in typed-function and in TypeScript:
const Multiply = 'multiply(number,number)=>number'
const Sqrt = 'sqrt(number)=>number'
const Zero = 'zero(number)=>number'
// TODO: get generics working
// TODO: how to pass config?
const createSquare = create(Sqrt, [Multiply, Zero],dep =>
x => dep.multiply(x, x)