Skip to content
Commit Detail

Commit de1774b

Author
Hood Chatham <roberthoodchatham@gmail.com> 2024-11-15 12:19:07 +0100
Parents
23cce68
Tree
b1040e1
Add addBuiltinModule from an instance of a template type

We can use `addBuiltinModule<T>(spec, type)` to add a builtin module, but it
imposes the restriction that the instance of `T` we want needs to be made with a
zero argument constructor. In a lot of use cases, we want to create it with a
static method or a constructor that takes args. So this adds a new overload that
takes the object we want to use as the builtinModule. The original version is
then implemented in terms of the new version.

Files changed

2 files changed~2 modified