In the readme, the documentation mentions about enum.
{ enum: [{ className1: { struct: {...} } }, { className2: { struct: {...} } }, ... ] } - an enum. The variants of the enum are described by the className1, className2, etc. fields. The variants are structs.
In the readme, the documentation mentions about enum.
But the current implementation seems not correct. https://github.com/near/borsh-js/blob/93a633dfa76d8577b3cb6f5c1a906dfa3b9b63a2/borsh-ts/deserialize.ts#L82