Update api and change filter to not be a tagged enum
Signed-off-by: trivernis <trivernis@protonmail.com>pull/4/head
parent
984240a507
commit
1dc17f0aef
@ -0,0 +1,10 @@
|
|||||||
|
export type RustEnum<VariantData> = {
|
||||||
|
[key: string]: VariantData
|
||||||
|
};
|
||||||
|
|
||||||
|
export function createRustEnum<VariantData>(variant: string, data: VariantData): RustEnum<VariantData> {
|
||||||
|
let enumInstance: RustEnum<VariantData> = {};
|
||||||
|
enumInstance[variant] = data;
|
||||||
|
|
||||||
|
return enumInstance;
|
||||||
|
}
|
Loading…
Reference in New Issue