Set default value for implementation
This commit is contained in:
parent
4ca6532171
commit
406419cac7
|
@ -6,7 +6,7 @@ export type Implementation = "herumi" | "blst-native";
|
||||||
// TODO: Use a Proxy for example to throw an error if it's not initialized yet
|
// TODO: Use a Proxy for example to throw an error if it's not initialized yet
|
||||||
export let bls: IBls;
|
export let bls: IBls;
|
||||||
|
|
||||||
async function getImplementation(impl: Implementation): Promise<IBls> {
|
async function getImplementation(impl: Implementation = "herumi"): Promise<IBls> {
|
||||||
switch (impl) {
|
switch (impl) {
|
||||||
case "herumi":
|
case "herumi":
|
||||||
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
|
|
Reference in New Issue